]>
Commit | Line | Data |
---|---|---|
7ac48069 | 1 | /* $Id$ |
d33e787c | 2 | * |
c44ddfa7 | 3 | * This file defines the query dispatch table |
d33e787c | 4 | * |
7ac48069 | 5 | * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology. |
c801de4c | 6 | * For copying and distribution information, please see the file |
7 | * <mit-copyright.h>. | |
d33e787c | 8 | */ |
9 | ||
c801de4c | 10 | #include <mit-copyright.h> |
03c05291 | 11 | #include "mr_server.h" |
d33e787c | 12 | #include "query.h" |
d33e787c | 13 | |
7ac48069 | 14 | #include "mr_et.h" |
d33e787c | 15 | |
d33e787c | 16 | /* VALOBJS |
17 | * These are commonly used validation objects, defined here so that they | |
18 | * can be shared. | |
19 | */ | |
20 | ||
d33e787c | 21 | static struct valobj VOuser0[] = { |
e2b8245f | 22 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
d33e787c | 23 | }; |
24 | ||
25 | static struct valobj VOmach0[] = { | |
e2b8245f | 26 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
d33e787c | 27 | }; |
28 | ||
29 | static struct valobj VOclu0[] = { | |
e2b8245f | 30 | {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER}, |
d33e787c | 31 | }; |
32 | ||
d1b3a4bf | 33 | static struct valobj VOsnet0[] = { |
34 | {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
35 | }; | |
36 | ||
d33e787c | 37 | static struct valobj VOlist0[] = { |
e2b8245f | 38 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
d33e787c | 39 | }; |
40 | ||
d1b3a4bf | 41 | static struct valobj VOfilesys0[] = { |
42 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, | |
43 | }; | |
44 | ||
2fb668b0 | 45 | static struct valobj VOcon0[] = { |
73155abd | 46 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, |
2fb668b0 | 47 | }; |
48 | ||
f802fd0d | 49 | static struct valobj VOnum0[] = { |
50 | {V_NUM, 0}, | |
d33e787c | 51 | }; |
52 | ||
d33e787c | 53 | /* Validations |
54 | * Commonly used validation records defined here so that they may | |
55 | * be shared. | |
56 | */ | |
57 | ||
58 | static struct validate VDmach = { VOmach0, 1 }; | |
263a36d4 | 59 | |
29028043 | 60 | static struct validate VDfix_modby = { |
61 | 0, | |
62 | 0, | |
0c345c78 | 63 | 0, |
64 | 0, | |
65 | 0, | |
66 | 0, | |
67 | 0, | |
68 | 0, | |
69 | followup_fix_modby, | |
d33e787c | 70 | }; |
71 | ||
d33e787c | 72 | /* Query data */ |
73 | ||
186dd63b | 74 | static char *galo2_fields[] = { |
e2b8245f | 75 | "login", "unix_uid", "shell", "last", "first", "middle", |
d33e787c | 76 | }; |
77 | ||
186dd63b | 78 | static char *galo_fields[] = { |
79 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
80 | }; | |
81 | ||
82 | static char *gual2_fields[] = { | |
e2b8245f | 83 | "login", |
84 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 85 | "clearid", "class", "comments", "signature", "secure", |
86 | "modtime", "modby", "modwith", | |
4ffa124a | 87 | }; |
0c345c78 | 88 | |
aec7d432 | 89 | static char *gual3_fields[] = { |
90 | "login", | |
91 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
92 | "status", "clearid", "class", "comments", "signature", "secure", "modtime", | |
93 | "modby", "modwith", "created", "creator", | |
94 | }; | |
95 | ||
186dd63b | 96 | static char *gual_fields[] = { |
97 | "login", | |
aec7d432 | 98 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", |
186dd63b | 99 | "status", "clearid", "class", "comments", "signature", "secure", |
aec7d432 | 100 | "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created", |
101 | "creator", | |
186dd63b | 102 | }; |
103 | ||
104 | static char *gubl2_fields[] = { | |
e2b8245f | 105 | "login", |
106 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 107 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 108 | }; |
109 | ||
186dd63b | 110 | static char *gubl_fields[] = { |
111 | "login", | |
112 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
3b634eb3 | 113 | "status", "clearid", "class", "modtime", "modby", "modwith", "created", |
114 | "creator", | |
186dd63b | 115 | }; |
116 | ||
9db6a21e | 117 | static struct validate gubl2_validate = |
118 | { | |
119 | 0, | |
120 | 0, | |
121 | 0, | |
122 | 0, | |
123 | 0, | |
124 | 0, | |
125 | access_login, | |
126 | 0, | |
127 | followup_fix_modby, | |
128 | }; | |
129 | ||
5eaef520 | 130 | static struct validate gubl_validate = |
d33e787c | 131 | { |
263a36d4 | 132 | 0, |
133 | 0, | |
d33e787c | 134 | 0, |
135 | 0, | |
136 | 0, | |
137 | 0, | |
138 | access_login, | |
139 | 0, | |
3b634eb3 | 140 | followup_get_user, |
d33e787c | 141 | }; |
142 | ||
186dd63b | 143 | static char *guau2_fields[] = { |
e2b8245f | 144 | "unix_uid", |
145 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 146 | "clearid", "class", "comments", "signature", "secure", |
147 | "modtime", "modby", "modwith", | |
4ffa124a | 148 | }; |
0c345c78 | 149 | |
aec7d432 | 150 | static char *guau3_fields[] = { |
186dd63b | 151 | "unix_uid", |
152 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
153 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 154 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 155 | }; |
156 | ||
aec7d432 | 157 | static char *guau_fields[] = { |
158 | "unix_uid", | |
159 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
160 | "status", "clearid", "class", "comments", "signature", "secure", | |
161 | "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created", | |
162 | "creator", | |
163 | }; | |
164 | ||
186dd63b | 165 | static char *guan2_fields[] = { |
e2b8245f | 166 | "first", "last", |
167 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 168 | "clearid", "class", "comments", "signature", "secure", |
169 | "modtime", "modby", "modwith", | |
4ffa124a | 170 | }; |
0c345c78 | 171 | |
aec7d432 | 172 | static char *guan3_fields[] = { |
186dd63b | 173 | "first", "last", |
174 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
175 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 176 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 177 | }; |
178 | ||
aec7d432 | 179 | static char *guan_fields[] = { |
180 | "first", "last", | |
181 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
182 | "status", "clearid", "class", "comments", "signature", "secure", | |
183 | "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created", | |
184 | "creator", | |
185 | }; | |
186 | ||
9db6a21e | 187 | static struct validate guan2_validate = |
188 | { | |
189 | 0, | |
190 | 0, | |
191 | 0, | |
192 | 0, | |
193 | 0, | |
194 | 0, | |
195 | 0, | |
196 | 0, | |
197 | followup_fix_modby, | |
198 | }; | |
199 | ||
5eaef520 | 200 | static struct validate guan_validate = |
60452f41 | 201 | { |
263a36d4 | 202 | 0, |
203 | 0, | |
60452f41 | 204 | 0, |
205 | 0, | |
206 | 0, | |
207 | 0, | |
208 | 0, | |
209 | 0, | |
3b634eb3 | 210 | followup_get_user, |
60452f41 | 211 | }; |
212 | ||
186dd63b | 213 | static char *guac2_fields[] = { |
e2b8245f | 214 | "class", |
215 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 216 | "clearid", "class", "comments", "signature", "secure", |
217 | "modtime", "modby", "modwith", | |
4ffa124a | 218 | }; |
0c345c78 | 219 | |
aec7d432 | 220 | static char *guac3_fields[] = { |
186dd63b | 221 | "class", |
222 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
223 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 224 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 225 | }; |
226 | ||
aec7d432 | 227 | static char *guac_fields[] = { |
228 | "class", | |
229 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
230 | "status", "clearid", "class", "comments", "signature", "secure", | |
231 | "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created", | |
232 | "creator", | |
233 | }; | |
234 | ||
186dd63b | 235 | static char *guam2_fields[] = { |
e2b8245f | 236 | "clearid", |
237 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 238 | "clearid", "class", "comments", "signature", "secure", |
239 | "modtime", "modby", "modwith", | |
4ffa124a | 240 | }; |
0c345c78 | 241 | |
aec7d432 | 242 | static char *guam3_fields[] = { |
186dd63b | 243 | "clearid", |
244 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
245 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 246 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 247 | }; |
248 | ||
aec7d432 | 249 | static char *guam_fields[] = { |
250 | "clearid", | |
251 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
252 | "status", "clearid", "class", "comments", "signature", "secure", | |
253 | "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created", | |
254 | "creator", | |
255 | }; | |
256 | ||
186dd63b | 257 | static char *gubu2_fields[] = { |
e2b8245f | 258 | "unix_uid", |
259 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 260 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 261 | }; |
262 | ||
186dd63b | 263 | static char *gubu_fields[] = { |
264 | "unix_uid", | |
265 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
3b634eb3 | 266 | "status", "clearid", "class", "modtime", "modby", "modwith", "created", |
267 | "creator", | |
186dd63b | 268 | }; |
269 | ||
9db6a21e | 270 | static struct validate gubu2_validate = |
271 | { | |
272 | VOnum0, | |
273 | 1, | |
274 | 0, | |
275 | 0, | |
276 | 0, | |
277 | 0, | |
278 | access_login, | |
279 | 0, | |
280 | followup_fix_modby, | |
281 | }; | |
282 | ||
5eaef520 | 283 | static struct validate gubu_validate = |
f9f5c199 | 284 | { |
f802fd0d | 285 | VOnum0, |
286 | 1, | |
f9f5c199 | 287 | 0, |
288 | 0, | |
289 | 0, | |
290 | 0, | |
291 | access_login, | |
292 | 0, | |
3b634eb3 | 293 | followup_get_user, |
f9f5c199 | 294 | }; |
295 | ||
186dd63b | 296 | static char *gubn2_fields[] = { |
e2b8245f | 297 | "first", "last", |
298 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 299 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 300 | }; |
301 | ||
186dd63b | 302 | static char *gubn_fields[] = { |
303 | "first", "last", | |
304 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
3b634eb3 | 305 | "status", "clearid", "class", "modtime", "modby", "modwith", "created", |
306 | "creator", | |
186dd63b | 307 | }; |
308 | ||
9db6a21e | 309 | static struct validate gubn2_validate = |
310 | { | |
311 | 0, | |
312 | 0, | |
313 | 0, | |
314 | 0, | |
315 | 0, | |
316 | 0, | |
317 | 0, | |
318 | 0, | |
319 | followup_fix_modby, | |
320 | }; | |
321 | ||
99e09b48 | 322 | static struct validate gubn_validate = |
323 | { | |
263a36d4 | 324 | 0, |
325 | 0, | |
0c345c78 | 326 | 0, |
327 | 0, | |
328 | 0, | |
329 | 0, | |
330 | 0, | |
331 | 0, | |
3b634eb3 | 332 | followup_get_user, |
99e09b48 | 333 | }; |
334 | ||
186dd63b | 335 | static char *gubc2_fields[] = { |
e2b8245f | 336 | "class", |
337 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 338 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 339 | }; |
340 | ||
186dd63b | 341 | static char *gubc_fields[] = { |
342 | "class", | |
343 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
344 | "status", "clearid", "class", "modtime", "modby", "modwith", | |
3b634eb3 | 345 | "created", "creator", |
186dd63b | 346 | }; |
347 | ||
348 | static char *gubm2_fields[] = { | |
e2b8245f | 349 | "clearid", |
350 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 351 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 352 | }; |
353 | ||
186dd63b | 354 | static char *gubm_fields[] = { |
355 | "clearid", | |
356 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", | |
357 | "middle", "status", "clearid", "class", "modtime", "modby", "modwith", | |
3b634eb3 | 358 | "created", "creator", |
186dd63b | 359 | }; |
360 | ||
361 | static char *auac2_fields[] = { | |
e2b8245f | 362 | "login", "unix_uid", "shell", "last", "first", "middle", "status", |
363 | "clearid", "class", "comments", "signature", "secure", | |
d33e787c | 364 | }; |
365 | ||
aec7d432 | 366 | static char *auac3_fields[] = { |
186dd63b | 367 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", |
368 | "middle", "status", "clearid", "class", "comments", "signature", "secure", | |
369 | }; | |
370 | ||
aec7d432 | 371 | static char *auac_fields[] = { |
372 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
373 | "status", "clearid", "class", "comments", "signature", "secure", | |
374 | "winhomedir", "winprofiledir", | |
375 | }; | |
376 | ||
186dd63b | 377 | static struct valobj auac2_valobj[] = { |
e2b8245f | 378 | {V_CHAR, 0, USERS_TABLE, "login"}, |
f802fd0d | 379 | {V_NUM, 1}, |
e2b8245f | 380 | {V_CHAR, 2, USERS_TABLE, "shell"}, |
381 | {V_CHAR, 3, USERS_TABLE, "last"}, | |
382 | {V_CHAR, 4, USERS_TABLE, "first"}, | |
383 | {V_CHAR, 5, USERS_TABLE, "middle"}, | |
f802fd0d | 384 | {V_NUM, 6}, |
e2b8245f | 385 | {V_CHAR, 7, USERS_TABLE, "clearid"}, |
386 | {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS}, | |
03c05291 | 387 | {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
9c45837e | 388 | {V_NUM, 11}, |
d33e787c | 389 | }; |
390 | ||
aec7d432 | 391 | static struct valobj auac3_valobj[] = { |
392 | {V_CHAR, 0, USERS_TABLE, "login"}, | |
393 | {V_NUM, 1}, | |
394 | {V_CHAR, 2, USERS_TABLE, "shell"}, | |
395 | {V_CHAR, 3, USERS_TABLE, "winconsoleshell"}, | |
396 | {V_CHAR, 4, USERS_TABLE, "last"}, | |
397 | {V_CHAR, 5, USERS_TABLE, "first"}, | |
398 | {V_CHAR, 6, USERS_TABLE, "middle"}, | |
399 | {V_NUM, 7}, | |
400 | {V_CHAR, 8, USERS_TABLE, "clearid"}, | |
401 | {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS}, | |
402 | {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
403 | {V_NUM, 12}, | |
404 | }; | |
405 | ||
186dd63b | 406 | static struct valobj auac_valobj[] = { |
407 | {V_CHAR, 0, USERS_TABLE, "login"}, | |
408 | {V_NUM, 1}, | |
409 | {V_CHAR, 2, USERS_TABLE, "shell"}, | |
410 | {V_CHAR, 3, USERS_TABLE, "winconsoleshell"}, | |
411 | {V_CHAR, 4, USERS_TABLE, "last"}, | |
412 | {V_CHAR, 5, USERS_TABLE, "first"}, | |
413 | {V_CHAR, 6, USERS_TABLE, "middle"}, | |
414 | {V_NUM, 7}, | |
415 | {V_CHAR, 8, USERS_TABLE, "clearid"}, | |
416 | {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS}, | |
417 | {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
418 | {V_NUM, 12}, | |
aec7d432 | 419 | {V_LEN, 13, USERS_TABLE, "winhomedir"}, |
420 | {V_LEN, 14, USERS_TABLE, "winprofiledir"}, | |
186dd63b | 421 | }; |
422 | ||
423 | static struct validate auac2_validate = { | |
424 | auac2_valobj, | |
425 | 11, | |
426 | "login", | |
427 | "login = '%s'", | |
428 | 1, | |
429 | "users_id", | |
430 | 0, | |
431 | setup_ausr, | |
432 | followup_ausr, | |
433 | }; | |
434 | ||
aec7d432 | 435 | static struct validate auac3_validate = { |
436 | auac3_valobj, | |
437 | 12, | |
438 | "login", | |
439 | "login = '%s'", | |
440 | 1, | |
441 | "users_id", | |
442 | 0, | |
443 | setup_ausr, | |
444 | followup_ausr, | |
445 | }; | |
446 | ||
4ffa124a | 447 | static struct validate auac_validate = { |
448 | auac_valobj, | |
aec7d432 | 449 | 14, |
186dd63b | 450 | "login", |
451 | "login = '%s'", | |
452 | 1, | |
453 | "users_id", | |
454 | 0, | |
455 | setup_ausr, | |
456 | followup_ausr, | |
457 | }; | |
458 | ||
459 | static struct validate ausr2_validate = { | |
460 | auac2_valobj, | |
461 | 9, | |
e2b8245f | 462 | "login", |
03c05291 | 463 | "login = '%s'", |
4ffa124a | 464 | 1, |
e2b8245f | 465 | "users_id", |
4ffa124a | 466 | 0, |
467 | setup_ausr, | |
468 | followup_ausr, | |
469 | }; | |
0c345c78 | 470 | |
aec7d432 | 471 | static struct validate ausr3_validate = { |
472 | auac3_valobj, | |
473 | 10, | |
474 | "login", | |
475 | "login = '%s'", | |
476 | 1, | |
477 | "users_id", | |
478 | 0, | |
479 | setup_ausr, | |
480 | followup_ausr, | |
481 | }; | |
482 | ||
d33e787c | 483 | static struct validate ausr_validate = { |
4ffa124a | 484 | auac_valobj, |
aec7d432 | 485 | 12, |
e2b8245f | 486 | "login", |
03c05291 | 487 | "login = '%s'", |
d33e787c | 488 | 1, |
e2b8245f | 489 | "users_id", |
d33e787c | 490 | 0, |
491 | setup_ausr, | |
492 | followup_ausr, | |
493 | }; | |
494 | ||
495 | static char *rusr_fields[] = { | |
b4bfb4d1 | 496 | "unix_uid", "login", "pobox_type" |
03c05291 | 497 | }; |
d33e787c | 498 | |
ba408d23 | 499 | static struct valobj rusr_valobj[] = { |
f802fd0d | 500 | {V_NUM, 0}, |
8bf97744 | 501 | {V_CHAR, 1, USERS_TABLE, "login"}, |
ba408d23 | 502 | }; |
503 | ||
d33e787c | 504 | static struct validate rusr_validate = { |
ba408d23 | 505 | rusr_valobj, |
b4bfb4d1 | 506 | 2, |
d33e787c | 507 | 0, |
508 | 0, | |
509 | 0, | |
510 | 0, | |
511 | 0, | |
512 | register_user, | |
513 | 0, | |
514 | }; | |
515 | ||
186dd63b | 516 | static char *uuac2_fields[] = { |
e2b8245f | 517 | "login", |
518 | "newlogin", "unix_uid", "shell", "last", "first", "middle", "status", | |
519 | "clearid", "class", "comments", "signature", "secure", | |
d33e787c | 520 | }; |
521 | ||
aec7d432 | 522 | static char *uuac3_fields[] = { |
186dd63b | 523 | "login", |
524 | "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first", | |
525 | "middle", "status", "clearid", "class", "comments", "signature", "secure", | |
526 | }; | |
527 | ||
aec7d432 | 528 | static char *uuac_fields[] = { |
529 | "login", | |
530 | "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first", | |
531 | "middle", "status", "clearid", "class", "comments", "signature", "secure", | |
532 | "winhomedir", "winprofiledir", | |
533 | }; | |
534 | ||
186dd63b | 535 | static struct valobj uuac2_valobj[] = { |
e2b8245f | 536 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
537 | {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE}, | |
f802fd0d | 538 | {V_NUM, 2}, |
e2b8245f | 539 | {V_CHAR, 3, USERS_TABLE, "shell"}, |
540 | {V_CHAR, 4, USERS_TABLE, "first"}, | |
541 | {V_CHAR, 5, USERS_TABLE, "last"}, | |
542 | {V_CHAR, 6, USERS_TABLE, "middle"}, | |
f802fd0d | 543 | {V_NUM, 7}, |
e2b8245f | 544 | {V_CHAR, 8, USERS_TABLE, "clearid"}, |
545 | {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS}, | |
03c05291 | 546 | {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
f802fd0d | 547 | {V_NUM, 12}, |
d33e787c | 548 | }; |
186dd63b | 549 | |
aec7d432 | 550 | static struct valobj uuac3_valobj[] = { |
551 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, | |
552 | {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE}, | |
553 | {V_NUM, 2}, | |
554 | {V_CHAR, 3, USERS_TABLE, "shell"}, | |
555 | {V_CHAR, 4, USERS_TABLE, "winconsoleshell"}, | |
556 | {V_CHAR, 5, USERS_TABLE, "first"}, | |
557 | {V_CHAR, 6, USERS_TABLE, "last"}, | |
558 | {V_CHAR, 7, USERS_TABLE, "middle"}, | |
559 | {V_NUM, 8}, | |
560 | {V_CHAR, 9, USERS_TABLE, "clearid"}, | |
561 | {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS}, | |
562 | {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
563 | {V_NUM, 13}, | |
564 | }; | |
565 | ||
186dd63b | 566 | static struct valobj uuac_valobj[] = { |
567 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, | |
568 | {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE}, | |
569 | {V_NUM, 2}, | |
570 | {V_CHAR, 3, USERS_TABLE, "shell"}, | |
571 | {V_CHAR, 4, USERS_TABLE, "winconsoleshell"}, | |
572 | {V_CHAR, 5, USERS_TABLE, "first"}, | |
573 | {V_CHAR, 6, USERS_TABLE, "last"}, | |
574 | {V_CHAR, 7, USERS_TABLE, "middle"}, | |
575 | {V_NUM, 8}, | |
576 | {V_CHAR, 9, USERS_TABLE, "clearid"}, | |
577 | {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS}, | |
578 | {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
579 | {V_NUM, 13}, | |
aec7d432 | 580 | {V_LEN, 14, USERS_TABLE, "winhomedir"}, |
581 | {V_LEN, 15, USERS_TABLE, "winprofiledir"}, | |
186dd63b | 582 | }; |
583 | ||
584 | static struct validate uuac2_validate = { | |
585 | uuac2_valobj, | |
586 | 12, | |
587 | 0, | |
588 | 0, | |
589 | 0, | |
590 | "users_id", | |
591 | 0, | |
592 | setup_ausr, | |
593 | set_modtime_by_id, | |
594 | }; | |
d33e787c | 595 | |
aec7d432 | 596 | static struct validate uuac3_validate = { |
597 | uuac3_valobj, | |
598 | 13, | |
599 | 0, | |
600 | 0, | |
601 | 0, | |
602 | "users_id", | |
603 | 0, | |
604 | setup_ausr, | |
605 | set_modtime_by_id, | |
606 | }; | |
607 | ||
4ffa124a | 608 | static struct validate uuac_validate = { |
0c345c78 | 609 | uuac_valobj, |
aec7d432 | 610 | 15, |
186dd63b | 611 | 0, |
612 | 0, | |
613 | 0, | |
614 | "users_id", | |
26e6ea51 | 615 | access_update_user, |
186dd63b | 616 | setup_ausr, |
617 | set_modtime_by_id, | |
618 | }; | |
619 | ||
620 | static struct validate uusr2_validate = { | |
621 | uuac2_valobj, | |
622 | 10, | |
0c345c78 | 623 | 0, |
624 | 0, | |
625 | 0, | |
e2b8245f | 626 | "users_id", |
0c345c78 | 627 | 0, |
628 | setup_ausr, | |
d55429b2 | 629 | set_modtime_by_id, |
4ffa124a | 630 | }; |
0c345c78 | 631 | |
aec7d432 | 632 | static struct validate uusr3_validate = { |
633 | uuac3_valobj, | |
634 | 11, | |
635 | 0, | |
636 | 0, | |
637 | 0, | |
638 | "users_id", | |
639 | 0, | |
640 | setup_ausr, | |
641 | set_modtime_by_id, | |
642 | }; | |
643 | ||
d33e787c | 644 | static struct validate uusr_validate = { |
4ffa124a | 645 | uuac_valobj, |
aec7d432 | 646 | 13, |
d33e787c | 647 | 0, |
648 | 0, | |
649 | 0, | |
e2b8245f | 650 | "users_id", |
d33e787c | 651 | 0, |
4ffa124a | 652 | setup_ausr, |
d33e787c | 653 | set_modtime_by_id, |
654 | }; | |
655 | ||
656 | static char *uush_fields[] = { | |
e2b8245f | 657 | "login", |
658 | "shell", | |
d33e787c | 659 | }; |
660 | ||
03c05291 | 661 | static struct valobj uush_valobj[] = { |
e2b8245f | 662 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
663 | {V_CHAR, 1, USERS_TABLE, "shell"}, | |
03c05291 | 664 | }; |
665 | ||
d33e787c | 666 | static struct validate uush_validate = { |
03c05291 | 667 | uush_valobj, |
d1b3a4bf | 668 | 2, |
d33e787c | 669 | 0, |
670 | 0, | |
671 | 0, | |
e2b8245f | 672 | "users_id", |
d33e787c | 673 | access_user, |
674 | 0, | |
a39342a9 | 675 | set_finger_modtime, |
d33e787c | 676 | }; |
677 | ||
29dbfca4 | 678 | static char *uuws_fields[] = { |
679 | "login", | |
680 | "winconsoleshell", | |
681 | }; | |
682 | ||
683 | static struct valobj uuws_valobj[] = { | |
684 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, | |
685 | {V_CHAR, 1, USERS_TABLE, "winconsoleshell"}, | |
686 | }; | |
687 | ||
688 | static struct validate uuws_validate = { | |
689 | uuws_valobj, | |
690 | 2, | |
691 | 0, | |
692 | 0, | |
693 | 0, | |
694 | "users_id", | |
695 | access_user, | |
696 | 0, | |
697 | set_finger_modtime, | |
698 | }; | |
699 | ||
d33e787c | 700 | static char *uust_fields[] = { |
e2b8245f | 701 | "login", |
702 | "status", | |
d33e787c | 703 | }; |
704 | ||
4ffa124a | 705 | static char *uuss_fields[] = { |
e2b8245f | 706 | "login", |
707 | "secure", | |
4ffa124a | 708 | }; |
0c345c78 | 709 | |
f802fd0d | 710 | static struct valobj uust_valobj[] = { |
f802fd0d | 711 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
712 | {V_NUM, 1}, | |
713 | {V_NUM, 2}, | |
714 | }; | |
715 | ||
d33e787c | 716 | static struct validate uust_validate = { |
f802fd0d | 717 | uust_valobj, |
d1b3a4bf | 718 | 2, |
d33e787c | 719 | 0, |
720 | 0, | |
721 | 0, | |
e2b8245f | 722 | "users_id", |
d33e787c | 723 | 0, |
724 | 0, | |
725 | set_modtime_by_id, | |
726 | }; | |
727 | ||
728 | static char *dusr_fields[] = { | |
e2b8245f | 729 | "login", |
d33e787c | 730 | }; |
731 | ||
732 | static struct validate dusr_validate = { | |
d1b3a4bf | 733 | VOuser0, |
734 | 1, | |
d33e787c | 735 | 0, |
736 | 0, | |
737 | 0, | |
738 | 0, | |
739 | 0, | |
740 | setup_dusr, | |
741 | 0, | |
742 | }; | |
743 | ||
77eb4bdf | 744 | static char *aurv_fields[] = { |
745 | "login", "reservation", | |
746 | }; | |
747 | ||
748 | static struct validate aurv_validate = { | |
749 | VOuser0, | |
750 | 1, | |
751 | 0, | |
752 | 0, | |
753 | 0, | |
754 | "users_id", | |
755 | 0, | |
756 | 0, | |
757 | do_user_reservation, | |
758 | }; | |
759 | ||
760 | static char *gurv_fields[] = { | |
761 | "login", | |
762 | "reservation", | |
763 | }; | |
764 | ||
765 | static struct validate gurv_validate = { | |
766 | VOuser0, | |
767 | 1, | |
768 | 0, | |
769 | 0, | |
770 | 0, | |
771 | 0, | |
772 | 0, | |
773 | 0, | |
774 | get_user_reservations, | |
775 | }; | |
776 | ||
777 | static char *gubr_fields[] = { | |
778 | "reservation", | |
779 | "login", | |
780 | }; | |
781 | ||
782 | static struct validate gubr_validate = { | |
783 | 0, | |
784 | 0, | |
785 | 0, | |
786 | 0, | |
787 | 0, | |
788 | 0, | |
789 | 0, | |
790 | 0, | |
791 | get_user_by_reservation, | |
792 | }; | |
793 | ||
e2b8245f | 794 | static char *gkum_fields[] = { "login", "kerberos", |
795 | "login", "kerberos" }; | |
012fc215 | 796 | |
e2b8245f | 797 | static char *akum_fields[] = { "login", "kerberos" }; |
012fc215 | 798 | |
799 | static struct valobj akum_valobj[] = | |
800 | { | |
e2b8245f | 801 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
03c05291 | 802 | {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
012fc215 | 803 | }; |
804 | ||
805 | static struct validate akum_validate = | |
806 | { | |
0c345c78 | 807 | akum_valobj, |
d1b3a4bf | 808 | 2, |
e2b8245f | 809 | "users_id", |
3e8c655c | 810 | "users_id = %d or string_id = %d", |
0c345c78 | 811 | 2, |
e2b8245f | 812 | "users_id", |
0c345c78 | 813 | access_user, |
996ffd1d | 814 | 0, |
135dcb80 | 815 | 0, |
816 | }; | |
012fc215 | 817 | |
818 | static struct validate dkum_validate = | |
819 | { | |
0c345c78 | 820 | akum_valobj, |
d1b3a4bf | 821 | 2, |
e2b8245f | 822 | "users_id", |
3e8c655c | 823 | "users_id = %d and string_id = %d", |
0c345c78 | 824 | 2, |
e2b8245f | 825 | "users_id", |
0c345c78 | 826 | access_user, |
827 | 0, | |
135dcb80 | 828 | 0, |
829 | }; | |
012fc215 | 830 | |
d33e787c | 831 | static char *gfbl_fields[] = { |
e2b8245f | 832 | "login", |
833 | "login", "fullname", "nickname", "home_addr", | |
5eaef520 | 834 | "home_phone", "office_addr", "office_phone", "department", |
8db06f75 | 835 | "affiliation", "modtime", "modby", "modwith", |
d33e787c | 836 | }; |
837 | ||
838 | static struct validate gfbl_validate = { | |
839 | VOuser0, | |
840 | 1, | |
841 | 0, | |
842 | 0, | |
843 | 0, | |
844 | 0, | |
845 | access_user, | |
846 | 0, | |
847 | followup_fix_modby, | |
848 | }; | |
849 | ||
850 | static char *ufbl_fields[] = { | |
e2b8245f | 851 | "login", |
d33e787c | 852 | "fullname", "nickname", "home_addr", |
5eaef520 | 853 | "home_phone", "office_addr", "office_phone", "department", |
4e5ec77f | 854 | "affiliation", |
d33e787c | 855 | }; |
856 | ||
03c05291 | 857 | static struct valobj ufbl_valobj[] = { |
e2b8245f | 858 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
03c05291 | 859 | {V_LEN, 1, USERS_TABLE, "fullname"}, |
860 | {V_LEN, 2, USERS_TABLE, "nickname"}, | |
861 | {V_LEN, 3, USERS_TABLE, "home_addr"}, | |
862 | {V_LEN, 4, USERS_TABLE, "home_phone"}, | |
863 | {V_LEN, 5, USERS_TABLE, "office_addr"}, | |
864 | {V_LEN, 6, USERS_TABLE, "office_phone"}, | |
865 | {V_LEN, 7, USERS_TABLE, "department"}, | |
866 | {V_LEN, 8, USERS_TABLE, "affiliation"}, | |
867 | }; | |
868 | ||
d33e787c | 869 | static struct validate ufbl_validate = { |
03c05291 | 870 | ufbl_valobj, |
d1b3a4bf | 871 | 9, |
d33e787c | 872 | 0, |
873 | 0, | |
874 | 0, | |
875 | 0, | |
876 | access_user, | |
877 | 0, | |
878 | set_finger_modtime, | |
879 | }; | |
880 | ||
881 | static char *gpob_fields[] = { | |
e2b8245f | 882 | "login", |
d6d830a1 | 883 | "login", "type", "box", "address", "modtime", "modby", "modwith", |
d33e787c | 884 | }; |
885 | ||
886 | static struct validate gpob_validate = { | |
887 | VOuser0, | |
888 | 1, | |
889 | "potype", | |
5eaef520 | 890 | "potype != 'NONE' and users_id = %d", |
d33e787c | 891 | 1, |
892 | 0, | |
893 | access_user, | |
894 | 0, | |
895 | followup_gpob, | |
896 | }; | |
897 | ||
898 | static char *gpox_fields[] = { | |
e2b8245f | 899 | "login", "type", "box", |
d33e787c | 900 | }; |
901 | ||
902 | static struct validate gpox_validate = { | |
d1b3a4bf | 903 | 0, |
904 | 0, | |
d33e787c | 905 | 0, |
906 | 0, | |
907 | 0, | |
908 | 0, | |
909 | 0, | |
910 | 0, | |
911 | followup_gpob, | |
912 | }; | |
913 | ||
914 | static char *spob_fields[] = { | |
e2b8245f | 915 | "login", "type", "box", |
d33e787c | 916 | }; |
917 | ||
918 | static struct valobj spob_valobj[] = { | |
e2b8245f | 919 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
03c05291 | 920 | {V_TYPE, 1, 0, "pobox", 0, MR_TYPE}, |
d33e787c | 921 | }; |
922 | ||
923 | static struct validate spob_validate = /* SET_POBOX */ | |
924 | { | |
925 | spob_valobj, | |
d1b3a4bf | 926 | 2, |
d33e787c | 927 | 0, |
928 | 0, | |
929 | 0, | |
930 | 0, | |
f659afb2 | 931 | access_spob, |
d33e787c | 932 | 0, |
933 | set_pobox, | |
934 | }; | |
935 | ||
936 | static struct validate spop_validate = /* SET_POBOX_POP */ | |
937 | { | |
d1b3a4bf | 938 | VOuser0, |
939 | 1, | |
d33e787c | 940 | 0, |
941 | 0, | |
942 | 0, | |
943 | 0, | |
944 | access_user, | |
17cb3de8 | 945 | 0, |
946 | set_pobox_pop, | |
d33e787c | 947 | }; |
948 | ||
949 | static struct validate dpob_validate = /* DELETE_POBOX */ | |
950 | { | |
d1b3a4bf | 951 | VOuser0, |
952 | 1, | |
d33e787c | 953 | 0, |
954 | 0, | |
955 | 0, | |
956 | 0, | |
957 | access_user, | |
958 | setup_dpob, | |
959 | set_pobox_modtime, | |
960 | }; | |
961 | ||
962 | static char *gmac_fields[] = { | |
e2b8245f | 963 | "name", |
8db06f75 | 964 | "name", "type", "modtime", "modby", "modwith", |
d33e787c | 965 | }; |
966 | ||
e4ae0190 | 967 | static char *ghst2_fields[] = { |
e2b8245f | 968 | "name", "address", "location", "network", |
8db06f75 | 969 | "name", "vendor", "model", "os", "location", "contact", "use", |
970 | "status", "status_change", "network", "address", "ace_type", | |
971 | "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
972 | "inuse", "modtime", "modby", "modwith", | |
d33e787c | 973 | }; |
974 | ||
e4ae0190 | 975 | static char *ghbh2_fields[] = { |
012e079f | 976 | "hwaddr", |
977 | "name", "vendor", "model", "os", "location", "contact", "use", | |
978 | "status", "status_change", "network", "address", "ace_type", | |
979 | "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
980 | "inuse", "modtime", "modby", "modwith", | |
981 | }; | |
982 | ||
4f6b1a05 | 983 | static char *ghst6_fields[] = { |
e4ae0190 | 984 | "name", "address", "location", "network", |
985 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
986 | "use", "status", "status_change", "network", "address", "ace_type", | |
987 | "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
988 | "inuse", "modtime", "modby", "modwith", | |
989 | }; | |
990 | ||
4f6b1a05 | 991 | static char *ghbh6_fields[] = { |
e4ae0190 | 992 | "hwaddr", |
993 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
994 | "use", "status", "status_change", "network", "address", "ace_type", | |
995 | "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
996 | "inuse", "modtime", "modby", "modwith", | |
997 | }; | |
998 | ||
4f6b1a05 | 999 | static char *ghst_fields[] = { |
1000 | "name", "address", "location", "network", | |
1001 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
1002 | "account_number", "use", "status", "status_change", "network", "address", | |
1003 | "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
1004 | "inuse", "modtime", "modby", "modwith", | |
1005 | }; | |
1006 | ||
1007 | static char *ghbh_fields[] = { | |
1008 | "hwaddr", | |
1009 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
1010 | "account_number", "use", "status", "status_change", "network", "address", | |
1011 | "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
1012 | "inuse", "modtime", "modby", "modwith", | |
1013 | }; | |
1014 | ||
1015 | static char *ghba_fields[] = { | |
1016 | "account_number", | |
1017 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
1018 | "account_number", "use", "status", "status_change", "network", "address", | |
1019 | "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
1020 | "inuse", "modtime", "modby", "modwith", | |
1021 | }; | |
1022 | ||
5eaef520 | 1023 | static struct validate ghst_validate = { |
263a36d4 | 1024 | 0, |
1025 | 0, | |
a66a2204 | 1026 | 0, |
1027 | 0, | |
1028 | 0, | |
1029 | 0, | |
1030 | access_host, | |
1031 | 0, | |
1032 | followup_ghst, | |
1033 | }; | |
1034 | ||
2884200f | 1035 | static char *ghha_fields[] = { |
1036 | "name", | |
1037 | "hwaddr", | |
1038 | }; | |
1039 | ||
e4ae0190 | 1040 | static char *ahst2_fields[] = { |
8db06f75 | 1041 | "name", "vendor", "model", "os", "location", "contact", "use", |
1042 | "status", "subnet", "address", "ace_type", "ace_name", | |
1043 | "admin_comment", "ops_comment", | |
a66a2204 | 1044 | }; |
1045 | ||
e4ae0190 | 1046 | static struct valobj ahst2_valobj[] = { |
e2b8245f | 1047 | {V_CHAR, 0, MACHINE_TABLE, "name"}, |
03c05291 | 1048 | {V_CHAR, 1, MACHINE_TABLE, "vendor"}, |
1049 | {V_CHAR, 2, MACHINE_TABLE, "model"}, | |
1050 | {V_CHAR, 3, MACHINE_TABLE, "os"}, | |
1051 | {V_CHAR, 4, MACHINE_TABLE, "location"}, | |
1052 | {V_CHAR, 5, MACHINE_TABLE, "contact"}, | |
f802fd0d | 1053 | {V_NUM, 6}, |
1054 | {V_NUM, 7}, | |
e2b8245f | 1055 | {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, |
1056 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, | |
a66a2204 | 1057 | {V_TYPEDATA, 11, 0, 0, 0, MR_ACE}, |
03c05291 | 1058 | {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
1059 | {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
d33e787c | 1060 | }; |
1061 | ||
e4ae0190 | 1062 | static struct validate ahst2_validate = { |
1063 | ahst2_valobj, | |
1064 | 13, | |
1065 | "name", | |
1066 | "name = UPPER('%s')", | |
1067 | 1, | |
1068 | "mach_id", | |
1069 | access_host, | |
1070 | setup_ahst, | |
1071 | set_uppercase_modtime, | |
1072 | }; | |
1073 | ||
4f6b1a05 | 1074 | static char *ahst6_fields[] = { |
e4ae0190 | 1075 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", |
1076 | "use", "status", "subnet", "address", "ace_type", "ace_name", | |
1077 | "admin_comment", "ops_comment", | |
1078 | }; | |
1079 | ||
4f6b1a05 | 1080 | static struct valobj ahst6_valobj[] = { |
e4ae0190 | 1081 | {V_CHAR, 0, MACHINE_TABLE, "name"}, |
1082 | {V_CHAR, 1, MACHINE_TABLE, "vendor"}, | |
1083 | {V_CHAR, 2, MACHINE_TABLE, "model"}, | |
1084 | {V_CHAR, 3, MACHINE_TABLE, "os"}, | |
1085 | {V_CHAR, 4, MACHINE_TABLE, "location"}, | |
1086 | {V_CHAR, 5, MACHINE_TABLE, "contact"}, | |
1087 | {V_CHAR, 6, MACHINE_TABLE, "billing_contact"}, | |
1088 | {V_NUM, 7}, | |
1089 | {V_NUM, 8}, | |
1090 | {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
1091 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
1092 | {V_TYPEDATA, 12, 0, 0, 0, MR_ACE}, | |
1093 | {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1094 | {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1095 | }; | |
1096 | ||
4f6b1a05 | 1097 | static struct validate ahst6_validate = { |
1098 | ahst6_valobj, | |
1099 | 14, | |
1100 | "name", | |
1101 | "name = UPPER('%s')", | |
1102 | 1, | |
1103 | "mach_id", | |
1104 | access_host, | |
1105 | setup_ahst, | |
1106 | set_uppercase_modtime, | |
1107 | }; | |
1108 | ||
1109 | static char *ahst_fields[] = { | |
1110 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
1111 | "account_number", "use", "status", "subnet", "address", "ace_type", | |
1112 | "ace_name", "admin_comment", "ops_comment", | |
1113 | }; | |
1114 | ||
1115 | static struct valobj ahst_valobj[] = { | |
1116 | {V_CHAR, 0, MACHINE_TABLE, "name"}, | |
1117 | {V_CHAR, 1, MACHINE_TABLE, "vendor"}, | |
1118 | {V_CHAR, 2, MACHINE_TABLE, "model"}, | |
1119 | {V_CHAR, 3, MACHINE_TABLE, "os"}, | |
1120 | {V_CHAR, 4, MACHINE_TABLE, "location"}, | |
1121 | {V_CHAR, 5, MACHINE_TABLE, "contact"}, | |
1122 | {V_CHAR, 6, MACHINE_TABLE, "billing_contact"}, | |
1123 | {V_CHAR, 7, MACHINE_TABLE, "account_number"}, | |
1124 | {V_NUM, 8}, | |
1125 | {V_NUM, 9}, | |
1126 | {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
1127 | {V_TYPE, 12, 0, "ace_type", 0, MR_ACE}, | |
1128 | {V_TYPEDATA, 13, 0, 0, 0, MR_ACE}, | |
1129 | {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1130 | {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1131 | }; | |
1132 | ||
a66a2204 | 1133 | static struct validate ahst_validate = { |
1134 | ahst_valobj, | |
4f6b1a05 | 1135 | 15, |
e2b8245f | 1136 | "name", |
03c05291 | 1137 | "name = UPPER('%s')", |
d33e787c | 1138 | 1, |
e2b8245f | 1139 | "mach_id", |
a66a2204 | 1140 | access_host, |
1141 | setup_ahst, | |
0ec43029 | 1142 | set_uppercase_modtime, |
d33e787c | 1143 | }; |
1144 | ||
e4ae0190 | 1145 | static char *uhst2_fields[] = { |
e2b8245f | 1146 | "name", |
8db06f75 | 1147 | "newname", "vendor", "model", "os", "location", "contact", "use", |
1148 | "status", "subnet", "address", "ace_type", "ace_name", | |
1149 | "admin_comment", "ops_comment", | |
d33e787c | 1150 | }; |
1151 | ||
e4ae0190 | 1152 | static struct valobj uhst2_valobj[] = { |
03c05291 | 1153 | {V_CHAR, 0, MACHINE_TABLE, "name"}, |
e2b8245f | 1154 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
1155 | {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE}, | |
03c05291 | 1156 | {V_CHAR, 2, MACHINE_TABLE, "vendor"}, |
1157 | {V_CHAR, 3, MACHINE_TABLE, "model"}, | |
1158 | {V_CHAR, 4, MACHINE_TABLE, "os"}, | |
1159 | {V_CHAR, 5, MACHINE_TABLE, "location"}, | |
f802fd0d | 1160 | {V_CHAR, 6, MACHINE_TABLE, "contact"}, |
1161 | {V_NUM, 7}, | |
1162 | {V_NUM, 8}, | |
e2b8245f | 1163 | {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, |
1164 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
a66a2204 | 1165 | {V_TYPEDATA, 12, 0, 0, 0, MR_ACE}, |
03c05291 | 1166 | {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
1167 | {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
d33e787c | 1168 | }; |
1169 | ||
e4ae0190 | 1170 | static struct validate uhst2_validate = { |
1171 | uhst2_valobj, | |
1172 | 15, | |
1173 | 0, | |
1174 | 0, | |
1175 | 0, | |
1176 | "mach_id", | |
1177 | access_host, | |
1178 | setup_ahst, | |
1179 | set_modtime_by_id, | |
1180 | }; | |
1181 | ||
4f6b1a05 | 1182 | static char *uhst6_fields[] = { |
e4ae0190 | 1183 | "name", |
1184 | "newname", "vendor", "model", "os", "location", "contact", "billing_contact", | |
1185 | "use", "status", "subnet", "address", "ace_type", "ace_name", | |
1186 | "admin_comment", "ops_comment", | |
1187 | }; | |
1188 | ||
4f6b1a05 | 1189 | static struct valobj uhst6_valobj[] = { |
e4ae0190 | 1190 | {V_CHAR, 0, MACHINE_TABLE, "name"}, |
1191 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
1192 | {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE}, | |
1193 | {V_CHAR, 2, MACHINE_TABLE, "vendor"}, | |
1194 | {V_CHAR, 3, MACHINE_TABLE, "model"}, | |
1195 | {V_CHAR, 4, MACHINE_TABLE, "os"}, | |
1196 | {V_CHAR, 5, MACHINE_TABLE, "location"}, | |
1197 | {V_CHAR, 6, MACHINE_TABLE, "contact"}, | |
1198 | {V_CHAR, 7, MACHINE_TABLE, "billing_contact"}, | |
1199 | {V_NUM, 8}, | |
1200 | {V_NUM, 9}, | |
1201 | {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
1202 | {V_TYPE, 12, 0, "ace_type", 0, MR_ACE}, | |
1203 | {V_TYPEDATA, 13, 0, 0, 0, MR_ACE}, | |
1204 | {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1205 | {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1206 | }; | |
1207 | ||
4f6b1a05 | 1208 | static struct validate uhst6_validate = { |
1209 | uhst6_valobj, | |
1210 | 16, | |
1211 | 0, | |
1212 | 0, | |
1213 | 0, | |
1214 | "mach_id", | |
1215 | access_host, | |
1216 | setup_ahst, | |
1217 | set_modtime_by_id, | |
1218 | }; | |
1219 | ||
1220 | static char *uhst_fields[] = { | |
1221 | "name", | |
1222 | "newname", "vendor", "model", "os", "location", "contact", "billing_contact", | |
1223 | "account_number", "use", "status", "subnet", "address", "ace_type", | |
1224 | "ace_name", "admin_comment", "ops_comment", | |
1225 | }; | |
1226 | ||
1227 | static struct valobj uhst_valobj[] = { | |
1228 | {V_CHAR, 0, MACHINE_TABLE, "name"}, | |
1229 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
1230 | {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE}, | |
1231 | {V_CHAR, 2, MACHINE_TABLE, "vendor"}, | |
1232 | {V_CHAR, 3, MACHINE_TABLE, "model"}, | |
1233 | {V_CHAR, 4, MACHINE_TABLE, "os"}, | |
1234 | {V_CHAR, 5, MACHINE_TABLE, "location"}, | |
1235 | {V_CHAR, 6, MACHINE_TABLE, "contact"}, | |
1236 | {V_CHAR, 7, MACHINE_TABLE, "billing_contact"}, | |
1237 | {V_CHAR, 8, MACHINE_TABLE, "account_number"}, | |
1238 | {V_NUM, 9}, | |
1239 | {V_NUM, 10}, | |
1240 | {V_ID, 11, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
1241 | {V_TYPE, 13, 0, "ace_type", 0, MR_ACE}, | |
1242 | {V_TYPEDATA, 14, 0, 0, 0, MR_ACE}, | |
1243 | {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1244 | {V_ID, 16, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1245 | }; | |
1246 | ||
a66a2204 | 1247 | static struct validate uhst_validate = { |
1248 | uhst_valobj, | |
4f6b1a05 | 1249 | 17, |
d33e787c | 1250 | 0, |
1251 | 0, | |
1252 | 0, | |
e2b8245f | 1253 | "mach_id", |
a66a2204 | 1254 | access_host, |
1255 | setup_ahst, | |
d33e787c | 1256 | set_modtime_by_id, |
1257 | }; | |
1258 | ||
2884200f | 1259 | static char *uhha_fields[] = { |
1260 | "name", | |
1261 | "hwaddr" | |
1262 | }; | |
1263 | ||
1264 | static struct valobj uhha_valobj[] = { | |
1265 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
1266 | {V_CHAR, 1, MACHINE_TABLE, "hwaddr"}, | |
1267 | }; | |
1268 | ||
1269 | static struct validate uhha_validate = { | |
1270 | uhha_valobj, | |
1271 | 2, | |
1272 | 0, | |
1273 | 0, | |
1274 | 0, | |
1275 | "mach_id", | |
1276 | 0, | |
1277 | setup_uhha, | |
1278 | set_modtime_by_id, | |
1279 | }; | |
1280 | ||
a66a2204 | 1281 | static char *dhst_fields[] = { |
e2b8245f | 1282 | "name", |
d33e787c | 1283 | }; |
1284 | ||
a66a2204 | 1285 | static struct validate dhst_validate = { |
d1b3a4bf | 1286 | VOmach0, |
1287 | 1, | |
d33e787c | 1288 | 0, |
1289 | 0, | |
1290 | 0, | |
1291 | 0, | |
1292 | 0, | |
1293 | setup_dmac, | |
1294 | 0, | |
1295 | }; | |
1296 | ||
a66a2204 | 1297 | static char *ghal_fields[] = { |
e2b8245f | 1298 | "alias", "canonical_hostname", |
1299 | "alias", "canonical_hostname" | |
a66a2204 | 1300 | }; |
1301 | ||
a66a2204 | 1302 | static struct validate ghal_validate = { |
263a36d4 | 1303 | 0, |
1304 | 0, | |
a66a2204 | 1305 | 0, |
1306 | 0, | |
1307 | 0, | |
1308 | 0, | |
65adfb53 | 1309 | access_ahal, |
a66a2204 | 1310 | 0, |
03c05291 | 1311 | 0, |
a66a2204 | 1312 | }; |
1313 | ||
1314 | static struct valobj ahal_valobj[] = { | |
e2b8245f | 1315 | {V_CHAR, 0, HOSTALIAS_TABLE, "name"}, |
e2b8245f | 1316 | {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
a66a2204 | 1317 | }; |
1318 | ||
1319 | static struct validate ahal_validate = { | |
1320 | ahal_valobj, | |
263a36d4 | 1321 | 2, |
e2b8245f | 1322 | "name", |
996ffd1d | 1323 | "name = UPPER('%s')", |
a66a2204 | 1324 | 1, |
e2b8245f | 1325 | "mach_id", |
a66a2204 | 1326 | access_ahal, |
1327 | setup_ahal, | |
1328 | 0, | |
1329 | }; | |
1330 | ||
1331 | static struct valobj dhal_valobj[] = { | |
e2b8245f | 1332 | {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
a66a2204 | 1333 | }; |
1334 | ||
1335 | static struct validate dhal_validate = { | |
1336 | dhal_valobj, | |
263a36d4 | 1337 | 1, |
e2b8245f | 1338 | "name", |
996ffd1d | 1339 | "name = UPPER('%s') AND mach_id = %d", |
a66a2204 | 1340 | 2, |
e2b8245f | 1341 | "mach_id", |
a66a2204 | 1342 | access_ahal, |
1343 | 0, | |
1344 | 0, | |
1345 | }; | |
1346 | ||
4f6b1a05 | 1347 | static char *gsnt2_fields[] = { |
e2b8245f | 1348 | "name", |
8db06f75 | 1349 | "name", "description", "address", "mask", "low", "high", "prefix", |
1350 | "ace_type", "ace_name", "modtime", "modby", "modwith" | |
3c1d412c | 1351 | }; |
1352 | ||
4f6b1a05 | 1353 | static char *gsnt_fields[] = { |
1354 | "name", | |
1355 | "name", "description", "status", "contact", "account_number", "address", | |
1356 | "mask", "low", "high", "prefix", "ace_type", "ace_name", "modtime", | |
1357 | "modby", "modwith" | |
1358 | }; | |
1359 | ||
3c1d412c | 1360 | static struct validate gsnt_validate = { |
263a36d4 | 1361 | 0, |
1362 | 0, | |
3c1d412c | 1363 | 0, |
1364 | 0, | |
1365 | 0, | |
1366 | 0, | |
a70337e7 | 1367 | access_snt, |
3c1d412c | 1368 | 0, |
1369 | followup_gsnt, | |
1370 | }; | |
1371 | ||
4f6b1a05 | 1372 | static char *asnt2_fields[] = { |
8db06f75 | 1373 | "name", "description", "address", "mask", "low", "high", "prefix", |
1374 | "ace_type", "ace_name", | |
3c1d412c | 1375 | }; |
1376 | ||
4f6b1a05 | 1377 | static struct valobj asnt2_valobj[] = { |
e2b8245f | 1378 | {V_CHAR, 0, SUBNET_TABLE, "name"}, |
1379 | {V_LEN, 1, SUBNET_TABLE, "description"}, | |
f802fd0d | 1380 | {V_NUM, 2}, |
1381 | {V_NUM, 3}, | |
1382 | {V_NUM, 4}, | |
1383 | {V_NUM, 5}, | |
03c05291 | 1384 | {V_LEN, 6, SUBNET_TABLE, "prefix"}, |
e2b8245f | 1385 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, |
bd8c26ff | 1386 | {V_TYPEDATA, 8, 0, 0, 0, MR_ACE}, |
3c1d412c | 1387 | }; |
1388 | ||
4f6b1a05 | 1389 | static struct validate asnt2_validate = |
3c1d412c | 1390 | { |
4f6b1a05 | 1391 | asnt2_valobj, |
d1b3a4bf | 1392 | 9, |
e2b8245f | 1393 | "name", |
5eaef520 | 1394 | "name = UPPER('%s')", |
1395 | 1, | |
e2b8245f | 1396 | "snet_id", |
5eaef520 | 1397 | 0, |
1398 | prefetch_value, | |
1399 | set_uppercase_modtime, | |
3c1d412c | 1400 | }; |
1401 | ||
4f6b1a05 | 1402 | static char *asnt_fields[] = { |
1403 | "name", "description", "status", "contact", "account_number", "address", | |
1404 | "mask", "low", "high", "prefix", "ace_type", "ace_name", | |
1405 | }; | |
1406 | ||
1407 | static struct valobj asnt_valobj[] = { | |
1408 | {V_CHAR, 0, SUBNET_TABLE, "name"}, | |
1409 | {V_LEN, 1, SUBNET_TABLE, "description"}, | |
1410 | {V_NUM, 2}, | |
1411 | {V_CHAR, 3, SUBNET_TABLE, "contact"}, | |
1412 | {V_CHAR, 4, SUBNET_TABLE, "account_number"}, | |
1413 | {V_NUM, 5}, | |
1414 | {V_NUM, 6}, | |
1415 | {V_NUM, 7}, | |
1416 | {V_NUM, 8}, | |
1417 | {V_LEN, 9, SUBNET_TABLE, "prefix"}, | |
1418 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, | |
1419 | {V_TYPEDATA, 11, 0, 0, 0, MR_ACE}, | |
1420 | }; | |
1421 | ||
1422 | static struct validate asnt_validate = | |
1423 | { | |
1424 | asnt_valobj, | |
1425 | 12, | |
1426 | "name", | |
1427 | "name = UPPER('%s')", | |
1428 | 1, | |
1429 | "snet_id", | |
1430 | 0, | |
1431 | setup_asnt, | |
1432 | set_uppercase_modtime, | |
1433 | }; | |
1434 | ||
1435 | static char *usnt2_fields[] = { | |
e2b8245f | 1436 | "name", |
8db06f75 | 1437 | "newname", "description", "address", "mask", "low", "high", "prefix", |
1438 | "ace_type", "ace_name", | |
3c1d412c | 1439 | }; |
1440 | ||
4f6b1a05 | 1441 | static struct valobj usnt2_valobj[] = { |
e2b8245f | 1442 | {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH}, |
1443 | {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE}, | |
1444 | {V_LEN, 2, SUBNET_TABLE, "description"}, | |
f802fd0d | 1445 | {V_NUM, 3}, |
1446 | {V_NUM, 4}, | |
1447 | {V_NUM, 5}, | |
1448 | {V_NUM, 6}, | |
03c05291 | 1449 | {V_LEN, 7, SUBNET_TABLE, "prefix"}, |
e2b8245f | 1450 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, |
bd8c26ff | 1451 | {V_TYPEDATA, 9, 0, 0, 0, MR_ACE}, |
3c1d412c | 1452 | }; |
1453 | ||
4f6b1a05 | 1454 | static struct validate usnt2_validate = |
3c1d412c | 1455 | { |
4f6b1a05 | 1456 | usnt2_valobj, |
d1b3a4bf | 1457 | 10, |
e2b8245f | 1458 | "name", |
5eaef520 | 1459 | "snet_id = %d", |
1460 | 1, | |
e2b8245f | 1461 | "snet_id", |
5eaef520 | 1462 | 0, |
1463 | 0, | |
1464 | set_modtime_by_id, | |
3c1d412c | 1465 | }; |
1466 | ||
4f6b1a05 | 1467 | static char *usnt_fields[] = { |
1468 | "name", | |
1469 | "newname", "description", "status", "contact", "account_number", "address", | |
1470 | "mask", "low", "high", "prefix", "ace_type", "ace_name", | |
1471 | }; | |
1472 | ||
1473 | static struct valobj usnt_valobj[] = { | |
1474 | {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH}, | |
1475 | {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE}, | |
1476 | {V_LEN, 2, SUBNET_TABLE, "description"}, | |
1477 | {V_NUM, 3}, | |
1478 | {V_CHAR, 4, SUBNET_TABLE, "contact"}, | |
1479 | {V_CHAR, 5, SUBNET_TABLE, "account_number"}, | |
1480 | {V_NUM, 6}, | |
1481 | {V_NUM, 7}, | |
1482 | {V_NUM, 8}, | |
1483 | {V_NUM, 9}, | |
1484 | {V_LEN, 10, SUBNET_TABLE, "prefix"}, | |
1485 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
1486 | {V_TYPEDATA, 12, 0, 0, 0, MR_ACE}, | |
1487 | }; | |
1488 | ||
1489 | static struct validate usnt_validate = | |
1490 | { | |
1491 | usnt_valobj, | |
1492 | 13, | |
1493 | "name", | |
1494 | "snet_id = %d", | |
1495 | 1, | |
1496 | "snet_id", | |
1497 | 0, | |
1498 | setup_asnt, | |
1499 | set_modtime_by_id, | |
1500 | }; | |
1501 | ||
3c1d412c | 1502 | static char *dsnt_fields[] = { |
e2b8245f | 1503 | "name", |
3c1d412c | 1504 | }; |
1505 | ||
3c1d412c | 1506 | static struct validate dsnt_validate = { |
d1b3a4bf | 1507 | VOsnet0, |
1508 | 1, | |
3c1d412c | 1509 | 0, |
1510 | 0, | |
1511 | 0, | |
1512 | 0, | |
1513 | 0, | |
1514 | setup_dsnt, | |
1515 | 0, | |
1516 | }; | |
1517 | ||
d33e787c | 1518 | static char *gclu_fields[] = { |
e2b8245f | 1519 | "name", |
8db06f75 | 1520 | "name", "description", "location", "modtime", "modby", "modwith", |
d33e787c | 1521 | }; |
1522 | ||
1523 | static char *aclu_fields[] = { | |
e2b8245f | 1524 | "name", "description", "location", |
d33e787c | 1525 | }; |
0c345c78 | 1526 | |
339a00a3 | 1527 | static struct valobj aclu_valobj[] = { |
e2b8245f | 1528 | {V_CHAR, 0, CLUSTERS_TABLE, "name"}, |
1529 | {V_LEN, 1, CLUSTERS_TABLE, "description"}, | |
1530 | {V_LEN, 2, CLUSTERS_TABLE, "location"}, | |
339a00a3 | 1531 | }; |
1532 | ||
5eaef520 | 1533 | static struct validate aclu_validate = |
d33e787c | 1534 | { |
339a00a3 | 1535 | aclu_valobj, |
d1b3a4bf | 1536 | 3, |
e2b8245f | 1537 | "name", |
03c05291 | 1538 | "name = '%s'", |
d33e787c | 1539 | 1, |
e2b8245f | 1540 | "clu_id", |
d33e787c | 1541 | 0, |
45bf7573 | 1542 | prefetch_value, |
d33e787c | 1543 | set_modtime, |
1544 | }; | |
1545 | ||
1546 | static char *uclu_fields[] = { | |
e2b8245f | 1547 | "name", |
1548 | "newname", "description", "location", | |
d33e787c | 1549 | }; |
1550 | ||
1551 | static struct valobj uclu_valobj[] = { | |
e2b8245f | 1552 | {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER}, |
1553 | {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE}, | |
1554 | {V_LEN, 2, CLUSTERS_TABLE, "description"}, | |
1555 | {V_LEN, 3, CLUSTERS_TABLE, "location"}, | |
d33e787c | 1556 | }; |
1557 | ||
1558 | static struct validate uclu_validate = { | |
1559 | uclu_valobj, | |
d1b3a4bf | 1560 | 4, |
d33e787c | 1561 | 0, |
1562 | 0, | |
1563 | 0, | |
e2b8245f | 1564 | "clu_id", |
d33e787c | 1565 | 0, |
1566 | 0, | |
1567 | set_modtime_by_id, | |
1568 | }; | |
1569 | ||
1570 | static char *dclu_fields[] = { | |
e2b8245f | 1571 | "name", |
d33e787c | 1572 | }; |
1573 | ||
1574 | static struct validate dclu_validate = { | |
0c345c78 | 1575 | VOclu0, |
1576 | 1, | |
1577 | 0, | |
1578 | 0, | |
1579 | 0, | |
1580 | 0, | |
1581 | 0, | |
1582 | setup_dclu, | |
1583 | 0, | |
d33e787c | 1584 | }; |
1585 | ||
1586 | static char *gmcm_fields[] = { | |
e2b8245f | 1587 | "machine", "cluster", |
1588 | "machine", "cluster", | |
d33e787c | 1589 | }; |
1590 | ||
1591 | static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */ | |
1592 | { /* DELETE_MACHINE_FROM_CLUSTER */ | |
e2b8245f | 1593 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
1594 | {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER}, | |
d33e787c | 1595 | }; |
1596 | ||
1597 | static struct validate amtc_validate = /* for amtc and dmfc */ | |
1598 | { | |
1599 | amtc_valobj, | |
1600 | 2, | |
e2b8245f | 1601 | "mach_id", |
3e8c655c | 1602 | "mach_id = %d and clu_id = %d", |
d33e787c | 1603 | 2, |
1604 | 0, | |
1605 | 0, | |
1606 | 0, | |
1607 | set_mach_modtime_by_id, | |
1608 | }; | |
1609 | ||
1610 | static char *gcld_fields[] = { | |
e2b8245f | 1611 | "cluster", "serv_label", |
1612 | "cluster", "serv_label", "serv_cluster", | |
88343c5e | 1613 | }; |
1614 | ||
1615 | static char *acld_fields[] = { | |
e2b8245f | 1616 | "cluster", "serv_label", "serv_cluster", |
d33e787c | 1617 | }; |
1618 | ||
1619 | static struct valobj acld_valobj[] = | |
1620 | { | |
e2b8245f | 1621 | {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER}, |
03c05291 | 1622 | {V_CHAR, 1, SVC_TABLE, "serv_label"}, |
1623 | {V_CHAR, 2, SVC_TABLE, "serv_cluster"} | |
d33e787c | 1624 | }; |
1625 | ||
5eaef520 | 1626 | static struct validate acld_validate = |
1627 | { | |
d33e787c | 1628 | acld_valobj, |
99e09b48 | 1629 | 3, |
e2b8245f | 1630 | "clu_id", |
03c05291 | 1631 | "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'", |
99e09b48 | 1632 | 3, |
1633 | 0, | |
1634 | 0, | |
1635 | 0, | |
1636 | set_cluster_modtime_by_id, | |
1637 | }; | |
1638 | ||
5eaef520 | 1639 | static struct validate dcld_validate = |
1640 | { | |
d1b3a4bf | 1641 | VOclu0, |
03c05291 | 1642 | 1, |
e2b8245f | 1643 | "clu_id", |
3e8c655c | 1644 | "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'", |
d33e787c | 1645 | 3, |
1646 | 0, | |
1647 | 0, | |
1648 | 0, | |
1649 | set_cluster_modtime_by_id, | |
1650 | }; | |
1651 | ||
44da57b2 | 1652 | static char *glin2_fields[] = { |
e2b8245f | 1653 | "name", |
1654 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
8db06f75 | 1655 | "ace_type", "ace_name", "description", "modtime", "modby", "modwith", |
99e09b48 | 1656 | }; |
1657 | ||
59c3208b | 1658 | static char *glin3_fields[] = { |
44da57b2 | 1659 | "name", |
1660 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1661 | "nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby", | |
1662 | "modwith", | |
1663 | }; | |
1664 | ||
8e3761a2 | 1665 | static char *glin4_fields[] = { |
59c3208b | 1666 | "name", |
1667 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
4529bc5f | 1668 | "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name", |
59c3208b | 1669 | "description", "modtime", "modby", "modwith", |
1670 | }; | |
1671 | ||
8e3761a2 | 1672 | static char *glin_fields[] = { |
1673 | "name", | |
1674 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1675 | "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name", | |
1676 | "memace_type", "memace_name", "description", "modtime", "modby", "modwith", | |
1677 | }; | |
1678 | ||
03c05291 | 1679 | static struct validate glin_validate = { |
0c345c78 | 1680 | 0, |
0c345c78 | 1681 | 0, |
1682 | 0, | |
1683 | 0, | |
1684 | 0, | |
1685 | 0, | |
03c05291 | 1686 | access_vis_list_by_name, |
0c345c78 | 1687 | 0, |
263a36d4 | 1688 | followup_glin, |
d33e787c | 1689 | }; |
1690 | ||
44da57b2 | 1691 | static char *alis2_fields[] = { |
e2b8245f | 1692 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", |
1693 | "ace_type", "ace_name", "description", | |
d33e787c | 1694 | }; |
1695 | ||
44da57b2 | 1696 | static struct valobj alis2_valobj[] = { |
e2b8245f | 1697 | {V_CHAR, 0, LIST_TABLE, "name"}, |
f802fd0d | 1698 | {V_NUM, 1}, |
1699 | {V_NUM, 2}, | |
1700 | {V_NUM, 3}, | |
1701 | {V_NUM, 4}, | |
1702 | {V_NUM, 5}, | |
1703 | {V_NUM, 6}, | |
e2b8245f | 1704 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, |
1705 | {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE}, | |
1706 | {V_LEN, 9, LIST_TABLE, "description"}, | |
d33e787c | 1707 | }; |
1708 | ||
44da57b2 | 1709 | static struct validate alis2_validate = { |
1710 | alis2_valobj, | |
1711 | 10, | |
1712 | "name", | |
1713 | "name = '%s'", | |
1714 | 1, | |
1715 | "list_id", | |
1716 | 0, | |
1717 | setup_alis, | |
1718 | set_modtime, | |
1719 | }; | |
1720 | ||
59c3208b | 1721 | static char *alis3_fields[] = { |
44da57b2 | 1722 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", |
1723 | "nfsgroup", "ace_type", "ace_name", "description", | |
1724 | }; | |
1725 | ||
59c3208b | 1726 | static struct valobj alis3_valobj[] = { |
44da57b2 | 1727 | {V_CHAR, 0, LIST_TABLE, "name"}, |
1728 | {V_NUM, 1}, | |
1729 | {V_NUM, 2}, | |
1730 | {V_NUM, 3}, | |
1731 | {V_NUM, 4}, | |
1732 | {V_NUM, 5}, | |
1733 | {V_NUM, 6}, | |
1734 | {V_NUM, 7}, | |
1735 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, | |
1736 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, | |
1737 | {V_LEN, 10, LIST_TABLE, "description"}, | |
1738 | }; | |
1739 | ||
59c3208b | 1740 | static struct validate alis3_validate = { |
1741 | alis3_valobj, | |
1742 | 11, | |
1743 | "name", | |
1744 | "name = '%s'", | |
1745 | 1, | |
1746 | "list_id", | |
1747 | 0, | |
1748 | setup_alis, | |
1749 | set_modtime, | |
1750 | }; | |
1751 | ||
8e3761a2 | 1752 | static char *alis4_fields[] = { |
59c3208b | 1753 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", |
1754 | "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name", | |
1755 | "description", | |
1756 | }; | |
1757 | ||
8e3761a2 | 1758 | static struct valobj alis4_valobj[] = { |
59c3208b | 1759 | {V_CHAR, 0, LIST_TABLE, "name"}, |
1760 | {V_NUM, 1}, | |
1761 | {V_NUM, 2}, | |
1762 | {V_NUM, 3}, | |
1763 | {V_NUM, 4}, | |
1764 | {V_NUM, 5}, | |
1765 | {V_NUM, 6}, | |
1766 | {V_NUM, 7}, | |
1767 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, | |
1768 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, | |
1769 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, | |
1770 | {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE}, | |
1771 | {V_LEN, 12, LIST_TABLE, "description"}, | |
1772 | }; | |
1773 | ||
8e3761a2 | 1774 | static struct validate alis4_validate = { |
1775 | alis4_valobj, | |
1776 | 13, | |
1777 | "name", | |
1778 | "name = '%s'", | |
1779 | 1, | |
1780 | "list_id", | |
1781 | 0, | |
1782 | setup_alis, | |
1783 | set_modtime, | |
1784 | }; | |
1785 | ||
1786 | static char *alis_fields[] = { | |
1787 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1788 | "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name", | |
1789 | "memace_type", "memace_name", "description", | |
1790 | }; | |
1791 | ||
1792 | static struct valobj alis_valobj[] = { | |
1793 | {V_CHAR, 0, LIST_TABLE, "name"}, | |
1794 | {V_NUM, 1}, | |
1795 | {V_NUM, 2}, | |
1796 | {V_NUM, 3}, | |
1797 | {V_NUM, 4}, | |
1798 | {V_NUM, 5}, | |
1799 | {V_NUM, 6}, | |
1800 | {V_NUM, 7}, | |
1801 | {V_NUM, 8}, | |
1802 | {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
1803 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, | |
1804 | {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE}, | |
1805 | {V_TYPE, 12, 0, "ace_type", 0, MR_ACE}, | |
1806 | {V_TYPEDATA, 13, 0, 0, "list_id", MR_ACE}, | |
1807 | {V_LEN, 14, LIST_TABLE, "description"}, | |
1808 | }; | |
1809 | ||
03c05291 | 1810 | static struct validate alis_validate = { |
1811 | alis_valobj, | |
8e3761a2 | 1812 | 15, |
e2b8245f | 1813 | "name", |
03c05291 | 1814 | "name = '%s'", |
d33e787c | 1815 | 1, |
e2b8245f | 1816 | "list_id", |
d33e787c | 1817 | 0, |
03c05291 | 1818 | setup_alis, |
1819 | set_modtime, | |
d33e787c | 1820 | }; |
1821 | ||
44da57b2 | 1822 | static char *ulis2_fields[] = { |
e2b8245f | 1823 | "name", |
03c05291 | 1824 | "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", |
e2b8245f | 1825 | "ace_type", "ace_name", "description", |
d33e787c | 1826 | }; |
1827 | ||
44da57b2 | 1828 | static struct valobj ulis2_valobj[] = { |
e2b8245f | 1829 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
1830 | {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE}, | |
f802fd0d | 1831 | {V_NUM, 2}, |
1832 | {V_NUM, 3}, | |
1833 | {V_NUM, 4}, | |
1834 | {V_NUM, 5}, | |
1835 | {V_NUM, 6}, | |
1836 | {V_NUM, 7}, | |
1837 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, | |
e2b8245f | 1838 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, |
e2b8245f | 1839 | {V_LEN, 10, LIST_TABLE, "description"}, |
d33e787c | 1840 | }; |
1841 | ||
44da57b2 | 1842 | static struct validate ulis2_validate = { |
1843 | ulis2_valobj, | |
d1b3a4bf | 1844 | 11, |
e2b8245f | 1845 | "name", |
03c05291 | 1846 | "list_id = %d", |
d33e787c | 1847 | 1, |
e2b8245f | 1848 | "list_id", |
03c05291 | 1849 | access_list, |
1850 | setup_alis, | |
1851 | set_modtime_by_id, | |
d33e787c | 1852 | }; |
1853 | ||
59c3208b | 1854 | static char *ulis3_fields[] = { |
44da57b2 | 1855 | "name", |
1856 | "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1857 | "nfsgroup", "ace_type", "ace_name", "description", | |
1858 | }; | |
1859 | ||
59c3208b | 1860 | static struct valobj ulis3_valobj[] = { |
44da57b2 | 1861 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
1862 | {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE}, | |
1863 | {V_NUM, 2}, | |
1864 | {V_NUM, 3}, | |
1865 | {V_NUM, 4}, | |
1866 | {V_NUM, 5}, | |
1867 | {V_NUM, 6}, | |
1868 | {V_NUM, 7}, | |
1869 | {V_NUM, 8}, | |
1870 | {V_TYPE, 9, 0, "ace_type", 0, MR_ACE}, | |
1871 | {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE}, | |
1872 | {V_LEN, 11, LIST_TABLE, "description"}, | |
1873 | }; | |
1874 | ||
59c3208b | 1875 | static struct validate ulis3_validate = { |
1876 | ulis3_valobj, | |
44da57b2 | 1877 | 12, |
1878 | "name", | |
1879 | "list_id = %d", | |
1880 | 1, | |
1881 | "list_id", | |
1882 | access_list, | |
1883 | setup_alis, | |
1884 | set_modtime_by_id, | |
1885 | }; | |
1886 | ||
8e3761a2 | 1887 | static char *ulis4_fields[] = { |
59c3208b | 1888 | "name", |
1889 | "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1890 | "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name", | |
1891 | "description", | |
1892 | }; | |
1893 | ||
8e3761a2 | 1894 | static struct valobj ulis4_valobj[] = { |
59c3208b | 1895 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
1896 | {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE}, | |
1897 | {V_NUM, 2}, | |
1898 | {V_NUM, 3}, | |
1899 | {V_NUM, 4}, | |
1900 | {V_NUM, 5}, | |
1901 | {V_NUM, 6}, | |
1902 | {V_NUM, 7}, | |
1903 | {V_NUM, 8}, | |
1904 | {V_TYPE, 9, 0, "ace_type", 0, MR_ACE}, | |
1905 | {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE}, | |
1906 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
1907 | {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE}, | |
1908 | {V_LEN, 13, LIST_TABLE, "description"}, | |
1909 | }; | |
1910 | ||
8e3761a2 | 1911 | static struct validate ulis4_validate = { |
1912 | ulis4_valobj, | |
1913 | 14, | |
1914 | "name", | |
1915 | "list_id = %d", | |
1916 | 1, | |
1917 | "list_id", | |
1918 | access_list, | |
1919 | setup_alis, | |
1920 | set_modtime_by_id, | |
1921 | }; | |
1922 | ||
1923 | static char *ulis_fields[] = { | |
1924 | "name", | |
1925 | "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1926 | "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name", | |
1927 | "memace_type", "memace_name", "description", | |
1928 | }; | |
1929 | ||
1930 | static struct valobj ulis_valobj[] = { | |
1931 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, | |
1932 | {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE}, | |
1933 | {V_NUM, 2}, | |
1934 | {V_NUM, 3}, | |
1935 | {V_NUM, 4}, | |
1936 | {V_NUM, 5}, | |
1937 | {V_NUM, 6}, | |
1938 | {V_NUM, 7}, | |
1939 | {V_NUM, 8}, | |
1940 | {V_NUM, 9}, | |
1941 | {V_ID, 10, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
1942 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
1943 | {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE}, | |
1944 | {V_TYPE, 13, 0, "ace_type", 0, MR_ACE}, | |
1945 | {V_TYPEDATA, 14, 0, 0, "list_id", MR_ACE}, | |
1946 | {V_LEN, 15, LIST_TABLE, "description"}, | |
1947 | }; | |
1948 | ||
59c3208b | 1949 | static struct validate ulis_validate = { |
1950 | ulis_valobj, | |
8e3761a2 | 1951 | 16, |
59c3208b | 1952 | "name", |
1953 | "list_id = %d", | |
1954 | 1, | |
1955 | "list_id", | |
1956 | access_list, | |
1957 | setup_alis, | |
1958 | set_modtime_by_id, | |
1959 | }; | |
1960 | ||
03c05291 | 1961 | static char *dlis_fields[] = { |
e2b8245f | 1962 | "name", |
d33e787c | 1963 | }; |
1964 | ||
03c05291 | 1965 | static struct validate dlis_validate = { |
d1b3a4bf | 1966 | VOlist0, |
1967 | 1, | |
e2b8245f | 1968 | "name", |
03c05291 | 1969 | "list_id = %d", |
d33e787c | 1970 | 1, |
1971 | 0, | |
03c05291 | 1972 | access_list, |
1973 | setup_dlis, | |
d33e787c | 1974 | 0, |
1975 | }; | |
1976 | ||
03c05291 | 1977 | static char *amtl_fields[] = { |
1978 | "list_name", "member_type", "member_name", | |
d33e787c | 1979 | }; |
1980 | ||
46b6f1f6 | 1981 | static char *atml_fields[] = { |
1982 | "list_name", "member_type", "member_name", "tag", | |
1983 | }; | |
1984 | ||
03c05291 | 1985 | static struct valobj amtl_valobj[] = { |
e2b8245f | 1986 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
03c05291 | 1987 | {V_TYPE, 1, 0, "member", 0, MR_TYPE}, |
1988 | {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH}, | |
46b6f1f6 | 1989 | {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
99e09b48 | 1990 | }; |
1991 | ||
03c05291 | 1992 | static struct validate amtl_validate = |
1993 | { | |
1994 | amtl_valobj, | |
d1b3a4bf | 1995 | 3, |
d33e787c | 1996 | 0, |
1997 | 0, | |
1998 | 0, | |
1999 | 0, | |
03c05291 | 2000 | access_list, |
d33e787c | 2001 | 0, |
03c05291 | 2002 | add_member_to_list, |
d33e787c | 2003 | }; |
2004 | ||
46b6f1f6 | 2005 | static struct validate atml_validate = |
2006 | { | |
2007 | amtl_valobj, | |
2008 | 4, | |
2009 | 0, | |
2010 | 0, | |
2011 | 0, | |
2012 | 0, | |
2013 | access_list, | |
2014 | 0, | |
2015 | add_member_to_list, | |
2016 | }; | |
2017 | ||
2018 | static struct validate tmol_validate = | |
2019 | { | |
2020 | amtl_valobj, | |
2021 | 4, | |
46b6f1f6 | 2022 | 0, |
46b6f1f6 | 2023 | 0, |
2024 | 0, | |
20541c25 | 2025 | 0, |
2026 | access_list, | |
2027 | 0, | |
2028 | tag_member_of_list, | |
46b6f1f6 | 2029 | }; |
2030 | ||
03c05291 | 2031 | static struct validate dmfl_validate = |
2032 | { | |
2033 | amtl_valobj, | |
d1b3a4bf | 2034 | 3, |
0c345c78 | 2035 | 0, |
2036 | 0, | |
2037 | 0, | |
2038 | 0, | |
03c05291 | 2039 | access_list, |
0c345c78 | 2040 | 0, |
03c05291 | 2041 | delete_member_from_list, |
d33e787c | 2042 | }; |
2043 | ||
03c05291 | 2044 | static char *gaus_fields[] = { |
e2b8245f | 2045 | "ace_type", "ace_name", |
03c05291 | 2046 | "use_type", "use_name", |
d33e787c | 2047 | }; |
2048 | ||
03c05291 | 2049 | static struct valobj gaus_valobj[] = { |
03c05291 | 2050 | {V_TYPE, 0, 0, "gaus", 0, MR_TYPE}, |
2051 | {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH}, | |
d33e787c | 2052 | }; |
2053 | ||
03c05291 | 2054 | static struct validate gaus_validate = { |
2055 | gaus_valobj, | |
d1b3a4bf | 2056 | 2, |
d33e787c | 2057 | 0, |
d33e787c | 2058 | 0, |
d33e787c | 2059 | 0, |
d33e787c | 2060 | 0, |
03c05291 | 2061 | access_member, |
d33e787c | 2062 | 0, |
03c05291 | 2063 | get_ace_use, |
d33e787c | 2064 | }; |
2065 | ||
d3051625 | 2066 | static char *ghbo_fields[] = { |
2067 | "ace_type", "ace_name", | |
2068 | "name", | |
2069 | }; | |
2070 | ||
2071 | static struct valobj ghbo_valobj[] = { | |
2072 | {V_TYPE, 0, 0, "gaus", 0, MR_TYPE}, | |
2073 | {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH}, | |
2074 | }; | |
2075 | ||
2076 | static struct validate ghbo_validate = { | |
2077 | ghbo_valobj, | |
2078 | 2, | |
2079 | 0, | |
2080 | 0, | |
2081 | 0, | |
2082 | 0, | |
2083 | access_member, | |
2084 | 0, | |
2085 | get_host_by_owner, | |
2086 | }; | |
2087 | ||
03c05291 | 2088 | static char *qgli_fields[] = { |
2089 | "active", "publicflg", "hidden", "maillist", "grouplist", | |
2090 | "list", | |
3e8c655c | 2091 | }; |
d33e787c | 2092 | |
03c05291 | 2093 | static struct valobj qgli_valobj[] = { |
2094 | {V_TYPE, 0, 0, "boolean", 0, MR_TYPE}, | |
2095 | {V_TYPE, 1, 0, "boolean", 0, MR_TYPE}, | |
2096 | {V_TYPE, 2, 0, "boolean", 0, MR_TYPE}, | |
2097 | {V_TYPE, 3, 0, "boolean", 0, MR_TYPE}, | |
2098 | {V_TYPE, 4, 0, "boolean", 0, MR_TYPE}, | |
d33e787c | 2099 | }; |
2100 | ||
03c05291 | 2101 | static struct validate qgli_validate = { |
2102 | qgli_valobj, | |
2103 | 5, | |
647daf33 | 2104 | 0, |
d33e787c | 2105 | 0, |
2106 | 0, | |
87167924 | 2107 | 0, |
03c05291 | 2108 | access_qgli, |
d33e787c | 2109 | 0, |
03c05291 | 2110 | qualified_get_lists, |
d33e787c | 2111 | }; |
2112 | ||
03c05291 | 2113 | static char *gmol_fields[] = { |
2114 | "list_name", | |
2115 | "member_type", "member_name", | |
d33e787c | 2116 | }; |
2117 | ||
46b6f1f6 | 2118 | static char *gtml_fields[] = { |
2119 | "list_name", | |
2120 | "member_type", "member_name", "tag", | |
d33e787c | 2121 | }; |
2122 | ||
46b6f1f6 | 2123 | static struct validate gmol_validate = { |
d1b3a4bf | 2124 | VOlist0, |
2125 | 1, | |
d33e787c | 2126 | 0, |
2127 | 0, | |
2128 | 0, | |
2129 | 0, | |
03c05291 | 2130 | access_visible_list, |
d33e787c | 2131 | 0, |
46b6f1f6 | 2132 | get_members_of_list, |
d33e787c | 2133 | }; |
2134 | ||
03c05291 | 2135 | static char *glom_fields[] = { |
2136 | "member_type", "member_name", | |
2137 | "list_name", "active", "publicflg", "hidden", "maillist", "grouplist", | |
d33e787c | 2138 | }; |
2139 | ||
03c05291 | 2140 | static struct valobj glom_valobj[] = { |
5eaef520 | 2141 | {V_TYPE, 0, 0, "rmember", 0, MR_TYPE}, |
2142 | {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH}, | |
d33e787c | 2143 | }; |
2144 | ||
03c05291 | 2145 | static struct validate glom_validate = { |
2146 | glom_valobj, | |
d1b3a4bf | 2147 | 2, |
d33e787c | 2148 | 0, |
2149 | 0, | |
03c05291 | 2150 | 0, |
2151 | 0, | |
2152 | access_member, | |
2153 | 0, | |
2154 | get_lists_of_member, | |
d33e787c | 2155 | }; |
2156 | ||
03c05291 | 2157 | static char *cmol_fields[] = { |
2158 | "list_name", | |
2159 | "count", | |
d33e787c | 2160 | }; |
2161 | ||
03c05291 | 2162 | static struct validate cmol_validate = { |
2163 | VOlist0, | |
d33e787c | 2164 | 1, |
2165 | 0, | |
2166 | 0, | |
2167 | 0, | |
2168 | 0, | |
03c05291 | 2169 | access_visible_list, |
d33e787c | 2170 | 0, |
03c05291 | 2171 | count_members_of_list, |
d33e787c | 2172 | }; |
2173 | ||
03c05291 | 2174 | static char *gsin_fields[] = { |
e2b8245f | 2175 | "service", |
2176 | "service", "update_int", "target_file", "script", "dfgen", "dfcheck", | |
2177 | "type", "enable", "inprogress", "harderror", "errmsg", | |
8db06f75 | 2178 | "ace_type", "ace_name", "modtime", "modby", "modwith", |
88343c5e | 2179 | }; |
2180 | ||
5eaef520 | 2181 | static struct validate gsin_validate = |
03c05291 | 2182 | { |
263a36d4 | 2183 | 0, |
2184 | 0, | |
99e09b48 | 2185 | 0, |
2186 | 0, | |
2187 | 0, | |
2188 | 0, | |
03c05291 | 2189 | access_service, |
99e09b48 | 2190 | 0, |
59c3208b | 2191 | followup_gsin, |
99e09b48 | 2192 | }; |
2193 | ||
03c05291 | 2194 | static char *qgsv_fields[] = { |
2195 | "enable", "inprogress", "harderror", | |
2196 | "service", | |
4ffa124a | 2197 | }; |
0c345c78 | 2198 | |
03c05291 | 2199 | static struct valobj qgsv_valobj[] = { |
2200 | {V_TYPE, 0, 0, "boolean", 0, MR_TYPE}, | |
2201 | {V_TYPE, 1, 0, "boolean", 0, MR_TYPE}, | |
2202 | {V_TYPE, 2, 0, "boolean", 0, MR_TYPE}, | |
d33e787c | 2203 | }; |
2204 | ||
03c05291 | 2205 | static struct validate qgsv_validate = { |
2206 | qgsv_valobj, | |
2207 | 3, | |
d33e787c | 2208 | 0, |
2209 | 0, | |
2210 | 0, | |
2211 | 0, | |
d33e787c | 2212 | 0, |
03c05291 | 2213 | 0, |
2214 | qualified_get_server, | |
d33e787c | 2215 | }; |
2216 | ||
03c05291 | 2217 | static char *asin_fields[] = { |
e2b8245f | 2218 | "service", "update_int", "target_file", "script", "type", "enable", |
2219 | "ace_type", "ace_name", | |
d33e787c | 2220 | }; |
2221 | ||
03c05291 | 2222 | static struct valobj asin_valobj[] = { |
e2b8245f | 2223 | {V_CHAR, 0, SERVERS_TABLE, "name"}, |
f802fd0d | 2224 | {V_NUM, 1}, |
03c05291 | 2225 | {V_LEN, 2, SERVERS_TABLE, "target_file"}, |
2226 | {V_LEN, 3, SERVERS_TABLE, "script"}, | |
2227 | {V_TYPE, 4, 0, "service", 0, MR_TYPE}, | |
f802fd0d | 2228 | {V_NUM, 5}, |
e2b8245f | 2229 | {V_TYPE, 6, 0, "ace_type", 0, MR_ACE}, |
03c05291 | 2230 | {V_TYPEDATA, 7, 0, 0, 0, MR_ACE}, |
d33e787c | 2231 | }; |
2232 | ||
03c05291 | 2233 | static struct validate asin_validate = /* for asin, usin */ |
2234 | { | |
2235 | asin_valobj, | |
d1b3a4bf | 2236 | 8, |
e2b8245f | 2237 | "name", |
03c05291 | 2238 | "name = UPPER('%s')", |
d33e787c | 2239 | 1, |
d33e787c | 2240 | 0, |
03c05291 | 2241 | 0, |
2242 | 0, | |
2243 | set_uppercase_modtime, | |
d33e787c | 2244 | }; |
2245 | ||
03c05291 | 2246 | static struct validate rsve_validate = { |
2247 | asin_valobj, | |
d1b3a4bf | 2248 | 1, |
e2b8245f | 2249 | "name", |
03c05291 | 2250 | "name = UPPER('%s')", |
d33e787c | 2251 | 1, |
d33e787c | 2252 | 0, |
03c05291 | 2253 | access_service, |
2254 | 0, | |
2255 | set_uppercase_modtime, | |
d33e787c | 2256 | }; |
2257 | ||
03c05291 | 2258 | static char *ssif_fields[] = { |
e2b8245f | 2259 | "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg", |
d33e787c | 2260 | }; |
2261 | ||
03c05291 | 2262 | static struct valobj ssif_valobj[] = { |
d1b3a4bf | 2263 | {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE}, |
f802fd0d | 2264 | {V_NUM, 1}, |
2265 | {V_NUM, 2}, | |
2266 | {V_NUM, 3}, | |
2267 | {V_NUM, 4}, | |
03c05291 | 2268 | {V_LEN, 5, SERVERS_TABLE, "errmsg"}, |
d33e787c | 2269 | }; |
2270 | ||
03c05291 | 2271 | static struct validate ssif_validate = { |
2272 | ssif_valobj, | |
d1b3a4bf | 2273 | 6, |
e2b8245f | 2274 | "name", |
03c05291 | 2275 | "name = UPPER('%s')", |
d33e787c | 2276 | 1, |
2277 | 0, | |
2278 | 0, | |
03c05291 | 2279 | 0, |
d33e787c | 2280 | 0, |
2281 | }; | |
2282 | ||
03c05291 | 2283 | static char *dsin_fields[] = { |
e2b8245f | 2284 | "service", |
95127ba8 | 2285 | }; |
2286 | ||
03c05291 | 2287 | static struct validate dsin_validate = { |
2288 | asin_valobj, | |
d1b3a4bf | 2289 | 1, |
e2b8245f | 2290 | "name", |
03c05291 | 2291 | "name = UPPER('%s')", |
2292 | 1, | |
0c345c78 | 2293 | 0, |
2294 | 0, | |
03c05291 | 2295 | setup_dsin, |
0c345c78 | 2296 | 0, |
95127ba8 | 2297 | }; |
2298 | ||
03c05291 | 2299 | static char *gshi_fields[] = { |
e2b8245f | 2300 | "service", "machine", |
2301 | "service", "machine", "enable", "override", "success", "inprogress", | |
03c05291 | 2302 | "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2", |
8db06f75 | 2303 | "value3", "modtime", "modby", "modwith", |
95127ba8 | 2304 | }; |
2305 | ||
03c05291 | 2306 | static struct validate gshi_validate = { |
263a36d4 | 2307 | 0, |
2308 | 0, | |
0c345c78 | 2309 | 0, |
2310 | 0, | |
2311 | 0, | |
2312 | 0, | |
03c05291 | 2313 | access_service, |
2314 | 0, | |
2315 | followup_fix_modby, | |
95127ba8 | 2316 | }; |
2317 | ||
03c05291 | 2318 | static char *qgsh_fields[] = { |
2319 | "service", "enable", "override", "success", "inprogress", "hosterror", | |
e2b8245f | 2320 | "service", "machine", |
d33e787c | 2321 | }; |
2322 | ||
03c05291 | 2323 | static struct valobj qgsh_valobj[] = { |
2324 | {V_TYPE, 1, 0, "boolean", 0, MR_TYPE}, | |
2325 | {V_TYPE, 2, 0, "boolean", 0, MR_TYPE}, | |
2326 | {V_TYPE, 3, 0, "boolean", 0, MR_TYPE}, | |
2327 | {V_TYPE, 4, 0, "boolean", 0, MR_TYPE}, | |
2328 | {V_TYPE, 5, 0, "boolean", 0, MR_TYPE}, | |
99e09b48 | 2329 | }; |
2330 | ||
03c05291 | 2331 | static struct validate qgsh_validate = { |
2332 | qgsh_valobj, | |
2333 | 5, | |
d33e787c | 2334 | 0, |
2335 | 0, | |
2336 | 0, | |
2337 | 0, | |
2338 | 0, | |
2339 | 0, | |
03c05291 | 2340 | qualified_get_serverhost, |
d33e787c | 2341 | }; |
2342 | ||
03c05291 | 2343 | static char *ashi_fields[] = { |
e2b8245f | 2344 | "service", "machine", "enable", "value1", "value2", "value3", |
d33e787c | 2345 | }; |
2346 | ||
03c05291 | 2347 | static struct valobj ashi_valobj[] = { |
e2b8245f | 2348 | {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE}, |
e2b8245f | 2349 | {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
f802fd0d | 2350 | {V_NUM, 2}, |
2351 | {V_NUM, 3}, | |
2352 | {V_NUM, 4}, | |
03c05291 | 2353 | {V_LEN, 5, SERVERHOSTS_TABLE, "value3"}, |
45bf7573 | 2354 | }; |
2355 | ||
03c05291 | 2356 | static struct validate ashi_validate = /* ashi & ushi */ |
2357 | { | |
2358 | ashi_valobj, | |
d1b3a4bf | 2359 | 6, |
e2b8245f | 2360 | "service", |
03c05291 | 2361 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 2362 | 2, |
d33e787c | 2363 | 0, |
03c05291 | 2364 | access_service, |
d33e787c | 2365 | 0, |
03c05291 | 2366 | set_serverhost_modtime, |
99e09b48 | 2367 | }; |
2368 | ||
5eaef520 | 2369 | static struct validate rshe_validate = |
03c05291 | 2370 | { |
2371 | ashi_valobj, | |
d1b3a4bf | 2372 | 2, |
e2b8245f | 2373 | "service", |
03c05291 | 2374 | "service = UPPER('%s') AND mach_id = %d", |
2375 | 2, | |
2376 | 0, | |
2377 | access_service, | |
2378 | 0, | |
2379 | set_serverhost_modtime, | |
d33e787c | 2380 | }; |
2381 | ||
5eaef520 | 2382 | static struct validate ssho_validate = |
03c05291 | 2383 | { |
2384 | ashi_valobj, | |
d1b3a4bf | 2385 | 2, |
e2b8245f | 2386 | "service", |
03c05291 | 2387 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 2388 | 2, |
d33e787c | 2389 | 0, |
03c05291 | 2390 | access_service, |
2391 | 0, | |
2392 | trigger_dcm, | |
d33e787c | 2393 | }; |
2394 | ||
03c05291 | 2395 | static char *sshi_fields[] = { |
e2b8245f | 2396 | "service", "machine", "override", "success", "inprogress", |
03c05291 | 2397 | "hosterror", "errmsg", "ltt", "lts", |
368be132 | 2398 | }; |
2399 | ||
03c05291 | 2400 | static struct valobj sshi_valobj[] = { |
e2b8245f | 2401 | {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE}, |
f802fd0d | 2402 | {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
2403 | {V_NUM, 2}, | |
2404 | {V_NUM, 3}, | |
2405 | {V_NUM, 4}, | |
2406 | {V_NUM, 5}, | |
2407 | {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"}, | |
2408 | {V_NUM, 7}, | |
2409 | {V_NUM, 8}, | |
368be132 | 2410 | }; |
2411 | ||
5eaef520 | 2412 | static struct validate sshi_validate = |
03c05291 | 2413 | { |
2414 | sshi_valobj, | |
d1b3a4bf | 2415 | 9, |
368be132 | 2416 | 0, |
2417 | 0, | |
2418 | 0, | |
2419 | 0, | |
2420 | 0, | |
2421 | 0, | |
03c05291 | 2422 | 0, |
368be132 | 2423 | }; |
2424 | ||
03c05291 | 2425 | static char *dshi_fields[] = { |
e2b8245f | 2426 | "service", "machine", |
368be132 | 2427 | }; |
2428 | ||
5eaef520 | 2429 | static struct validate dshi_validate = |
03c05291 | 2430 | { |
2431 | ashi_valobj, | |
d1b3a4bf | 2432 | 2, |
e2b8245f | 2433 | "service", |
03c05291 | 2434 | "service = UPPER('%s') AND mach_id = %d", |
135dcb80 | 2435 | 2, |
368be132 | 2436 | 0, |
03c05291 | 2437 | access_service, |
2438 | setup_dshi, | |
368be132 | 2439 | 0, |
03c05291 | 2440 | }; |
2441 | ||
2442 | static char *gslo_fields[] = { | |
2443 | "server", | |
e2b8245f | 2444 | "server", "machine", |
03c05291 | 2445 | }; |
2446 | ||
2447 | static char *gfsl_fields[] = { | |
e2b8245f | 2448 | "label", |
8db06f75 | 2449 | "label", "type", "machine", "name", "mount", "access", "comments", |
2450 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
03c05291 | 2451 | }; |
2452 | ||
5a8887d8 | 2453 | static struct validate gfsl_validate = { |
2454 | 0, | |
2455 | 0, | |
2456 | 0, | |
2457 | 0, | |
2458 | 0, | |
2459 | 0, | |
2460 | access_filesys, | |
2461 | 0, | |
2462 | followup_fix_modby, | |
2463 | }; | |
2464 | ||
03c05291 | 2465 | static char *gfsm_fields[] = { |
e2b8245f | 2466 | "machine", |
8db06f75 | 2467 | "label", "type", "machine", "name", "mount", "access", "comments", |
2468 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
03c05291 | 2469 | }; |
2470 | ||
03c05291 | 2471 | static struct validate gfsm_validate = { |
d1b3a4bf | 2472 | VOmach0, |
2473 | 1, | |
368be132 | 2474 | 0, |
2475 | 0, | |
368be132 | 2476 | 0, |
03c05291 | 2477 | 0, |
2478 | 0, | |
2479 | 0, | |
2480 | followup_fix_modby, | |
368be132 | 2481 | }; |
2482 | ||
03c05291 | 2483 | static char *gfsn_fields[] = { |
cc1bca5c | 2484 | "machine", "partition", |
8db06f75 | 2485 | "label", "type", "machine", "name", "mount", "access", "comments", |
2486 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
368be132 | 2487 | }; |
2488 | ||
03c05291 | 2489 | static struct validate gfsn_validate = { |
263a36d4 | 2490 | VOmach0, |
2491 | 1, | |
368be132 | 2492 | 0, |
2493 | 0, | |
368be132 | 2494 | 0, |
2495 | 0, | |
368be132 | 2496 | 0, |
2497 | 0, | |
03c05291 | 2498 | followup_fix_modby, |
368be132 | 2499 | }; |
2500 | ||
03c05291 | 2501 | static char *gfsp_fields[] = { |
2502 | "path", | |
8db06f75 | 2503 | "label", "type", "machine", "name", "mount", "access", "comments", |
2504 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
d33e787c | 2505 | }; |
2506 | ||
03c05291 | 2507 | static char *gfsg_fields[] = { |
e2b8245f | 2508 | "list", |
8db06f75 | 2509 | "label", "type", "machine", "name", "mount", "access", "comments", |
2510 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
03c05291 | 2511 | }; |
2512 | ||
03c05291 | 2513 | static struct validate gfsg_validate = { |
d1b3a4bf | 2514 | VOlist0, |
2515 | 1, | |
d33e787c | 2516 | 0, |
2517 | 0, | |
2518 | 0, | |
2519 | 0, | |
03c05291 | 2520 | access_list, |
d33e787c | 2521 | 0, |
03c05291 | 2522 | followup_fix_modby, |
d33e787c | 2523 | }; |
2524 | ||
03c05291 | 2525 | static char *afil_fields[] = { |
8db06f75 | 2526 | "label", "type", "machine", "name", "mount", "access", "comments", |
2527 | "owner", "owners", "create", "lockertype", | |
d33e787c | 2528 | }; |
2529 | ||
03c05291 | 2530 | static struct valobj afil_valobj[] = { |
e2b8245f | 2531 | {V_CHAR, 0, FILESYS_TABLE, "label"}, |
03c05291 | 2532 | {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE}, |
e2b8245f | 2533 | {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
2534 | {V_CHAR, 3, FILESYS_TABLE, "name"}, | |
03c05291 | 2535 | {V_LEN, 4, FILESYS_TABLE, "mount"}, |
f802fd0d | 2536 | {V_LEN, 5, FILESYS_TABLE, "rwaccess"}, |
e2b8245f | 2537 | {V_LEN, 6, FILESYS_TABLE, "comments"}, |
2538 | {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER}, | |
2539 | {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST}, | |
f802fd0d | 2540 | {V_NUM, 9}, |
03c05291 | 2541 | {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE}, |
99e09b48 | 2542 | }; |
2543 | ||
03c05291 | 2544 | static struct validate afil_validate = { |
2545 | afil_valobj, | |
d1b3a4bf | 2546 | 11, |
e2b8245f | 2547 | "label", |
03c05291 | 2548 | "label = '%s'", |
2549 | 1, | |
e2b8245f | 2550 | "filsys_id", |
03c05291 | 2551 | 0, |
2552 | setup_afil, | |
2553 | set_filesys_modtime, | |
2554 | }; | |
99e09b48 | 2555 | |
03c05291 | 2556 | static char *ufil_fields[] = { |
8db06f75 | 2557 | "label", "newlabel", "type", "machine", "name", "mount", "access", |
2558 | "comments", "owner", "owners", "create", "lockertype", | |
d33e787c | 2559 | }; |
2560 | ||
03c05291 | 2561 | static struct valobj ufil_valobj[] = { |
e2b8245f | 2562 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, |
2563 | {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE}, | |
03c05291 | 2564 | {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE}, |
e2b8245f | 2565 | {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
2566 | {V_CHAR, 4, FILESYS_TABLE, "name"}, | |
03c05291 | 2567 | {V_LEN, 5, FILESYS_TABLE, "mount"}, |
f802fd0d | 2568 | {V_LEN, 6, FILESYS_TABLE, "rwaccess"}, |
e2b8245f | 2569 | {V_LEN, 7, FILESYS_TABLE, "comments"}, |
2570 | {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER}, | |
2571 | {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST}, | |
f802fd0d | 2572 | {V_NUM, 10}, |
03c05291 | 2573 | {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE}, |
d33e787c | 2574 | }; |
2575 | ||
03c05291 | 2576 | static struct validate ufil_validate = { |
2577 | ufil_valobj, | |
d1b3a4bf | 2578 | 12, |
e2b8245f | 2579 | "label", |
03c05291 | 2580 | "filsys_id = %d", |
2581 | 1, | |
e2b8245f | 2582 | "filsys_id", |
d33e787c | 2583 | 0, |
03c05291 | 2584 | setup_ufil, |
2585 | set_filesys_modtime, | |
d33e787c | 2586 | }; |
2587 | ||
03c05291 | 2588 | static char *dfil_fields[] = { |
e2b8245f | 2589 | "label", |
03c05291 | 2590 | }; |
2591 | ||
03c05291 | 2592 | static struct validate dfil_validate = { |
d1b3a4bf | 2593 | VOfilesys0, |
2594 | 1, | |
03c05291 | 2595 | "label", |
2596 | "filsys_id = %d", | |
2597 | 1, | |
d33e787c | 2598 | 0, |
2599 | 0, | |
03c05291 | 2600 | setup_dfil, |
2601 | 0, | |
d33e787c | 2602 | }; |
2603 | ||
03c05291 | 2604 | static char *gfgm_fields[] = { |
e2b8245f | 2605 | "fsgroup", "filesys", "sortkey" |
5eaef520 | 2606 | }; |
03c05291 | 2607 | |
03c05291 | 2608 | static struct validate gfgm_validate = { |
d1b3a4bf | 2609 | VOfilesys0, |
29028043 | 2610 | 1, |
d33e787c | 2611 | 0, |
2612 | 0, | |
2613 | 0, | |
2614 | 0, | |
2615 | 0, | |
2616 | 0, | |
d33e787c | 2617 | 0, |
d33e787c | 2618 | }; |
2619 | ||
03c05291 | 2620 | static struct valobj aftg_valobj[] = { |
e2b8245f | 2621 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, |
2622 | {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, | |
d33e787c | 2623 | }; |
2624 | ||
03c05291 | 2625 | static struct validate aftg_validate = { |
2626 | aftg_valobj, | |
d1b3a4bf | 2627 | 2, |
03c05291 | 2628 | "group_id", |
2629 | "group_id = %d and filsys_id = %d", | |
2630 | 2, | |
2631 | 0, | |
2632 | 0, | |
2633 | 0, | |
d33e787c | 2634 | 0, |
d33e787c | 2635 | }; |
2636 | ||
03c05291 | 2637 | static char *ganf_fields[] = { |
8db06f75 | 2638 | "machine", "dir", "device", "status", "allocated", "size", |
2639 | "modtime", "modby", "modwith", | |
d33e787c | 2640 | }; |
2641 | ||
03c05291 | 2642 | static char *gnfp_fields[] = { |
e2b8245f | 2643 | "machine", "dir", |
8db06f75 | 2644 | "machine", "dir", "device", "status", "allocated", "size", |
2645 | "modtime", "modby", "modwith", | |
d33e787c | 2646 | }; |
2647 | ||
03c05291 | 2648 | static struct validate gnfp_validate = { |
263a36d4 | 2649 | VOmach0, |
2650 | 1, | |
03c05291 | 2651 | 0, |
2652 | 0, | |
2653 | 0, | |
2654 | 0, | |
2655 | 0, | |
2656 | 0, | |
2657 | followup_fix_modby, | |
d33e787c | 2658 | }; |
2659 | ||
03c05291 | 2660 | static struct valobj anfp_valobj[] = { |
e2b8245f | 2661 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
03c05291 | 2662 | {V_CHAR, 1, NFSPHYS_TABLE, "dir"}, |
2663 | {V_LEN, 2, NFSPHYS_TABLE, "device"}, | |
f802fd0d | 2664 | {V_NUM, 3}, |
2665 | {V_NUM, 4}, | |
2666 | {V_NUM, 5}, | |
03c05291 | 2667 | }; |
2668 | ||
2669 | static struct validate anfp_validate = { | |
2670 | anfp_valobj, | |
d1b3a4bf | 2671 | 6, |
e2b8245f | 2672 | "dir", |
03c05291 | 2673 | "mach_id = %d and dir = '%s'", |
2674 | 2, | |
2675 | "nfsphys_id", | |
d33e787c | 2676 | 0, |
03c05291 | 2677 | prefetch_value, |
2678 | set_nfsphys_modtime, | |
2679 | }; | |
2680 | ||
2681 | static struct validate unfp_validate = { | |
2682 | anfp_valobj, | |
d1b3a4bf | 2683 | 6, |
e2b8245f | 2684 | "dir", |
03c05291 | 2685 | "mach_id = %d and dir = '%s'", |
2686 | 2, | |
2687 | "nfsphys_id", | |
d33e787c | 2688 | 0, |
03c05291 | 2689 | 0, |
2690 | set_nfsphys_modtime, | |
d33e787c | 2691 | }; |
2692 | ||
03c05291 | 2693 | static char *ajnf_fields[] = { |
e2b8245f | 2694 | "machine", "dir", "adjustment", |
d33e787c | 2695 | }; |
2696 | ||
f802fd0d | 2697 | static struct valobj ajnf_valobj[] = { |
f802fd0d | 2698 | {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE}, |
2699 | {V_CHAR, 1, NFSPHYS_TABLE, "dir"}, | |
2700 | {V_NUM, 2}, | |
2701 | }; | |
2702 | ||
2703 | static struct validate ajnf_validate = { | |
2704 | ajnf_valobj, | |
d1b3a4bf | 2705 | 3, |
f802fd0d | 2706 | "dir", |
2707 | "mach_id = %d and dir = '%s'", | |
2708 | 2, | |
2709 | "nfsphys_id", | |
2710 | 0, | |
2711 | 0, | |
2712 | set_nfsphys_modtime, | |
2713 | }; | |
2714 | ||
03c05291 | 2715 | static char *dnfp_fields[] = { |
e2b8245f | 2716 | "machine", "dir", |
d33e787c | 2717 | }; |
2718 | ||
03c05291 | 2719 | static struct validate dnfp_validate = { |
d1b3a4bf | 2720 | anfp_valobj, |
2721 | 2, | |
e2b8245f | 2722 | "dir", |
03c05291 | 2723 | "mach_id = %d and dir = '%s'", |
2724 | 2, | |
2725 | "nfsphys_id", | |
66f4a35b | 2726 | 0, |
03c05291 | 2727 | setup_dnfp, |
2728 | set_nfsphys_modtime, | |
2729 | }; | |
2730 | ||
2731 | static char *gqot_fields[] = { | |
e2b8245f | 2732 | "filesys", "type", "name", |
8db06f75 | 2733 | "filesys", "type", "name", "quota", "dir", "machine", |
2734 | "modtime", "modby", "modwith", | |
66f4a35b | 2735 | }; |
2736 | ||
03c05291 | 2737 | static struct valobj gqot_valobj[] = { |
e2b8245f | 2738 | {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE}, |
03c05291 | 2739 | {V_TYPEDATA, 2, 0, 0, 0, MR_ACE}, |
03c05291 | 2740 | }; |
2741 | ||
2742 | static struct validate gqot_validate = { | |
2743 | gqot_valobj, | |
263a36d4 | 2744 | 2, |
66f4a35b | 2745 | 0, |
2746 | 0, | |
2747 | 0, | |
d33e787c | 2748 | 0, |
d33e787c | 2749 | 0, |
03c05291 | 2750 | 0, |
2751 | followup_gqot, | |
d33e787c | 2752 | }; |
2753 | ||
03c05291 | 2754 | static char *gqbf_fields[] = { |
e2b8245f | 2755 | "filesys", |
8db06f75 | 2756 | "filesys", "type", "name", "quota", "dir", "machine", |
2757 | "modtime", "modby", "modwith", | |
d33e787c | 2758 | }; |
2759 | ||
03c05291 | 2760 | static struct validate gqbf_validate = { |
263a36d4 | 2761 | 0, |
2762 | 0, | |
0c345c78 | 2763 | 0, |
2764 | 0, | |
2765 | 0, | |
2766 | 0, | |
03c05291 | 2767 | access_filesys, |
0c345c78 | 2768 | 0, |
03c05291 | 2769 | followup_gqot, |
d33e787c | 2770 | }; |
2771 | ||
03c05291 | 2772 | static char *aqot_fields[] = { |
e2b8245f | 2773 | "filesys", "type", "name", "quota", |
d33e787c | 2774 | }; |
2775 | ||
03c05291 | 2776 | static struct valobj aqot_valobj[] = { |
e2b8245f | 2777 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, |
2778 | {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE}, | |
03c05291 | 2779 | {V_TYPEDATA, 2, 0, 0, 0, MR_ACE}, |
f802fd0d | 2780 | {V_NUM, 3}, |
d33e787c | 2781 | }; |
2782 | ||
03c05291 | 2783 | static struct validate aqot_validate = { |
2784 | aqot_valobj, | |
d1b3a4bf | 2785 | 4, |
e2b8245f | 2786 | "filsys_id", |
03c05291 | 2787 | "filsys_id = %d and type = '%s' and entity_id = %d", |
2788 | 3, | |
0c345c78 | 2789 | 0, |
2790 | 0, | |
03c05291 | 2791 | prefetch_filesys, |
2792 | followup_aqot, | |
2793 | }; | |
2794 | ||
2795 | static struct validate uqot_validate = { | |
2796 | aqot_valobj, | |
d1b3a4bf | 2797 | 4, |
e2b8245f | 2798 | "filsys_id", |
03c05291 | 2799 | "filsys_id = %d AND type = '%s' AND entity_id = %d", |
2800 | 3, | |
2801 | 0, | |
0c345c78 | 2802 | 0, |
03c05291 | 2803 | setup_dqot, |
2804 | followup_aqot, | |
2805 | }; | |
2806 | ||
2807 | static struct validate dqot_validate = { | |
2808 | aqot_valobj, | |
d1b3a4bf | 2809 | 3, |
e2b8245f | 2810 | "filsys_id", |
03c05291 | 2811 | "filsys_id = %d AND type = '%s' AND entity_id = %d", |
2812 | 3, | |
0c345c78 | 2813 | 0, |
0c345c78 | 2814 | 0, |
03c05291 | 2815 | setup_dqot, |
2816 | followup_dqot, | |
d33e787c | 2817 | }; |
2818 | ||
03c05291 | 2819 | static char *gnfq_fields[] = { |
e2b8245f | 2820 | "filesys", "login", |
8db06f75 | 2821 | "filesys", "login", "quota", "dir", "machine", |
2822 | "modtime", "modby", "modwith", | |
d33e787c | 2823 | }; |
2824 | ||
03c05291 | 2825 | static struct validate gnfq_validate = { |
263a36d4 | 2826 | 0, |
2827 | 0, | |
d33e787c | 2828 | 0, |
2829 | 0, | |
2830 | 0, | |
2831 | 0, | |
03c05291 | 2832 | access_filesys, |
d33e787c | 2833 | 0, |
03c05291 | 2834 | followup_gqot, |
d33e787c | 2835 | }; |
2836 | ||
03c05291 | 2837 | static char *gnqp_fields[] = { |
e2b8245f | 2838 | "machine", "dir", |
8db06f75 | 2839 | "filesys", "login", "quota", "dir", "machine", |
2840 | "modtime", "modby", "modwith", | |
4ffa124a | 2841 | }; |
0c345c78 | 2842 | |
03c05291 | 2843 | static char *anfq_fields[] = { |
e2b8245f | 2844 | "filesys", "login", "quota", |
d33e787c | 2845 | }; |
2846 | ||
f802fd0d | 2847 | static struct valobj anfq_valobj[] = { |
f802fd0d | 2848 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, |
2849 | {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER}, | |
2850 | {V_NUM, 2}, | |
2851 | }; | |
2852 | ||
03c05291 | 2853 | static struct validate anfq_validate = { |
f802fd0d | 2854 | anfq_valobj, |
d1b3a4bf | 2855 | 3, |
e2b8245f | 2856 | "filsys_id", |
03c05291 | 2857 | "filsys_id = %d AND type = 'USER' AND entity_id = %d", |
2858 | 2, | |
2859 | 0, /* object ? */ | |
d33e787c | 2860 | 0, |
03c05291 | 2861 | prefetch_filesys, |
2862 | followup_aqot, | |
d33e787c | 2863 | }; |
2864 | ||
03c05291 | 2865 | static struct validate unfq_validate = { |
f802fd0d | 2866 | anfq_valobj, |
d1b3a4bf | 2867 | 3, |
e2b8245f | 2868 | "filsys_id", |
03c05291 | 2869 | "filsys_id = %d AND type = 'USER' AND entity_id = %d", |
2870 | 2, | |
d33e787c | 2871 | 0, |
2872 | 0, | |
03c05291 | 2873 | setup_dqot, |
2874 | followup_aqot, | |
2875 | }; | |
2876 | ||
2877 | static struct validate dnfq_validate = { | |
f802fd0d | 2878 | anfq_valobj, |
d1b3a4bf | 2879 | 3, |
e2b8245f | 2880 | "filsys_id", |
03c05291 | 2881 | "filsys_id = %d AND entity_id = %d", |
2882 | 2, | |
d33e787c | 2883 | 0, |
d33e787c | 2884 | 0, |
03c05291 | 2885 | setup_dqot, |
2886 | followup_dqot, | |
d33e787c | 2887 | }; |
2888 | ||
d7ddc011 | 2889 | static char *gzcl2_fields[] = { |
e2b8245f | 2890 | "class", |
2891 | "class", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
8db06f75 | 2892 | "iws_type", "iws_name", "iui_type", "iui_name", |
2893 | "modtime", "modby", "modwith", | |
d33e787c | 2894 | }; |
2895 | ||
d7ddc011 | 2896 | static char *gzcl_fields[] = { |
2897 | "class", | |
2898 | "class", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
2899 | "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", | |
2900 | "owner_id", "modtime", "modby", "modwith", | |
2901 | }; | |
2902 | ||
d33e787c | 2903 | static struct validate gzcl_validate = { |
263a36d4 | 2904 | 0, |
2905 | 0, | |
d33e787c | 2906 | 0, |
2907 | 0, | |
2908 | 0, | |
2909 | 0, | |
d7ddc011 | 2910 | access_zephyr, |
d33e787c | 2911 | 0, |
2912 | followup_gzcl, | |
2913 | }; | |
2914 | ||
d7ddc011 | 2915 | static char *azcl2_fields[] = { |
e2b8245f | 2916 | "class", "xmt_type", "xmt_name", "sub_type", "sub_name", |
0c345c78 | 2917 | "iws_type", "iws_name", "iui_type", "iui_name", |
d7ddc011 | 2918 | }; |
2919 | ||
2920 | static struct valobj azcl2_valobj[] = { | |
2921 | {V_CHAR, 0, ZEPHYR_TABLE, "class"}, | |
2922 | {V_TYPE, 1, 0, "zace_type", 0, MR_ACE}, | |
2923 | {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE}, | |
2924 | {V_TYPE, 3, 0, "zace_type", 0, MR_ACE}, | |
2925 | {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE}, | |
2926 | {V_TYPE, 5, 0, "zace_type", 0, MR_ACE}, | |
2927 | {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE}, | |
2928 | {V_TYPE, 7, 0, "zace_type", 0, MR_ACE}, | |
2929 | {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE}, | |
2930 | }; | |
2931 | ||
2932 | static struct validate azcl2_validate = { | |
2933 | azcl2_valobj, | |
2934 | 9, | |
2935 | "class", | |
2936 | "class = '%s'", | |
2937 | 1, | |
2938 | 0, | |
2939 | 0, | |
2940 | 0, | |
2941 | set_zephyr_modtime, | |
2942 | }; | |
2943 | ||
2944 | static char *azcl_fields[] = { | |
2945 | "class", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
2946 | "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", | |
2947 | "owner_id", | |
d33e787c | 2948 | }; |
2949 | ||
2950 | static struct valobj azcl_valobj[] = { | |
e2b8245f | 2951 | {V_CHAR, 0, ZEPHYR_TABLE, "class"}, |
46b6f1f6 | 2952 | {V_TYPE, 1, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2953 | {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2954 | {V_TYPE, 3, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2955 | {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2956 | {V_TYPE, 5, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2957 | {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2958 | {V_TYPE, 7, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2959 | {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE}, |
d7ddc011 | 2960 | {V_TYPE, 9, 0, "ace_type", 0, MR_ACE}, |
2961 | {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE}, | |
d33e787c | 2962 | }; |
2963 | ||
2964 | static struct validate azcl_validate = { | |
2965 | azcl_valobj, | |
d7ddc011 | 2966 | 11, |
e2b8245f | 2967 | "class", |
03c05291 | 2968 | "class = '%s'", |
d33e787c | 2969 | 1, |
2970 | 0, | |
2971 | 0, | |
2972 | 0, | |
2973 | set_zephyr_modtime, | |
2974 | }; | |
2975 | ||
d7ddc011 | 2976 | static char *uzcl2_fields[] = { |
e2b8245f | 2977 | "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name", |
0c345c78 | 2978 | "iws_type", "iws_name", "iui_type", "iui_name", |
d33e787c | 2979 | }; |
2980 | ||
d7ddc011 | 2981 | static struct valobj uzcl2_valobj[] = { |
2982 | {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS}, | |
2983 | {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE}, | |
2984 | {V_TYPE, 2, 0, "zace_type", 0, MR_ACE}, | |
2985 | {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE}, | |
2986 | {V_TYPE, 4, 0, "zace_type", 0, MR_ACE}, | |
2987 | {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE}, | |
2988 | {V_TYPE, 6, 0, "zace_type", 0, MR_ACE}, | |
2989 | {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE}, | |
2990 | {V_TYPE, 8, 0, "zace_type", 0, MR_ACE}, | |
2991 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, | |
2992 | }; | |
2993 | ||
2994 | static struct validate uzcl2_validate = { | |
2995 | uzcl2_valobj, | |
2996 | 10, | |
2997 | "class", | |
2998 | "class = '%s'", | |
2999 | 1, | |
3000 | 0, | |
3001 | access_zephyr, | |
3002 | 0, | |
3003 | set_zephyr_modtime, | |
3004 | }; | |
3005 | ||
3006 | static char *uzcl_fields[] = { | |
3007 | "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
3008 | "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id", | |
3009 | }; | |
3010 | ||
d33e787c | 3011 | static struct valobj uzcl_valobj[] = { |
d1b3a4bf | 3012 | {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS}, |
e2b8245f | 3013 | {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE}, |
46b6f1f6 | 3014 | {V_TYPE, 2, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 3015 | {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 3016 | {V_TYPE, 4, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 3017 | {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 3018 | {V_TYPE, 6, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 3019 | {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 3020 | {V_TYPE, 8, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 3021 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, |
d7ddc011 | 3022 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, |
3023 | {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE}, | |
d33e787c | 3024 | }; |
3025 | ||
3026 | static struct validate uzcl_validate = { | |
3027 | uzcl_valobj, | |
d7ddc011 | 3028 | 12, |
e2b8245f | 3029 | "class", |
3e8c655c | 3030 | "class = '%s'", |
d33e787c | 3031 | 1, |
3032 | 0, | |
d7ddc011 | 3033 | access_zephyr, |
d33e787c | 3034 | 0, |
3035 | set_zephyr_modtime, | |
3036 | }; | |
3037 | ||
3038 | static struct validate dzcl_validate = { | |
3039 | 0, | |
3040 | 0, | |
e2b8245f | 3041 | "class", |
73043086 | 3042 | "class = '%s'", |
d33e787c | 3043 | 1, |
3044 | 0, | |
3045 | 0, | |
3046 | 0, | |
3047 | 0, | |
3048 | }; | |
3049 | ||
03c05291 | 3050 | static char *gsha_fields[] = { |
e2b8245f | 3051 | "machine", |
8db06f75 | 3052 | "machine", "ace_type", "ace_name", "modtime", "modby", "modwith", |
03c05291 | 3053 | }; |
3054 | ||
5eaef520 | 3055 | static struct validate gsha_validate = |
03c05291 | 3056 | { |
263a36d4 | 3057 | 0, |
3058 | 0, | |
03c05291 | 3059 | 0, |
3060 | 0, | |
3061 | 0, | |
3062 | 0, | |
3063 | 0, | |
3064 | 0, | |
3065 | followup_gsha, | |
3066 | }; | |
3067 | ||
3068 | static char *asha_fields[] = { | |
e2b8245f | 3069 | "machine", "ace_type", "ace_name", |
03c05291 | 3070 | }; |
3071 | ||
3072 | static struct valobj asha_valobj[] = { | |
e2b8245f | 3073 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
e2b8245f | 3074 | {V_TYPE, 1, 0, "ace_type", 0, MR_ACE}, |
03c05291 | 3075 | {V_TYPEDATA, 2, 0, 0, 0, MR_ACE}, |
3076 | }; | |
3077 | ||
5eaef520 | 3078 | static struct validate asha_validate = |
03c05291 | 3079 | { |
3080 | asha_valobj, | |
d1b3a4bf | 3081 | 3, |
e2b8245f | 3082 | "mach_id", |
03c05291 | 3083 | "mach_id = %d", |
3084 | 1, | |
e2b8245f | 3085 | "mach_id", |
03c05291 | 3086 | 0, |
3087 | 0, | |
3088 | set_modtime_by_id, | |
3089 | }; | |
3090 | ||
46b6f1f6 | 3091 | static char *gacl_fields[] = { |
3092 | "machine", "target", | |
3093 | "machine", "target", "kind", "list", | |
3094 | }; | |
3095 | ||
3096 | static char *aacl_fields[] = { | |
3097 | "machine", "target", "kind", "list", | |
3098 | }; | |
3099 | ||
3100 | static char *dacl_fields[] = { | |
3101 | "machine", "target", | |
3102 | }; | |
3103 | ||
3104 | static struct valobj aacl_valobj[] = { | |
3105 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3106 | {V_CHAR, 1, ACL_TABLE, "target"}, | |
3107 | {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE}, | |
3108 | {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3109 | }; | |
3110 | ||
3111 | static struct validate gacl_validate = | |
3112 | { | |
3113 | aacl_valobj, | |
3114 | 1, | |
3115 | NULL, | |
3116 | NULL, | |
3117 | 0, | |
3118 | "mach_id", | |
3119 | /* access_acl */ 0, | |
3120 | 0, | |
3121 | 0, | |
3122 | }; | |
3123 | ||
3124 | static struct validate aacl_validate = | |
3125 | { | |
3126 | aacl_valobj, | |
3127 | 4, | |
3128 | "mach_id", | |
3129 | "mach_id = %d AND target = '%s'", | |
3130 | 2, | |
3131 | "mach_id", | |
3132 | /* access_acl */ 0, | |
3133 | 0, | |
3134 | 0, | |
3135 | }; | |
3136 | ||
fd5b2340 | 3137 | static char *gsvc_fields[] = { |
69eb9470 | 3138 | "service", "protocol", |
8db06f75 | 3139 | "service", "protocol", "port", "description", "modtime", "modby", "modwith", |
d33e787c | 3140 | }; |
3141 | ||
fd5b2340 | 3142 | static char *asvc_fields[] = { |
e2b8245f | 3143 | "service", "protocol", "port", "description", |
fd5b2340 | 3144 | }; |
3145 | ||
69eb9470 | 3146 | static char *dsvc_fields[] = { |
3147 | "service", "protocol", | |
3148 | }; | |
3149 | ||
03c05291 | 3150 | static struct valobj asvc_valobj[] = { |
e2b8245f | 3151 | {V_CHAR, 0, SERVICES_TABLE, "name"}, |
03c05291 | 3152 | {V_CHAR, 1, SERVICES_TABLE, "protocol"}, |
f802fd0d | 3153 | {V_NUM, 2}, |
e2b8245f | 3154 | {V_CHAR, 3, SERVICES_TABLE, "description"}, |
03c05291 | 3155 | }; |
3156 | ||
fd5b2340 | 3157 | static struct validate asvc_validate = { |
03c05291 | 3158 | asvc_valobj, |
f802fd0d | 3159 | 4, |
e2b8245f | 3160 | "name", |
69eb9470 | 3161 | "name = '%s' AND protocol = '%s'", |
3162 | 2, | |
3163 | 0, | |
3164 | 0, | |
3165 | 0, | |
3166 | set_service_modtime, | |
3167 | }; | |
3168 | ||
3169 | static struct validate dsvc_validate = { | |
3170 | asvc_valobj, | |
3171 | 2, | |
3172 | "name", | |
3173 | "name = '%s' AND protocol = '%s'", | |
3174 | 2, | |
3175 | 0, | |
fd5b2340 | 3176 | 0, |
3177 | 0, | |
3178 | 0, | |
fd5b2340 | 3179 | }; |
3180 | ||
2884200f | 3181 | static char *gprn_fields[] = { |
3182 | "name", | |
3183 | "name", "type", "hwtype", "duplexname", "hostname", | |
3184 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 3185 | "banner", "location", "contact", "modtime", "modby", "modwith" |
d33e787c | 3186 | }; |
3187 | ||
2884200f | 3188 | static char *gpbd_fields[] = { |
3189 | "duplexname", | |
3190 | "name", "type", "hwtype", "duplexname", "hostname", | |
3191 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 3192 | "banner", "location", "contact", "modtime", "modby", "modwith" |
d4462d4f | 3193 | }; |
3194 | ||
2884200f | 3195 | static char *gpbe_fields[] = { |
3196 | "hwaddr", | |
3197 | "name", "type", "hwtype", "duplexname", "hostname", | |
3198 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 3199 | "banner", "location", "contact", "modtime", "modby", "modwith" |
fad88070 | 3200 | }; |
3201 | ||
2884200f | 3202 | static char *gpbh_fields[] = { |
3203 | "hostname", | |
3204 | "name", "type", "hwtype", "duplexname", "hostname", | |
3205 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 3206 | "banner", "location", "contact", "modtime", "modby", "modwith" |
d33e787c | 3207 | }; |
3208 | ||
2884200f | 3209 | static char *gpbr_fields[] = { |
3210 | "rm", | |
3211 | "name", "type", "hwtype", "duplexname", "hostname", | |
3212 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 3213 | "banner", "location", "contact", "modtime", "modby", "modwith" |
d33e787c | 3214 | }; |
3215 | ||
2884200f | 3216 | static char *gpbl_fields[] = { |
3217 | "location", | |
3218 | "name", "type", "hwtype", "duplexname", "hostname", | |
3219 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 3220 | "banner", "location", "contact", "modtime", "modby", "modwith" |
fd5b2340 | 3221 | }; |
3222 | ||
2884200f | 3223 | static char *gpbc_fields[] = { |
3224 | "contact", | |
3225 | "name", "type", "hwtype", "duplexname", "hostname", | |
3226 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 3227 | "banner", "location", "contact", "modtime", "modby", "modwith" |
012fc215 | 3228 | }; |
3229 | ||
2884200f | 3230 | static char *aprn_fields[] = { |
3231 | "printer", "type", "hwtype", "duplexname", "hostname", | |
3232 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 3233 | "banner", "location", "contact", |
03c05291 | 3234 | }; |
012fc215 | 3235 | |
2884200f | 3236 | static struct valobj aprn_valobj[] = { |
3237 | {V_CHAR, 0, PRINTERS_TABLE, "name"}, | |
3238 | {V_TYPE, 1, 0, "printertype", 0, MR_TYPE}, | |
3239 | {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE}, | |
3240 | {V_CHAR, 3, PRINTERS_TABLE, "duplexname"}, | |
3241 | {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3242 | {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3243 | {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3244 | {V_CHAR, 7, PRINTERS_TABLE, "rp"}, | |
3245 | {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3246 | {V_NUM, 9}, | |
3247 | {V_NUM, 10}, | |
3248 | {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3249 | {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST}, | |
e5a63571 | 3250 | {V_NUM, 13}, |
3251 | {V_CHAR, 14, PRINTERS_TABLE, "location"}, | |
3252 | {V_CHAR, 15, PRINTERS_TABLE, "contact"}, | |
012fc215 | 3253 | }; |
3254 | ||
2884200f | 3255 | static struct validate aprn_validate = { |
3256 | aprn_valobj, | |
e5a63571 | 3257 | 16, |
e2b8245f | 3258 | "name", |
03c05291 | 3259 | "name = '%s'", |
012fc215 | 3260 | 1, |
3261 | 0, | |
1a9a0a59 | 3262 | access_printer, |
3263 | setup_aprn, | |
3264 | set_modtime, | |
3265 | }; | |
3266 | ||
3267 | static char *uprn_fields[] = { | |
3268 | "printer", | |
3269 | "printer", "type", "hwtype", "duplexname", "hostname", | |
3270 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
3271 | "banner", "location", "contact", | |
3272 | }; | |
3273 | ||
3274 | static struct valobj uprn_valobj[] = { | |
3275 | {V_CHAR, 0, PRINTERS_TABLE, "name"}, | |
3276 | {V_CHAR, 1, PRINTERS_TABLE, "name"}, | |
3277 | {V_TYPE, 2, 0, "printertype", 0, MR_TYPE}, | |
3278 | {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE}, | |
3279 | {V_CHAR, 4, PRINTERS_TABLE, "duplexname"}, | |
3280 | {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3281 | {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3282 | {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3283 | {V_CHAR, 8, PRINTERS_TABLE, "rp"}, | |
3284 | {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3285 | {V_NUM, 10}, | |
3286 | {V_NUM, 11}, | |
3287 | {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3288 | {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3289 | {V_NUM, 14}, | |
3290 | {V_CHAR, 15, PRINTERS_TABLE, "location"}, | |
3291 | {V_CHAR, 16, PRINTERS_TABLE, "contact"}, | |
3292 | }; | |
3293 | ||
3294 | static struct validate uprn_validate = { | |
3295 | uprn_valobj, | |
3296 | 16, | |
3297 | "name", | |
3298 | "name = '%s'", | |
3299 | 1, | |
012fc215 | 3300 | 0, |
1a9a0a59 | 3301 | access_printer, |
2884200f | 3302 | setup_aprn, |
1a9a0a59 | 3303 | set_modtime, |
012fc215 | 3304 | }; |
3305 | ||
2884200f | 3306 | static struct validate dprn_validate = { |
012fc215 | 3307 | 0, |
3308 | 0, | |
e2b8245f | 3309 | "name", |
3e8c655c | 3310 | "name = '%s'", |
012fc215 | 3311 | 1, |
3312 | 0, | |
1a9a0a59 | 3313 | access_printer, |
3314 | 0, | |
3315 | 0, | |
3316 | }; | |
3317 | ||
3318 | static char *gpsv_fields[] = { | |
3319 | "host", | |
3320 | "host", "kind", "printer_types", "owner_type", "owner_name", | |
3321 | "lpc_acl", "modtime", "modby", "modwith" | |
3322 | }; | |
3323 | ||
3324 | static struct valobj gpsv_valobj[] = { | |
3325 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3326 | }; | |
3327 | ||
3328 | static struct validate gpsv_validate = { | |
3329 | gpsv_valobj, | |
3330 | 1, | |
3331 | 0, | |
3332 | 0, | |
3333 | 0, | |
3334 | 0, | |
3335 | 0, | |
3336 | 0, | |
3337 | followup_gpsv, | |
3338 | }; | |
3339 | ||
3340 | static char *apsv_fields[] = { | |
3341 | "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl" | |
3342 | }; | |
3343 | ||
3344 | static struct valobj apsv_valobj[] = { | |
3345 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3346 | {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE}, | |
3347 | {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING}, | |
3348 | {V_TYPE, 3, 0, "ace_type", 0, MR_ACE}, | |
3349 | {V_TYPEDATA, 4, 0, 0, 0, MR_ACE}, | |
3350 | {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3351 | }; | |
3352 | ||
3353 | static struct validate apsv_validate = { | |
3354 | apsv_valobj, | |
3355 | 6, | |
3356 | "mach_id", | |
3357 | "mach_id = %d", | |
3358 | 1, | |
3359 | "mach_id", | |
012fc215 | 3360 | 0, |
3361 | 0, | |
1a9a0a59 | 3362 | set_modtime_by_id, |
012fc215 | 3363 | }; |
3364 | ||
1a9a0a59 | 3365 | static char *dpsv_fields[] = { |
3366 | "host", | |
3367 | }; | |
3368 | ||
3369 | static struct validate dpsv_validate = { | |
3370 | gpsv_valobj, | |
3371 | 1, | |
3372 | "mach_id", | |
3373 | "mach_id = %d", | |
3374 | 1, | |
3375 | 0, | |
3376 | 0, | |
3377 | setup_dpsv, | |
3378 | 0, | |
3379 | }; | |
3380 | ||
d33e787c | 3381 | static char *gali_fields[] = { |
e2b8245f | 3382 | "name", "type", "trans", |
3383 | "name", "type", "trans", | |
d33e787c | 3384 | }; |
3385 | ||
3386 | static char *aali_fields[] = { | |
e2b8245f | 3387 | "name", "type", "trans", |
d33e787c | 3388 | }; |
3389 | ||
3390 | static struct valobj aali_valobj[] = { | |
e2b8245f | 3391 | {V_CHAR, 0, ALIAS_TABLE, "name"}, |
3392 | {V_TYPE, 1, 0, "alias", 0, MR_TYPE}, | |
03c05291 | 3393 | {V_CHAR, 2, ALIAS_TABLE, "trans"}, |
d33e787c | 3394 | }; |
3395 | ||
3396 | static struct validate aali_validate = { | |
3397 | aali_valobj, | |
3398 | 3, | |
3399 | "trans", | |
03c05291 | 3400 | "name = '%s' and type = '%s' and trans = '%s'", |
d33e787c | 3401 | 3, |
3402 | 0, | |
3403 | 0, | |
3404 | 0, | |
3405 | 0, | |
3406 | }; | |
3407 | ||
3408 | static struct validate dali_validate = /* DELETE_ALIAS */ | |
3409 | { | |
3410 | 0, | |
3411 | 0, | |
3412 | "trans", | |
73043086 | 3413 | "name = '%s' and type = '%s' and trans = '%s'", |
d33e787c | 3414 | 3, |
3415 | 0, | |
3416 | 0, | |
3417 | 0, | |
3418 | 0, | |
3419 | }; | |
3420 | ||
3421 | static char *gval_fields[] = { | |
e2b8245f | 3422 | "name", "value", |
d33e787c | 3423 | }; |
3424 | ||
3425 | static struct valobj gval_valobj[] = { | |
e2b8245f | 3426 | {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH}, |
d33e787c | 3427 | }; |
3428 | ||
3429 | static struct validate gval_validate = { | |
3430 | gval_valobj, | |
3431 | 1, | |
3432 | 0, | |
3433 | 0, | |
3434 | 0, | |
3435 | 0, | |
3436 | 0, | |
3437 | 0, | |
3438 | 0, | |
3439 | }; | |
3440 | ||
3441 | static char *aval_fields[] = { | |
e2b8245f | 3442 | "name", "value", |
d33e787c | 3443 | }; |
3444 | ||
03c05291 | 3445 | static struct valobj aval_valobj[] = { |
e2b8245f | 3446 | {V_CHAR, 0, NUMVALUES_TABLE, "name"}, |
f802fd0d | 3447 | {V_NUM, 1}, |
03c05291 | 3448 | }; |
3449 | ||
d33e787c | 3450 | static struct validate aval_validate = /* for aval, uval, and dval */ |
3451 | { | |
03c05291 | 3452 | aval_valobj, |
f802fd0d | 3453 | 2, |
e2b8245f | 3454 | "name", |
03c05291 | 3455 | "name = '%s'", |
d33e787c | 3456 | 1, |
3457 | 0, | |
3458 | 0, | |
3459 | 0, | |
3460 | 0, | |
3461 | }; | |
3462 | ||
3463 | static char *dval_fields[] = { | |
e2b8245f | 3464 | "name", |
d33e787c | 3465 | }; |
3466 | ||
3467 | static char *gats_fields[] = { | |
8db06f75 | 3468 | "table_name", "appends", "updates", "deletes", |
3469 | "modtime", "modby", "modwith", | |
d33e787c | 3470 | }; |
3471 | ||
2962e9ec | 3472 | static char *_sdl_fields[] = { |
5eaef520 | 3473 | "level", |
2962e9ec | 3474 | }; |
3475 | ||
5eaef520 | 3476 | static struct validate _sdl_validate = |
2962e9ec | 3477 | { |
f802fd0d | 3478 | VOnum0, |
3479 | 1, | |
7ac48069 | 3480 | NULL, |
3481 | NULL, | |
5eaef520 | 3482 | 0, |
3483 | 0, | |
3484 | 0, | |
3485 | 0, | |
3486 | _sdl_followup, | |
2962e9ec | 3487 | }; |
3488 | ||
ca3ca9c9 | 3489 | static char *gusl_fields[] = { |
77bf4a4d | 3490 | "login", "domain_sid", |
ca3ca9c9 | 3491 | "login", "sid", "created", |
3492 | }; | |
3493 | ||
3494 | static struct validate gusl_validate = | |
3495 | { | |
3496 | VOuser0, | |
3497 | 1, | |
3498 | NULL, | |
3499 | NULL, | |
3500 | 0, | |
3501 | 0, | |
3502 | 0, | |
3503 | 0, | |
3504 | 0, | |
3505 | }; | |
3506 | ||
3507 | static char *glsn_fields[] = { | |
77bf4a4d | 3508 | "name", "domain_sid", |
ca3ca9c9 | 3509 | "name", "sid", "created", |
3510 | }; | |
3511 | ||
3512 | static struct validate glsn_validate = | |
3513 | { | |
3514 | VOlist0, | |
3515 | 1, | |
3516 | NULL, | |
3517 | NULL, | |
3518 | 0, | |
3519 | 0, | |
3520 | 0, | |
3521 | 0, | |
3522 | 0, | |
3523 | }; | |
3524 | ||
3525 | static char *ausl_fields[] = { | |
3526 | "login", "sid", | |
3527 | }; | |
3528 | ||
3529 | static struct validate ausl_validate = | |
3530 | { | |
3531 | VOuser0, | |
3532 | 1, | |
3533 | "sid", | |
d08dccbf | 3534 | "users_id = %d AND sid = '%s'", |
3535 | 2, | |
ca3ca9c9 | 3536 | 0, |
3537 | 0, | |
3538 | 0, | |
3539 | 0, | |
3540 | }; | |
3541 | ||
3542 | static char *alsn_fields[] = { | |
3543 | "name", "sid", | |
3544 | }; | |
3545 | ||
3546 | static struct validate alsn_validate = | |
3547 | { | |
3548 | VOlist0, | |
3549 | 1, | |
3550 | "sid", | |
d08dccbf | 3551 | "list_id = %d AND sid = '%s'", |
3552 | 2, | |
ca3ca9c9 | 3553 | 0, |
3554 | 0, | |
3555 | 0, | |
3556 | 0, | |
3557 | }; | |
d33e787c | 3558 | |
77bf4a4d | 3559 | static char *gdds_fields[] = { |
3560 | "sid", | |
3561 | }; | |
3562 | ||
73155abd | 3563 | static char *gcon7_fields[] = { |
2fb668b0 | 3564 | "name", |
3565 | "name", "description", "location", "contact", | |
3566 | "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith", | |
3567 | }; | |
3568 | ||
3569 | static struct validate gcon_validate = { | |
3570 | 0, | |
3571 | 0, | |
3572 | 0, | |
3573 | 0, | |
3574 | 0, | |
3575 | 0, | |
3576 | 0, | |
3577 | 0, | |
3578 | followup_gcon, | |
3579 | }; | |
3580 | ||
73155abd | 3581 | static char *gcon_fields[] = { |
3582 | "name", | |
3583 | "name", "publicflg", "description", "location", "contact", | |
3584 | "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith", | |
3585 | }; | |
3586 | ||
3587 | static char *acon7_fields[] = { | |
2fb668b0 | 3588 | "name", "description", "location", "contact", |
3589 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3590 | }; | |
3591 | ||
73155abd | 3592 | static struct valobj acon7_valobj[] = { |
2fb668b0 | 3593 | {V_CHAR, 0, CONTAINERS_TABLE, "name"}, |
3594 | {V_LEN, 1, CONTAINERS_TABLE, "description"}, | |
3595 | {V_CHAR, 2, CONTAINERS_TABLE, "location"}, | |
3596 | {V_CHAR, 3, CONTAINERS_TABLE, "contact"}, | |
3597 | {V_TYPE, 4, 0, "ace_type", 0, MR_ACE}, | |
3598 | {V_TYPEDATA, 5, 0, 0, 0, MR_ACE}, | |
3599 | {V_TYPE, 6, 0, "ace_type", 0, MR_ACE}, | |
3600 | {V_TYPEDATA, 7, 0, 0, 0, MR_ACE}, | |
3601 | }; | |
3602 | ||
73155abd | 3603 | static struct validate acon7_validate = |
3604 | { | |
3605 | acon7_valobj, | |
3606 | 8, | |
3607 | "name", | |
3608 | "name = '%s'", | |
3609 | 1, | |
3610 | "cnt_id", | |
3611 | 0, | |
3612 | setup_acon, | |
3613 | set_modtime, | |
3614 | }; | |
3615 | ||
3616 | static char *acon_fields[] = { | |
3617 | "name", "publicflg", "description", "location", "contact", | |
3618 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3619 | }; | |
3620 | ||
3621 | static struct valobj acon_valobj[] = { | |
3622 | {V_CHAR, 0, CONTAINERS_TABLE, "name"}, | |
3623 | {V_NUM, 1}, | |
3624 | {V_LEN, 2, CONTAINERS_TABLE, "description"}, | |
3625 | {V_CHAR, 3, CONTAINERS_TABLE, "location"}, | |
3626 | {V_CHAR, 4, CONTAINERS_TABLE, "contact"}, | |
3627 | {V_TYPE, 5, 0, "ace_type", 0, MR_ACE}, | |
3628 | {V_TYPEDATA, 6, 0, 0, 0, MR_ACE}, | |
3629 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, | |
3630 | {V_TYPEDATA, 8, 0, 0, 0, MR_ACE}, | |
3631 | }; | |
3632 | ||
2fb668b0 | 3633 | static struct validate acon_validate = |
3634 | { | |
3635 | acon_valobj, | |
73155abd | 3636 | 9, |
2fb668b0 | 3637 | "name", |
3638 | "name = '%s'", | |
3639 | 1, | |
3640 | "cnt_id", | |
3641 | 0, | |
73155abd | 3642 | setup_acon, |
2fb668b0 | 3643 | set_modtime, |
3644 | }; | |
3645 | ||
73155abd | 3646 | static char *ucon7_fields[] = { |
2fb668b0 | 3647 | "name", |
3648 | "newname", "description", "location", "contact", | |
3649 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3650 | }; | |
3651 | ||
73155abd | 3652 | static struct valobj ucon7_valobj[] = { |
2fb668b0 | 3653 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, |
3654 | {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE}, | |
3655 | {V_LEN, 2, CONTAINERS_TABLE, "description"}, | |
3656 | {V_CHAR, 3, CONTAINERS_TABLE, "location"}, | |
3657 | {V_CHAR, 4, CONTAINERS_TABLE, "contact"}, | |
3658 | {V_TYPE, 5, 0, "ace_type", 0, MR_ACE}, | |
3659 | {V_TYPEDATA, 6, 0, 0, 0, MR_ACE}, | |
3660 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, | |
3661 | {V_TYPEDATA, 8, 0, 0, 0, MR_ACE}, | |
3662 | }; | |
3663 | ||
73155abd | 3664 | static struct validate ucon7_validate = |
3665 | { | |
3666 | ucon7_valobj, | |
3667 | 9, | |
3668 | 0, | |
3669 | 0, | |
3670 | 0, | |
3671 | 0, | |
3672 | access_container, | |
3673 | 0, | |
3674 | update_container, | |
3675 | }; | |
3676 | ||
3677 | static char *ucon_fields[] = { | |
3678 | "name", | |
3679 | "newname", "publicflg", "description", "location", "contact", | |
3680 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3681 | }; | |
3682 | ||
3683 | static struct valobj ucon_valobj[] = { | |
3684 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
3685 | {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE}, | |
3686 | {V_NUM, 2}, | |
3687 | {V_LEN, 3, CONTAINERS_TABLE, "description"}, | |
3688 | {V_CHAR, 4, CONTAINERS_TABLE, "location"}, | |
3689 | {V_CHAR, 5, CONTAINERS_TABLE, "contact"}, | |
3690 | {V_TYPE, 6, 0, "ace_type", 0, MR_ACE}, | |
3691 | {V_TYPEDATA, 7, 0, 0, 0, MR_ACE}, | |
3692 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, | |
3693 | {V_TYPEDATA, 9, 0, 0, 0, MR_ACE}, | |
3694 | }; | |
3695 | ||
2fb668b0 | 3696 | static struct validate ucon_validate = |
3697 | { | |
3698 | ucon_valobj, | |
73155abd | 3699 | 10, |
2fb668b0 | 3700 | 0, |
3701 | 0, | |
3702 | 0, | |
3703 | 0, | |
3704 | access_container, | |
3705 | 0, | |
3706 | update_container, | |
3707 | }; | |
3708 | ||
3709 | static char *dcon_fields[] = { | |
3710 | "name", | |
3711 | }; | |
3712 | ||
3713 | static struct validate dcon_validate = | |
3714 | { | |
3715 | VOcon0, | |
3716 | 1, | |
3717 | 0, | |
3718 | 0, | |
3719 | 0, | |
3720 | 0, | |
3721 | 0, | |
3722 | setup_dcon, | |
3723 | 0, | |
3724 | }; | |
3725 | ||
3726 | static char *amcn_fields[] = { | |
3727 | "machine", "container", | |
3728 | }; | |
3729 | ||
3730 | static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */ | |
3731 | { /* DELETE_MACHINE_FROM_CONTAINER */ | |
3732 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3733 | {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
3734 | }; | |
3735 | ||
3736 | static struct validate amcn_validate = /* for amtn and dmfn */ | |
d16a0628 | 3737 | { |
3738 | amcn_valobj, | |
3739 | 2, | |
3740 | "mach_id", | |
3741 | "mach_id = %d", | |
3742 | 1, | |
3743 | 0, | |
3744 | access_container, | |
3745 | 0, | |
3746 | set_mach_modtime_by_id, | |
3747 | }; | |
3748 | ||
3749 | static struct validate dmcn_validate = /* for amtn and dmfn */ | |
2fb668b0 | 3750 | { |
3751 | amcn_valobj, | |
3752 | 2, | |
3753 | "mach_id", | |
3754 | "mach_id = %d and cnt_id = %d", | |
3755 | 2, | |
3756 | 0, | |
3757 | access_container, | |
3758 | 0, | |
3759 | set_mach_modtime_by_id, | |
3760 | }; | |
3761 | ||
7807f2e6 | 3762 | static char *gmnm_fields[] = { |
3763 | "machine", | |
3764 | "machine", "container", | |
3765 | }; | |
3766 | ||
2fb668b0 | 3767 | static char *gmoc_fields[] = { |
3768 | "container", | |
3769 | "isrecursive", | |
3770 | "machine", | |
3771 | "container", | |
3772 | }; | |
3773 | ||
3774 | static struct validate gmoc_validate = | |
3775 | { | |
3776 | VOcon0, | |
3777 | 1, | |
3778 | 0, | |
3779 | 0, | |
3780 | 0, | |
3781 | 0, | |
3782 | 0, | |
3783 | 0, | |
3784 | get_machines_of_container, | |
3785 | }; | |
3786 | ||
3787 | static char *gsoc_fields[] = { | |
3788 | "container", | |
3789 | "isrecursive", | |
3790 | "subcontainer", | |
3791 | }; | |
3792 | ||
3793 | static struct validate gsoc_validate = | |
3794 | { | |
3795 | VOcon0, | |
3796 | 1, | |
3797 | 0, | |
3798 | 0, | |
3799 | 0, | |
3800 | 0, | |
3801 | 0, | |
3802 | 0, | |
3803 | get_subcontainers_of_container, | |
3804 | }; | |
3805 | ||
0ef13dc2 | 3806 | static char *gtlc_fields[] = { |
3807 | "name", | |
3808 | }; | |
3809 | ||
73155abd | 3810 | static char *scli_fields[] = { |
3811 | "containername", | |
3812 | "listname", | |
3813 | }; | |
3814 | ||
3815 | static struct valobj scli_valobj[] = { | |
3816 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
3817 | {V_ID, 1, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3818 | }; | |
3819 | ||
3820 | static struct validate scli_validate = { | |
3821 | scli_valobj, | |
3822 | 2, | |
3823 | 0, | |
3824 | 0, | |
3825 | 0, | |
3826 | 0, | |
3827 | 0, | |
3828 | setup_scli, | |
3829 | set_container_list, | |
3830 | }; | |
3831 | ||
3832 | static char *gcli_fields[] = { | |
3833 | "containername", | |
3834 | "containername", "listname", | |
3835 | }; | |
0ef13dc2 | 3836 | |
6e442c45 | 3837 | static struct validate glic_validate = |
3838 | { | |
3839 | VOlist0, | |
3840 | 1, | |
3841 | NULL, | |
3842 | NULL, | |
3843 | 0, | |
3844 | 0, | |
3845 | 0, | |
3846 | 0, | |
3847 | 0, | |
3848 | }; | |
3849 | ||
3850 | static char *glic_fields[] = { | |
3851 | "listname", | |
3852 | "containername", "listname", | |
3853 | }; | |
3854 | ||
d33e787c | 3855 | /* Generalized Query Definitions */ |
3856 | ||
c44ddfa7 | 3857 | /* Multiple versions of the same query MUST be listed in ascending |
3858 | * order. | |
3859 | */ | |
3860 | ||
e41960ac | 3861 | /* Note: For any query which uses prefetch_value, the vcnt should be |
3862 | * one less than the number of %-format specifiers in the tlist. | |
3863 | */ | |
3864 | ||
c44ddfa7 | 3865 | struct query Queries[] = { |
d33e787c | 3866 | { |
186dd63b | 3867 | /* Q_GALO - GET_ALL_LOGINS, v2 */ |
d33e787c | 3868 | "get_all_logins", |
3869 | "galo", | |
c44ddfa7 | 3870 | 2, |
d33e787c | 3871 | RETRIEVE, |
3872 | "u", | |
03c05291 | 3873 | USERS_TABLE, |
3874 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u", | |
186dd63b | 3875 | galo2_fields, |
d33e787c | 3876 | 6, |
0c345c78 | 3877 | "u.users_id != 0", |
d33e787c | 3878 | 0, |
29028043 | 3879 | "u.login", |
3880 | 0, | |
d33e787c | 3881 | }, |
5eaef520 | 3882 | |
d33e787c | 3883 | { |
186dd63b | 3884 | /* Q_GALO - GET_ALL_LOGINS, v3 */ |
3885 | "get_all_logins", | |
3886 | "galo", | |
3887 | 3, | |
3888 | RETRIEVE, | |
3889 | "u", | |
3890 | USERS_TABLE, | |
3891 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u", | |
3892 | galo_fields, | |
3893 | 7, | |
3894 | "u.users_id != 0", | |
3895 | 0, | |
3896 | "u.login", | |
3897 | 0, | |
3898 | }, | |
3899 | ||
3900 | { | |
3901 | /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */ | |
d33e787c | 3902 | "get_all_active_logins", |
3903 | "gaal", | |
c44ddfa7 | 3904 | 2, |
d33e787c | 3905 | RETRIEVE, |
3906 | "u", | |
03c05291 | 3907 | USERS_TABLE, |
3908 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u", | |
186dd63b | 3909 | galo2_fields, |
d33e787c | 3910 | 6, |
0c345c78 | 3911 | "u.status = 1", |
d33e787c | 3912 | 0, |
29028043 | 3913 | "u.login", |
3914 | 0, | |
d33e787c | 3915 | }, |
5eaef520 | 3916 | |
4ffa124a | 3917 | { |
186dd63b | 3918 | /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */ |
3919 | "get_all_active_logins", | |
3920 | "gaal", | |
3921 | 3, | |
3922 | RETRIEVE, | |
3923 | "u", | |
3924 | USERS_TABLE, | |
3925 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u", | |
3926 | galo_fields, | |
3927 | 7, | |
3928 | "u.status = 1", | |
3929 | 0, | |
3930 | "u.login", | |
3931 | 0, | |
3932 | }, | |
3933 | ||
3934 | { | |
3935 | /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */ | |
0c345c78 | 3936 | "get_user_account_by_login", |
3937 | "gual", | |
c44ddfa7 | 3938 | 2, |
0c345c78 | 3939 | RETRIEVE, |
3940 | "u", | |
03c05291 | 3941 | USERS_TABLE, |
d55429b2 | 3942 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 3943 | gual2_fields, |
0c345c78 | 3944 | 15, |
263a36d4 | 3945 | "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 3946 | 1, |
29028043 | 3947 | "u.login", |
9db6a21e | 3948 | &gubl2_validate, |
4ffa124a | 3949 | }, |
5eaef520 | 3950 | |
4ffa124a | 3951 | { |
186dd63b | 3952 | /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */ |
3953 | "get_user_account_by_login", | |
3954 | "gual", | |
3955 | 3, | |
3956 | RETRIEVE, | |
3957 | "u", | |
3958 | USERS_TABLE, | |
3b634eb3 | 3959 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
aec7d432 | 3960 | gual3_fields, |
3b634eb3 | 3961 | 18, |
186dd63b | 3962 | "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
3963 | 1, | |
3964 | "u.login", | |
3965 | &gubl_validate, | |
3966 | }, | |
3967 | ||
aec7d432 | 3968 | { |
3969 | /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v11 */ | |
3970 | "get_user_account_by_login", | |
3971 | "gual", | |
3972 | 11, | |
3973 | RETRIEVE, | |
3974 | "u", | |
3975 | USERS_TABLE, | |
3976 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", | |
3977 | gual_fields, | |
3978 | 20, | |
3979 | "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", | |
3980 | 1, | |
3981 | "u.login", | |
3982 | &gubl_validate, | |
3983 | }, | |
3984 | ||
186dd63b | 3985 | { |
3986 | /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */ | |
0c345c78 | 3987 | "get_user_account_by_uid", |
3988 | "guau", | |
c44ddfa7 | 3989 | 2, |
0c345c78 | 3990 | RETRIEVE, |
3991 | "u", | |
03c05291 | 3992 | USERS_TABLE, |
d55429b2 | 3993 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 3994 | guau2_fields, |
0c345c78 | 3995 | 15, |
03c05291 | 3996 | "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 3997 | 1, |
29028043 | 3998 | "u.login", |
9db6a21e | 3999 | &gubu2_validate, |
4ffa124a | 4000 | }, |
5eaef520 | 4001 | |
4ffa124a | 4002 | { |
186dd63b | 4003 | /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */ |
4004 | "get_user_account_by_uid", | |
4005 | "guau", | |
4006 | 3, | |
4007 | RETRIEVE, | |
4008 | "u", | |
4009 | USERS_TABLE, | |
3b634eb3 | 4010 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
aec7d432 | 4011 | guau3_fields, |
3b634eb3 | 4012 | 18, |
186dd63b | 4013 | "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id", |
4014 | 1, | |
4015 | "u.login", | |
4016 | &gubu_validate, | |
4017 | }, | |
4018 | ||
aec7d432 | 4019 | { |
4020 | /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v11 */ | |
4021 | "get_user_account_by_uid", | |
4022 | "guau", | |
4023 | 11, | |
4024 | RETRIEVE, | |
4025 | "u", | |
4026 | USERS_TABLE, | |
4027 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", | |
4028 | guau_fields, | |
4029 | 20, | |
4030 | "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id", | |
4031 | 1, | |
4032 | "u.login", | |
4033 | &gubu_validate, | |
4034 | }, | |
4035 | ||
186dd63b | 4036 | { |
4037 | /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */ | |
0c345c78 | 4038 | "get_user_account_by_name", |
4039 | "guan", | |
c44ddfa7 | 4040 | 2, |
0c345c78 | 4041 | RETRIEVE, |
4042 | "u", | |
03c05291 | 4043 | USERS_TABLE, |
d55429b2 | 4044 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 4045 | guan2_fields, |
0c345c78 | 4046 | 15, |
263a36d4 | 4047 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id", |
0c345c78 | 4048 | 2, |
29028043 | 4049 | "u.login", |
9db6a21e | 4050 | &guan2_validate, |
4ffa124a | 4051 | }, |
5eaef520 | 4052 | |
4ffa124a | 4053 | { |
186dd63b | 4054 | /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */ |
4055 | "get_user_account_by_name", | |
4056 | "guan", | |
4057 | 3, | |
4058 | RETRIEVE, | |
4059 | "u", | |
4060 | USERS_TABLE, | |
3b634eb3 | 4061 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
aec7d432 | 4062 | guan3_fields, |
3b634eb3 | 4063 | 18, |
186dd63b | 4064 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id", |
4065 | 2, | |
4066 | "u.login", | |
4067 | &guan_validate, | |
4068 | }, | |
4069 | ||
aec7d432 | 4070 | { |
4071 | /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v11 */ | |
4072 | "get_user_account_by_name", | |
4073 | "guan", | |
4074 | 11, | |
4075 | RETRIEVE, | |
4076 | "u", | |
4077 | USERS_TABLE, | |
4078 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", | |
4079 | guan_fields, | |
4080 | 20, | |
4081 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id", | |
4082 | 2, | |
4083 | "u.login", | |
4084 | &guan_validate, | |
4085 | }, | |
4086 | ||
186dd63b | 4087 | { |
4088 | /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */ | |
0c345c78 | 4089 | "get_user_account_by_class", |
4090 | "guac", | |
c44ddfa7 | 4091 | 2, |
0c345c78 | 4092 | RETRIEVE, |
4093 | "u", | |
03c05291 | 4094 | USERS_TABLE, |
d55429b2 | 4095 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 4096 | guac2_fields, |
0c345c78 | 4097 | 15, |
03c05291 | 4098 | "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 4099 | 1, |
29028043 | 4100 | "u.login", |
4101 | &VDfix_modby, | |
4ffa124a | 4102 | }, |
5eaef520 | 4103 | |
4ffa124a | 4104 | { |
186dd63b | 4105 | /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */ |
4106 | "get_user_account_by_class", | |
4107 | "guac", | |
4108 | 3, | |
4109 | RETRIEVE, | |
4110 | "u", | |
4111 | USERS_TABLE, | |
3b634eb3 | 4112 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
aec7d432 | 4113 | guac3_fields, |
3b634eb3 | 4114 | 18, |
186dd63b | 4115 | "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id", |
4116 | 1, | |
4117 | "u.login", | |
9db6a21e | 4118 | &guan_validate, |
186dd63b | 4119 | }, |
4120 | ||
aec7d432 | 4121 | { |
4122 | /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v11 */ | |
4123 | "get_user_account_by_class", | |
4124 | "guac", | |
4125 | 11, | |
4126 | RETRIEVE, | |
4127 | "u", | |
4128 | USERS_TABLE, | |
4129 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", | |
4130 | guac_fields, | |
4131 | 20, | |
4132 | "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id", | |
4133 | 1, | |
4134 | "u.login", | |
4135 | &guan_validate, | |
4136 | }, | |
4137 | ||
186dd63b | 4138 | { |
4139 | /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */ | |
0c345c78 | 4140 | "get_user_account_by_id", |
4141 | "guai", | |
c44ddfa7 | 4142 | 2, |
0c345c78 | 4143 | RETRIEVE, |
4144 | "u", | |
03c05291 | 4145 | USERS_TABLE, |
d55429b2 | 4146 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 4147 | guam2_fields, |
0c345c78 | 4148 | 15, |
263a36d4 | 4149 | "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 4150 | 1, |
29028043 | 4151 | "u.login", |
263a36d4 | 4152 | &VDfix_modby, |
4ffa124a | 4153 | }, |
5eaef520 | 4154 | |
d33e787c | 4155 | { |
186dd63b | 4156 | /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */ |
4157 | "get_user_account_by_id", | |
4158 | "guai", | |
4159 | 3, | |
4160 | RETRIEVE, | |
4161 | "u", | |
4162 | USERS_TABLE, | |
3b634eb3 | 4163 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
186dd63b | 4164 | guam_fields, |
3b634eb3 | 4165 | 18, |
186dd63b | 4166 | "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
4167 | 1, | |
4168 | "u.login", | |
9db6a21e | 4169 | &guan_validate, |
186dd63b | 4170 | }, |
4171 | ||
aec7d432 | 4172 | { |
4173 | /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v11 */ | |
4174 | "get_user_account_by_id", | |
4175 | "guai", | |
4176 | 11, | |
4177 | RETRIEVE, | |
4178 | "u", | |
4179 | USERS_TABLE, | |
4180 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", | |
4181 | guam_fields, | |
4182 | 20, | |
4183 | "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", | |
4184 | 1, | |
4185 | "u.login", | |
4186 | &guan_validate, | |
4187 | }, | |
4188 | ||
186dd63b | 4189 | { |
4190 | /* Q_GUBL - GET_USER_BY_LOGIN, v2 */ | |
d33e787c | 4191 | "get_user_by_login", |
4192 | "gubl", | |
c44ddfa7 | 4193 | 2, |
d33e787c | 4194 | RETRIEVE, |
4195 | "u", | |
5eaef520 | 4196 | USERS_TABLE, |
03c05291 | 4197 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", |
186dd63b | 4198 | gubl2_fields, |
d33e787c | 4199 | 12, |
263a36d4 | 4200 | "u.login LIKE '%s' AND u.users_id != 0", |
d33e787c | 4201 | 1, |
29028043 | 4202 | "u.login", |
9db6a21e | 4203 | &gubl2_validate, |
d33e787c | 4204 | }, |
5eaef520 | 4205 | |
d33e787c | 4206 | { |
186dd63b | 4207 | /* Q_GUBL - GET_USER_BY_LOGIN, v3 */ |
4208 | "get_user_by_login", | |
4209 | "gubl", | |
4210 | 3, | |
4211 | RETRIEVE, | |
4212 | "u", | |
4213 | USERS_TABLE, | |
3b634eb3 | 4214 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u", |
186dd63b | 4215 | gubl_fields, |
3b634eb3 | 4216 | 15, |
186dd63b | 4217 | "u.login LIKE '%s' AND u.users_id != 0", |
4218 | 1, | |
4219 | "u.login", | |
4220 | &gubl_validate, | |
4221 | }, | |
4222 | ||
4223 | { | |
4224 | /* Q_GUBU - GET_USER_BY_UID, v2 */ | |
d33e787c | 4225 | "get_user_by_uid", |
4226 | "gubu", | |
c44ddfa7 | 4227 | 2, |
d33e787c | 4228 | RETRIEVE, |
4229 | "u", | |
03c05291 | 4230 | USERS_TABLE, |
4231 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", | |
186dd63b | 4232 | gubu2_fields, |
d33e787c | 4233 | 12, |
03c05291 | 4234 | "u.unix_uid = %s AND u.users_id != 0", |
d33e787c | 4235 | 1, |
29028043 | 4236 | "u.login", |
9db6a21e | 4237 | &gubu2_validate, |
d33e787c | 4238 | }, |
5eaef520 | 4239 | |
d33e787c | 4240 | { |
186dd63b | 4241 | /* Q_GUBU - GET_USER_BY_UID, v3 */ |
4242 | "get_user_by_uid", | |
4243 | "gubu", | |
4244 | 3, | |
4245 | RETRIEVE, | |
4246 | "u", | |
4247 | USERS_TABLE, | |
3b634eb3 | 4248 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u", |
186dd63b | 4249 | gubu_fields, |
3b634eb3 | 4250 | 15, |
186dd63b | 4251 | "u.unix_uid = %s AND u.users_id != 0", |
4252 | 1, | |
4253 | "u.login", | |
4254 | &gubu_validate, | |
4255 | }, | |
4256 | ||
4257 | { | |
4258 | /* Q_GUBN - GET_USER_BY_NAME, v2 */ | |
d33e787c | 4259 | "get_user_by_name", |
4260 | "gubn", | |
c44ddfa7 | 4261 | 2, |
d33e787c | 4262 | RETRIEVE, |
4263 | "u", | |
03c05291 | 4264 | USERS_TABLE, |
4265 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", | |
186dd63b | 4266 | gubn2_fields, |
d33e787c | 4267 | 12, |
263a36d4 | 4268 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0", |
d33e787c | 4269 | 2, |
29028043 | 4270 | "u.login", |
9db6a21e | 4271 | &gubn2_validate, |
d33e787c | 4272 | }, |
5eaef520 | 4273 | |
d33e787c | 4274 | { |
186dd63b | 4275 | /* Q_GUBN - GET_USER_BY_NAME, v3 */ |
4276 | "get_user_by_name", | |
4277 | "gubn", | |
4278 | 3, | |
4279 | RETRIEVE, | |
4280 | "u", | |
4281 | USERS_TABLE, | |
3b634eb3 | 4282 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u", |
186dd63b | 4283 | gubn_fields, |
3b634eb3 | 4284 | 15, |
186dd63b | 4285 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0", |
4286 | 2, | |
4287 | "u.login", | |
4288 | &gubn_validate, | |
4289 | }, | |
4290 | ||
4291 | { | |
4292 | /* Q_GUBC - GET_USER_BY_CLASS, v2 */ | |
d33e787c | 4293 | "get_user_by_class", |
4294 | "gubc", | |
c44ddfa7 | 4295 | 2, |
d33e787c | 4296 | RETRIEVE, |
4297 | "u", | |
03c05291 | 4298 | USERS_TABLE, |
4299 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", | |
186dd63b | 4300 | gubc2_fields, |
d33e787c | 4301 | 12, |
03c05291 | 4302 | "u.type = UPPER('%s') AND u.users_id != 0", |
d33e787c | 4303 | 1, |
29028043 | 4304 | "u.login", |
4305 | &VDfix_modby, | |
d33e787c | 4306 | }, |
5eaef520 | 4307 | |
d33e787c | 4308 | { |
186dd63b | 4309 | /* Q_GUBC - GET_USER_BY_CLASS, v3 */ |
4310 | "get_user_by_class", | |
4311 | "gubc", | |
4312 | 3, | |
4313 | RETRIEVE, | |
4314 | "u", | |
4315 | USERS_TABLE, | |
3b634eb3 | 4316 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS') FROM users u", |
186dd63b | 4317 | gubc_fields, |
3b634eb3 | 4318 | 15, |
186dd63b | 4319 | "u.type = UPPER('%s') AND u.users_id != 0", |
4320 | 1, | |
4321 | "u.login", | |
9db6a21e | 4322 | &guan_validate, |
186dd63b | 4323 | }, |
4324 | ||
4325 | { | |
4326 | /* Q_GUBM - GET_USER_BY_MITID, v2 */ | |
d33e787c | 4327 | "get_user_by_mitid", |
4328 | "gubm", | |
c44ddfa7 | 4329 | 2, |
d33e787c | 4330 | RETRIEVE, |
4331 | "u", | |
03c05291 | 4332 | USERS_TABLE, |
4333 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", | |
186dd63b | 4334 | gubm2_fields, |
d33e787c | 4335 | 12, |
263a36d4 | 4336 | "u.clearid LIKE '%s' AND u.users_id != 0", |
d33e787c | 4337 | 1, |
29028043 | 4338 | "u.login", |
263a36d4 | 4339 | &VDfix_modby, |
d33e787c | 4340 | }, |
5eaef520 | 4341 | |
4ffa124a | 4342 | { |
186dd63b | 4343 | /* Q_GUBM - GET_USER_BY_MITID, v3 */ |
4344 | "get_user_by_mitid", | |
4345 | "gubm", | |
4346 | 3, | |
4347 | RETRIEVE, | |
4348 | "u", | |
4349 | USERS_TABLE, | |
3b634eb3 | 4350 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u", |
186dd63b | 4351 | gubm_fields, |
3b634eb3 | 4352 | 15, |
186dd63b | 4353 | "u.clearid LIKE '%s' AND u.users_id != 0", |
4354 | 1, | |
4355 | "u.login", | |
9db6a21e | 4356 | &guan_validate, |
186dd63b | 4357 | }, |
4358 | ||
4359 | { | |
4360 | /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */ | |
4ffa124a | 4361 | "add_user_account", |
4362 | "auac", | |
c44ddfa7 | 4363 | 2, |
4ffa124a | 4364 | APPEND, |
4365 | "u", | |
03c05291 | 4366 | USERS_TABLE, |
d55429b2 | 4367 | /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)", |
4368 | * but using up one argv element. | |
4369 | */ | |
4370 | "INTO users (login, unix_uid, shell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)", | |
186dd63b | 4371 | auac2_fields, |
4ffa124a | 4372 | 12, |
7ac48069 | 4373 | NULL, |
4ffa124a | 4374 | 0, |
29028043 | 4375 | NULL, |
186dd63b | 4376 | &auac2_validate, |
4377 | }, | |
4378 | ||
4379 | { | |
4380 | /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */ | |
4381 | "add_user_account", | |
4382 | "auac", | |
4383 | 3, | |
4384 | APPEND, | |
4385 | "u", | |
4386 | USERS_TABLE, | |
4387 | /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)", | |
4388 | * but using up one argv element. | |
4389 | */ | |
3b634eb3 | 4390 | "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s, SYSDATE, %s)", |
aec7d432 | 4391 | auac3_fields, |
186dd63b | 4392 | 13, |
4393 | NULL, | |
4394 | 0, | |
4395 | NULL, | |
aec7d432 | 4396 | &auac3_validate, |
4397 | }, | |
4398 | ||
4399 | { | |
4400 | /* Q_AUAC - ADD_USER_ACCOUNT, v11 */ /* uses prefetch_value() for users_id */ | |
4401 | "add_user_account", | |
4402 | "auac", | |
4403 | 11, | |
4404 | APPEND, | |
4405 | "u", | |
4406 | USERS_TABLE, | |
4407 | /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)", | |
4408 | * but using up one argv element. | |
4409 | */ | |
4410 | "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, winhomedir, winprofiledir, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, SYSDATE, %s)", | |
4411 | auac_fields, | |
4412 | 15, | |
4413 | NULL, | |
4414 | 0, | |
4415 | NULL, | |
4ffa124a | 4416 | &auac_validate, |
4417 | }, | |
5eaef520 | 4418 | |
d33e787c | 4419 | { |
186dd63b | 4420 | /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */ |
d33e787c | 4421 | "add_user", |
4422 | "ausr", | |
c44ddfa7 | 4423 | 2, |
d33e787c | 4424 | APPEND, |
4425 | "u", | |
03c05291 | 4426 | USERS_TABLE, |
5eaef520 | 4427 | "INTO users (login, unix_uid, shell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s)", |
186dd63b | 4428 | auac2_fields, |
d33e787c | 4429 | 9, |
45bf7573 | 4430 | 0, |
d33e787c | 4431 | 0, |
29028043 | 4432 | NULL, |
186dd63b | 4433 | &ausr2_validate, |
4434 | }, | |
4435 | ||
4436 | { | |
4437 | /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */ | |
4438 | "add_user", | |
4439 | "ausr", | |
4440 | 3, | |
4441 | APPEND, | |
4442 | "u", | |
4443 | USERS_TABLE, | |
3b634eb3 | 4444 | "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s, SYSDATE, %s)", |
aec7d432 | 4445 | auac3_fields, |
186dd63b | 4446 | 10, |
4447 | 0, | |
4448 | 0, | |
4449 | NULL, | |
aec7d432 | 4450 | &ausr3_validate, |
4451 | }, | |
4452 | ||
4453 | { | |
4454 | /* Q_AUSR - ADD_USER, v11 */ /* uses prefetch_value() for users_id */ | |
4455 | "add_user", | |
4456 | "ausr", | |
4457 | 11, | |
4458 | APPEND, | |
4459 | "u", | |
4460 | USERS_TABLE, | |
4461 | "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, winhomedir, winprofiledir, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, SYSDATE, %s)", | |
4462 | auac_fields, | |
4463 | 12, | |
4464 | 0, | |
4465 | 0, | |
4466 | NULL, | |
d33e787c | 4467 | &ausr_validate, |
4468 | }, | |
5eaef520 | 4469 | |
d33e787c | 4470 | { |
4471 | /* Q_RUSR - REGISTER_USER */ | |
4472 | "register_user", | |
4473 | "rusr", | |
c44ddfa7 | 4474 | 2, |
d33e787c | 4475 | APPEND, |
4476 | 0, | |
4477 | 0, | |
4478 | 0, | |
4479 | rusr_fields, | |
4480 | 3, | |
4481 | 0, | |
4482 | 0, | |
29028043 | 4483 | NULL, |
d33e787c | 4484 | &rusr_validate, |
4485 | }, | |
5eaef520 | 4486 | |
4ffa124a | 4487 | { |
186dd63b | 4488 | /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */ |
4ffa124a | 4489 | "update_user_account", |
4490 | "uuac", | |
c44ddfa7 | 4491 | 2, |
4ffa124a | 4492 | UPDATE, |
4493 | "u", | |
03c05291 | 4494 | USERS_TABLE, |
d55429b2 | 4495 | /* See comment in auac about signature. */ |
4496 | "users SET login = '%s', unix_uid = %s, shell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d, signature = NVL(CHR(0), '%s'), secure = %s", | |
186dd63b | 4497 | uuac2_fields, |
4ffa124a | 4498 | 12, |
4499 | "users_id = %d", | |
4500 | 1, | |
29028043 | 4501 | NULL, |
186dd63b | 4502 | &uuac2_validate, |
4503 | }, | |
4504 | ||
4505 | { | |
4506 | /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */ | |
4507 | "update_user_account", | |
4508 | "uuac", | |
4509 | 3, | |
4510 | UPDATE, | |
4511 | "u", | |
4512 | USERS_TABLE, | |
4513 | /* See comment in auac about signature. */ | |
4514 | "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d, signature = NVL(CHR(0), '%s'), secure = %s", | |
aec7d432 | 4515 | uuac3_fields, |
186dd63b | 4516 | 13, |
4517 | "users_id = %d", | |
4518 | 1, | |
4519 | NULL, | |
aec7d432 | 4520 | &uuac3_validate, |
4521 | }, | |
4522 | ||
4523 | { | |
4524 | /* Q_UUAC - UPDATE_USER_ACCOUNT, v11 */ | |
4525 | "update_user_account", | |
4526 | "uuac", | |
4527 | 11, | |
4528 | UPDATE, | |
4529 | "u", | |
4530 | USERS_TABLE, | |
4531 | /* See comment in auac about signature. */ | |
4532 | "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d, signature = NVL(CHR(0), '%s'), secure = %s, winhomedir = NVL('%s', CHR(0)), winprofiledir = NVL('%s', CHR(0))", | |
4533 | uuac_fields, | |
4534 | 15, | |
4535 | "users_id = %d", | |
4536 | 1, | |
4537 | NULL, | |
4ffa124a | 4538 | &uuac_validate, |
4539 | }, | |
5eaef520 | 4540 | |
d33e787c | 4541 | { |
186dd63b | 4542 | /* Q_UUSR - UPDATE_USER, v2 */ |
d33e787c | 4543 | "update_user", |
4544 | "uusr", | |
c44ddfa7 | 4545 | 2, |
d33e787c | 4546 | UPDATE, |
4547 | "u", | |
03c05291 | 4548 | USERS_TABLE, |
5eaef520 | 4549 | "users SET login = '%s', unix_uid = %s, shell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s'", |
186dd63b | 4550 | uuac2_fields, |
d33e787c | 4551 | 9, |
4e5ec77f | 4552 | "users_id = %d", |
d33e787c | 4553 | 1, |
29028043 | 4554 | NULL, |
186dd63b | 4555 | &uusr2_validate, |
4556 | }, | |
4557 | ||
4558 | { | |
4559 | /* Q_UUSR - UPDATE_USER, v3 */ | |
4560 | "update_user", | |
4561 | "uusr", | |
4562 | 3, | |
4563 | UPDATE, | |
4564 | "u", | |
4565 | USERS_TABLE, | |
4566 | "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s'", | |
aec7d432 | 4567 | uuac3_fields, |
186dd63b | 4568 | 10, |
4569 | "users_id = %d", | |
4570 | 1, | |
4571 | NULL, | |
aec7d432 | 4572 | &uusr3_validate, |
4573 | }, | |
4574 | ||
4575 | { | |
4576 | /* Q_UUSR - UPDATE_USER, v11 */ | |
4577 | "update_user", | |
4578 | "uusr", | |
4579 | 11, | |
4580 | UPDATE, | |
4581 | "u", | |
4582 | USERS_TABLE, | |
4583 | "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', winhomedir = NVL('%s', CHR(0)), winprofiledir = NVL('%s', CHR(0)) ", | |
4584 | uuac_fields, | |
4585 | 12, | |
4586 | "users_id = %d", | |
4587 | 1, | |
4588 | NULL, | |
d33e787c | 4589 | &uusr_validate, |
4590 | }, | |
4591 | ||
4592 | { | |
4593 | /* Q_UUSH - UPDATE_USER_SHELL */ | |
4594 | "update_user_shell", | |
4595 | "uush", | |
c44ddfa7 | 4596 | 2, |
d33e787c | 4597 | UPDATE, |
4598 | "u", | |
03c05291 | 4599 | USERS_TABLE, |
5eaef520 | 4600 | "users SET shell = '%s'", |
d33e787c | 4601 | uush_fields, |
4602 | 1, | |
4e5ec77f | 4603 | "users_id = %d", |
d33e787c | 4604 | 1, |
29028043 | 4605 | NULL, |
d33e787c | 4606 | &uush_validate, |
4607 | }, | |
4608 | ||
29dbfca4 | 4609 | { |
4610 | /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */ | |
4611 | "update_user_windows_shell", | |
4612 | "uuws", | |
4613 | 2, | |
4614 | UPDATE, | |
4615 | "u", | |
4616 | USERS_TABLE, | |
4617 | "users SET winconsoleshell = '%s'", | |
4618 | uuws_fields, | |
4619 | 1, | |
4620 | "users_id = %d", | |
4621 | 1, | |
4622 | NULL, | |
4623 | &uuws_validate, | |
4624 | }, | |
4625 | ||
d33e787c | 4626 | { |
4627 | /* Q_UUST - UPDATE_USER_STATUS */ | |
4628 | "update_user_status", | |
4629 | "uust", | |
c44ddfa7 | 4630 | 2, |
d33e787c | 4631 | UPDATE, |
4632 | "u", | |
03c05291 | 4633 | USERS_TABLE, |
4e5ec77f | 4634 | "users SET status = %s", |
d33e787c | 4635 | uust_fields, |
4636 | 1, | |
4e5ec77f | 4637 | "users_id = %d", |
d33e787c | 4638 | 1, |
29028043 | 4639 | NULL, |
d33e787c | 4640 | &uust_validate, |
4641 | }, | |
4642 | ||
4ffa124a | 4643 | { |
4644 | /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */ | |
4645 | "update_user_security_status", | |
4646 | "uuss", | |
c44ddfa7 | 4647 | 2, |
4ffa124a | 4648 | UPDATE, |
4649 | "u", | |
03c05291 | 4650 | USERS_TABLE, |
135dcb80 | 4651 | "users SET secure = %s", |
4ffa124a | 4652 | uuss_fields, |
4653 | 1, | |
4654 | "users_id = %d", | |
4655 | 1, | |
29028043 | 4656 | NULL, |
4ffa124a | 4657 | &uust_validate, |
4658 | }, | |
5eaef520 | 4659 | |
d33e787c | 4660 | { |
5eaef520 | 4661 | /* Q_DUSR - DELETE_USER */ |
d33e787c | 4662 | "delete_user", |
4663 | "dusr", | |
c44ddfa7 | 4664 | 2, |
d33e787c | 4665 | DELETE, |
4666 | "u", | |
03c05291 | 4667 | USERS_TABLE, |
7ac48069 | 4668 | NULL, |
d33e787c | 4669 | dusr_fields, |
4670 | 0, | |
4e5ec77f | 4671 | "users_id = %d", |
d33e787c | 4672 | 1, |
29028043 | 4673 | NULL, |
d33e787c | 4674 | &dusr_validate, |
4675 | }, | |
4676 | ||
77eb4bdf | 4677 | { |
4678 | /* Q_AURV - ADD_USER_RESERVATION */ | |
4679 | "add_user_reservation", | |
4680 | "aurv", | |
4681 | 2, | |
4682 | UPDATE, | |
4683 | 0, | |
4684 | USERS_TABLE, | |
4685 | 0, | |
4686 | aurv_fields, | |
4687 | 2, | |
4688 | 0, | |
4689 | 0, | |
4690 | NULL, | |
4691 | &aurv_validate, | |
4692 | }, | |
4693 | ||
4694 | { | |
4695 | /* Q_GURV - GET_USER_RESERVATIONS */ | |
4696 | "get_user_reservations", | |
4697 | "gurv", | |
4698 | 2, | |
4699 | RETRIEVE, | |
4700 | 0, | |
4701 | USERS_TABLE, | |
4702 | 0, | |
4703 | gurv_fields, | |
4704 | 2, | |
4705 | 0, | |
4706 | 1, | |
4707 | NULL, | |
4708 | &gurv_validate, | |
4709 | }, | |
4710 | ||
4711 | { | |
4712 | /* Q_GUBR - GET_USER_BY_RESERVATION */ | |
4713 | "get_user_by_reservation", | |
4714 | "gubr", | |
4715 | 2, | |
4716 | RETRIEVE, | |
4717 | 0, | |
4718 | USERS_TABLE, | |
4719 | 0, | |
4720 | gubr_fields, | |
4721 | 1, | |
4722 | 0, | |
4723 | 1, | |
4724 | NULL, | |
4725 | &gubr_validate, | |
4726 | }, | |
4727 | ||
4728 | { | |
4729 | /* Q_DURV - DELETE_USER_RESERVATION */ | |
4730 | "delete_user_reservation", | |
4731 | "durv", | |
4732 | 2, | |
4733 | UPDATE, | |
4734 | 0, | |
4735 | USERS_TABLE, | |
4736 | 0, | |
4737 | aurv_fields, | |
4738 | 2, | |
4739 | 0, | |
4740 | 0, | |
4741 | NULL, | |
4742 | &aurv_validate, | |
4743 | }, | |
4744 | ||
012fc215 | 4745 | { |
5eaef520 | 4746 | /* Q_GKUM - GET_KERBEROS_USER_MAP */ |
012fc215 | 4747 | "get_kerberos_user_map", |
4748 | "gkum", | |
c44ddfa7 | 4749 | 2, |
012fc215 | 4750 | RETRIEVE, |
4751 | "k", | |
03c05291 | 4752 | KRBMAP_TABLE, |
4753 | "u.login, str.string FROM krbmap km, users u, strings str", | |
012fc215 | 4754 | gkum_fields, |
4755 | 2, | |
263a36d4 | 4756 | "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id", |
012fc215 | 4757 | 2, |
29028043 | 4758 | "u.login, str.string", |
263a36d4 | 4759 | NULL, |
012fc215 | 4760 | }, |
4761 | ||
4762 | { | |
4763 | /* Q_AKUM - ADD_KERBEROS_USER_MAP */ | |
4764 | "add_kerberos_user_map", | |
4765 | "akum", | |
c44ddfa7 | 4766 | 2, |
012fc215 | 4767 | APPEND, |
4768 | "k", | |
03c05291 | 4769 | KRBMAP_TABLE, |
99e09b48 | 4770 | "INTO krbmap (users_id, string_id) VALUES (%d, %d)", |
012fc215 | 4771 | akum_fields, |
4772 | 2, | |
4773 | 0, | |
4774 | 0, | |
29028043 | 4775 | NULL, |
012fc215 | 4776 | &akum_validate, |
4777 | }, | |
4778 | ||
4779 | { | |
4780 | /* Q_DKUM - DELETE_KERBEROS_USER_MAP */ | |
4781 | "delete_kerberos_user_map", | |
4782 | "dkum", | |
c44ddfa7 | 4783 | 2, |
012fc215 | 4784 | DELETE, |
4785 | "k", | |
03c05291 | 4786 | KRBMAP_TABLE, |
012fc215 | 4787 | 0, |
4788 | akum_fields, | |
4789 | 0, | |
99e09b48 | 4790 | "users_id = %d AND string_id = %d", |
012fc215 | 4791 | 2, |
29028043 | 4792 | NULL, |
012fc215 | 4793 | &dkum_validate, |
4794 | }, | |
4795 | ||
d33e787c | 4796 | { |
4797 | /* Q_GFBL - GET_FINGER_BY_LOGIN */ | |
4798 | "get_finger_by_login", | |
4799 | "gfbl", | |
c44ddfa7 | 4800 | 2, |
d33e787c | 4801 | RETRIEVE, |
4802 | "u", | |
03c05291 | 4803 | USERS_TABLE, |
4804 | "login, fullname, nickname, home_addr, home_phone, office_addr, office_phone, department, affiliation, TO_CHAR(fmodtime, 'DD-mon-YYYY HH24:MI:SS'), fmodby, fmodwith FROM users", | |
d33e787c | 4805 | gfbl_fields, |
4806 | 12, | |
03c05291 | 4807 | "users_id = %d", |
d33e787c | 4808 | 1, |
29028043 | 4809 | "login", |
d33e787c | 4810 | &gfbl_validate, |
4811 | }, | |
4812 | ||
4813 | { | |
4814 | /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */ | |
4815 | "update_finger_by_login", | |
4816 | "ufbl", | |
c44ddfa7 | 4817 | 2, |
d33e787c | 4818 | UPDATE, |
4819 | "u", | |
03c05291 | 4820 | USERS_TABLE, |
5eaef520 | 4821 | "users SET fullname= NVL('%s', CHR(0)), nickname= NVL('%s', CHR(0)), home_addr= NVL('%s', CHR(0)), home_phone= NVL('%s', CHR(0)), office_addr= NVL('%s', CHR(0)), office_phone= NVL('%s', CHR(0)), department= NVL('%s', CHR(0)), affiliation= NVL('%s', CHR(0))", |
d33e787c | 4822 | ufbl_fields, |
4823 | 8, | |
4e5ec77f | 4824 | "users_id = %d", |
d33e787c | 4825 | 1, |
29028043 | 4826 | NULL, |
d33e787c | 4827 | &ufbl_validate, |
4828 | }, | |
4829 | ||
4830 | { | |
4831 | /* Q_GPOB - GET_POBOX */ | |
4832 | "get_pobox", | |
4833 | "gpob", | |
c44ddfa7 | 4834 | 2, |
d33e787c | 4835 | RETRIEVE, |
4836 | "u", | |
03c05291 | 4837 | USERS_TABLE, |
d6d830a1 | 4838 | "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users", |
d33e787c | 4839 | gpob_fields, |
d6d830a1 | 4840 | 7, |
03c05291 | 4841 | "users_id = %d", |
d33e787c | 4842 | 1, |
29028043 | 4843 | "login", |
d33e787c | 4844 | &gpob_validate, |
4845 | }, | |
4846 | ||
4847 | { | |
4848 | /* Q_GAPO - GET_ALL_POBOXES */ | |
4849 | "get_all_poboxes", | |
4850 | "gapo", | |
c44ddfa7 | 4851 | 2, |
d33e787c | 4852 | RETRIEVE, |
4853 | "u", | |
03c05291 | 4854 | USERS_TABLE, |
4855 | "login, potype, pop_id || ':' || box_id FROM users", | |
d33e787c | 4856 | gpox_fields, |
4857 | 3, | |
03c05291 | 4858 | "potype != 'NONE'", |
d33e787c | 4859 | 0, |
29028043 | 4860 | "login", |
d33e787c | 4861 | &gpox_validate, |
4862 | }, | |
5eaef520 | 4863 | |
d33e787c | 4864 | { |
4865 | /* Q_GPOP - GET_POBOXES_POP */ | |
4866 | "get_poboxes_pop", | |
4867 | "gpop", | |
c44ddfa7 | 4868 | 2, |
d33e787c | 4869 | RETRIEVE, |
4870 | "u", | |
03c05291 | 4871 | USERS_TABLE, |
17cb3de8 | 4872 | "login, potype, users_id FROM users", |
d33e787c | 4873 | gpox_fields, |
4874 | 3, | |
03c05291 | 4875 | "potype = 'POP'", |
d33e787c | 4876 | 0, |
29028043 | 4877 | "login", |
d33e787c | 4878 | &gpox_validate |
4879 | }, | |
4880 | ||
4881 | { | |
4882 | /* Q_GPOF - GET_POBOXES_SMTP */ | |
4883 | "get_poboxes_smtp", | |
4884 | "gpos", | |
c44ddfa7 | 4885 | 2, |
d33e787c | 4886 | RETRIEVE, |
4887 | "u", | |
03c05291 | 4888 | USERS_TABLE, |
17cb3de8 | 4889 | "login, potype, users_id FROM users", |
d33e787c | 4890 | gpox_fields, |
4891 | 3, | |
03c05291 | 4892 | "potype = 'SMTP'", |
d33e787c | 4893 | 0, |
29028043 | 4894 | "login", |
d33e787c | 4895 | &gpox_validate |
4896 | }, | |
4897 | ||
4898 | { | |
4899 | /* Q_SPOB - SET_POBOX */ | |
4900 | "set_pobox", | |
4901 | "spob", | |
c44ddfa7 | 4902 | 2, |
d33e787c | 4903 | UPDATE, |
4904 | 0, | |
03c05291 | 4905 | USERS_TABLE, |
d33e787c | 4906 | 0, |
4907 | spob_fields, | |
4908 | 3, | |
7ac48069 | 4909 | NULL, |
d33e787c | 4910 | 0, |
29028043 | 4911 | NULL, |
d33e787c | 4912 | &spob_validate, |
4913 | }, | |
4914 | ||
4915 | { | |
4916 | /* Q_SPOP - SET_POBOX_POP */ | |
4917 | "set_pobox_pop", | |
4918 | "spop", | |
c44ddfa7 | 4919 | 2, |
d33e787c | 4920 | UPDATE, |
8b0fdf05 | 4921 | 0, |
03c05291 | 4922 | USERS_TABLE, |
17cb3de8 | 4923 | 0, |
d33e787c | 4924 | spob_fields, |
8b0fdf05 | 4925 | 1, |
17cb3de8 | 4926 | NULL, |
4927 | 0, | |
29028043 | 4928 | NULL, |
d33e787c | 4929 | &spop_validate, |
4930 | }, | |
4931 | ||
4932 | { | |
4933 | /* Q_DPOB - DELETE_POBOX */ | |
4934 | "delete_pobox", | |
4935 | "dpob", | |
c44ddfa7 | 4936 | 2, |
d33e787c | 4937 | UPDATE, |
4938 | "u", | |
03c05291 | 4939 | USERS_TABLE, |
4940 | "users SET potype = 'NONE'", | |
4941 | spob_fields, | |
4942 | 0, | |
4943 | "users_id = %d", | |
d33e787c | 4944 | 1, |
29028043 | 4945 | NULL, |
03c05291 | 4946 | &dpob_validate, |
d33e787c | 4947 | }, |
4948 | ||
4949 | { | |
e4ae0190 | 4950 | /* Q_GHST - GET_HOST, v2 */ |
a66a2204 | 4951 | "get_host", |
4952 | "ghst", | |
c44ddfa7 | 4953 | 2, |
a66a2204 | 4954 | RETRIEVE, |
4955 | "m", | |
03c05291 | 4956 | MACHINE_TABLE, |
4957 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
e4ae0190 | 4958 | ghst2_fields, |
a66a2204 | 4959 | 21, |
1fa08fc4 | 4960 | "m.name LIKE UPPER('%s') AND m.address LIKE '%s' AND m.location LIKE UPPER('%s') AND s.name LIKE UPPER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", |
a66a2204 | 4961 | 4, |
29028043 | 4962 | "m.name", |
a66a2204 | 4963 | &ghst_validate, |
4964 | }, | |
4965 | ||
9333756a | 4966 | { |
e4ae0190 | 4967 | /* Q_GHST - GET_HOST, v6 */ |
4968 | "get_host", | |
4969 | "ghst", | |
4970 | 6, | |
4971 | RETRIEVE, | |
4972 | "m", | |
4973 | MACHINE_TABLE, | |
4974 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
4f6b1a05 | 4975 | ghst6_fields, |
e4ae0190 | 4976 | 22, |
4977 | "m.name LIKE UPPER('%s') AND m.address LIKE '%s' AND m.location LIKE UPPER('%s') AND s.name LIKE UPPER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4978 | 4, | |
4979 | "m.name", | |
4980 | &ghst_validate, | |
4981 | }, | |
4982 | ||
4f6b1a05 | 4983 | { |
4984 | /* Q_GHST - GET_HOST, v8 */ | |
4985 | "get_host", | |
4986 | "ghst", | |
4987 | 8, | |
4988 | RETRIEVE, | |
4989 | "m", | |
4990 | MACHINE_TABLE, | |
4991 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
4992 | ghst_fields, | |
4993 | 23, | |
4994 | "m.name LIKE UPPER('%s') AND m.address LIKE '%s' AND m.location LIKE UPPER('%s') AND s.name LIKE UPPER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4995 | 4, | |
4996 | "m.name", | |
4997 | &ghst_validate, | |
4998 | }, | |
4999 | ||
e4ae0190 | 5000 | { |
5001 | /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */ | |
9333756a | 5002 | "get_host_by_hwaddr", |
5003 | "ghbh", | |
c44ddfa7 | 5004 | 2, |
9333756a | 5005 | RETRIEVE, |
5006 | "m", | |
5007 | MACHINE_TABLE, | |
5008 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
e4ae0190 | 5009 | ghbh2_fields, |
9333756a | 5010 | 21, |
5011 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
5012 | 1, | |
5013 | "m.name", | |
012e079f | 5014 | &ghst_validate, |
9333756a | 5015 | }, |
5016 | ||
e4ae0190 | 5017 | { |
5018 | /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */ | |
5019 | "get_host_by_hwaddr", | |
5020 | "ghbh", | |
5021 | 6, | |
5022 | RETRIEVE, | |
5023 | "m", | |
5024 | MACHINE_TABLE, | |
5025 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
4f6b1a05 | 5026 | ghbh6_fields, |
e4ae0190 | 5027 | 22, |
5028 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
5029 | 1, | |
5030 | "m.name", | |
5031 | &ghst_validate, | |
5032 | }, | |
5033 | ||
4f6b1a05 | 5034 | { |
5035 | /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */ | |
5036 | "get_host_by_hwaddr", | |
5037 | "ghbh", | |
5038 | 8, | |
5039 | RETRIEVE, | |
5040 | "m", | |
5041 | MACHINE_TABLE, | |
5042 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
5043 | ghbh_fields, | |
5044 | 23, | |
5045 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
5046 | 1, | |
5047 | "m.name", | |
5048 | &ghst_validate, | |
5049 | }, | |
5050 | ||
5051 | { | |
5052 | /* Q_GHBA - GET_HOST_BY_ACCOUNT_NUMBER, v8 */ | |
5053 | "get_host_by_account_number", | |
5054 | "ghba", | |
5055 | 8, | |
5056 | RETRIEVE, | |
5057 | "m", | |
5058 | MACHINE_TABLE, | |
5059 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
5060 | ghba_fields, | |
5061 | 23, | |
5062 | "m.account_number LIKE '%s' AND m.mach_id != 0 and s.snet_id = m.snet_id", | |
5063 | 1, | |
5064 | "m.name", | |
5065 | &ghst_validate, | |
5066 | }, | |
5067 | ||
2884200f | 5068 | { |
5069 | /* Q_GHHA - GET_HOST_HWADDR */ | |
5070 | "get_host_hwaddr", | |
5071 | "ghha", | |
c44ddfa7 | 5072 | 2, |
2884200f | 5073 | RETRIEVE, |
5074 | "m", | |
5075 | MACHINE_TABLE, | |
5076 | "m.hwaddr FROM machine m", | |
5077 | ghha_fields, | |
5078 | 1, | |
5079 | "m.name LIKE UPPER('%s')", | |
5080 | 1, | |
5081 | NULL, | |
5082 | NULL, | |
5083 | }, | |
5084 | ||
a66a2204 | 5085 | { |
e4ae0190 | 5086 | /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */ |
a66a2204 | 5087 | "add_host", |
5088 | "ahst", | |
c44ddfa7 | 5089 | 2, |
d33e787c | 5090 | APPEND, |
5091 | "m", | |
03c05291 | 5092 | MACHINE_TABLE, |
5eaef520 | 5093 | "INTO machine (name, vendor, model, os, location, contact, use, status, statuschange, snet_id, address, owner_type, owner_id, acomment, ocomment, created, inuse, mach_id, creator) VALUES (UPPER('%s'), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL('%s', CHR(0)), %s, %s, SYSDATE, %d, '%s', '%s', %d, %d, %d, SYSDATE, SYSDATE, %s, %s)", |
e4ae0190 | 5094 | ahst2_fields, |
a66a2204 | 5095 | 14, |
45bf7573 | 5096 | 0, |
d33e787c | 5097 | 0, |
29028043 | 5098 | NULL, |
e4ae0190 | 5099 | &ahst2_validate, |
5100 | }, | |
5101 | ||
5102 | { | |
5103 | /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */ | |
5104 | "add_host", | |
5105 | "ahst", | |
5106 | 6, | |
5107 | APPEND, | |
5108 | "m", | |
5109 | MACHINE_TABLE, | |
5110 | "INTO machine (name, vendor, model, os, location, contact, billing_contact, use, status, statuschange, snet_id, address, owner_type, owner_id, acomment, ocomment, created, inuse, mach_id, creator) VALUES (UPPER('%s'), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, SYSDATE, %d, '%s', '%s', %d, %d, %d, SYSDATE, SYSDATE, %s, %s)", | |
4f6b1a05 | 5111 | ahst6_fields, |
2c593a9e | 5112 | 15, |
751f43da | 5113 | 0, |
5114 | 0, | |
5115 | NULL, | |
4f6b1a05 | 5116 | &ahst6_validate, |
5117 | }, | |
5118 | ||
5119 | { | |
5120 | /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */ | |
5121 | "add_host", | |
5122 | "ahst", | |
5123 | 8, | |
5124 | APPEND, | |
5125 | "m", | |
5126 | MACHINE_TABLE, | |
5127 | "INTO machine (name, vendor, model, os, location, contact, billing_contact, account_number, use, status, statuschange, snet_id, address, owner_type, owner_id, acomment, ocomment, created, inuse, mach_id, creator) VALUES (UPPER('%s'), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, SYSDATE, %d, '%s', '%s', %d, %d, %d, SYSDATE, SYSDATE, %s, %s)", | |
5128 | ahst_fields, | |
5129 | 16, | |
5130 | 0, | |
5131 | 0, | |
5132 | NULL, | |
a66a2204 | 5133 | &ahst_validate, |
d33e787c | 5134 | }, |
5135 | ||
5136 | { | |
e4ae0190 | 5137 | /* Q_UHST - UPDATE_HOST, v2 */ |
a66a2204 | 5138 | "update_host", |
5139 | "uhst", | |
c44ddfa7 | 5140 | 2, |
d33e787c | 5141 | UPDATE, |
5142 | "m", | |
03c05291 | 5143 | MACHINE_TABLE, |
5eaef520 | 5144 | "machine SET name = NVL(UPPER('%s'), CHR(0)), vendor = NVL(UPPER('%s'), CHR(0)), model = NVL(UPPER('%s'), CHR(0)), os = NVL(UPPER('%s'), CHR(0)), location = NVL(UPPER('%s'), CHR(0)), contact = NVL('%s', CHR(0)), use = %s, status = %s, snet_id = %d, address = '%s', owner_type = '%s', owner_id = %d, acomment = %d, ocomment = %d", |
e4ae0190 | 5145 | uhst2_fields, |
a66a2204 | 5146 | 14, |
4e5ec77f | 5147 | "mach_id = %d", |
d33e787c | 5148 | 1, |
29028043 | 5149 | NULL, |
e4ae0190 | 5150 | &uhst2_validate, |
5151 | }, | |
5152 | ||
5153 | { | |
5154 | /* Q_UHST - UPDATE_HOST, v6 */ | |
5155 | "update_host", | |
5156 | "uhst", | |
5157 | 6, | |
5158 | UPDATE, | |
5159 | "m", | |
5160 | MACHINE_TABLE, | |
5161 | "machine SET name = NVL(UPPER('%s'), CHR(0)), vendor = NVL(UPPER('%s'), CHR(0)), model = NVL(UPPER('%s'), CHR(0)), os = NVL(UPPER('%s'), CHR(0)), location = NVL(UPPER('%s'), CHR(0)), contact = NVL('%s', CHR(0)), billing_contact = NVL('%s', CHR(0)), use = %s, status = %s, snet_id = %d, address = '%s', owner_type = '%s', owner_id = %d, acomment = %d, ocomment = %d", | |
4f6b1a05 | 5162 | uhst6_fields, |
2c593a9e | 5163 | 15, |
751f43da | 5164 | "mach_id = %d", |
5165 | 1, | |
5166 | NULL, | |
4f6b1a05 | 5167 | &uhst6_validate, |
5168 | }, | |
5169 | ||
5170 | { | |
5171 | /* Q_UHST - UPDATE_HOST, v8 */ | |
5172 | "update_host", | |
5173 | "uhst", | |
5174 | 8, | |
5175 | UPDATE, | |
5176 | "m", | |
5177 | MACHINE_TABLE, | |
5178 | "machine SET name = NVL(UPPER('%s'), CHR(0)), vendor = NVL(UPPER('%s'), CHR(0)), model = NVL(UPPER('%s'), CHR(0)), os = NVL(UPPER('%s'), CHR(0)), location = NVL(UPPER('%s'), CHR(0)), contact = NVL('%s', CHR(0)), billing_contact = NVL('%s', CHR(0)), account_number = NVL('%s', CHR(0)), use = %s, status = %s, snet_id = %d, address = '%s', owner_type = '%s', owner_id = %d, acomment = %d, ocomment = %d", | |
5179 | uhst_fields, | |
5180 | 16, | |
5181 | "mach_id = %d", | |
5182 | 1, | |
5183 | NULL, | |
a66a2204 | 5184 | &uhst_validate, |
d33e787c | 5185 | }, |
5186 | ||
2884200f | 5187 | { |
5188 | /* Q_UHHA - UPDATE_HOST_HWADDR */ | |
5189 | "update_host_hwaddr", | |
5190 | "uhha", | |
c44ddfa7 | 5191 | 2, |
2884200f | 5192 | UPDATE, |
5193 | "m", | |
5194 | MACHINE_TABLE, | |
1fdf882a | 5195 | "machine SET hwaddr = NVL('%s', CHR(0))", |
2884200f | 5196 | uhha_fields, |
5197 | 1, | |
5198 | "mach_id = %d", | |
5199 | 1, | |
5200 | NULL, | |
5201 | &uhha_validate, | |
5202 | }, | |
5203 | ||
d33e787c | 5204 | { |
a66a2204 | 5205 | /* Q_DHST - DELETE_HOST */ |
5206 | "delete_host", | |
5207 | "dhst", | |
c44ddfa7 | 5208 | 2, |
d33e787c | 5209 | DELETE, |
5210 | "m", | |
03c05291 | 5211 | MACHINE_TABLE, |
7ac48069 | 5212 | NULL, |
a66a2204 | 5213 | dhst_fields, |
d33e787c | 5214 | 0, |
4e5ec77f | 5215 | "mach_id = %d", |
d33e787c | 5216 | 1, |
29028043 | 5217 | NULL, |
a66a2204 | 5218 | &dhst_validate, |
5219 | }, | |
5220 | ||
03c05291 | 5221 | { |
5222 | /* Q_GMAC - GET_MACHINE */ | |
5223 | "get_machine", | |
5224 | "gmac", | |
c44ddfa7 | 5225 | 2, |
03c05291 | 5226 | RETRIEVE, |
5227 | "m", | |
5228 | MACHINE_TABLE, | |
5229 | "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine", | |
5230 | gmac_fields, | |
5231 | 5, | |
263a36d4 | 5232 | "name LIKE UPPER('%s') AND mach_id != 0", |
03c05291 | 5233 | 1, |
29028043 | 5234 | "name", |
263a36d4 | 5235 | &VDfix_modby, |
03c05291 | 5236 | }, |
5237 | ||
a66a2204 | 5238 | { |
5239 | /* Q_GHAL - GET_HOSTALIAS */ | |
5240 | "get_hostalias", | |
5241 | "ghal", | |
c44ddfa7 | 5242 | 2, |
a66a2204 | 5243 | RETRIEVE, |
03c05291 | 5244 | "a", |
5245 | HOSTALIAS_TABLE, | |
5246 | "a.name, m.name FROM hostalias a, machine m", | |
a66a2204 | 5247 | ghal_fields, |
5248 | 2, | |
263a36d4 | 5249 | "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')", |
a66a2204 | 5250 | 2, |
29028043 | 5251 | "a.name", |
a66a2204 | 5252 | &ghal_validate, |
5253 | }, | |
5254 | ||
5255 | { | |
5256 | /* Q_AHAL - ADD_HOSTALIAS */ | |
5257 | "add_hostalias", | |
5258 | "ahal", | |
c44ddfa7 | 5259 | 2, |
a66a2204 | 5260 | APPEND, |
5261 | "a", | |
03c05291 | 5262 | HOSTALIAS_TABLE, |
5eaef520 | 5263 | "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)", |
a66a2204 | 5264 | ghal_fields, |
5265 | 2, | |
5266 | 0, | |
5267 | 0, | |
29028043 | 5268 | NULL, |
a66a2204 | 5269 | &ahal_validate, |
5270 | }, | |
5271 | ||
5272 | { | |
5273 | /* Q_DHAL - DELETE_HOSTALIAS */ | |
5274 | "delete_hostalias", | |
5275 | "dhal", | |
c44ddfa7 | 5276 | 2, |
a66a2204 | 5277 | DELETE, |
5278 | "a", | |
03c05291 | 5279 | HOSTALIAS_TABLE, |
7ac48069 | 5280 | NULL, |
a66a2204 | 5281 | ghal_fields, |
5282 | 0, | |
03c05291 | 5283 | "name = UPPER('%s') AND mach_id = %d", |
a66a2204 | 5284 | 2, |
29028043 | 5285 | NULL, |
a66a2204 | 5286 | &dhal_validate, |
d33e787c | 5287 | }, |
5288 | ||
3c1d412c | 5289 | { |
4f6b1a05 | 5290 | /* Q_GSNT - GET_SUBNET, v2 */ |
3c1d412c | 5291 | "get_subnet", |
5292 | "gsnt", | |
c44ddfa7 | 5293 | 2, |
3c1d412c | 5294 | RETRIEVE, |
5295 | "s", | |
03c05291 | 5296 | SUBNET_TABLE, |
5297 | "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet", | |
4f6b1a05 | 5298 | gsnt2_fields, |
bd8c26ff | 5299 | 12, |
5e8fdad1 | 5300 | "name LIKE UPPER('%s')", |
3c1d412c | 5301 | 1, |
29028043 | 5302 | "name", |
3c1d412c | 5303 | &gsnt_validate, |
5304 | }, | |
5305 | ||
5306 | { | |
4f6b1a05 | 5307 | /* Q_GSNT - GET_SUBNET, v8 */ |
5308 | "get_subnet", | |
5309 | "gsnt", | |
5310 | 8, | |
5311 | RETRIEVE, | |
5312 | "s", | |
5313 | SUBNET_TABLE, | |
5314 | "name, description, status, contact, account_number, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet", | |
5315 | gsnt_fields, | |
5316 | 15, | |
5317 | "name LIKE UPPER('%s')", | |
5318 | 1, | |
5319 | "name", | |
5320 | &gsnt_validate, | |
5321 | }, | |
5322 | ||
5323 | { | |
5324 | /* Q_ASNT - ADD_SUBNET, v2 */ | |
3c1d412c | 5325 | "add_subnet", |
5326 | "asnt", | |
c44ddfa7 | 5327 | 2, |
3c1d412c | 5328 | APPEND, |
5329 | "s", | |
03c05291 | 5330 | SUBNET_TABLE, |
5eaef520 | 5331 | "INTO subnet (name, description, saddr, mask, low, high, prefix, owner_type, owner_id, snet_id) VALUES (UPPER('%s'), NVL('%s', CHR(0)), %s, %s, %s, %s, NVL('%s', CHR(0)), '%s', %d, %s)", |
4f6b1a05 | 5332 | asnt2_fields, |
bd8c26ff | 5333 | 9, |
3c1d412c | 5334 | 0, |
5335 | 0, | |
29028043 | 5336 | NULL, |
4f6b1a05 | 5337 | &asnt2_validate, |
5338 | }, | |
5339 | ||
5340 | { | |
5341 | /* Q_ASNT - ADD_SUBNET, v8 */ | |
5342 | "add_subnet", | |
5343 | "asnt", | |
5344 | 8, | |
5345 | APPEND, | |
5346 | "s", | |
5347 | SUBNET_TABLE, | |
8dc7d749 | 5348 | "INTO subnet (name, description, status, contact, account_number, saddr, mask, low, high, prefix, owner_type, owner_id, snet_id) VALUES (UPPER('%s'), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, %s, %s, NVL('%s', CHR(0)), '%s', %d, %s)", |
4f6b1a05 | 5349 | asnt_fields, |
5350 | 12, | |
5351 | 0, | |
5352 | 0, | |
5353 | NULL, | |
3c1d412c | 5354 | &asnt_validate, |
5355 | }, | |
5356 | ||
5357 | { | |
4f6b1a05 | 5358 | /* Q_USNT - UPDATE_SUBNET, v2 */ |
3c1d412c | 5359 | "update_subnet", |
5360 | "usnt", | |
c44ddfa7 | 5361 | 2, |
3c1d412c | 5362 | UPDATE, |
5363 | "s", | |
03c05291 | 5364 | SUBNET_TABLE, |
5eaef520 | 5365 | "subnet SET name = UPPER('%s'), description = NVL('%s', CHR(0)), saddr = %s, mask = %s, low = %s, high = %s, prefix = NVL('%s', CHR(0)), owner_type = '%s', owner_id = %d", |
4f6b1a05 | 5366 | usnt2_fields, |
bd8c26ff | 5367 | 9, |
3c1d412c | 5368 | "snet_id = %d", |
5369 | 1, | |
29028043 | 5370 | NULL, |
4f6b1a05 | 5371 | &usnt2_validate, |
5372 | }, | |
5373 | ||
5374 | { | |
5375 | /* Q_USNT - UPDATE_SUBNET, v8 */ | |
5376 | "update_subnet", | |
5377 | "usnt", | |
5378 | 8, | |
5379 | UPDATE, | |
5380 | "s", | |
5381 | SUBNET_TABLE, | |
5382 | "subnet SET name = UPPER('%s'), description = NVL('%s', CHR(0)), status = %s, contact = NVL('%s', CHR(0)), account_number = NVL('%s', CHR(0)), saddr = %s, mask = %s, low = %s, high = %s, prefix = NVL('%s', CHR(0)), owner_type = '%s', owner_id = %d", | |
5383 | usnt_fields, | |
5384 | 12, | |
5385 | "snet_id = %d", | |
5386 | 1, | |
5387 | NULL, | |
3c1d412c | 5388 | &usnt_validate, |
5389 | }, | |
5390 | ||
5391 | { | |
5392 | /* Q_DSNT - DELETE_SUBNET */ | |
5393 | "delete_subnet", | |
5394 | "dsnt", | |
c44ddfa7 | 5395 | 2, |
3c1d412c | 5396 | DELETE, |
5397 | "s", | |
03c05291 | 5398 | SUBNET_TABLE, |
7ac48069 | 5399 | NULL, |
3c1d412c | 5400 | dsnt_fields, |
5401 | 0, | |
5402 | "snet_id = %d", | |
5403 | 1, | |
29028043 | 5404 | NULL, |
3c1d412c | 5405 | &dsnt_validate, |
5406 | }, | |
5407 | ||
d33e787c | 5408 | { |
5409 | /* Q_GCLU - GET_CLUSTER */ | |
5410 | "get_cluster", | |
5411 | "gclu", | |
c44ddfa7 | 5412 | 2, |
d33e787c | 5413 | RETRIEVE, |
5414 | "c", | |
e688520a | 5415 | CLUSTERS_TABLE, |
03c05291 | 5416 | "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters", |
d33e787c | 5417 | gclu_fields, |
5418 | 6, | |
263a36d4 | 5419 | "name LIKE '%s' AND clu_id != 0", |
d33e787c | 5420 | 1, |
29028043 | 5421 | "name", |
263a36d4 | 5422 | &VDfix_modby, |
d33e787c | 5423 | }, |
5424 | ||
5425 | { | |
45bf7573 | 5426 | /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */ |
d33e787c | 5427 | "add_cluster", |
5428 | "aclu", | |
c44ddfa7 | 5429 | 2, |
d33e787c | 5430 | APPEND, |
5431 | "c", | |
e688520a | 5432 | CLUSTERS_TABLE, |
5eaef520 | 5433 | "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)", |
d33e787c | 5434 | aclu_fields, |
5435 | 3, | |
45bf7573 | 5436 | 0, |
d33e787c | 5437 | 0, |
29028043 | 5438 | NULL, |
d33e787c | 5439 | &aclu_validate, |
5440 | }, | |
5441 | ||
5442 | { | |
5443 | /* Q_UCLU - UPDATE_CLUSTER */ | |
5444 | "update_cluster", | |
5445 | "uclu", | |
c44ddfa7 | 5446 | 2, |
d33e787c | 5447 | UPDATE, |
5448 | "c", | |
e688520a | 5449 | CLUSTERS_TABLE, |
5eaef520 | 5450 | "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))", |
d33e787c | 5451 | uclu_fields, |
5452 | 3, | |
4e5ec77f | 5453 | "clu_id = %d", |
d33e787c | 5454 | 1, |
29028043 | 5455 | NULL, |
d33e787c | 5456 | &uclu_validate, |
5457 | }, | |
5458 | ||
5459 | { | |
5460 | /* Q_DCLU - DELETE_CLUSTER */ | |
5461 | "delete_cluster", | |
5462 | "dclu", | |
c44ddfa7 | 5463 | 2, |
d33e787c | 5464 | DELETE, |
5465 | "c", | |
e688520a | 5466 | CLUSTERS_TABLE, |
7ac48069 | 5467 | NULL, |
d33e787c | 5468 | dclu_fields, |
5469 | 0, | |
4e5ec77f | 5470 | "clu_id = %d", |
d33e787c | 5471 | 1, |
29028043 | 5472 | NULL, |
d33e787c | 5473 | &dclu_validate, |
5474 | }, | |
5475 | ||
5476 | { | |
5eaef520 | 5477 | /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */ |
d33e787c | 5478 | "get_machine_to_cluster_map", |
5479 | "gmcm", | |
c44ddfa7 | 5480 | 2, |
d33e787c | 5481 | RETRIEVE, |
0c345c78 | 5482 | "mcm", |
03c05291 | 5483 | MCMAP_TABLE, |
5484 | "m.name, c.name FROM machine m, clusters c, mcmap mcm", | |
d33e787c | 5485 | gmcm_fields, |
5486 | 2, | |
263a36d4 | 5487 | "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id", |
d33e787c | 5488 | 2, |
29028043 | 5489 | "m.name", |
263a36d4 | 5490 | NULL, |
d33e787c | 5491 | }, |
5eaef520 | 5492 | |
d33e787c | 5493 | { |
5494 | /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */ | |
5495 | "add_machine_to_cluster", | |
5496 | "amtc", | |
c44ddfa7 | 5497 | 2, |
d33e787c | 5498 | APPEND, |
0c345c78 | 5499 | "mcm", |
03c05291 | 5500 | MCMAP_TABLE, |
4e5ec77f | 5501 | "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)", |
d33e787c | 5502 | gmcm_fields, |
5503 | 2, | |
5504 | 0, | |
5505 | 0, | |
29028043 | 5506 | NULL, |
d33e787c | 5507 | &amtc_validate, |
5508 | }, | |
5509 | ||
5510 | { | |
5511 | /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */ | |
5512 | "delete_machine_from_cluster", | |
5513 | "dmfc", | |
c44ddfa7 | 5514 | 2, |
d33e787c | 5515 | DELETE, |
0c345c78 | 5516 | "mcm", |
03c05291 | 5517 | MCMAP_TABLE, |
d33e787c | 5518 | 0, |
5519 | gmcm_fields, | |
5520 | 0, | |
4e5ec77f | 5521 | "mach_id = %d AND clu_id = %d", |
d33e787c | 5522 | 2, |
29028043 | 5523 | NULL, |
d33e787c | 5524 | &amtc_validate, |
5525 | }, | |
5526 | ||
5527 | { | |
68dd808d | 5528 | /* Q_GCLD - GET_CLUSTER_DATA */ |
d33e787c | 5529 | "get_cluster_data", |
5530 | "gcld", | |
c44ddfa7 | 5531 | 2, |
d33e787c | 5532 | RETRIEVE, |
d33e787c | 5533 | "svc", |
03c05291 | 5534 | SVC_TABLE, |
5535 | "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c", | |
d33e787c | 5536 | gcld_fields, |
5537 | 3, | |
263a36d4 | 5538 | "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'", |
d33e787c | 5539 | 2, |
29028043 | 5540 | "c.name, svc.serv_label", |
263a36d4 | 5541 | NULL, |
d33e787c | 5542 | }, |
5543 | ||
5544 | { | |
5545 | /* Q_ACLD - ADD_CLUSTER_DATA */ | |
5546 | "add_cluster_data", | |
5547 | "acld", | |
c44ddfa7 | 5548 | 2, |
d33e787c | 5549 | APPEND, |
0c345c78 | 5550 | "svc", |
03c05291 | 5551 | SVC_TABLE, |
5eaef520 | 5552 | "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')", |
88343c5e | 5553 | acld_fields, |
d33e787c | 5554 | 3, |
7ac48069 | 5555 | NULL, |
d33e787c | 5556 | 0, |
29028043 | 5557 | NULL, |
d33e787c | 5558 | &acld_validate, |
5559 | }, | |
5560 | ||
5561 | { | |
5562 | /* Q_DCLD - DELETE_CLUSTER_DATA */ | |
5563 | "delete_cluster_data", | |
5564 | "dcld", | |
c44ddfa7 | 5565 | 2, |
d33e787c | 5566 | DELETE, |
0c345c78 | 5567 | "svc", |
03c05291 | 5568 | SVC_TABLE, |
7ac48069 | 5569 | NULL, |
88343c5e | 5570 | acld_fields, |
d33e787c | 5571 | 0, |
5eaef520 | 5572 | "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'", |
d33e787c | 5573 | 3, |
29028043 | 5574 | NULL, |
99e09b48 | 5575 | &dcld_validate, |
d33e787c | 5576 | }, |
5577 | ||
03c05291 | 5578 | { |
44da57b2 | 5579 | /* Q_GLIN - GET_LIST_INFO, v2 */ |
03c05291 | 5580 | "get_list_info", |
5581 | "glin", | |
c44ddfa7 | 5582 | 2, |
03c05291 | 5583 | RETRIEVE, |
263a36d4 | 5584 | "l", |
03c05291 | 5585 | LIST_TABLE, |
ccdbc974 | 5586 | "name, active, publicflg, hidden, maillist, grouplist, gid, acl_type, acl_id, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM list", |
44da57b2 | 5587 | glin2_fields, |
03c05291 | 5588 | 13, |
263a36d4 | 5589 | "name LIKE '%s'", |
5eaef520 | 5590 | 1, |
263a36d4 | 5591 | "name", |
5eaef520 | 5592 | &glin_validate, |
03c05291 | 5593 | }, |
5eaef520 | 5594 | |
44da57b2 | 5595 | { |
5596 | /* Q_GLIN - GET_LIST_INFO, v3 */ | |
5597 | "get_list_info", | |
5598 | "glin", | |
5599 | 3, | |
5600 | RETRIEVE, | |
5601 | "l", | |
5602 | LIST_TABLE, | |
5603 | "name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM list", | |
59c3208b | 5604 | glin3_fields, |
44da57b2 | 5605 | 14, |
5606 | "name LIKE '%s'", | |
5607 | 1, | |
5608 | "name", | |
5609 | &glin_validate, | |
5610 | }, | |
5611 | ||
59c3208b | 5612 | { |
5613 | /* Q_GLIN - GET_LIST_INFO, v4 */ | |
5614 | "get_list_info", | |
5615 | "glin", | |
5616 | 4, | |
5617 | RETRIEVE, | |
5618 | "l", | |
5619 | LIST_TABLE, | |
5620 | "name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, memacl_type, memacl_id, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM list", | |
8e3761a2 | 5621 | glin4_fields, |
59c3208b | 5622 | 16, |
5623 | "name LIKE '%s'", | |
5624 | 1, | |
5625 | "name", | |
5626 | &glin_validate, | |
5627 | }, | |
5628 | ||
8e3761a2 | 5629 | { |
5630 | /* Q_GLIN - GET_LIST_INFO, v10 */ | |
5631 | "get_list_info", | |
5632 | "glin", | |
5633 | 10, | |
5634 | RETRIEVE, | |
5635 | "l", | |
5636 | LIST_TABLE, | |
5637 | "l.name, l.active, l.publicflg, l.hidden, l.maillist, l.grouplist, l.gid, l.nfsgroup, l.mailman, m.name, l.acl_type, l.acl_id, l.memacl_type, l.memacl_id, l.description, TO_CHAR(l.modtime, 'DD-mon-YYYY HH24:MI:SS'), l.modby, l.modwith FROM list l, machine m", | |
5638 | glin_fields, | |
5639 | 18, | |
5640 | "l.name LIKE '%s' AND m.mach_id = l.mailman_id", | |
5641 | 1, | |
5642 | "l.name", | |
5643 | &glin_validate, | |
5644 | }, | |
5645 | ||
03c05291 | 5646 | { |
5647 | /* Q_EXLN - EXPAND_LIST_NAMES */ | |
5648 | "expand_list_names", | |
5649 | "exln", | |
c44ddfa7 | 5650 | 2, |
03c05291 | 5651 | RETRIEVE, |
5652 | "l", | |
5653 | LIST_TABLE, | |
5654 | "name FROM list", | |
5655 | glin_fields, | |
5656 | 1, | |
263a36d4 | 5657 | "name LIKE '%s' AND list_id != 0", |
03c05291 | 5658 | 1, |
29028043 | 5659 | "name", |
263a36d4 | 5660 | NULL, |
03c05291 | 5661 | }, |
5eaef520 | 5662 | |
03c05291 | 5663 | { |
44da57b2 | 5664 | /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */ |
03c05291 | 5665 | "add_list", |
5666 | "alis", | |
c44ddfa7 | 5667 | 2, |
03c05291 | 5668 | APPEND, |
5669 | "l", | |
5eaef520 | 5670 | LIST_TABLE, |
5671 | "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, acl_type, acl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, '%s', %d, NVL('%s', CHR(0)), %s)", | |
44da57b2 | 5672 | alis2_fields, |
03c05291 | 5673 | 10, |
5674 | 0, | |
5675 | 0, | |
29028043 | 5676 | NULL, |
44da57b2 | 5677 | &alis2_validate, |
5678 | }, | |
5679 | ||
5680 | { | |
5681 | /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */ | |
5682 | "add_list", | |
5683 | "alis", | |
5684 | 3, | |
5685 | APPEND, | |
5686 | "l", | |
5687 | LIST_TABLE, | |
5688 | "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, '%s', %d, NVL('%s', CHR(0)), %s)", | |
59c3208b | 5689 | alis3_fields, |
44da57b2 | 5690 | 11, |
5691 | 0, | |
5692 | 0, | |
5693 | NULL, | |
59c3208b | 5694 | &alis3_validate, |
5695 | }, | |
5696 | ||
5697 | { | |
5698 | /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */ | |
5699 | "add_list", | |
5700 | "alis", | |
5701 | 4, | |
5702 | APPEND, | |
5703 | "l", | |
5704 | LIST_TABLE, | |
5705 | "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, memacl_type, memacl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, '%s', %d, '%s', %d, NVL('%s', CHR(0)), %s)", | |
8e3761a2 | 5706 | alis4_fields, |
59c3208b | 5707 | 13, |
5708 | 0, | |
5709 | 0, | |
5710 | NULL, | |
8e3761a2 | 5711 | &alis4_validate, |
5712 | }, | |
5713 | ||
5714 | { | |
5715 | /* Q_ALIS - ADD_LIST, v10 */ /* uses prefetch_value() for list_id */ | |
5716 | "add_list", | |
5717 | "alis", | |
5718 | 10, | |
5719 | APPEND, | |
5720 | "l", | |
5721 | LIST_TABLE, | |
5722 | "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, mailman, mailman_id, acl_type, acl_id, memacl_type, memacl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, %s, %d, '%s', %d, '%s', %d, NVL('%s', CHR(0)), %s)", | |
5723 | alis_fields, | |
5724 | 15, | |
5725 | 0, | |
5726 | 0, | |
5727 | NULL, | |
03c05291 | 5728 | &alis_validate, |
5729 | }, | |
5730 | ||
5731 | { | |
44da57b2 | 5732 | /* Q_ULIS - UPDATE_LIST, v2 */ |
03c05291 | 5733 | "update_list", |
5734 | "ulis", | |
c44ddfa7 | 5735 | 2, |
03c05291 | 5736 | UPDATE, |
5737 | "l", | |
5738 | LIST_TABLE, | |
5eaef520 | 5739 | "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, acl_type = '%s', acl_id = %d, description = NVL('%s', CHR(0))", |
44da57b2 | 5740 | ulis2_fields, |
03c05291 | 5741 | 10, |
5742 | "list_id = %d", | |
5743 | 1, | |
29028043 | 5744 | NULL, |
44da57b2 | 5745 | &ulis2_validate, |
5746 | }, | |
5747 | ||
5748 | { | |
5749 | /* Q_ULIS - UPDATE_LIST, v3 */ | |
5750 | "update_list", | |
5751 | "ulis", | |
5752 | 3, | |
5753 | UPDATE, | |
5754 | "l", | |
5755 | LIST_TABLE, | |
5756 | "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, acl_type = '%s', acl_id = %d, description = NVL('%s', CHR(0))", | |
59c3208b | 5757 | ulis3_fields, |
44da57b2 | 5758 | 11, |
5759 | "list_id = %d", | |
5760 | 1, | |
5761 | NULL, | |
59c3208b | 5762 | &ulis3_validate, |
5763 | }, | |
5764 | ||
5765 | { | |
5766 | /* Q_ULIS, UPDATE_LIST, v4 */ | |
5767 | "update_list", | |
5768 | "ulis", | |
5769 | 4, | |
5770 | UPDATE, | |
5771 | "l", | |
5772 | LIST_TABLE, | |
5773 | "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, acl_type = '%s', acl_id = %d, memacl_type = '%s', memacl_id = %d, description = NVL('%s', CHR(0))", | |
8e3761a2 | 5774 | ulis4_fields, |
59c3208b | 5775 | 13, |
5776 | "list_id = %d", | |
5777 | 1, | |
5778 | NULL, | |
8e3761a2 | 5779 | &ulis4_validate, |
5780 | }, | |
5781 | ||
5782 | { | |
5783 | /* Q_ULIS, UPDATE_LIST, v10 */ | |
5784 | "update_list", | |
5785 | "ulis", | |
5786 | 10, | |
5787 | UPDATE, | |
5788 | "l", | |
5789 | LIST_TABLE, | |
5790 | "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, mailman = %s, mailman_id = %d, acl_type = '%s', acl_id = %d, memacl_type = '%s', memacl_id = %d, description = NVL('%s', CHR(0))", | |
5791 | ulis_fields, | |
5792 | 15, | |
5793 | "list_id = %d", | |
5794 | 1, | |
5795 | NULL, | |
03c05291 | 5796 | &ulis_validate, |
5797 | }, | |
5798 | ||
5799 | { | |
5800 | /* Q_DLIS - DELETE_LIST */ | |
5801 | "delete_list", | |
5802 | "dlis", | |
c44ddfa7 | 5803 | 2, |
03c05291 | 5804 | DELETE, |
5805 | "l", | |
5806 | LIST_TABLE, | |
7ac48069 | 5807 | NULL, |
03c05291 | 5808 | dlis_fields, |
5809 | 0, | |
5810 | "list_id = %d", | |
5811 | 1, | |
29028043 | 5812 | NULL, |
03c05291 | 5813 | &dlis_validate, |
5814 | }, | |
5815 | ||
5816 | { | |
5817 | /* Q_AMTL - ADD_MEMBER_TO_LIST */ | |
5818 | "add_member_to_list", | |
5819 | "amtl", | |
c44ddfa7 | 5820 | 2, |
03c05291 | 5821 | APPEND, |
5822 | 0, | |
5823 | IMEMBERS_TABLE, | |
5824 | 0, | |
5825 | amtl_fields, | |
5826 | 3, | |
7ac48069 | 5827 | NULL, |
03c05291 | 5828 | 0, |
29028043 | 5829 | NULL, |
03c05291 | 5830 | &amtl_validate, |
5831 | }, | |
5832 | ||
46b6f1f6 | 5833 | { |
5834 | /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */ | |
5835 | "add_tagged_member_to_list", | |
5836 | "atml", | |
c44ddfa7 | 5837 | 2, |
46b6f1f6 | 5838 | APPEND, |
5839 | 0, | |
5840 | IMEMBERS_TABLE, | |
5841 | 0, | |
5842 | atml_fields, | |
5843 | 4, | |
5844 | NULL, | |
5845 | 0, | |
5846 | NULL, | |
5847 | &atml_validate, | |
5848 | }, | |
5849 | ||
5850 | { | |
5851 | /* Q_TMOL - TAG_MEMBER_OF_LIST */ | |
5852 | "tag_member_of_list", | |
5853 | "tmol", | |
c44ddfa7 | 5854 | 2, |
46b6f1f6 | 5855 | UPDATE, |
20541c25 | 5856 | 0, |
46b6f1f6 | 5857 | IMEMBERS_TABLE, |
20541c25 | 5858 | 0, |
46b6f1f6 | 5859 | atml_fields, |
5860 | 1, | |
20541c25 | 5861 | 0, |
46b6f1f6 | 5862 | 3, |
5863 | NULL, | |
5864 | &tmol_validate, | |
5865 | }, | |
5866 | ||
03c05291 | 5867 | { |
5868 | /* Q_DMFL - DELETE_MEMBER_FROM_LIST */ | |
5869 | "delete_member_from_list", | |
5870 | "dmfl", | |
c44ddfa7 | 5871 | 2, |
03c05291 | 5872 | DELETE, |
5873 | 0, | |
5874 | IMEMBERS_TABLE, | |
7ac48069 | 5875 | NULL, |
03c05291 | 5876 | amtl_fields, |
5877 | 0, | |
5878 | 0, | |
5879 | 3, | |
29028043 | 5880 | NULL, |
03c05291 | 5881 | &dmfl_validate, |
5882 | }, | |
5883 | ||
5884 | { | |
5885 | /* Q_GAUS - GET_ACE_USE */ | |
5886 | "get_ace_use", | |
5887 | "gaus", | |
c44ddfa7 | 5888 | 2, |
03c05291 | 5889 | RETRIEVE, |
5890 | 0, | |
5891 | 0, | |
5892 | 0, | |
5893 | gaus_fields, | |
5894 | 2, | |
5895 | 0, | |
5896 | 2, | |
29028043 | 5897 | NULL, |
03c05291 | 5898 | &gaus_validate, |
5899 | }, | |
5900 | ||
d3051625 | 5901 | { |
5902 | /* Q_GHBO - GET_HOST_BY_OWNER */ | |
5903 | "get_host_by_owner", | |
5904 | "ghbo", | |
5905 | 2, | |
5906 | RETRIEVE, | |
5907 | 0, | |
5908 | 0, | |
5909 | 0, | |
5910 | ghbo_fields, | |
5911 | 1, | |
5912 | 0, | |
5913 | 2, | |
5914 | NULL, | |
5915 | &ghbo_validate, | |
5916 | }, | |
5917 | ||
03c05291 | 5918 | { |
5919 | /* Q_QGLI - QUALIFIED_GET_LISTS */ | |
5920 | "qualified_get_lists", | |
5921 | "qgli", | |
c44ddfa7 | 5922 | 2, |
03c05291 | 5923 | RETRIEVE, |
5924 | 0, | |
5925 | LIST_TABLE, | |
5926 | 0, | |
5927 | qgli_fields, | |
5928 | 1, | |
5929 | 0, | |
5930 | 5, | |
29028043 | 5931 | NULL, |
03c05291 | 5932 | &qgli_validate, |
5933 | }, | |
5934 | ||
5935 | { | |
5936 | /* Q_GMOL - GET_MEMBERS_OF_LIST */ | |
5937 | "get_members_of_list", | |
5938 | "gmol", | |
c44ddfa7 | 5939 | 2, |
03c05291 | 5940 | RETRIEVE, |
7ac48069 | 5941 | NULL, |
03c05291 | 5942 | IMEMBERS_TABLE, |
7ac48069 | 5943 | NULL, |
03c05291 | 5944 | gmol_fields, |
5945 | 2, | |
7ac48069 | 5946 | NULL, |
03c05291 | 5947 | 1, |
29028043 | 5948 | NULL, |
03c05291 | 5949 | &gmol_validate, |
5950 | }, | |
5951 | ||
5952 | { | |
5953 | /* Q_GEML - GET_END_MEMBERS_OF_LIST */ | |
5954 | "get_end_members_of_list", | |
5955 | "geml", | |
c44ddfa7 | 5956 | 2, |
03c05291 | 5957 | RETRIEVE, |
7ac48069 | 5958 | NULL, |
03c05291 | 5959 | IMEMBERS_TABLE, |
7ac48069 | 5960 | NULL, |
03c05291 | 5961 | gmol_fields, |
fd8d2149 | 5962 | 2, |
7ac48069 | 5963 | NULL, |
03c05291 | 5964 | 1, |
29028043 | 5965 | NULL, |
46b6f1f6 | 5966 | &gmol_validate, |
5967 | }, | |
5968 | ||
5969 | { | |
5970 | /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */ | |
5971 | "get_tagged_members_of_list", | |
5972 | "gtml", | |
c44ddfa7 | 5973 | 2, |
46b6f1f6 | 5974 | RETRIEVE, |
5975 | NULL, | |
5976 | IMEMBERS_TABLE, | |
5977 | NULL, | |
5978 | gtml_fields, | |
5979 | 3, | |
5980 | NULL, | |
5981 | 1, | |
5982 | NULL, | |
5983 | &gmol_validate, | |
03c05291 | 5984 | }, |
5eaef520 | 5985 | |
03c05291 | 5986 | { |
5987 | /* Q_GLOM - GET_LISTS_OF_MEMBER */ | |
5988 | "get_lists_of_member", | |
5989 | "glom", | |
c44ddfa7 | 5990 | 2, |
03c05291 | 5991 | RETRIEVE, |
5992 | 0, | |
5993 | IMEMBERS_TABLE, | |
5994 | 0, | |
5995 | glom_fields, | |
5996 | 6, | |
5997 | 0, | |
5998 | 2, | |
29028043 | 5999 | NULL, |
03c05291 | 6000 | &glom_validate, |
6001 | }, | |
6002 | ||
6003 | { | |
6004 | /* Q_CMOL - COUNT_MEMBERS_OF_LIST */ | |
6005 | "count_members_of_list", | |
6006 | "cmol", | |
c44ddfa7 | 6007 | 2, |
03c05291 | 6008 | RETRIEVE, |
6009 | 0, | |
6010 | IMEMBERS_TABLE, | |
6011 | 0, | |
6012 | cmol_fields, | |
6013 | 1, | |
6014 | 0, | |
6015 | 1, | |
29028043 | 6016 | NULL, |
03c05291 | 6017 | &cmol_validate, |
6018 | }, | |
6019 | ||
d33e787c | 6020 | { |
6021 | /* Q_GSIN - GET_SERVER_INFO */ | |
6022 | "get_server_info", | |
6023 | "gsin", | |
c44ddfa7 | 6024 | 2, |
d33e787c | 6025 | RETRIEVE, |
6026 | "s", | |
03c05291 | 6027 | SERVERS_TABLE, |
6028 | "name, update_int, target_file, script, dfgen, dfcheck, type, enable, inprogress, harderror, errmsg, acl_type, acl_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM servers", | |
d33e787c | 6029 | gsin_fields, |
7ac4c1b1 | 6030 | 16, |
263a36d4 | 6031 | "name LIKE UPPER('%s')", |
d33e787c | 6032 | 1, |
29028043 | 6033 | "name", |
d33e787c | 6034 | &gsin_validate, |
6035 | }, | |
6036 | ||
6037 | { | |
6038 | /* Q_QGSV - QUALIFIED_GET_SERVER */ | |
6039 | "qualified_get_server", | |
6040 | "qgsv", | |
c44ddfa7 | 6041 | 2, |
d33e787c | 6042 | RETRIEVE, |
6043 | 0, | |
03c05291 | 6044 | SERVERS_TABLE, |
d33e787c | 6045 | 0, |
6046 | qgsv_fields, | |
6047 | 1, | |
6048 | 0, | |
6049 | 3, | |
29028043 | 6050 | NULL, |
d33e787c | 6051 | &qgsv_validate, |
6052 | }, | |
6053 | ||
6054 | { | |
6055 | /* Q_ASIN - ADD_SERVER_INFO */ | |
6056 | "add_server_info", | |
6057 | "asin", | |
c44ddfa7 | 6058 | 2, |
d33e787c | 6059 | APPEND, |
6060 | "s", | |
03c05291 | 6061 | SERVERS_TABLE, |
5eaef520 | 6062 | "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)", |
d33e787c | 6063 | asin_fields, |
6064 | 8, | |
7ac48069 | 6065 | NULL, |
d33e787c | 6066 | 0, |
29028043 | 6067 | NULL, |
d33e787c | 6068 | &asin_validate, |
6069 | }, | |
6070 | ||
6071 | { | |
6072 | /* Q_USIN - UPDATE_SERVER_INFO */ | |
6073 | "update_server_info", | |
6074 | "usin", | |
c44ddfa7 | 6075 | 2, |
d33e787c | 6076 | UPDATE, |
6077 | "s", | |
03c05291 | 6078 | SERVERS_TABLE, |
4e5ec77f | 6079 | "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d", |
d33e787c | 6080 | asin_fields, |
6081 | 7, | |
03c05291 | 6082 | "name = UPPER('%s')", |
d33e787c | 6083 | 1, |
29028043 | 6084 | NULL, |
d33e787c | 6085 | &asin_validate, |
6086 | }, | |
6087 | ||
6088 | { | |
6089 | /* Q_RSVE - RESET_SERVER_ERROR */ | |
6090 | "reset_server_error", | |
6091 | "rsve", | |
c44ddfa7 | 6092 | 2, |
d33e787c | 6093 | UPDATE, |
6094 | "s", | |
03c05291 | 6095 | SERVERS_TABLE, |
4e5ec77f | 6096 | "servers SET harderror = 0, dfcheck = dfgen", |
d33e787c | 6097 | dsin_fields, |
6098 | 0, | |
03c05291 | 6099 | "name = UPPER('%s')", |
d33e787c | 6100 | 1, |
29028043 | 6101 | NULL, |
d33e787c | 6102 | &rsve_validate, |
6103 | }, | |
6104 | ||
6105 | { | |
6106 | /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */ | |
6107 | "set_server_internal_flags", | |
6108 | "ssif", | |
c44ddfa7 | 6109 | 2, |
d33e787c | 6110 | UPDATE, |
6111 | "s", | |
03c05291 | 6112 | SERVERS_TABLE, |
5eaef520 | 6113 | "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))", |
d33e787c | 6114 | ssif_fields, |
7ac4c1b1 | 6115 | 5, |
03c05291 | 6116 | "name = UPPER('%s')", |
d33e787c | 6117 | 1, |
29028043 | 6118 | NULL, |
d33e787c | 6119 | &ssif_validate, |
6120 | }, | |
6121 | ||
6122 | { | |
6123 | /* Q_DSIN - DELETE_SERVER_INFO */ | |
6124 | "delete_server_info", | |
6125 | "dsin", | |
c44ddfa7 | 6126 | 2, |
d33e787c | 6127 | DELETE, |
6128 | "s", | |
03c05291 | 6129 | SERVERS_TABLE, |
7ac48069 | 6130 | NULL, |
d33e787c | 6131 | dsin_fields, |
6132 | 0, | |
03c05291 | 6133 | "name = UPPER('%s')", |
d33e787c | 6134 | 1, |
29028043 | 6135 | NULL, |
d33e787c | 6136 | &dsin_validate, |
6137 | }, | |
6138 | ||
6139 | { | |
5eaef520 | 6140 | /* Q_GSHI - GET_SERVER_HOST_INFO */ |
d33e787c | 6141 | "get_server_host_info", |
6142 | "gshi", | |
c44ddfa7 | 6143 | 2, |
d33e787c | 6144 | RETRIEVE, |
6145 | "sh", | |
03c05291 | 6146 | SERVERHOSTS_TABLE, |
6147 | "sh.service, m.name, sh.enable, sh.override, sh.success, sh.inprogress, sh.hosterror, sh.hosterrmsg, sh.ltt, sh.lts, sh.value1, sh.value2, sh.value3, TO_CHAR(sh.modtime, 'DD-mon-YYYY HH24:MI:SS'), sh.modby, sh.modwith FROM serverhosts sh, machine m", | |
d33e787c | 6148 | gshi_fields, |
6149 | 16, | |
263a36d4 | 6150 | "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id", |
d33e787c | 6151 | 2, |
29028043 | 6152 | "sh.service, m.name", |
d33e787c | 6153 | &gshi_validate, |
6154 | }, | |
6155 | ||
6156 | { | |
135dcb80 | 6157 | /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */ |
d33e787c | 6158 | "qualified_get_server_host", |
6159 | "qgsh", | |
c44ddfa7 | 6160 | 2, |
d33e787c | 6161 | RETRIEVE, |
135dcb80 | 6162 | 0, |
03c05291 | 6163 | SERVERHOSTS_TABLE, |
d33e787c | 6164 | 0, |
6165 | qgsh_fields, | |
6166 | 2, | |
6167 | 0, | |
6168 | 6, | |
29028043 | 6169 | NULL, |
d33e787c | 6170 | &qgsh_validate, |
6171 | }, | |
6172 | ||
6173 | { | |
6174 | /* Q_ASHI - ADD_SERVER_HOST_INFO */ | |
6175 | "add_server_host_info", | |
6176 | "ashi", | |
c44ddfa7 | 6177 | 2, |
d33e787c | 6178 | APPEND, |
6179 | "sh", | |
03c05291 | 6180 | SERVERHOSTS_TABLE, |
5eaef520 | 6181 | "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))", |
d33e787c | 6182 | ashi_fields, |
6183 | 6, | |
7ac48069 | 6184 | NULL, |
d33e787c | 6185 | 0, |
29028043 | 6186 | NULL, |
d33e787c | 6187 | &ashi_validate, |
6188 | }, | |
6189 | ||
6190 | { | |
6191 | /* Q_USHI - UPDATE_SERVER_HOST_INFO */ | |
6192 | "update_server_host_info", | |
6193 | "ushi", | |
c44ddfa7 | 6194 | 2, |
d33e787c | 6195 | UPDATE, |
6196 | "sh", | |
03c05291 | 6197 | SERVERHOSTS_TABLE, |
5eaef520 | 6198 | "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))", |
d33e787c | 6199 | ashi_fields, |
6200 | 4, | |
03c05291 | 6201 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 6202 | 2, |
29028043 | 6203 | NULL, |
d33e787c | 6204 | &ashi_validate, |
6205 | }, | |
6206 | ||
6207 | { | |
6208 | /* Q_RSHE - RESET_SERVER_HOST_ERROR */ | |
6209 | "reset_server_host_error", | |
6210 | "rshe", | |
c44ddfa7 | 6211 | 2, |
d33e787c | 6212 | UPDATE, |
6213 | "sh", | |
03c05291 | 6214 | SERVERHOSTS_TABLE, |
4e5ec77f | 6215 | "serverhosts SET hosterror = 0", |
d33e787c | 6216 | dshi_fields, |
6217 | 0, | |
03c05291 | 6218 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 6219 | 2, |
29028043 | 6220 | NULL, |
d33e787c | 6221 | &rshe_validate, |
6222 | }, | |
6223 | ||
6224 | { | |
6225 | /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */ | |
6226 | "set_server_host_override", | |
6227 | "ssho", | |
c44ddfa7 | 6228 | 2, |
d33e787c | 6229 | UPDATE, |
6230 | "sh", | |
03c05291 | 6231 | SERVERHOSTS_TABLE, |
4e5ec77f | 6232 | "serverhosts SET override = 1", |
d33e787c | 6233 | dshi_fields, |
6234 | 0, | |
03c05291 | 6235 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 6236 | 2, |
29028043 | 6237 | NULL, |
d33e787c | 6238 | &ssho_validate, |
6239 | }, | |
6240 | ||
6241 | { | |
e41960ac | 6242 | /* Q_SSHI - SET_SERVER_HOST_INTERNAL */ |
d33e787c | 6243 | "set_server_host_internal", |
6244 | "sshi", | |
c44ddfa7 | 6245 | 2, |
d33e787c | 6246 | UPDATE, |
7ac4c1b1 | 6247 | "s", |
03c05291 | 6248 | SERVERHOSTS_TABLE, |
5eaef520 | 6249 | "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s", |
d33e787c | 6250 | sshi_fields, |
6251 | 7, | |
5eaef520 | 6252 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 6253 | 2, |
29028043 | 6254 | NULL, |
d33e787c | 6255 | &sshi_validate, |
6256 | }, | |
6257 | ||
6258 | { | |
03c05291 | 6259 | /* Q_DSHI - DELETE_SERVER_HOST_INFO */ |
6260 | "delete_server_host_info", | |
6261 | "dshi", | |
c44ddfa7 | 6262 | 2, |
d33e787c | 6263 | DELETE, |
03c05291 | 6264 | "sh", |
6265 | SERVERHOSTS_TABLE, | |
7ac48069 | 6266 | NULL, |
03c05291 | 6267 | dshi_fields, |
d33e787c | 6268 | 0, |
03c05291 | 6269 | "service = UPPER('%s') AND mach_id = %d", |
6270 | 2, | |
29028043 | 6271 | NULL, |
03c05291 | 6272 | &dshi_validate, |
d33e787c | 6273 | }, |
6274 | ||
6275 | { | |
5eaef520 | 6276 | /* Q_GSLO - GET_SERVER_LOCATIONS */ |
d33e787c | 6277 | "get_server_locations", |
6278 | "gslo", | |
c44ddfa7 | 6279 | 2, |
d33e787c | 6280 | RETRIEVE, |
6281 | "sh", | |
03c05291 | 6282 | SERVERHOSTS_TABLE, |
6283 | "sh.service, m.name FROM serverhosts sh, machine m", | |
d33e787c | 6284 | gslo_fields, |
6285 | 2, | |
263a36d4 | 6286 | "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id", |
d33e787c | 6287 | 1, |
29028043 | 6288 | "sh.service, m.name", |
263a36d4 | 6289 | NULL, |
d33e787c | 6290 | }, |
6291 | ||
6292 | { | |
5eaef520 | 6293 | /* Q_GFSL - GET_FILESYS_BY_LABEL */ |
d33e787c | 6294 | "get_filesys_by_label", |
6295 | "gfsl", | |
c44ddfa7 | 6296 | 2, |
d33e787c | 6297 | RETRIEVE, |
6298 | "fs", | |
03c05291 | 6299 | FILESYS_TABLE, |
6300 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l", | |
d33e787c | 6301 | gfsl_fields, |
6302 | 14, | |
263a36d4 | 6303 | "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 6304 | 1, |
29028043 | 6305 | "fs.label", |
5a8887d8 | 6306 | &gfsl_validate, |
d33e787c | 6307 | }, |
6308 | ||
6309 | { | |
5eaef520 | 6310 | /* Q_GFSM - GET_FILESYS_BY_MACHINE */ |
d33e787c | 6311 | "get_filesys_by_machine", |
6312 | "gfsm", | |
c44ddfa7 | 6313 | 2, |
d33e787c | 6314 | RETRIEVE, |
6315 | "fs", | |
03c05291 | 6316 | FILESYS_TABLE, |
6317 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l", | |
d33e787c | 6318 | gfsm_fields, |
6319 | 14, | |
4e5ec77f | 6320 | "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 6321 | 1, |
29028043 | 6322 | "fs.label", |
d33e787c | 6323 | &gfsm_validate, |
6324 | }, | |
6325 | ||
88343c5e | 6326 | { |
5eaef520 | 6327 | /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */ |
88343c5e | 6328 | "get_filesys_by_nfsphys", |
6329 | "gfsn", | |
c44ddfa7 | 6330 | 2, |
88343c5e | 6331 | RETRIEVE, |
6332 | "fs", | |
03c05291 | 6333 | FILESYS_TABLE, |
6334 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l, nfsphys np", | |
88343c5e | 6335 | gfsn_fields, |
6336 | 14, | |
cc1bca5c | 6337 | "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id AND np.nfsphys_id = fs.phys_id AND np.dir LIKE '%s'", |
88343c5e | 6338 | 2, |
29028043 | 6339 | "fs.label", |
99e09b48 | 6340 | &gfsn_validate, |
88343c5e | 6341 | }, |
6342 | ||
d33e787c | 6343 | { |
5eaef520 | 6344 | /* Q_GFSG - GET_FILESYS_BY_GROUP */ |
d33e787c | 6345 | "get_filesys_by_group", |
6346 | "gfsg", | |
c44ddfa7 | 6347 | 2, |
d33e787c | 6348 | RETRIEVE, |
6349 | "fs", | |
03c05291 | 6350 | FILESYS_TABLE, |
6351 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l", | |
d33e787c | 6352 | gfsg_fields, |
6353 | 14, | |
4e5ec77f | 6354 | "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 6355 | 1, |
29028043 | 6356 | "fs.label", |
d33e787c | 6357 | &gfsg_validate, |
6358 | }, | |
6359 | ||
4ffa124a | 6360 | { |
76f86976 | 6361 | /* Q_GFSP - GET_FILESYS_BY_PATH */ |
4ffa124a | 6362 | "get_filesys_by_path", |
6363 | "gfsp", | |
c44ddfa7 | 6364 | 2, |
4ffa124a | 6365 | RETRIEVE, |
6366 | "fs", | |
03c05291 | 6367 | FILESYS_TABLE, |
6368 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l", | |
4ffa124a | 6369 | gfsp_fields, |
6370 | 14, | |
263a36d4 | 6371 | "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id", |
4ffa124a | 6372 | 1, |
29028043 | 6373 | "fs.label", |
263a36d4 | 6374 | &VDfix_modby, |
4ffa124a | 6375 | }, |
5eaef520 | 6376 | |
d33e787c | 6377 | { |
45bf7573 | 6378 | /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */ |
d33e787c | 6379 | "add_filesys", |
6380 | "afil", | |
c44ddfa7 | 6381 | 2, |
d33e787c | 6382 | APPEND, |
6383 | "fs", | |
03c05291 | 6384 | FILESYS_TABLE, |
d4296047 | 6385 | "INTO filesys (label, type, mach_id, name, mount, rwaccess, comments, owner, owners, createflg, lockertype, filsys_id) VALUES ('%s', '%s', %d, NVL('%s', CHR(0)), NVL('%s', CHR(0)), '%s', NVL('%s', CHR(0)), %d, %d, %s, '%s', %s)", |
d33e787c | 6386 | afil_fields, |
6387 | 11, | |
45bf7573 | 6388 | 0, |
d33e787c | 6389 | 0, |
29028043 | 6390 | NULL, |
d33e787c | 6391 | &afil_validate, |
6392 | }, | |
6393 | ||
6394 | { | |
6395 | /* Q_UFIL - UPDATE_FILESYS */ | |
6396 | "update_filesys", | |
6397 | "ufil", | |
c44ddfa7 | 6398 | 2, |
d33e787c | 6399 | UPDATE, |
6400 | "fs", | |
03c05291 | 6401 | FILESYS_TABLE, |
d4296047 | 6402 | "filesys SET label = '%s', type = '%s', mach_id = %d, name = NVL('%s', CHR(0)), mount = NVL('%s', CHR(0)), rwaccess = '%s', comments = NVL('%s', CHR(0)), owner = %d, owners = %d, createflg = %s, lockertype = '%s'", |
d33e787c | 6403 | ufil_fields, |
6404 | 11, | |
4e5ec77f | 6405 | "filsys_id = %d", |
d33e787c | 6406 | 1, |
29028043 | 6407 | NULL, |
5eaef520 | 6408 | &ufil_validate, |
d33e787c | 6409 | }, |
6410 | ||
6411 | { | |
6412 | /* Q_DFIL - DELETE_FILESYS */ | |
6413 | "delete_filesys", | |
6414 | "dfil", | |
c44ddfa7 | 6415 | 2, |
d33e787c | 6416 | DELETE, |
6417 | "fs", | |
03c05291 | 6418 | FILESYS_TABLE, |
7ac48069 | 6419 | NULL, |
d33e787c | 6420 | dfil_fields, |
6421 | 0, | |
4e5ec77f | 6422 | "filsys_id = %d", |
d33e787c | 6423 | 1, |
29028043 | 6424 | NULL, |
d33e787c | 6425 | &dfil_validate, |
6426 | }, | |
6427 | ||
95127ba8 | 6428 | { |
5eaef520 | 6429 | /* Q_GFGM - GET_FSGROUP_MEMBERS */ |
95127ba8 | 6430 | "get_fsgroup_members", |
6431 | "gfgm", | |
c44ddfa7 | 6432 | 2, |
95127ba8 | 6433 | RETRIEVE, |
6434 | "fg", | |
03c05291 | 6435 | FSGROUP_TABLE, |
6436 | "fs.label, fg.key FROM fsgroup fg, filesys fs", | |
95127ba8 | 6437 | gfgm_fields, |
6438 | 2, | |
4e5ec77f | 6439 | "fg.group_id = %d AND fs.filsys_id = fg.filsys_id", |
95127ba8 | 6440 | 1, |
29028043 | 6441 | "fs.label, fg.key", |
95127ba8 | 6442 | &gfgm_validate, |
6443 | }, | |
6444 | ||
6445 | { | |
76f86976 | 6446 | /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */ |
95127ba8 | 6447 | "add_filesys_to_fsgroup", |
6448 | "aftg", | |
c44ddfa7 | 6449 | 2, |
95127ba8 | 6450 | APPEND, |
6451 | "fg", | |
03c05291 | 6452 | FSGROUP_TABLE, |
5eaef520 | 6453 | "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')", |
95127ba8 | 6454 | gfgm_fields, |
76f86976 | 6455 | 3, |
7ac48069 | 6456 | NULL, |
76f86976 | 6457 | 0, |
29028043 | 6458 | NULL, |
95127ba8 | 6459 | &aftg_validate, |
6460 | }, | |
6461 | ||
6462 | { | |
6463 | /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */ | |
6464 | "remove_filesys_from_fsgroup", | |
6465 | "rffg", | |
c44ddfa7 | 6466 | 2, |
95127ba8 | 6467 | DELETE, |
6468 | "fg", | |
03c05291 | 6469 | FSGROUP_TABLE, |
7ac48069 | 6470 | NULL, |
95127ba8 | 6471 | gfgm_fields, |
6472 | 0, | |
4e5ec77f | 6473 | "group_id = %d AND filsys_id = %d", |
95127ba8 | 6474 | 2, |
29028043 | 6475 | NULL, |
95127ba8 | 6476 | &aftg_validate, |
6477 | }, | |
6478 | ||
d33e787c | 6479 | { |
5eaef520 | 6480 | /* Q_GANF - GET_ALL_NFSPHYS */ |
d33e787c | 6481 | "get_all_nfsphys", |
6482 | "ganf", | |
c44ddfa7 | 6483 | 2, |
d33e787c | 6484 | RETRIEVE, |
6485 | "np", | |
03c05291 | 6486 | NFSPHYS_TABLE, |
6487 | "m.name, np.dir, np.device, np.status, np.allocated, np.partsize, TO_CHAR(np.modtime, 'DD-mon-YYYY HH24:MI:SS'), np.modby, np.modwith FROM nfsphys np, machine m", | |
d33e787c | 6488 | ganf_fields, |
6489 | 9, | |
4e5ec77f | 6490 | "m.mach_id = np.mach_id", |
d33e787c | 6491 | 0, |
29028043 | 6492 | "m.name, np.dir", |
6493 | &VDfix_modby, | |
d33e787c | 6494 | }, |
6495 | ||
6496 | { | |
5eaef520 | 6497 | /* Q_GNFP - GET_NFSPHYS */ |
d33e787c | 6498 | "get_nfsphys", |
6499 | "gnfp", | |
c44ddfa7 | 6500 | 2, |
d33e787c | 6501 | RETRIEVE, |
6502 | "np", | |
03c05291 | 6503 | NFSPHYS_TABLE, |
6504 | "m.name, np.dir, np.device, np.status, np.allocated, np.partsize, TO_CHAR(np.modtime, 'DD-mon-YYYY HH24:MI:SS'), np.modby, np.modwith FROM nfsphys np, machine m", | |
d33e787c | 6505 | gnfp_fields, |
6506 | 9, | |
263a36d4 | 6507 | "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id", |
d33e787c | 6508 | 2, |
29028043 | 6509 | "m.name, np.dir", |
d33e787c | 6510 | &gnfp_validate, |
6511 | }, | |
6512 | ||
6513 | { | |
45bf7573 | 6514 | /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */ |
d33e787c | 6515 | "add_nfsphys", |
6516 | "anfp", | |
c44ddfa7 | 6517 | 2, |
d33e787c | 6518 | APPEND, |
6519 | "np", | |
03c05291 | 6520 | NFSPHYS_TABLE, |
5eaef520 | 6521 | "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)", |
d33e787c | 6522 | ganf_fields, |
6523 | 6, | |
45bf7573 | 6524 | 0, |
d33e787c | 6525 | 0, |
29028043 | 6526 | NULL, |
d33e787c | 6527 | &anfp_validate, |
6528 | }, | |
6529 | ||
6530 | { | |
6531 | /* Q_UNFP - UPDATE_NFSPHYS */ | |
6532 | "update_nfsphys", | |
6533 | "unfp", | |
c44ddfa7 | 6534 | 2, |
d33e787c | 6535 | UPDATE, |
6536 | "np", | |
03c05291 | 6537 | NFSPHYS_TABLE, |
5eaef520 | 6538 | "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s", |
135dcb80 | 6539 | ganf_fields, |
d33e787c | 6540 | 4, |
5eaef520 | 6541 | "mach_id = %d AND dir = '%s'", |
d33e787c | 6542 | 2, |
29028043 | 6543 | NULL, |
45bf7573 | 6544 | &unfp_validate, |
d33e787c | 6545 | }, |
6546 | ||
6547 | { | |
6548 | /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */ | |
6549 | "adjust_nfsphys_allocation", | |
6550 | "ajnf", | |
c44ddfa7 | 6551 | 2, |
d33e787c | 6552 | UPDATE, |
6553 | "np", | |
03c05291 | 6554 | NFSPHYS_TABLE, |
4e5ec77f | 6555 | "nfsphys SET allocated = allocated + %s", |
99e09b48 | 6556 | ajnf_fields, |
d33e787c | 6557 | 1, |
4e5ec77f | 6558 | "mach_id = %d AND dir = '%s'", |
d33e787c | 6559 | 2, |
29028043 | 6560 | NULL, |
f802fd0d | 6561 | &ajnf_validate, |
d33e787c | 6562 | }, |
6563 | ||
6564 | { | |
6565 | /* Q_DNFP - DELETE_NFSPHYS */ | |
6566 | "delete_nfsphys", | |
6567 | "dnfp", | |
c44ddfa7 | 6568 | 2, |
d33e787c | 6569 | DELETE, |
6570 | "np", | |
03c05291 | 6571 | NFSPHYS_TABLE, |
7ac48069 | 6572 | NULL, |
d33e787c | 6573 | dnfp_fields, |
6574 | 0, | |
4e5ec77f | 6575 | "mach_id = %d AND dir = '%s'", |
d33e787c | 6576 | 2, |
29028043 | 6577 | NULL, |
d33e787c | 6578 | &dnfp_validate, |
6579 | }, | |
6580 | ||
368be132 | 6581 | { |
5eaef520 | 6582 | /* Q_GQOT - GET_QUOTA */ |
368be132 | 6583 | "get_quota", |
6584 | "gqot", | |
c44ddfa7 | 6585 | 2, |
368be132 | 6586 | RETRIEVE, |
6587 | "q", | |
03c05291 | 6588 | QUOTA_TABLE, |
6589 | "fs.label, q.type, q.entity_id, q.quota, q.phys_id, m.name, TO_CHAR(q.modtime, 'DD-mon-YYYY HH24:MI:SS'), q.modby, q.modwith FROM quota q, filesys fs, machine m", | |
368be132 | 6590 | gqot_fields, |
6591 | 9, | |
263a36d4 | 6592 | "fs.label LIKE '%s' AND q.type = '%s' AND q.entity_id = %d AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id", |
368be132 | 6593 | 3, |
29028043 | 6594 | NULL, |
368be132 | 6595 | &gqot_validate, |
6596 | }, | |
6597 | ||
6598 | { | |
5eaef520 | 6599 | /* Q_GQBF - GET_QUOTA_BY_FILESYS */ |
368be132 | 6600 | "get_quota_by_filesys", |
6601 | "gqbf", | |
c44ddfa7 | 6602 | 2, |
368be132 | 6603 | RETRIEVE, |
6604 | "q", | |
03c05291 | 6605 | QUOTA_TABLE, |
6606 | "fs.label, q.type, q.entity_id, q.quota, q.phys_id, m.name, TO_CHAR(q.modtime, 'DD-mon-YYYY HH24:MI:SS'), q.modby, q.modwith FROM quota q, filesys fs, machine m", | |
368be132 | 6607 | gqbf_fields, |
6608 | 9, | |
263a36d4 | 6609 | "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id", |
368be132 | 6610 | 1, |
29028043 | 6611 | "fs.label, q.type", |
368be132 | 6612 | &gqbf_validate, |
6613 | }, | |
6614 | ||
6615 | { | |
135dcb80 | 6616 | /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */ |
368be132 | 6617 | "add_quota", |
6618 | "aqot", | |
c44ddfa7 | 6619 | 2, |
368be132 | 6620 | APPEND, |
135dcb80 | 6621 | 0, |
03c05291 | 6622 | QUOTA_TABLE, |
135dcb80 | 6623 | "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)", |
368be132 | 6624 | aqot_fields, |
135dcb80 | 6625 | 4, |
7ac48069 | 6626 | NULL, |
76f86976 | 6627 | 0, |
29028043 | 6628 | NULL, |
368be132 | 6629 | &aqot_validate, |
6630 | }, | |
6631 | ||
6632 | { | |
6633 | /* Q_UQOT - UPDATE_QUOTA */ | |
6634 | "update_quota", | |
6635 | "uqot", | |
c44ddfa7 | 6636 | 2, |
368be132 | 6637 | UPDATE, |
135dcb80 | 6638 | 0, |
03c05291 | 6639 | QUOTA_TABLE, |
4e5ec77f | 6640 | "quota SET quota = %s", |
368be132 | 6641 | aqot_fields, |
6642 | 1, | |
135dcb80 | 6643 | 0, |
368be132 | 6644 | 3, |
29028043 | 6645 | NULL, |
368be132 | 6646 | &uqot_validate, |
6647 | }, | |
6648 | ||
6649 | { | |
6650 | /* Q_DQOT - DELETE_QUOTA */ | |
6651 | "delete_quota", | |
6652 | "dqot", | |
c44ddfa7 | 6653 | 2, |
368be132 | 6654 | DELETE, |
135dcb80 | 6655 | 0, |
03c05291 | 6656 | QUOTA_TABLE, |
7ac48069 | 6657 | NULL, |
368be132 | 6658 | aqot_fields, |
6659 | 0, | |
135dcb80 | 6660 | 0, |
368be132 | 6661 | 3, |
29028043 | 6662 | NULL, |
368be132 | 6663 | &dqot_validate, |
6664 | }, | |
6665 | ||
d33e787c | 6666 | { |
5eaef520 | 6667 | /* Q_GNFQ - GET_NFS_QUOTAS */ |
88343c5e | 6668 | "get_nfs_quota", |
d33e787c | 6669 | "gnfq", |
c44ddfa7 | 6670 | 2, |
d33e787c | 6671 | RETRIEVE, |
368be132 | 6672 | "q", |
03c05291 | 6673 | QUOTA_TABLE, |
6674 | "fs.label, u.login, q.quota, q.phys_id, m.name, TO_CHAR(q.modtime, 'DD-mon-YYYY HH24:MI:SS'), q.modby, q.modwith FROM quota q, filesys fs, users u, machine m", | |
d33e787c | 6675 | gnfq_fields, |
6676 | 8, | |
263a36d4 | 6677 | "fs.label LIKE '%s' AND q.type = 'USER' AND q.entity_id = u.users_id AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id AND u.login = '%s'", |
88343c5e | 6678 | 2, |
29028043 | 6679 | "fs.label, u.login", |
d33e787c | 6680 | &gnfq_validate, |
6681 | }, | |
6682 | ||
6683 | { | |
5eaef520 | 6684 | /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */ |
d33e787c | 6685 | "get_nfs_quotas_by_partition", |
6686 | "gnqp", | |
c44ddfa7 | 6687 | 2, |
d33e787c | 6688 | RETRIEVE, |
368be132 | 6689 | "q", |
03c05291 | 6690 | QUOTA_TABLE, |
6691 | "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m", | |
d33e787c | 6692 | gnqp_fields, |
6693 | 5, | |
263a36d4 | 6694 | "np.mach_id = %d AND np.dir LIKE '%s' AND q.phys_id = np.nfsphys_id AND fs.filsys_id = q.filsys_id AND q.type = 'USER' AND u.users_id = q.entity_id AND m.mach_id = np.mach_id", |
d33e787c | 6695 | 2, |
29028043 | 6696 | "fs.label", |
263a36d4 | 6697 | NULL, |
d33e787c | 6698 | }, |
6699 | ||
d33e787c | 6700 | { |
135dcb80 | 6701 | /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */ |
d33e787c | 6702 | "add_nfs_quota", |
6703 | "anfq", | |
c44ddfa7 | 6704 | 2, |
d33e787c | 6705 | APPEND, |
135dcb80 | 6706 | 0, |
03c05291 | 6707 | QUOTA_TABLE, |
135dcb80 | 6708 | "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)", |
d33e787c | 6709 | anfq_fields, |
135dcb80 | 6710 | 3, |
7ac48069 | 6711 | NULL, |
76f86976 | 6712 | 0, |
29028043 | 6713 | NULL, |
d33e787c | 6714 | &anfq_validate, |
6715 | }, | |
6716 | ||
6717 | { | |
5eaef520 | 6718 | /* Q_UNFQ - UPDATE_NFS_QUOTA */ |
d33e787c | 6719 | "update_nfs_quota", |
6720 | "unfq", | |
c44ddfa7 | 6721 | 2, |
d33e787c | 6722 | UPDATE, |
135dcb80 | 6723 | 0, |
03c05291 | 6724 | QUOTA_TABLE, |
4e5ec77f | 6725 | "quota SET quota = %s", |
d33e787c | 6726 | anfq_fields, |
6727 | 1, | |
135dcb80 | 6728 | 0, |
d33e787c | 6729 | 2, |
29028043 | 6730 | NULL, |
d33e787c | 6731 | &unfq_validate, |
6732 | }, | |
6733 | ||
6734 | { | |
6735 | /* Q_DNFQ - DELETE_NFS_QUOTA */ | |
6736 | "delete_nfs_quota", | |
6737 | "dnfq", | |
c44ddfa7 | 6738 | 2, |
d33e787c | 6739 | DELETE, |
135dcb80 | 6740 | 0, |
03c05291 | 6741 | QUOTA_TABLE, |
7ac48069 | 6742 | NULL, |
d33e787c | 6743 | anfq_fields, |
6744 | 0, | |
135dcb80 | 6745 | 0, |
d33e787c | 6746 | 2, |
29028043 | 6747 | NULL, |
d33e787c | 6748 | &dnfq_validate, |
6749 | }, | |
6750 | ||
d33e787c | 6751 | { |
d7ddc011 | 6752 | /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */ |
d33e787c | 6753 | "get_zephyr_class", |
6754 | "gzcl", | |
c44ddfa7 | 6755 | 2, |
d33e787c | 6756 | RETRIEVE, |
6757 | "z", | |
03c05291 | 6758 | ZEPHYR_TABLE, |
6759 | "class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM zephyr", | |
d7ddc011 | 6760 | gzcl2_fields, |
d33e787c | 6761 | 12, |
263a36d4 | 6762 | "class LIKE '%s'", |
d33e787c | 6763 | 1, |
29028043 | 6764 | "class", |
d33e787c | 6765 | &gzcl_validate, |
03c05291 | 6766 | }, |
d33e787c | 6767 | |
6768 | { | |
d7ddc011 | 6769 | /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */ |
6770 | "get_zephyr_class", | |
6771 | "gzcl", | |
6772 | 5, | |
6773 | RETRIEVE, | |
6774 | "z", | |
6775 | ZEPHYR_TABLE, | |
6776 | "class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM zephyr", | |
6777 | gzcl_fields, | |
6778 | 14, | |
6779 | "class LIKE '%s'", | |
6780 | 1, | |
6781 | "class", | |
6782 | &gzcl_validate, | |
6783 | }, | |
6784 | ||
6785 | { | |
6786 | /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */ | |
d33e787c | 6787 | "add_zephyr_class", |
6788 | "azcl", | |
c44ddfa7 | 6789 | 2, |
d33e787c | 6790 | APPEND, |
6791 | "z", | |
03c05291 | 6792 | ZEPHYR_TABLE, |
5eaef520 | 6793 | "INTO zephyr (class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id) VALUES ('%s', '%s', %d, '%s', %d, '%s', %d, '%s', %d)", |
d7ddc011 | 6794 | azcl2_fields, |
d33e787c | 6795 | 9, |
6796 | 0, | |
6797 | 0, | |
29028043 | 6798 | NULL, |
d7ddc011 | 6799 | &azcl2_validate, |
6800 | }, | |
6801 | ||
6802 | { | |
6803 | /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */ | |
6804 | "add_zephyr_class", | |
6805 | "azcl", | |
6806 | 5, | |
6807 | APPEND, | |
6808 | "z", | |
6809 | ZEPHYR_TABLE, | |
6810 | "INTO zephyr (class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, owner_type, owner_id) VALUES ('%s', '%s', %d, '%s', %d, '%s', %d, '%s', %d, '%s', %d)", | |
6811 | azcl_fields, | |
6812 | 11, | |
6813 | 0, | |
6814 | 0, | |
6815 | NULL, | |
d33e787c | 6816 | &azcl_validate, |
5eaef520 | 6817 | }, |
d33e787c | 6818 | |
6819 | { | |
d7ddc011 | 6820 | /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */ |
d33e787c | 6821 | "update_zephyr_class", |
6822 | "uzcl", | |
c44ddfa7 | 6823 | 2, |
d33e787c | 6824 | UPDATE, |
6825 | "z", | |
03c05291 | 6826 | ZEPHYR_TABLE, |
135dcb80 | 6827 | "zephyr SET class = '%s', xmt_type = '%s', xmt_id = %d, sub_type = '%s', sub_id = %d, iws_type = '%s', iws_id = %d, iui_type = '%s', iui_id = %d", |
d7ddc011 | 6828 | uzcl2_fields, |
d33e787c | 6829 | 9, |
99e09b48 | 6830 | "class = '%s'", |
d33e787c | 6831 | 1, |
29028043 | 6832 | NULL, |
d7ddc011 | 6833 | &uzcl2_validate, |
6834 | }, | |
6835 | ||
6836 | { | |
6837 | /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */ | |
6838 | "update_zephyr_class", | |
6839 | "uzcl", | |
6840 | 5, | |
6841 | UPDATE, | |
6842 | "z", | |
6843 | ZEPHYR_TABLE, | |
6844 | "zephyr SET class = '%s', xmt_type = '%s', xmt_id = %d, sub_type = '%s', sub_id = %d, iws_type = '%s', iws_id = %d, iui_type = '%s', iui_id = %d, owner_type = '%s', owner_id = %d", | |
6845 | uzcl_fields, | |
6846 | 11, | |
6847 | "class = '%s'", | |
6848 | 1, | |
6849 | NULL, | |
d33e787c | 6850 | &uzcl_validate, |
5eaef520 | 6851 | }, |
d33e787c | 6852 | |
6853 | { | |
6854 | /* Q_DZCL - DELETE_ZEPHYR_CLASS */ | |
6855 | "delete_zephyr_class", | |
6856 | "dzcl", | |
c44ddfa7 | 6857 | 2, |
d33e787c | 6858 | DELETE, |
6859 | "z", | |
03c05291 | 6860 | ZEPHYR_TABLE, |
d33e787c | 6861 | 0, |
6862 | uzcl_fields, | |
6863 | 0, | |
99e09b48 | 6864 | "class = '%s'", |
d33e787c | 6865 | 1, |
29028043 | 6866 | NULL, |
d33e787c | 6867 | &dzcl_validate, |
5eaef520 | 6868 | }, |
fd5b2340 | 6869 | |
03c05291 | 6870 | { |
5eaef520 | 6871 | /* Q_GSHA - GET_SERVER_HOST_ACCESS */ |
03c05291 | 6872 | "get_server_host_access", |
6873 | "gsha", | |
c44ddfa7 | 6874 | 2, |
03c05291 | 6875 | RETRIEVE, |
6876 | "ha", | |
6877 | HOSTACCESS_TABLE, | |
6878 | "m.name, ha.acl_type, ha.acl_id, TO_CHAR(ha.modtime, 'DD-mon-YYYY HH24:MI:SS'), ha.modby, ha.modwith FROM hostaccess ha, machine m", | |
6879 | gsha_fields, | |
6880 | 6, | |
263a36d4 | 6881 | "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id", |
03c05291 | 6882 | 1, |
29028043 | 6883 | "m.name", |
03c05291 | 6884 | &gsha_validate, |
6885 | }, | |
6886 | ||
6887 | { | |
6888 | /* Q_ASHA - ADD_SERVER_HOST_ACCESS */ | |
6889 | "add_server_host_access", | |
6890 | "asha", | |
c44ddfa7 | 6891 | 2, |
03c05291 | 6892 | APPEND, |
6893 | "ha", | |
6894 | HOSTACCESS_TABLE, | |
5eaef520 | 6895 | "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)", |
03c05291 | 6896 | asha_fields, |
6897 | 3, | |
6898 | 0, | |
6899 | 0, | |
29028043 | 6900 | NULL, |
03c05291 | 6901 | &asha_validate, |
6902 | }, | |
6903 | ||
6904 | { | |
6905 | /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */ | |
6906 | "update_server_host_access", | |
6907 | "usha", | |
c44ddfa7 | 6908 | 2, |
03c05291 | 6909 | UPDATE, |
6910 | "ha", | |
6911 | HOSTACCESS_TABLE, | |
6912 | "hostaccess SET acl_type = '%s', acl_id = %d", | |
6913 | asha_fields, | |
6914 | 2, | |
6915 | "mach_id = %d", | |
6916 | 1, | |
29028043 | 6917 | NULL, |
03c05291 | 6918 | &asha_validate, |
6919 | }, | |
6920 | ||
6921 | { | |
6922 | /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */ | |
6923 | "delete_server_host_access", | |
6924 | "dsha", | |
c44ddfa7 | 6925 | 2, |
03c05291 | 6926 | DELETE, |
6927 | "ha", | |
6928 | HOSTACCESS_TABLE, | |
6929 | 0, | |
6930 | asha_fields, | |
6931 | 0, | |
6932 | "mach_id = %d", | |
6933 | 1, | |
29028043 | 6934 | NULL, |
03c05291 | 6935 | &VDmach, |
6936 | }, | |
6937 | ||
46b6f1f6 | 6938 | { |
6939 | /* Q_GACL - GET_ACL */ | |
6940 | "get_acl", | |
6941 | "gacl", | |
c44ddfa7 | 6942 | 2, |
46b6f1f6 | 6943 | RETRIEVE, |
6944 | "ac", | |
6945 | ACL_TABLE, | |
6946 | "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l", | |
6947 | gacl_fields, | |
6948 | 4, | |
6949 | "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id", | |
6950 | 2, | |
6951 | "m.name, ac.target, ac.kind", | |
6952 | &gacl_validate, | |
6953 | }, | |
6954 | ||
6955 | { | |
6956 | /* Q_AACL - ADD_ACL */ | |
6957 | "add_acl", | |
6958 | "aacl", | |
c44ddfa7 | 6959 | 2, |
46b6f1f6 | 6960 | APPEND, |
6961 | "ac", | |
6962 | ACL_TABLE, | |
6963 | "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)", | |
6964 | aacl_fields, | |
6965 | 4, | |
6966 | 0, | |
6967 | 0, | |
6968 | NULL, | |
6969 | &aacl_validate, | |
6970 | }, | |
6971 | ||
6972 | { | |
6973 | /* Q_DACL - DELETE_ACL */ | |
6974 | "delete_acl", | |
6975 | "dacl", | |
c44ddfa7 | 6976 | 2, |
46b6f1f6 | 6977 | DELETE, |
6978 | "ac", | |
6979 | ACL_TABLE, | |
6980 | 0, | |
6981 | dacl_fields, | |
6982 | 0, | |
6983 | "mach_id = %d AND target = '%s'", | |
6984 | 2, | |
6985 | NULL, | |
6986 | &gacl_validate, | |
6987 | }, | |
6988 | ||
d33e787c | 6989 | { |
6990 | /* Q_GSVC - GET_SERVICE */ | |
6991 | "get_service", | |
6992 | "gsvc", | |
c44ddfa7 | 6993 | 2, |
d33e787c | 6994 | RETRIEVE, |
0c345c78 | 6995 | "ss", |
03c05291 | 6996 | SERVICES_TABLE, |
6997 | "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services", | |
fd5b2340 | 6998 | gsvc_fields, |
d33e787c | 6999 | 7, |
69eb9470 | 7000 | "name LIKE '%s' AND protocol LIKE '%s'", |
7001 | 2, | |
29028043 | 7002 | "name", |
263a36d4 | 7003 | &VDfix_modby, |
d33e787c | 7004 | }, |
7005 | ||
7006 | { | |
7007 | /* Q_ASVC - ADD_SERVICE */ | |
7008 | "add_service", | |
7009 | "asvc", | |
c44ddfa7 | 7010 | 2, |
d33e787c | 7011 | APPEND, |
0c345c78 | 7012 | "ss", |
03c05291 | 7013 | SERVICES_TABLE, |
5eaef520 | 7014 | "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))", |
fd5b2340 | 7015 | asvc_fields, |
d33e787c | 7016 | 4, |
7ac48069 | 7017 | NULL, |
d33e787c | 7018 | 0, |
29028043 | 7019 | NULL, |
d33e787c | 7020 | &asvc_validate, |
7021 | }, | |
7022 | ||
7023 | { | |
7024 | /* Q_DSVC - DELETE_SERVICE */ | |
7025 | "delete_service", | |
7026 | "dsvc", | |
c44ddfa7 | 7027 | 2, |
d33e787c | 7028 | DELETE, |
0c345c78 | 7029 | "ss", |
03c05291 | 7030 | SERVICES_TABLE, |
d33e787c | 7031 | 0, |
69eb9470 | 7032 | dsvc_fields, |
d33e787c | 7033 | 0, |
69eb9470 | 7034 | "name = '%s' AND protocol = '%s'", |
7035 | 2, | |
29028043 | 7036 | NULL, |
69eb9470 | 7037 | &dsvc_validate, |
d33e787c | 7038 | }, |
fd5b2340 | 7039 | |
d33e787c | 7040 | { |
2884200f | 7041 | /* Q_GPRN - GET_PRINTER */ |
7042 | "get_printer", | |
7043 | "gprn", | |
c44ddfa7 | 7044 | 2, |
d33e787c | 7045 | RETRIEVE, |
2884200f | 7046 | "pr", |
7047 | PRINTERS_TABLE, | |
e5a63571 | 7048 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 7049 | gprn_fields, |
e5a63571 | 7050 | 19, |
2884200f | 7051 | "pr.name LIKE '%s' AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
d33e787c | 7052 | 1, |
2884200f | 7053 | "pr.name", |
7054 | &VDfix_modby, | |
d33e787c | 7055 | }, |
7056 | ||
7057 | { | |
2884200f | 7058 | /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */ |
7059 | "get_printer_by_duplexname", | |
7060 | "gpbd", | |
c44ddfa7 | 7061 | 2, |
2884200f | 7062 | RETRIEVE, |
7063 | "pr", | |
7064 | PRINTERS_TABLE, | |
e5a63571 | 7065 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 7066 | gpbd_fields, |
e5a63571 | 7067 | 19, |
2884200f | 7068 | "pr.duplexname LIKE '%s' AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
7069 | 1, | |
7070 | "pr.name", | |
7071 | &VDfix_modby, | |
fd5b2340 | 7072 | }, |
7073 | ||
7074 | { | |
2884200f | 7075 | /* Q_GPBE - GET_PRINTER_BY_ETHERNET */ |
7076 | "get_printer_by_ethernet", | |
7077 | "gpbe", | |
c44ddfa7 | 7078 | 2, |
2884200f | 7079 | RETRIEVE, |
7080 | "pr", | |
7081 | PRINTERS_TABLE, | |
e5a63571 | 7082 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 7083 | gpbd_fields, |
e5a63571 | 7084 | 19, |
59841cdb | 7085 | "m1.hwaddr LIKE LOWER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
fd5b2340 | 7086 | 1, |
2884200f | 7087 | "pr.name", |
7088 | &VDfix_modby, | |
fd5b2340 | 7089 | }, |
7090 | ||
7091 | { | |
2884200f | 7092 | /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */ |
7093 | "get_printer_by_hostname", | |
7094 | "gpbh", | |
c44ddfa7 | 7095 | 2, |
fd5b2340 | 7096 | RETRIEVE, |
2884200f | 7097 | "pr", |
7098 | PRINTERS_TABLE, | |
e5a63571 | 7099 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 7100 | gpbh_fields, |
e5a63571 | 7101 | 19, |
2884200f | 7102 | "m1.name LIKE UPPER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
fd5b2340 | 7103 | 1, |
2884200f | 7104 | "pr.name", |
263a36d4 | 7105 | &VDfix_modby, |
d33e787c | 7106 | }, |
7107 | ||
7108 | { | |
2884200f | 7109 | /* Q_GPBR - GET_PRINTER_BY_RM */ |
7110 | "get_printer_by_rm", | |
7111 | "gpbr", | |
c44ddfa7 | 7112 | 2, |
2884200f | 7113 | RETRIEVE, |
7114 | "pr", | |
7115 | PRINTERS_TABLE, | |
e5a63571 | 7116 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 7117 | gpbr_fields, |
e5a63571 | 7118 | 19, |
2884200f | 7119 | "m3.name LIKE UPPER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
d33e787c | 7120 | 1, |
2884200f | 7121 | "pr.name", |
7122 | &VDfix_modby, | |
d33e787c | 7123 | }, |
7124 | ||
012fc215 | 7125 | { |
2884200f | 7126 | /* Q_GPBL - GET_PRINTER_BY_LOCATION */ |
7127 | "get_printer_by_location", | |
7128 | "gpbl", | |
c44ddfa7 | 7129 | 2, |
012fc215 | 7130 | RETRIEVE, |
2884200f | 7131 | "pr", |
7132 | PRINTERS_TABLE, | |
e5a63571 | 7133 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 7134 | gpbl_fields, |
e5a63571 | 7135 | 19, |
2884200f | 7136 | "UPPER(pr.location) LIKE UPPER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
7137 | 1, | |
7138 | "pr.name", | |
7139 | &VDfix_modby, | |
7140 | }, | |
7141 | ||
7142 | { | |
7143 | /* Q_GPBC - GET_PRINTER_BY_CONTACT */ | |
7144 | "get_printer_by_contact", | |
7145 | "gpbc", | |
c44ddfa7 | 7146 | 2, |
2884200f | 7147 | RETRIEVE, |
7148 | "pr", | |
7149 | PRINTERS_TABLE, | |
e5a63571 | 7150 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 7151 | gpbc_fields, |
e5a63571 | 7152 | 19, |
2884200f | 7153 | "UPPER(pr.contact) LIKE UPPER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
012fc215 | 7154 | 1, |
2884200f | 7155 | "pr.name", |
263a36d4 | 7156 | &VDfix_modby, |
012fc215 | 7157 | }, |
7158 | ||
7159 | { | |
2884200f | 7160 | /* Q_APRN - ADD_PRINTER */ |
7161 | "add_printer", | |
7162 | "aprn", | |
c44ddfa7 | 7163 | 2, |
012fc215 | 7164 | APPEND, |
2884200f | 7165 | "pr", |
7166 | PRINTERS_TABLE, | |
e5a63571 | 7167 | "INTO printers (name, type, hwtype, duplexname, mach_id, loghost, rm, rp, rq, ka, pc, ac, lpc_acl, banner, location, contact) VALUES ('%s', '%s', '%s', NVL('%s', CHR(0)), %d, %d, %d, NVL('%s', CHR(0)), %d, %s, %s, %d, %d, %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)))", |
2884200f | 7168 | aprn_fields, |
e5a63571 | 7169 | 16, |
012fc215 | 7170 | 0, |
7171 | 0, | |
29028043 | 7172 | NULL, |
2884200f | 7173 | &aprn_validate, |
012fc215 | 7174 | }, |
7175 | ||
1a9a0a59 | 7176 | { |
7177 | /* Q_UPRN - UPDATE_PRINTER */ | |
7178 | "update_printer", | |
7179 | "uprn", | |
c44ddfa7 | 7180 | 2, |
1a9a0a59 | 7181 | UPDATE, |
7182 | "pr", | |
7183 | PRINTERS_TABLE, | |
7184 | "printers SET name = '%s', type = '%s', hwtype = '%s', duplexname = NVL('%s', CHR(0)), mach_id = %d, loghost = %d, rm = %d, rp = NVL('%s', CHR(0)), rq = %d, ka = %d, pc = %d, ac = %d, lpc_acl = %d, banner = %d, location = NVL('%s', CHR(0)), contact = NVL('%s', CHR(0))", | |
7185 | uprn_fields, | |
7186 | 16, | |
7187 | 0, | |
7188 | 0, | |
7189 | NULL, | |
7190 | &uprn_validate, | |
7191 | }, | |
7192 | ||
012fc215 | 7193 | { |
2884200f | 7194 | /* Q_DPRN - DELETE_PRINTER */ |
7195 | "delete_printer", | |
7196 | "dprn", | |
c44ddfa7 | 7197 | 2, |
012fc215 | 7198 | DELETE, |
2884200f | 7199 | "pr", |
7200 | PRINTERS_TABLE, | |
012fc215 | 7201 | 0, |
2884200f | 7202 | aprn_fields, |
012fc215 | 7203 | 0, |
99e09b48 | 7204 | "name = '%s'", |
012fc215 | 7205 | 1, |
29028043 | 7206 | NULL, |
2884200f | 7207 | &dprn_validate, |
012fc215 | 7208 | }, |
7209 | ||
1a9a0a59 | 7210 | { |
7211 | /* Q_GPSV - GET_PRINT_SERVER */ | |
7212 | "get_print_server", | |
7213 | "gpsv", | |
c44ddfa7 | 7214 | 2, |
1a9a0a59 | 7215 | RETRIEVE, |
7216 | "ps", | |
7217 | PRINTSERVERS_TABLE, | |
7218 | "m.name, ps.kind, s.string, ps.owner_type, ps.owner_id, l.name, TO_CHAR(ps.modtime, 'DD-mon-YYYY HH24:MI:SS'), ps.modby, ps.modwith FROM printservers ps, machine m, strings s, list l", | |
7219 | gpsv_fields, | |
7220 | 9, | |
7221 | "ps.mach_id = %d AND m.mach_id = ps.mach_id AND s.string_id = ps.printer_types AND l.list_id = ps.lpc_acl", | |
7222 | 1, | |
7223 | NULL, | |
7224 | &gpsv_validate, | |
7225 | }, | |
7226 | ||
7227 | { | |
7228 | /* Q_APSV - ADD_PRINT_SERVER */ | |
7229 | "add_print_server", | |
7230 | "apsv", | |
c44ddfa7 | 7231 | 2, |
1a9a0a59 | 7232 | APPEND, |
7233 | "ps", | |
7234 | PRINTSERVERS_TABLE, | |
7235 | "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)", | |
7236 | apsv_fields, | |
7237 | 6, | |
7238 | 0, | |
7239 | 0, | |
7240 | NULL, | |
7241 | &apsv_validate, | |
7242 | }, | |
7243 | ||
7244 | { | |
7245 | /* Q_UPSV - UPDATE_PRINT_SERVER */ | |
7246 | "update_print_server", | |
7247 | "upsv", | |
c44ddfa7 | 7248 | 2, |
1a9a0a59 | 7249 | UPDATE, |
7250 | "ps", | |
7251 | PRINTSERVERS_TABLE, | |
7252 | "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d", | |
7253 | apsv_fields, | |
7254 | 5, | |
7255 | "mach_id = %d", | |
7256 | 1, | |
7257 | NULL, | |
7258 | &apsv_validate, | |
7259 | }, | |
7260 | ||
7261 | { | |
7262 | /* Q_DPSV - DELETE_PRINT_SERVER */ | |
7263 | "delete_print_server", | |
7264 | "dpsv", | |
c44ddfa7 | 7265 | 2, |
1a9a0a59 | 7266 | DELETE, |
7267 | "ps", | |
7268 | PRINTSERVERS_TABLE, | |
7269 | 0, | |
7270 | dpsv_fields, | |
7271 | 0, | |
7272 | "mach_id = %d", | |
7273 | 1, | |
7274 | NULL, | |
7275 | &dpsv_validate, | |
7276 | }, | |
7277 | ||
d33e787c | 7278 | { |
7279 | /* Q_GALI - GET_ALIAS */ | |
7280 | "get_alias", | |
7281 | "gali", | |
c44ddfa7 | 7282 | 2, |
d33e787c | 7283 | RETRIEVE, |
7284 | "a", | |
03c05291 | 7285 | ALIAS_TABLE, |
7286 | "name, type, trans FROM alias", | |
d33e787c | 7287 | gali_fields, |
7288 | 3, | |
263a36d4 | 7289 | "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'", |
d33e787c | 7290 | 3, |
29028043 | 7291 | "type, name, trans", |
263a36d4 | 7292 | NULL, |
d33e787c | 7293 | }, |
7294 | ||
7295 | { | |
7296 | /* Q_AALI - ADD_ALIAS */ | |
7297 | "add_alias", | |
7298 | "aali", | |
c44ddfa7 | 7299 | 2, |
d33e787c | 7300 | APPEND, |
7301 | "a", | |
03c05291 | 7302 | ALIAS_TABLE, |
4e5ec77f | 7303 | "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')", |
d33e787c | 7304 | aali_fields, |
7305 | 3, | |
7ac48069 | 7306 | NULL, |
d33e787c | 7307 | 0, |
29028043 | 7308 | NULL, |
d33e787c | 7309 | &aali_validate, |
7310 | }, | |
7311 | ||
7312 | { | |
7313 | /* Q_DALI - DELETE_ALIAS */ | |
7314 | "delete_alias", | |
7315 | "dali", | |
c44ddfa7 | 7316 | 2, |
d33e787c | 7317 | DELETE, |
7318 | "a", | |
03c05291 | 7319 | ALIAS_TABLE, |
7ac48069 | 7320 | NULL, |
d33e787c | 7321 | aali_fields, |
7322 | 0, | |
5eaef520 | 7323 | "name = '%s' AND type = '%s' AND trans = '%s'", |
d33e787c | 7324 | 3, |
29028043 | 7325 | NULL, |
d33e787c | 7326 | &dali_validate, |
7327 | }, | |
7328 | ||
7329 | { | |
7330 | /* Q_GVAL - GET_VALUE */ | |
7331 | "get_value", | |
7332 | "gval", | |
c44ddfa7 | 7333 | 2, |
d33e787c | 7334 | RETRIEVE, |
0c345c78 | 7335 | "val", |
03c05291 | 7336 | NUMVALUES_TABLE, |
7337 | "value FROM numvalues", | |
d33e787c | 7338 | gval_fields, |
7339 | 1, | |
03c05291 | 7340 | "name = '%s'", |
d33e787c | 7341 | 1, |
29028043 | 7342 | NULL, |
d33e787c | 7343 | &gval_validate, |
7344 | }, | |
7345 | ||
7346 | { | |
7347 | /* Q_AVAL - ADD_VALUE */ | |
7348 | "add_value", | |
7349 | "aval", | |
c44ddfa7 | 7350 | 2, |
d33e787c | 7351 | APPEND, |
0c345c78 | 7352 | "val", |
03c05291 | 7353 | NUMVALUES_TABLE, |
4e5ec77f | 7354 | "INTO numvalues (name, value) VALUES ('%s', %s)", |
d33e787c | 7355 | aval_fields, |
7356 | 2, | |
7ac48069 | 7357 | NULL, |
d33e787c | 7358 | 0, |
29028043 | 7359 | NULL, |
d33e787c | 7360 | &aval_validate, |
7361 | }, | |
7362 | ||
7363 | { | |
7364 | /* Q_UVAL - UPDATE_VALUE */ | |
7365 | "update_value", | |
7366 | "uval", | |
c44ddfa7 | 7367 | 2, |
d33e787c | 7368 | UPDATE, |
0c345c78 | 7369 | "val", |
03c05291 | 7370 | NUMVALUES_TABLE, |
4e5ec77f | 7371 | "numvalues SET value = %s", |
d33e787c | 7372 | aval_fields, |
7373 | 1, | |
99e09b48 | 7374 | "name = '%s'", |
d33e787c | 7375 | 1, |
29028043 | 7376 | NULL, |
d33e787c | 7377 | &aval_validate, |
7378 | }, | |
7379 | ||
7380 | { | |
7381 | /* Q_DVAL - DELETE_VALUE */ | |
7382 | "delete_value", | |
7383 | "dval", | |
c44ddfa7 | 7384 | 2, |
d33e787c | 7385 | DELETE, |
0c345c78 | 7386 | "val", |
03c05291 | 7387 | NUMVALUES_TABLE, |
7ac48069 | 7388 | NULL, |
d33e787c | 7389 | dval_fields, |
7390 | 0, | |
99e09b48 | 7391 | "name = '%s'", |
d33e787c | 7392 | 1, |
29028043 | 7393 | NULL, |
d33e787c | 7394 | &aval_validate, |
7395 | }, | |
7396 | ||
7397 | { | |
7398 | /* Q_GATS - GET_ALL_TABLE_STATS */ | |
7399 | "get_all_table_stats", | |
7400 | "gats", | |
c44ddfa7 | 7401 | 2, |
d33e787c | 7402 | RETRIEVE, |
7403 | "tbs", | |
03c05291 | 7404 | TBLSTATS_TABLE, |
7405 | "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats", | |
d33e787c | 7406 | gats_fields, |
45bf7573 | 7407 | 5, |
7ac48069 | 7408 | NULL, |
d33e787c | 7409 | 0, |
29028043 | 7410 | "table_name", |
d33e787c | 7411 | 0, |
7412 | }, | |
7413 | ||
2962e9ec | 7414 | { |
7415 | /* Q__SDL - _SET_DEBUG_LEVEL */ | |
7416 | "_set_debug_level", | |
7417 | "_sdl", | |
c44ddfa7 | 7418 | 2, |
2962e9ec | 7419 | UPDATE, |
7ac48069 | 7420 | NULL, |
03c05291 | 7421 | 0, |
7ac48069 | 7422 | NULL, |
2962e9ec | 7423 | _sdl_fields, |
7424 | 1, | |
7ac48069 | 7425 | NULL, |
2962e9ec | 7426 | 0, |
29028043 | 7427 | NULL, |
2962e9ec | 7428 | &_sdl_validate, |
7429 | }, | |
7430 | ||
ca3ca9c9 | 7431 | { |
7432 | /* Q_GUSL - GET_USER_SIDS_BY_LOGIN, v4 */ | |
7433 | "get_user_sids_by_login", | |
7434 | "gusl", | |
7435 | 4, | |
7436 | RETRIEVE, | |
7437 | "s", | |
7438 | USERSIDS_TABLE, | |
7439 | "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM users u, usersids us", | |
7440 | gusl_fields, | |
7441 | 3, | |
77bf4a4d | 7442 | "us.users_id = %d AND u.users_id = us.users_id AND SUBSTR(us.sid, 1, LENGTH(us.sid)-8) = '%s'", |
7443 | 2, | |
7444 | NULL, | |
ca3ca9c9 | 7445 | &gusl_validate, |
7446 | }, | |
7447 | ||
7448 | { | |
7449 | /* Q_AUSL - ADD_USER_SID_BY_LOGIN, v4 */ | |
7450 | "add_user_sid_by_login", | |
7451 | "ausl", | |
7452 | 4, | |
7453 | APPEND, | |
7454 | "s", | |
7455 | USERSIDS_TABLE, | |
7456 | "INTO usersids (users_id, sid) VALUES (%d, '%s')", | |
7457 | ausl_fields, | |
7458 | 2, | |
7459 | NULL, | |
7460 | 0, | |
7461 | NULL, | |
7462 | &ausl_validate, | |
7463 | }, | |
7464 | ||
7465 | { | |
7466 | /* Q_GLSN - GET_LIST_SIDS_BY_NAME, v4 */ | |
7467 | "get_list_sids_by_name", | |
7468 | "glsn", | |
7469 | 4, | |
7470 | RETRIEVE, | |
7471 | "s", | |
7472 | LISTSIDS_TABLE, | |
7473 | "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM list l, listsids ls", | |
7474 | glsn_fields, | |
7475 | 3, | |
77bf4a4d | 7476 | "ls.list_id = %d AND l.list_id = ls.list_id AND SUBSTR(ls.sid, 1, LENGTH(ls.sid)-8) = '%s'", |
7477 | 2, | |
7478 | NULL, | |
ca3ca9c9 | 7479 | &glsn_validate, |
7480 | }, | |
7481 | ||
7482 | { | |
7483 | /* Q_ALSN - ADD_LIST_SID_BY_NAME, v4 */ | |
7484 | "add_list_sid_by_name", | |
7485 | "alsn", | |
7486 | 4, | |
7487 | APPEND, | |
7488 | "s", | |
7489 | LISTSIDS_TABLE, | |
7490 | "INTO listsids (list_id, sid) VALUES (%d, '%s')", | |
7491 | alsn_fields, | |
7492 | 2, | |
7493 | NULL, | |
7494 | 0, | |
7495 | NULL, | |
7496 | &alsn_validate, | |
7497 | }, | |
7498 | ||
77bf4a4d | 7499 | { |
7500 | /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */ | |
7501 | "get_distinct_domain_sids", | |
7502 | "gdds", | |
7503 | 4, | |
7504 | RETRIEVE, | |
7505 | "s", | |
7506 | USERSIDS_TABLE, | |
7507 | "DISTINCT SUBSTR(sid, 1, LENGTH(sid)-8) FROM usersids", | |
7508 | gdds_fields, | |
7509 | 1, | |
7510 | NULL, | |
7511 | 0, | |
7512 | NULL, | |
7513 | NULL, | |
7514 | }, | |
7515 | ||
2fb668b0 | 7516 | { |
7517 | /* Q_GCON - GET_CONTAINER, v7 */ | |
7518 | "get_container", | |
7519 | "gcon", | |
7520 | 7, | |
7521 | RETRIEVE, | |
7522 | "c", | |
7523 | CONTAINERS_TABLE, | |
7524 | "name, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM containers", | |
73155abd | 7525 | gcon7_fields, |
2fb668b0 | 7526 | 11, |
73155abd | 7527 | "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0", |
7528 | 1, | |
7529 | NULL, | |
7530 | &gcon_validate, | |
7531 | }, | |
7532 | ||
7533 | { | |
7534 | /* Q_GCON - GET_CONTAINER, v9 */ | |
7535 | "get_container", | |
7536 | "gcon", | |
7537 | 9, | |
7538 | RETRIEVE, | |
7539 | "c", | |
7540 | CONTAINERS_TABLE, | |
7541 | "name, publicflg, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM containers", | |
7542 | gcon_fields, | |
7543 | 12, | |
7544 | "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0", | |
2fb668b0 | 7545 | 1, |
7546 | NULL, | |
7547 | &gcon_validate, | |
7548 | }, | |
7549 | ||
7550 | { | |
7551 | /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */ | |
7552 | "add_container", | |
7553 | "acon", | |
7554 | 7, | |
7555 | APPEND, | |
7556 | "c", | |
7557 | CONTAINERS_TABLE, | |
7558 | "INTO containers (name, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, cnt_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), '%s', %d, '%s', %d, %s)", | |
73155abd | 7559 | acon7_fields, |
2fb668b0 | 7560 | 8, |
7561 | 0, | |
7562 | 0, | |
7563 | NULL, | |
73155abd | 7564 | &acon7_validate, |
7565 | }, | |
7566 | ||
7567 | { | |
7568 | /* Q_ACON - ADD_CONTAINER, v9 */ /* uses prefetch_value() for cnt_id */ | |
7569 | "add_container", | |
7570 | "acon", | |
7571 | 9, | |
7572 | APPEND, | |
7573 | "c", | |
7574 | CONTAINERS_TABLE, | |
7575 | "INTO containers (name, publicflg, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, cnt_id) VALUES ('%s', %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), '%s', %d, '%s', %d, %s)", | |
7576 | acon_fields, | |
7577 | 9, | |
7578 | 0, | |
7579 | 0, | |
7580 | NULL, | |
2fb668b0 | 7581 | &acon_validate, |
7582 | }, | |
7583 | ||
7584 | { | |
7585 | /* Q_UCON - UPDATE_CONTAINER, v7 */ | |
7586 | "update_container", | |
7587 | "ucon", | |
7588 | 7, | |
7589 | UPDATE, | |
7590 | 0, | |
7591 | CONTAINERS_TABLE, | |
7592 | 0, | |
73155abd | 7593 | ucon7_fields, |
2fb668b0 | 7594 | 8, |
7595 | 0, | |
7596 | 1, | |
7597 | NULL, | |
73155abd | 7598 | &ucon7_validate, |
7599 | }, | |
7600 | ||
7601 | { | |
7602 | /* Q_UCON - UPDATE_CONTAINER, v9 */ | |
7603 | "update_container", | |
7604 | "ucon", | |
7605 | 9, | |
7606 | UPDATE, | |
7607 | 0, | |
7608 | CONTAINERS_TABLE, | |
7609 | 0, | |
7610 | ucon_fields, | |
7611 | 9, | |
7612 | 0, | |
7613 | 1, | |
7614 | NULL, | |
2fb668b0 | 7615 | &ucon_validate, |
7616 | }, | |
7617 | ||
7618 | { | |
7619 | /* Q_DCON - DELETE_CONTAINER, v7 */ | |
7620 | "delete_container", | |
7621 | "dcon", | |
7622 | 7, | |
7623 | DELETE, | |
7624 | "c", | |
7625 | CONTAINERS_TABLE, | |
7626 | NULL, | |
7627 | dcon_fields, | |
7628 | 0, | |
7629 | "cnt_id = %d", | |
7630 | 1, | |
7631 | NULL, | |
7632 | &dcon_validate, | |
7633 | }, | |
7634 | ||
7635 | { | |
7636 | /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */ | |
7637 | "add_machine_to_container", | |
7638 | "amcn", | |
7639 | 7, | |
7640 | APPEND, | |
7641 | "mcn", | |
7642 | MCNTMAP_TABLE, | |
7643 | "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)", | |
7644 | amcn_fields, | |
7645 | 2, | |
7646 | 0, | |
7647 | 0, | |
7648 | NULL, | |
7649 | &amcn_validate, | |
7650 | }, | |
7651 | ||
7652 | { | |
7653 | /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */ | |
7654 | "delete_machine_from_container", | |
7655 | "dmcn", | |
7656 | 7, | |
7657 | DELETE, | |
7658 | "mcn", | |
7659 | MCNTMAP_TABLE, | |
7660 | 0, | |
7661 | amcn_fields, | |
7662 | 0, | |
7663 | "mach_id = %d AND cnt_id = %d", | |
7664 | 2, | |
7665 | NULL, | |
d16a0628 | 7666 | &dmcn_validate, |
2fb668b0 | 7667 | }, |
7668 | ||
7669 | { | |
7670 | /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */ | |
7671 | "get_machine_to_container_map", | |
7672 | "gmnm", | |
7673 | 7, | |
7674 | RETRIEVE, | |
7675 | "mcn", | |
7676 | MCNTMAP_TABLE, | |
7807f2e6 | 7677 | "m.name, c.name FROM machine m, containers c, mcntmap mcn", |
7678 | gmnm_fields, | |
7679 | 2, | |
59aecfaf | 7680 | "m.name LIKE UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id", |
2fb668b0 | 7681 | 1, |
7682 | NULL, | |
7683 | NULL, | |
7684 | }, | |
7685 | ||
7686 | { | |
7687 | /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */ | |
7688 | "get_machines_of_container", | |
7689 | "gmoc", | |
7690 | 7, | |
7691 | RETRIEVE, | |
7692 | NULL, | |
7693 | MCNTMAP_TABLE, | |
7694 | NULL, | |
7695 | gmoc_fields, | |
7696 | 2, | |
7697 | NULL, | |
7698 | 2, | |
7699 | NULL, | |
7700 | &gmoc_validate, | |
7701 | }, | |
7702 | ||
7703 | { | |
7704 | /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */ | |
7705 | "get_subcontainers_of_container", | |
7706 | "gsoc", | |
7707 | 7, | |
7708 | RETRIEVE, | |
7709 | NULL, | |
7710 | CONTAINERS_TABLE, | |
7711 | NULL, | |
7712 | gsoc_fields, | |
7713 | 1, | |
7714 | NULL, | |
7715 | 2, | |
7716 | NULL, | |
7717 | &gsoc_validate, | |
7718 | }, | |
7719 | ||
0ef13dc2 | 7720 | { |
52581841 | 7721 | /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v7 */ |
0ef13dc2 | 7722 | "get_toplevel_containers", |
7723 | "gtlc", | |
52581841 | 7724 | 7, |
0ef13dc2 | 7725 | RETRIEVE, |
7726 | "c", | |
7727 | CONTAINERS_TABLE, | |
7728 | "name FROM containers", | |
7729 | gtlc_fields, | |
7730 | 1, | |
7731 | "name NOT LIKE '%%/%%'", | |
7732 | 0, | |
7733 | "name", | |
7734 | NULL, | |
7735 | }, | |
7736 | ||
73155abd | 7737 | { |
7738 | /* Q_SCLI - SET_CONTAINER_LIST, v9 */ | |
7739 | "set_container_list", | |
7740 | "scli", | |
7741 | 9, | |
7742 | UPDATE, | |
7743 | 0, | |
7744 | CONTAINERS_TABLE, | |
7745 | 0, | |
7746 | scli_fields, | |
7747 | 1, | |
7748 | 0, | |
7749 | 1, | |
7750 | NULL, | |
7751 | &scli_validate, | |
7752 | }, | |
7753 | ||
7754 | { | |
7755 | /* Q_GCLI - GET_CONTAINER_LIST, v9 */ | |
7756 | "get_container_list", | |
7757 | "gcli", | |
7758 | 9, | |
7759 | RETRIEVE, | |
7760 | "c", | |
7761 | CONTAINERS_TABLE, | |
7762 | "c.name, l.name FROM containers c, list l", | |
7763 | gcli_fields, | |
7764 | 2, | |
7765 | "LOWER(c.name) = LOWER('%s') AND c.list_id = l.list_id AND c.list_id != 0", | |
7766 | 1, | |
7767 | NULL, | |
7768 | NULL, | |
7769 | }, | |
7770 | ||
6e442c45 | 7771 | { |
7772 | /* G_GLIC - GET_LIST_CONTAINER, v9 */ | |
7773 | "get_list_container", | |
7774 | "glic", | |
7775 | 9, | |
7776 | RETRIEVE, | |
7777 | "c", | |
7778 | CONTAINERS_TABLE, | |
7779 | "c.name, l.name FROM containers c, list l", | |
7780 | glic_fields, | |
7781 | 2, | |
7782 | "l.list_id = %d AND l.list_id = c.list_id and c.list_id != 0", | |
7783 | 1, | |
7784 | NULL, | |
7785 | &glic_validate, | |
7786 | }, | |
7787 | ||
d33e787c | 7788 | }; |
7789 | ||
c44ddfa7 | 7790 | int QueryCount = (sizeof(Queries) / sizeof(struct query)); |