]>
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, | |
a66a2204 | 1030 | 0, |
c1fe2b12 | 1031 | setup_ghst, |
a66a2204 | 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 | ||
73155abd | 3489 | static char *gcon7_fields[] = { |
2fb668b0 | 3490 | "name", |
3491 | "name", "description", "location", "contact", | |
3492 | "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith", | |
3493 | }; | |
3494 | ||
3495 | static struct validate gcon_validate = { | |
3496 | 0, | |
3497 | 0, | |
3498 | 0, | |
3499 | 0, | |
3500 | 0, | |
3501 | 0, | |
3502 | 0, | |
3503 | 0, | |
3504 | followup_gcon, | |
3505 | }; | |
3506 | ||
73155abd | 3507 | static char *gcon_fields[] = { |
3508 | "name", | |
3509 | "name", "publicflg", "description", "location", "contact", | |
3510 | "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith", | |
3511 | }; | |
3512 | ||
3513 | static char *acon7_fields[] = { | |
2fb668b0 | 3514 | "name", "description", "location", "contact", |
3515 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3516 | }; | |
3517 | ||
73155abd | 3518 | static struct valobj acon7_valobj[] = { |
2fb668b0 | 3519 | {V_CHAR, 0, CONTAINERS_TABLE, "name"}, |
3520 | {V_LEN, 1, CONTAINERS_TABLE, "description"}, | |
3521 | {V_CHAR, 2, CONTAINERS_TABLE, "location"}, | |
3522 | {V_CHAR, 3, CONTAINERS_TABLE, "contact"}, | |
3523 | {V_TYPE, 4, 0, "ace_type", 0, MR_ACE}, | |
3524 | {V_TYPEDATA, 5, 0, 0, 0, MR_ACE}, | |
3525 | {V_TYPE, 6, 0, "ace_type", 0, MR_ACE}, | |
3526 | {V_TYPEDATA, 7, 0, 0, 0, MR_ACE}, | |
3527 | }; | |
3528 | ||
73155abd | 3529 | static struct validate acon7_validate = |
3530 | { | |
3531 | acon7_valobj, | |
3532 | 8, | |
3533 | "name", | |
3534 | "name = '%s'", | |
3535 | 1, | |
3536 | "cnt_id", | |
3537 | 0, | |
3538 | setup_acon, | |
3539 | set_modtime, | |
3540 | }; | |
3541 | ||
3542 | static char *acon_fields[] = { | |
3543 | "name", "publicflg", "description", "location", "contact", | |
3544 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3545 | }; | |
3546 | ||
3547 | static struct valobj acon_valobj[] = { | |
3548 | {V_CHAR, 0, CONTAINERS_TABLE, "name"}, | |
3549 | {V_NUM, 1}, | |
3550 | {V_LEN, 2, CONTAINERS_TABLE, "description"}, | |
3551 | {V_CHAR, 3, CONTAINERS_TABLE, "location"}, | |
3552 | {V_CHAR, 4, CONTAINERS_TABLE, "contact"}, | |
3553 | {V_TYPE, 5, 0, "ace_type", 0, MR_ACE}, | |
3554 | {V_TYPEDATA, 6, 0, 0, 0, MR_ACE}, | |
3555 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, | |
3556 | {V_TYPEDATA, 8, 0, 0, 0, MR_ACE}, | |
3557 | }; | |
3558 | ||
2fb668b0 | 3559 | static struct validate acon_validate = |
3560 | { | |
3561 | acon_valobj, | |
73155abd | 3562 | 9, |
2fb668b0 | 3563 | "name", |
3564 | "name = '%s'", | |
3565 | 1, | |
3566 | "cnt_id", | |
3567 | 0, | |
73155abd | 3568 | setup_acon, |
2fb668b0 | 3569 | set_modtime, |
3570 | }; | |
3571 | ||
73155abd | 3572 | static char *ucon7_fields[] = { |
2fb668b0 | 3573 | "name", |
3574 | "newname", "description", "location", "contact", | |
3575 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3576 | }; | |
3577 | ||
73155abd | 3578 | static struct valobj ucon7_valobj[] = { |
2fb668b0 | 3579 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, |
3580 | {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE}, | |
3581 | {V_LEN, 2, CONTAINERS_TABLE, "description"}, | |
3582 | {V_CHAR, 3, CONTAINERS_TABLE, "location"}, | |
3583 | {V_CHAR, 4, CONTAINERS_TABLE, "contact"}, | |
3584 | {V_TYPE, 5, 0, "ace_type", 0, MR_ACE}, | |
3585 | {V_TYPEDATA, 6, 0, 0, 0, MR_ACE}, | |
3586 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, | |
3587 | {V_TYPEDATA, 8, 0, 0, 0, MR_ACE}, | |
3588 | }; | |
3589 | ||
73155abd | 3590 | static struct validate ucon7_validate = |
3591 | { | |
3592 | ucon7_valobj, | |
3593 | 9, | |
3594 | 0, | |
3595 | 0, | |
3596 | 0, | |
3597 | 0, | |
3598 | access_container, | |
3599 | 0, | |
3600 | update_container, | |
3601 | }; | |
3602 | ||
3603 | static char *ucon_fields[] = { | |
3604 | "name", | |
3605 | "newname", "publicflg", "description", "location", "contact", | |
3606 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3607 | }; | |
3608 | ||
3609 | static struct valobj ucon_valobj[] = { | |
3610 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
3611 | {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE}, | |
3612 | {V_NUM, 2}, | |
3613 | {V_LEN, 3, CONTAINERS_TABLE, "description"}, | |
3614 | {V_CHAR, 4, CONTAINERS_TABLE, "location"}, | |
3615 | {V_CHAR, 5, CONTAINERS_TABLE, "contact"}, | |
3616 | {V_TYPE, 6, 0, "ace_type", 0, MR_ACE}, | |
3617 | {V_TYPEDATA, 7, 0, 0, 0, MR_ACE}, | |
3618 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, | |
3619 | {V_TYPEDATA, 9, 0, 0, 0, MR_ACE}, | |
3620 | }; | |
3621 | ||
2fb668b0 | 3622 | static struct validate ucon_validate = |
3623 | { | |
3624 | ucon_valobj, | |
73155abd | 3625 | 10, |
2fb668b0 | 3626 | 0, |
3627 | 0, | |
3628 | 0, | |
3629 | 0, | |
3630 | access_container, | |
3631 | 0, | |
3632 | update_container, | |
3633 | }; | |
3634 | ||
3635 | static char *dcon_fields[] = { | |
3636 | "name", | |
3637 | }; | |
3638 | ||
3639 | static struct validate dcon_validate = | |
3640 | { | |
3641 | VOcon0, | |
3642 | 1, | |
3643 | 0, | |
3644 | 0, | |
3645 | 0, | |
3646 | 0, | |
3647 | 0, | |
3648 | setup_dcon, | |
3649 | 0, | |
3650 | }; | |
3651 | ||
3652 | static char *amcn_fields[] = { | |
3653 | "machine", "container", | |
3654 | }; | |
3655 | ||
3656 | static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */ | |
3657 | { /* DELETE_MACHINE_FROM_CONTAINER */ | |
3658 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3659 | {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
3660 | }; | |
3661 | ||
3662 | static struct validate amcn_validate = /* for amtn and dmfn */ | |
d16a0628 | 3663 | { |
3664 | amcn_valobj, | |
3665 | 2, | |
3666 | "mach_id", | |
3667 | "mach_id = %d", | |
3668 | 1, | |
3669 | 0, | |
3670 | access_container, | |
3671 | 0, | |
3672 | set_mach_modtime_by_id, | |
3673 | }; | |
3674 | ||
3675 | static struct validate dmcn_validate = /* for amtn and dmfn */ | |
2fb668b0 | 3676 | { |
3677 | amcn_valobj, | |
3678 | 2, | |
3679 | "mach_id", | |
3680 | "mach_id = %d and cnt_id = %d", | |
3681 | 2, | |
3682 | 0, | |
3683 | access_container, | |
3684 | 0, | |
3685 | set_mach_modtime_by_id, | |
3686 | }; | |
3687 | ||
7807f2e6 | 3688 | static char *gmnm_fields[] = { |
3689 | "machine", | |
3690 | "machine", "container", | |
3691 | }; | |
3692 | ||
2fb668b0 | 3693 | static char *gmoc_fields[] = { |
3694 | "container", | |
3695 | "isrecursive", | |
3696 | "machine", | |
3697 | "container", | |
3698 | }; | |
3699 | ||
3700 | static struct validate gmoc_validate = | |
3701 | { | |
3702 | VOcon0, | |
3703 | 1, | |
3704 | 0, | |
3705 | 0, | |
3706 | 0, | |
3707 | 0, | |
3708 | 0, | |
3709 | 0, | |
3710 | get_machines_of_container, | |
3711 | }; | |
3712 | ||
3713 | static char *gsoc_fields[] = { | |
3714 | "container", | |
3715 | "isrecursive", | |
3716 | "subcontainer", | |
3717 | }; | |
3718 | ||
3719 | static struct validate gsoc_validate = | |
3720 | { | |
3721 | VOcon0, | |
3722 | 1, | |
3723 | 0, | |
3724 | 0, | |
3725 | 0, | |
3726 | 0, | |
3727 | 0, | |
3728 | 0, | |
3729 | get_subcontainers_of_container, | |
3730 | }; | |
3731 | ||
0ef13dc2 | 3732 | static char *gtlc_fields[] = { |
3733 | "name", | |
3734 | }; | |
3735 | ||
73155abd | 3736 | static char *scli_fields[] = { |
3737 | "containername", | |
3738 | "listname", | |
3739 | }; | |
3740 | ||
3741 | static struct valobj scli_valobj[] = { | |
3742 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
3743 | {V_ID, 1, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3744 | }; | |
3745 | ||
3746 | static struct validate scli_validate = { | |
3747 | scli_valobj, | |
3748 | 2, | |
3749 | 0, | |
3750 | 0, | |
3751 | 0, | |
3752 | 0, | |
3753 | 0, | |
3754 | setup_scli, | |
3755 | set_container_list, | |
3756 | }; | |
3757 | ||
3758 | static char *gcli_fields[] = { | |
3759 | "containername", | |
3760 | "containername", "listname", | |
3761 | }; | |
0ef13dc2 | 3762 | |
6e442c45 | 3763 | static struct validate glic_validate = |
3764 | { | |
3765 | VOlist0, | |
3766 | 1, | |
3767 | NULL, | |
3768 | NULL, | |
3769 | 0, | |
3770 | 0, | |
3771 | 0, | |
3772 | 0, | |
3773 | 0, | |
3774 | }; | |
3775 | ||
3776 | static char *glic_fields[] = { | |
3777 | "listname", | |
3778 | "containername", "listname", | |
3779 | }; | |
3780 | ||
d33e787c | 3781 | /* Generalized Query Definitions */ |
3782 | ||
c44ddfa7 | 3783 | /* Multiple versions of the same query MUST be listed in ascending |
3784 | * order. | |
3785 | */ | |
3786 | ||
e41960ac | 3787 | /* Note: For any query which uses prefetch_value, the vcnt should be |
3788 | * one less than the number of %-format specifiers in the tlist. | |
3789 | */ | |
3790 | ||
c44ddfa7 | 3791 | struct query Queries[] = { |
d33e787c | 3792 | { |
186dd63b | 3793 | /* Q_GALO - GET_ALL_LOGINS, v2 */ |
d33e787c | 3794 | "get_all_logins", |
3795 | "galo", | |
c44ddfa7 | 3796 | 2, |
d33e787c | 3797 | RETRIEVE, |
3798 | "u", | |
03c05291 | 3799 | USERS_TABLE, |
3800 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u", | |
186dd63b | 3801 | galo2_fields, |
d33e787c | 3802 | 6, |
0c345c78 | 3803 | "u.users_id != 0", |
d33e787c | 3804 | 0, |
29028043 | 3805 | "u.login", |
3806 | 0, | |
d33e787c | 3807 | }, |
5eaef520 | 3808 | |
d33e787c | 3809 | { |
186dd63b | 3810 | /* Q_GALO - GET_ALL_LOGINS, v3 */ |
3811 | "get_all_logins", | |
3812 | "galo", | |
3813 | 3, | |
3814 | RETRIEVE, | |
3815 | "u", | |
3816 | USERS_TABLE, | |
3817 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u", | |
3818 | galo_fields, | |
3819 | 7, | |
3820 | "u.users_id != 0", | |
3821 | 0, | |
3822 | "u.login", | |
3823 | 0, | |
3824 | }, | |
3825 | ||
3826 | { | |
3827 | /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */ | |
d33e787c | 3828 | "get_all_active_logins", |
3829 | "gaal", | |
c44ddfa7 | 3830 | 2, |
d33e787c | 3831 | RETRIEVE, |
3832 | "u", | |
03c05291 | 3833 | USERS_TABLE, |
3834 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u", | |
186dd63b | 3835 | galo2_fields, |
d33e787c | 3836 | 6, |
0c345c78 | 3837 | "u.status = 1", |
d33e787c | 3838 | 0, |
29028043 | 3839 | "u.login", |
3840 | 0, | |
d33e787c | 3841 | }, |
5eaef520 | 3842 | |
4ffa124a | 3843 | { |
186dd63b | 3844 | /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */ |
3845 | "get_all_active_logins", | |
3846 | "gaal", | |
3847 | 3, | |
3848 | RETRIEVE, | |
3849 | "u", | |
3850 | USERS_TABLE, | |
3851 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u", | |
3852 | galo_fields, | |
3853 | 7, | |
3854 | "u.status = 1", | |
3855 | 0, | |
3856 | "u.login", | |
3857 | 0, | |
3858 | }, | |
3859 | ||
3860 | { | |
3861 | /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */ | |
0c345c78 | 3862 | "get_user_account_by_login", |
3863 | "gual", | |
c44ddfa7 | 3864 | 2, |
0c345c78 | 3865 | RETRIEVE, |
3866 | "u", | |
03c05291 | 3867 | USERS_TABLE, |
d55429b2 | 3868 | "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 | 3869 | gual2_fields, |
0c345c78 | 3870 | 15, |
263a36d4 | 3871 | "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 3872 | 1, |
29028043 | 3873 | "u.login", |
9db6a21e | 3874 | &gubl2_validate, |
4ffa124a | 3875 | }, |
5eaef520 | 3876 | |
4ffa124a | 3877 | { |
186dd63b | 3878 | /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */ |
3879 | "get_user_account_by_login", | |
3880 | "gual", | |
3881 | 3, | |
3882 | RETRIEVE, | |
3883 | "u", | |
3884 | USERS_TABLE, | |
3b634eb3 | 3885 | "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 | 3886 | gual3_fields, |
3b634eb3 | 3887 | 18, |
186dd63b | 3888 | "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
3889 | 1, | |
3890 | "u.login", | |
3891 | &gubl_validate, | |
3892 | }, | |
3893 | ||
aec7d432 | 3894 | { |
3895 | /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v11 */ | |
3896 | "get_user_account_by_login", | |
3897 | "gual", | |
3898 | 11, | |
3899 | RETRIEVE, | |
3900 | "u", | |
3901 | USERS_TABLE, | |
3902 | "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", | |
3903 | gual_fields, | |
3904 | 20, | |
3905 | "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", | |
3906 | 1, | |
3907 | "u.login", | |
3908 | &gubl_validate, | |
3909 | }, | |
3910 | ||
186dd63b | 3911 | { |
3912 | /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */ | |
0c345c78 | 3913 | "get_user_account_by_uid", |
3914 | "guau", | |
c44ddfa7 | 3915 | 2, |
0c345c78 | 3916 | RETRIEVE, |
3917 | "u", | |
03c05291 | 3918 | USERS_TABLE, |
d55429b2 | 3919 | "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 | 3920 | guau2_fields, |
0c345c78 | 3921 | 15, |
03c05291 | 3922 | "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 3923 | 1, |
29028043 | 3924 | "u.login", |
9db6a21e | 3925 | &gubu2_validate, |
4ffa124a | 3926 | }, |
5eaef520 | 3927 | |
4ffa124a | 3928 | { |
186dd63b | 3929 | /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */ |
3930 | "get_user_account_by_uid", | |
3931 | "guau", | |
3932 | 3, | |
3933 | RETRIEVE, | |
3934 | "u", | |
3935 | USERS_TABLE, | |
3b634eb3 | 3936 | "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 | 3937 | guau3_fields, |
3b634eb3 | 3938 | 18, |
186dd63b | 3939 | "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id", |
3940 | 1, | |
3941 | "u.login", | |
3942 | &gubu_validate, | |
3943 | }, | |
3944 | ||
aec7d432 | 3945 | { |
3946 | /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v11 */ | |
3947 | "get_user_account_by_uid", | |
3948 | "guau", | |
3949 | 11, | |
3950 | RETRIEVE, | |
3951 | "u", | |
3952 | USERS_TABLE, | |
3953 | "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", | |
3954 | guau_fields, | |
3955 | 20, | |
3956 | "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id", | |
3957 | 1, | |
3958 | "u.login", | |
3959 | &gubu_validate, | |
3960 | }, | |
3961 | ||
186dd63b | 3962 | { |
3963 | /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */ | |
0c345c78 | 3964 | "get_user_account_by_name", |
3965 | "guan", | |
c44ddfa7 | 3966 | 2, |
0c345c78 | 3967 | RETRIEVE, |
3968 | "u", | |
03c05291 | 3969 | USERS_TABLE, |
d55429b2 | 3970 | "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 | 3971 | guan2_fields, |
0c345c78 | 3972 | 15, |
263a36d4 | 3973 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id", |
0c345c78 | 3974 | 2, |
29028043 | 3975 | "u.login", |
9db6a21e | 3976 | &guan2_validate, |
4ffa124a | 3977 | }, |
5eaef520 | 3978 | |
4ffa124a | 3979 | { |
186dd63b | 3980 | /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */ |
3981 | "get_user_account_by_name", | |
3982 | "guan", | |
3983 | 3, | |
3984 | RETRIEVE, | |
3985 | "u", | |
3986 | USERS_TABLE, | |
3b634eb3 | 3987 | "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 | 3988 | guan3_fields, |
3b634eb3 | 3989 | 18, |
186dd63b | 3990 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id", |
3991 | 2, | |
3992 | "u.login", | |
3993 | &guan_validate, | |
3994 | }, | |
3995 | ||
aec7d432 | 3996 | { |
3997 | /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v11 */ | |
3998 | "get_user_account_by_name", | |
3999 | "guan", | |
4000 | 11, | |
4001 | RETRIEVE, | |
4002 | "u", | |
4003 | USERS_TABLE, | |
4004 | "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", | |
4005 | guan_fields, | |
4006 | 20, | |
4007 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id", | |
4008 | 2, | |
4009 | "u.login", | |
4010 | &guan_validate, | |
4011 | }, | |
4012 | ||
186dd63b | 4013 | { |
4014 | /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */ | |
0c345c78 | 4015 | "get_user_account_by_class", |
4016 | "guac", | |
c44ddfa7 | 4017 | 2, |
0c345c78 | 4018 | RETRIEVE, |
4019 | "u", | |
03c05291 | 4020 | USERS_TABLE, |
d55429b2 | 4021 | "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 | 4022 | guac2_fields, |
0c345c78 | 4023 | 15, |
03c05291 | 4024 | "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 4025 | 1, |
29028043 | 4026 | "u.login", |
4027 | &VDfix_modby, | |
4ffa124a | 4028 | }, |
5eaef520 | 4029 | |
4ffa124a | 4030 | { |
186dd63b | 4031 | /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */ |
4032 | "get_user_account_by_class", | |
4033 | "guac", | |
4034 | 3, | |
4035 | RETRIEVE, | |
4036 | "u", | |
4037 | USERS_TABLE, | |
3b634eb3 | 4038 | "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 | 4039 | guac3_fields, |
3b634eb3 | 4040 | 18, |
186dd63b | 4041 | "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id", |
4042 | 1, | |
4043 | "u.login", | |
9db6a21e | 4044 | &guan_validate, |
186dd63b | 4045 | }, |
4046 | ||
aec7d432 | 4047 | { |
4048 | /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v11 */ | |
4049 | "get_user_account_by_class", | |
4050 | "guac", | |
4051 | 11, | |
4052 | RETRIEVE, | |
4053 | "u", | |
4054 | USERS_TABLE, | |
4055 | "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", | |
4056 | guac_fields, | |
4057 | 20, | |
4058 | "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id", | |
4059 | 1, | |
4060 | "u.login", | |
4061 | &guan_validate, | |
4062 | }, | |
4063 | ||
186dd63b | 4064 | { |
4065 | /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */ | |
0c345c78 | 4066 | "get_user_account_by_id", |
4067 | "guai", | |
c44ddfa7 | 4068 | 2, |
0c345c78 | 4069 | RETRIEVE, |
4070 | "u", | |
03c05291 | 4071 | USERS_TABLE, |
d55429b2 | 4072 | "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 | 4073 | guam2_fields, |
0c345c78 | 4074 | 15, |
263a36d4 | 4075 | "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 4076 | 1, |
29028043 | 4077 | "u.login", |
263a36d4 | 4078 | &VDfix_modby, |
4ffa124a | 4079 | }, |
5eaef520 | 4080 | |
d33e787c | 4081 | { |
186dd63b | 4082 | /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */ |
4083 | "get_user_account_by_id", | |
4084 | "guai", | |
4085 | 3, | |
4086 | RETRIEVE, | |
4087 | "u", | |
4088 | USERS_TABLE, | |
3b634eb3 | 4089 | "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 | 4090 | guam_fields, |
3b634eb3 | 4091 | 18, |
186dd63b | 4092 | "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
4093 | 1, | |
4094 | "u.login", | |
9db6a21e | 4095 | &guan_validate, |
186dd63b | 4096 | }, |
4097 | ||
aec7d432 | 4098 | { |
4099 | /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v11 */ | |
4100 | "get_user_account_by_id", | |
4101 | "guai", | |
4102 | 11, | |
4103 | RETRIEVE, | |
4104 | "u", | |
4105 | USERS_TABLE, | |
4106 | "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", | |
4107 | guam_fields, | |
4108 | 20, | |
4109 | "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", | |
4110 | 1, | |
4111 | "u.login", | |
4112 | &guan_validate, | |
4113 | }, | |
4114 | ||
186dd63b | 4115 | { |
4116 | /* Q_GUBL - GET_USER_BY_LOGIN, v2 */ | |
d33e787c | 4117 | "get_user_by_login", |
4118 | "gubl", | |
c44ddfa7 | 4119 | 2, |
d33e787c | 4120 | RETRIEVE, |
4121 | "u", | |
5eaef520 | 4122 | USERS_TABLE, |
03c05291 | 4123 | "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 | 4124 | gubl2_fields, |
d33e787c | 4125 | 12, |
263a36d4 | 4126 | "u.login LIKE '%s' AND u.users_id != 0", |
d33e787c | 4127 | 1, |
29028043 | 4128 | "u.login", |
9db6a21e | 4129 | &gubl2_validate, |
d33e787c | 4130 | }, |
5eaef520 | 4131 | |
d33e787c | 4132 | { |
186dd63b | 4133 | /* Q_GUBL - GET_USER_BY_LOGIN, v3 */ |
4134 | "get_user_by_login", | |
4135 | "gubl", | |
4136 | 3, | |
4137 | RETRIEVE, | |
4138 | "u", | |
4139 | USERS_TABLE, | |
3b634eb3 | 4140 | "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 | 4141 | gubl_fields, |
3b634eb3 | 4142 | 15, |
186dd63b | 4143 | "u.login LIKE '%s' AND u.users_id != 0", |
4144 | 1, | |
4145 | "u.login", | |
4146 | &gubl_validate, | |
4147 | }, | |
4148 | ||
4149 | { | |
4150 | /* Q_GUBU - GET_USER_BY_UID, v2 */ | |
d33e787c | 4151 | "get_user_by_uid", |
4152 | "gubu", | |
c44ddfa7 | 4153 | 2, |
d33e787c | 4154 | RETRIEVE, |
4155 | "u", | |
03c05291 | 4156 | USERS_TABLE, |
4157 | "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 | 4158 | gubu2_fields, |
d33e787c | 4159 | 12, |
03c05291 | 4160 | "u.unix_uid = %s AND u.users_id != 0", |
d33e787c | 4161 | 1, |
29028043 | 4162 | "u.login", |
9db6a21e | 4163 | &gubu2_validate, |
d33e787c | 4164 | }, |
5eaef520 | 4165 | |
d33e787c | 4166 | { |
186dd63b | 4167 | /* Q_GUBU - GET_USER_BY_UID, v3 */ |
4168 | "get_user_by_uid", | |
4169 | "gubu", | |
4170 | 3, | |
4171 | RETRIEVE, | |
4172 | "u", | |
4173 | USERS_TABLE, | |
3b634eb3 | 4174 | "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 | 4175 | gubu_fields, |
3b634eb3 | 4176 | 15, |
186dd63b | 4177 | "u.unix_uid = %s AND u.users_id != 0", |
4178 | 1, | |
4179 | "u.login", | |
4180 | &gubu_validate, | |
4181 | }, | |
4182 | ||
4183 | { | |
4184 | /* Q_GUBN - GET_USER_BY_NAME, v2 */ | |
d33e787c | 4185 | "get_user_by_name", |
4186 | "gubn", | |
c44ddfa7 | 4187 | 2, |
d33e787c | 4188 | RETRIEVE, |
4189 | "u", | |
03c05291 | 4190 | USERS_TABLE, |
4191 | "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 | 4192 | gubn2_fields, |
d33e787c | 4193 | 12, |
263a36d4 | 4194 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0", |
d33e787c | 4195 | 2, |
29028043 | 4196 | "u.login", |
9db6a21e | 4197 | &gubn2_validate, |
d33e787c | 4198 | }, |
5eaef520 | 4199 | |
d33e787c | 4200 | { |
186dd63b | 4201 | /* Q_GUBN - GET_USER_BY_NAME, v3 */ |
4202 | "get_user_by_name", | |
4203 | "gubn", | |
4204 | 3, | |
4205 | RETRIEVE, | |
4206 | "u", | |
4207 | USERS_TABLE, | |
3b634eb3 | 4208 | "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 | 4209 | gubn_fields, |
3b634eb3 | 4210 | 15, |
186dd63b | 4211 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0", |
4212 | 2, | |
4213 | "u.login", | |
4214 | &gubn_validate, | |
4215 | }, | |
4216 | ||
4217 | { | |
4218 | /* Q_GUBC - GET_USER_BY_CLASS, v2 */ | |
d33e787c | 4219 | "get_user_by_class", |
4220 | "gubc", | |
c44ddfa7 | 4221 | 2, |
d33e787c | 4222 | RETRIEVE, |
4223 | "u", | |
03c05291 | 4224 | USERS_TABLE, |
4225 | "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 | 4226 | gubc2_fields, |
d33e787c | 4227 | 12, |
03c05291 | 4228 | "u.type = UPPER('%s') AND u.users_id != 0", |
d33e787c | 4229 | 1, |
29028043 | 4230 | "u.login", |
4231 | &VDfix_modby, | |
d33e787c | 4232 | }, |
5eaef520 | 4233 | |
d33e787c | 4234 | { |
186dd63b | 4235 | /* Q_GUBC - GET_USER_BY_CLASS, v3 */ |
4236 | "get_user_by_class", | |
4237 | "gubc", | |
4238 | 3, | |
4239 | RETRIEVE, | |
4240 | "u", | |
4241 | USERS_TABLE, | |
3b634eb3 | 4242 | "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 | 4243 | gubc_fields, |
3b634eb3 | 4244 | 15, |
186dd63b | 4245 | "u.type = UPPER('%s') AND u.users_id != 0", |
4246 | 1, | |
4247 | "u.login", | |
9db6a21e | 4248 | &guan_validate, |
186dd63b | 4249 | }, |
4250 | ||
4251 | { | |
4252 | /* Q_GUBM - GET_USER_BY_MITID, v2 */ | |
d33e787c | 4253 | "get_user_by_mitid", |
4254 | "gubm", | |
c44ddfa7 | 4255 | 2, |
d33e787c | 4256 | RETRIEVE, |
4257 | "u", | |
03c05291 | 4258 | USERS_TABLE, |
4259 | "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 | 4260 | gubm2_fields, |
d33e787c | 4261 | 12, |
263a36d4 | 4262 | "u.clearid LIKE '%s' AND u.users_id != 0", |
d33e787c | 4263 | 1, |
29028043 | 4264 | "u.login", |
263a36d4 | 4265 | &VDfix_modby, |
d33e787c | 4266 | }, |
5eaef520 | 4267 | |
4ffa124a | 4268 | { |
186dd63b | 4269 | /* Q_GUBM - GET_USER_BY_MITID, v3 */ |
4270 | "get_user_by_mitid", | |
4271 | "gubm", | |
4272 | 3, | |
4273 | RETRIEVE, | |
4274 | "u", | |
4275 | USERS_TABLE, | |
3b634eb3 | 4276 | "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 | 4277 | gubm_fields, |
3b634eb3 | 4278 | 15, |
186dd63b | 4279 | "u.clearid LIKE '%s' AND u.users_id != 0", |
4280 | 1, | |
4281 | "u.login", | |
9db6a21e | 4282 | &guan_validate, |
186dd63b | 4283 | }, |
4284 | ||
4285 | { | |
4286 | /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */ | |
4ffa124a | 4287 | "add_user_account", |
4288 | "auac", | |
c44ddfa7 | 4289 | 2, |
4ffa124a | 4290 | APPEND, |
4291 | "u", | |
03c05291 | 4292 | USERS_TABLE, |
d55429b2 | 4293 | /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)", |
4294 | * but using up one argv element. | |
4295 | */ | |
4296 | "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 | 4297 | auac2_fields, |
4ffa124a | 4298 | 12, |
7ac48069 | 4299 | NULL, |
4ffa124a | 4300 | 0, |
29028043 | 4301 | NULL, |
186dd63b | 4302 | &auac2_validate, |
4303 | }, | |
4304 | ||
4305 | { | |
4306 | /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */ | |
4307 | "add_user_account", | |
4308 | "auac", | |
4309 | 3, | |
4310 | APPEND, | |
4311 | "u", | |
4312 | USERS_TABLE, | |
4313 | /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)", | |
4314 | * but using up one argv element. | |
4315 | */ | |
3b634eb3 | 4316 | "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 | 4317 | auac3_fields, |
186dd63b | 4318 | 13, |
4319 | NULL, | |
4320 | 0, | |
4321 | NULL, | |
aec7d432 | 4322 | &auac3_validate, |
4323 | }, | |
4324 | ||
4325 | { | |
4326 | /* Q_AUAC - ADD_USER_ACCOUNT, v11 */ /* uses prefetch_value() for users_id */ | |
4327 | "add_user_account", | |
4328 | "auac", | |
4329 | 11, | |
4330 | APPEND, | |
4331 | "u", | |
4332 | USERS_TABLE, | |
4333 | /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)", | |
4334 | * but using up one argv element. | |
4335 | */ | |
4336 | "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)", | |
4337 | auac_fields, | |
4338 | 15, | |
4339 | NULL, | |
4340 | 0, | |
4341 | NULL, | |
4ffa124a | 4342 | &auac_validate, |
4343 | }, | |
5eaef520 | 4344 | |
d33e787c | 4345 | { |
186dd63b | 4346 | /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */ |
d33e787c | 4347 | "add_user", |
4348 | "ausr", | |
c44ddfa7 | 4349 | 2, |
d33e787c | 4350 | APPEND, |
4351 | "u", | |
03c05291 | 4352 | USERS_TABLE, |
5eaef520 | 4353 | "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 | 4354 | auac2_fields, |
d33e787c | 4355 | 9, |
45bf7573 | 4356 | 0, |
d33e787c | 4357 | 0, |
29028043 | 4358 | NULL, |
186dd63b | 4359 | &ausr2_validate, |
4360 | }, | |
4361 | ||
4362 | { | |
4363 | /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */ | |
4364 | "add_user", | |
4365 | "ausr", | |
4366 | 3, | |
4367 | APPEND, | |
4368 | "u", | |
4369 | USERS_TABLE, | |
3b634eb3 | 4370 | "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 | 4371 | auac3_fields, |
186dd63b | 4372 | 10, |
4373 | 0, | |
4374 | 0, | |
4375 | NULL, | |
aec7d432 | 4376 | &ausr3_validate, |
4377 | }, | |
4378 | ||
4379 | { | |
4380 | /* Q_AUSR - ADD_USER, v11 */ /* uses prefetch_value() for users_id */ | |
4381 | "add_user", | |
4382 | "ausr", | |
4383 | 11, | |
4384 | APPEND, | |
4385 | "u", | |
4386 | USERS_TABLE, | |
4387 | "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)", | |
4388 | auac_fields, | |
4389 | 12, | |
4390 | 0, | |
4391 | 0, | |
4392 | NULL, | |
d33e787c | 4393 | &ausr_validate, |
4394 | }, | |
5eaef520 | 4395 | |
d33e787c | 4396 | { |
4397 | /* Q_RUSR - REGISTER_USER */ | |
4398 | "register_user", | |
4399 | "rusr", | |
c44ddfa7 | 4400 | 2, |
d33e787c | 4401 | APPEND, |
4402 | 0, | |
4403 | 0, | |
4404 | 0, | |
4405 | rusr_fields, | |
4406 | 3, | |
4407 | 0, | |
4408 | 0, | |
29028043 | 4409 | NULL, |
d33e787c | 4410 | &rusr_validate, |
4411 | }, | |
5eaef520 | 4412 | |
4ffa124a | 4413 | { |
186dd63b | 4414 | /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */ |
4ffa124a | 4415 | "update_user_account", |
4416 | "uuac", | |
c44ddfa7 | 4417 | 2, |
4ffa124a | 4418 | UPDATE, |
4419 | "u", | |
03c05291 | 4420 | USERS_TABLE, |
d55429b2 | 4421 | /* See comment in auac about signature. */ |
4422 | "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 | 4423 | uuac2_fields, |
4ffa124a | 4424 | 12, |
4425 | "users_id = %d", | |
4426 | 1, | |
29028043 | 4427 | NULL, |
186dd63b | 4428 | &uuac2_validate, |
4429 | }, | |
4430 | ||
4431 | { | |
4432 | /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */ | |
4433 | "update_user_account", | |
4434 | "uuac", | |
4435 | 3, | |
4436 | UPDATE, | |
4437 | "u", | |
4438 | USERS_TABLE, | |
4439 | /* See comment in auac about signature. */ | |
4440 | "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 | 4441 | uuac3_fields, |
186dd63b | 4442 | 13, |
4443 | "users_id = %d", | |
4444 | 1, | |
4445 | NULL, | |
aec7d432 | 4446 | &uuac3_validate, |
4447 | }, | |
4448 | ||
4449 | { | |
4450 | /* Q_UUAC - UPDATE_USER_ACCOUNT, v11 */ | |
4451 | "update_user_account", | |
4452 | "uuac", | |
4453 | 11, | |
4454 | UPDATE, | |
4455 | "u", | |
4456 | USERS_TABLE, | |
4457 | /* See comment in auac about signature. */ | |
4458 | "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))", | |
4459 | uuac_fields, | |
4460 | 15, | |
4461 | "users_id = %d", | |
4462 | 1, | |
4463 | NULL, | |
4ffa124a | 4464 | &uuac_validate, |
4465 | }, | |
5eaef520 | 4466 | |
d33e787c | 4467 | { |
186dd63b | 4468 | /* Q_UUSR - UPDATE_USER, v2 */ |
d33e787c | 4469 | "update_user", |
4470 | "uusr", | |
c44ddfa7 | 4471 | 2, |
d33e787c | 4472 | UPDATE, |
4473 | "u", | |
03c05291 | 4474 | USERS_TABLE, |
5eaef520 | 4475 | "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 | 4476 | uuac2_fields, |
d33e787c | 4477 | 9, |
4e5ec77f | 4478 | "users_id = %d", |
d33e787c | 4479 | 1, |
29028043 | 4480 | NULL, |
186dd63b | 4481 | &uusr2_validate, |
4482 | }, | |
4483 | ||
4484 | { | |
4485 | /* Q_UUSR - UPDATE_USER, v3 */ | |
4486 | "update_user", | |
4487 | "uusr", | |
4488 | 3, | |
4489 | UPDATE, | |
4490 | "u", | |
4491 | USERS_TABLE, | |
4492 | "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 | 4493 | uuac3_fields, |
186dd63b | 4494 | 10, |
4495 | "users_id = %d", | |
4496 | 1, | |
4497 | NULL, | |
aec7d432 | 4498 | &uusr3_validate, |
4499 | }, | |
4500 | ||
4501 | { | |
4502 | /* Q_UUSR - UPDATE_USER, v11 */ | |
4503 | "update_user", | |
4504 | "uusr", | |
4505 | 11, | |
4506 | UPDATE, | |
4507 | "u", | |
4508 | USERS_TABLE, | |
4509 | "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)) ", | |
4510 | uuac_fields, | |
4511 | 12, | |
4512 | "users_id = %d", | |
4513 | 1, | |
4514 | NULL, | |
d33e787c | 4515 | &uusr_validate, |
4516 | }, | |
4517 | ||
4518 | { | |
4519 | /* Q_UUSH - UPDATE_USER_SHELL */ | |
4520 | "update_user_shell", | |
4521 | "uush", | |
c44ddfa7 | 4522 | 2, |
d33e787c | 4523 | UPDATE, |
4524 | "u", | |
03c05291 | 4525 | USERS_TABLE, |
5eaef520 | 4526 | "users SET shell = '%s'", |
d33e787c | 4527 | uush_fields, |
4528 | 1, | |
4e5ec77f | 4529 | "users_id = %d", |
d33e787c | 4530 | 1, |
29028043 | 4531 | NULL, |
d33e787c | 4532 | &uush_validate, |
4533 | }, | |
4534 | ||
29dbfca4 | 4535 | { |
4536 | /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */ | |
4537 | "update_user_windows_shell", | |
4538 | "uuws", | |
4539 | 2, | |
4540 | UPDATE, | |
4541 | "u", | |
4542 | USERS_TABLE, | |
4543 | "users SET winconsoleshell = '%s'", | |
4544 | uuws_fields, | |
4545 | 1, | |
4546 | "users_id = %d", | |
4547 | 1, | |
4548 | NULL, | |
4549 | &uuws_validate, | |
4550 | }, | |
4551 | ||
d33e787c | 4552 | { |
4553 | /* Q_UUST - UPDATE_USER_STATUS */ | |
4554 | "update_user_status", | |
4555 | "uust", | |
c44ddfa7 | 4556 | 2, |
d33e787c | 4557 | UPDATE, |
4558 | "u", | |
03c05291 | 4559 | USERS_TABLE, |
4e5ec77f | 4560 | "users SET status = %s", |
d33e787c | 4561 | uust_fields, |
4562 | 1, | |
4e5ec77f | 4563 | "users_id = %d", |
d33e787c | 4564 | 1, |
29028043 | 4565 | NULL, |
d33e787c | 4566 | &uust_validate, |
4567 | }, | |
4568 | ||
4ffa124a | 4569 | { |
4570 | /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */ | |
4571 | "update_user_security_status", | |
4572 | "uuss", | |
c44ddfa7 | 4573 | 2, |
4ffa124a | 4574 | UPDATE, |
4575 | "u", | |
03c05291 | 4576 | USERS_TABLE, |
135dcb80 | 4577 | "users SET secure = %s", |
4ffa124a | 4578 | uuss_fields, |
4579 | 1, | |
4580 | "users_id = %d", | |
4581 | 1, | |
29028043 | 4582 | NULL, |
4ffa124a | 4583 | &uust_validate, |
4584 | }, | |
5eaef520 | 4585 | |
d33e787c | 4586 | { |
5eaef520 | 4587 | /* Q_DUSR - DELETE_USER */ |
d33e787c | 4588 | "delete_user", |
4589 | "dusr", | |
c44ddfa7 | 4590 | 2, |
d33e787c | 4591 | DELETE, |
4592 | "u", | |
03c05291 | 4593 | USERS_TABLE, |
7ac48069 | 4594 | NULL, |
d33e787c | 4595 | dusr_fields, |
4596 | 0, | |
4e5ec77f | 4597 | "users_id = %d", |
d33e787c | 4598 | 1, |
29028043 | 4599 | NULL, |
d33e787c | 4600 | &dusr_validate, |
4601 | }, | |
4602 | ||
77eb4bdf | 4603 | { |
4604 | /* Q_AURV - ADD_USER_RESERVATION */ | |
4605 | "add_user_reservation", | |
4606 | "aurv", | |
4607 | 2, | |
4608 | UPDATE, | |
4609 | 0, | |
4610 | USERS_TABLE, | |
4611 | 0, | |
4612 | aurv_fields, | |
4613 | 2, | |
4614 | 0, | |
4615 | 0, | |
4616 | NULL, | |
4617 | &aurv_validate, | |
4618 | }, | |
4619 | ||
4620 | { | |
4621 | /* Q_GURV - GET_USER_RESERVATIONS */ | |
4622 | "get_user_reservations", | |
4623 | "gurv", | |
4624 | 2, | |
4625 | RETRIEVE, | |
4626 | 0, | |
4627 | USERS_TABLE, | |
4628 | 0, | |
4629 | gurv_fields, | |
4630 | 2, | |
4631 | 0, | |
4632 | 1, | |
4633 | NULL, | |
4634 | &gurv_validate, | |
4635 | }, | |
4636 | ||
4637 | { | |
4638 | /* Q_GUBR - GET_USER_BY_RESERVATION */ | |
4639 | "get_user_by_reservation", | |
4640 | "gubr", | |
4641 | 2, | |
4642 | RETRIEVE, | |
4643 | 0, | |
4644 | USERS_TABLE, | |
4645 | 0, | |
4646 | gubr_fields, | |
4647 | 1, | |
4648 | 0, | |
4649 | 1, | |
4650 | NULL, | |
4651 | &gubr_validate, | |
4652 | }, | |
4653 | ||
4654 | { | |
4655 | /* Q_DURV - DELETE_USER_RESERVATION */ | |
4656 | "delete_user_reservation", | |
4657 | "durv", | |
4658 | 2, | |
4659 | UPDATE, | |
4660 | 0, | |
4661 | USERS_TABLE, | |
4662 | 0, | |
4663 | aurv_fields, | |
4664 | 2, | |
4665 | 0, | |
4666 | 0, | |
4667 | NULL, | |
4668 | &aurv_validate, | |
4669 | }, | |
4670 | ||
012fc215 | 4671 | { |
5eaef520 | 4672 | /* Q_GKUM - GET_KERBEROS_USER_MAP */ |
012fc215 | 4673 | "get_kerberos_user_map", |
4674 | "gkum", | |
c44ddfa7 | 4675 | 2, |
012fc215 | 4676 | RETRIEVE, |
4677 | "k", | |
03c05291 | 4678 | KRBMAP_TABLE, |
4679 | "u.login, str.string FROM krbmap km, users u, strings str", | |
012fc215 | 4680 | gkum_fields, |
4681 | 2, | |
263a36d4 | 4682 | "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id", |
012fc215 | 4683 | 2, |
29028043 | 4684 | "u.login, str.string", |
263a36d4 | 4685 | NULL, |
012fc215 | 4686 | }, |
4687 | ||
4688 | { | |
4689 | /* Q_AKUM - ADD_KERBEROS_USER_MAP */ | |
4690 | "add_kerberos_user_map", | |
4691 | "akum", | |
c44ddfa7 | 4692 | 2, |
012fc215 | 4693 | APPEND, |
4694 | "k", | |
03c05291 | 4695 | KRBMAP_TABLE, |
99e09b48 | 4696 | "INTO krbmap (users_id, string_id) VALUES (%d, %d)", |
012fc215 | 4697 | akum_fields, |
4698 | 2, | |
4699 | 0, | |
4700 | 0, | |
29028043 | 4701 | NULL, |
012fc215 | 4702 | &akum_validate, |
4703 | }, | |
4704 | ||
4705 | { | |
4706 | /* Q_DKUM - DELETE_KERBEROS_USER_MAP */ | |
4707 | "delete_kerberos_user_map", | |
4708 | "dkum", | |
c44ddfa7 | 4709 | 2, |
012fc215 | 4710 | DELETE, |
4711 | "k", | |
03c05291 | 4712 | KRBMAP_TABLE, |
012fc215 | 4713 | 0, |
4714 | akum_fields, | |
4715 | 0, | |
99e09b48 | 4716 | "users_id = %d AND string_id = %d", |
012fc215 | 4717 | 2, |
29028043 | 4718 | NULL, |
012fc215 | 4719 | &dkum_validate, |
4720 | }, | |
4721 | ||
d33e787c | 4722 | { |
4723 | /* Q_GFBL - GET_FINGER_BY_LOGIN */ | |
4724 | "get_finger_by_login", | |
4725 | "gfbl", | |
c44ddfa7 | 4726 | 2, |
d33e787c | 4727 | RETRIEVE, |
4728 | "u", | |
03c05291 | 4729 | USERS_TABLE, |
4730 | "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 | 4731 | gfbl_fields, |
4732 | 12, | |
03c05291 | 4733 | "users_id = %d", |
d33e787c | 4734 | 1, |
29028043 | 4735 | "login", |
d33e787c | 4736 | &gfbl_validate, |
4737 | }, | |
4738 | ||
4739 | { | |
4740 | /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */ | |
4741 | "update_finger_by_login", | |
4742 | "ufbl", | |
c44ddfa7 | 4743 | 2, |
d33e787c | 4744 | UPDATE, |
4745 | "u", | |
03c05291 | 4746 | USERS_TABLE, |
5eaef520 | 4747 | "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 | 4748 | ufbl_fields, |
4749 | 8, | |
4e5ec77f | 4750 | "users_id = %d", |
d33e787c | 4751 | 1, |
29028043 | 4752 | NULL, |
d33e787c | 4753 | &ufbl_validate, |
4754 | }, | |
4755 | ||
4756 | { | |
4757 | /* Q_GPOB - GET_POBOX */ | |
4758 | "get_pobox", | |
4759 | "gpob", | |
c44ddfa7 | 4760 | 2, |
d33e787c | 4761 | RETRIEVE, |
4762 | "u", | |
03c05291 | 4763 | USERS_TABLE, |
d6d830a1 | 4764 | "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users", |
d33e787c | 4765 | gpob_fields, |
d6d830a1 | 4766 | 7, |
03c05291 | 4767 | "users_id = %d", |
d33e787c | 4768 | 1, |
29028043 | 4769 | "login", |
d33e787c | 4770 | &gpob_validate, |
4771 | }, | |
4772 | ||
4773 | { | |
4774 | /* Q_GAPO - GET_ALL_POBOXES */ | |
4775 | "get_all_poboxes", | |
4776 | "gapo", | |
c44ddfa7 | 4777 | 2, |
d33e787c | 4778 | RETRIEVE, |
4779 | "u", | |
03c05291 | 4780 | USERS_TABLE, |
4781 | "login, potype, pop_id || ':' || box_id FROM users", | |
d33e787c | 4782 | gpox_fields, |
4783 | 3, | |
03c05291 | 4784 | "potype != 'NONE'", |
d33e787c | 4785 | 0, |
29028043 | 4786 | "login", |
d33e787c | 4787 | &gpox_validate, |
4788 | }, | |
5eaef520 | 4789 | |
d33e787c | 4790 | { |
4791 | /* Q_GPOP - GET_POBOXES_POP */ | |
4792 | "get_poboxes_pop", | |
4793 | "gpop", | |
c44ddfa7 | 4794 | 2, |
d33e787c | 4795 | RETRIEVE, |
4796 | "u", | |
03c05291 | 4797 | USERS_TABLE, |
17cb3de8 | 4798 | "login, potype, users_id FROM users", |
d33e787c | 4799 | gpox_fields, |
4800 | 3, | |
03c05291 | 4801 | "potype = 'POP'", |
d33e787c | 4802 | 0, |
29028043 | 4803 | "login", |
d33e787c | 4804 | &gpox_validate |
4805 | }, | |
4806 | ||
4807 | { | |
4808 | /* Q_GPOF - GET_POBOXES_SMTP */ | |
4809 | "get_poboxes_smtp", | |
4810 | "gpos", | |
c44ddfa7 | 4811 | 2, |
d33e787c | 4812 | RETRIEVE, |
4813 | "u", | |
03c05291 | 4814 | USERS_TABLE, |
17cb3de8 | 4815 | "login, potype, users_id FROM users", |
d33e787c | 4816 | gpox_fields, |
4817 | 3, | |
03c05291 | 4818 | "potype = 'SMTP'", |
d33e787c | 4819 | 0, |
29028043 | 4820 | "login", |
d33e787c | 4821 | &gpox_validate |
4822 | }, | |
4823 | ||
4824 | { | |
4825 | /* Q_SPOB - SET_POBOX */ | |
4826 | "set_pobox", | |
4827 | "spob", | |
c44ddfa7 | 4828 | 2, |
d33e787c | 4829 | UPDATE, |
4830 | 0, | |
03c05291 | 4831 | USERS_TABLE, |
d33e787c | 4832 | 0, |
4833 | spob_fields, | |
4834 | 3, | |
7ac48069 | 4835 | NULL, |
d33e787c | 4836 | 0, |
29028043 | 4837 | NULL, |
d33e787c | 4838 | &spob_validate, |
4839 | }, | |
4840 | ||
4841 | { | |
4842 | /* Q_SPOP - SET_POBOX_POP */ | |
4843 | "set_pobox_pop", | |
4844 | "spop", | |
c44ddfa7 | 4845 | 2, |
d33e787c | 4846 | UPDATE, |
8b0fdf05 | 4847 | 0, |
03c05291 | 4848 | USERS_TABLE, |
17cb3de8 | 4849 | 0, |
d33e787c | 4850 | spob_fields, |
8b0fdf05 | 4851 | 1, |
17cb3de8 | 4852 | NULL, |
4853 | 0, | |
29028043 | 4854 | NULL, |
d33e787c | 4855 | &spop_validate, |
4856 | }, | |
4857 | ||
4858 | { | |
4859 | /* Q_DPOB - DELETE_POBOX */ | |
4860 | "delete_pobox", | |
4861 | "dpob", | |
c44ddfa7 | 4862 | 2, |
d33e787c | 4863 | UPDATE, |
4864 | "u", | |
03c05291 | 4865 | USERS_TABLE, |
4866 | "users SET potype = 'NONE'", | |
4867 | spob_fields, | |
4868 | 0, | |
4869 | "users_id = %d", | |
d33e787c | 4870 | 1, |
29028043 | 4871 | NULL, |
03c05291 | 4872 | &dpob_validate, |
d33e787c | 4873 | }, |
4874 | ||
4875 | { | |
e4ae0190 | 4876 | /* Q_GHST - GET_HOST, v2 */ |
a66a2204 | 4877 | "get_host", |
4878 | "ghst", | |
c44ddfa7 | 4879 | 2, |
a66a2204 | 4880 | RETRIEVE, |
4881 | "m", | |
03c05291 | 4882 | MACHINE_TABLE, |
4883 | "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 | 4884 | ghst2_fields, |
a66a2204 | 4885 | 21, |
1fa08fc4 | 4886 | "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 | 4887 | 4, |
29028043 | 4888 | "m.name", |
a66a2204 | 4889 | &ghst_validate, |
4890 | }, | |
4891 | ||
9333756a | 4892 | { |
e4ae0190 | 4893 | /* Q_GHST - GET_HOST, v6 */ |
4894 | "get_host", | |
4895 | "ghst", | |
4896 | 6, | |
4897 | RETRIEVE, | |
4898 | "m", | |
4899 | MACHINE_TABLE, | |
4900 | "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 | 4901 | ghst6_fields, |
e4ae0190 | 4902 | 22, |
4903 | "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", | |
4904 | 4, | |
4905 | "m.name", | |
4906 | &ghst_validate, | |
4907 | }, | |
4908 | ||
4f6b1a05 | 4909 | { |
4910 | /* Q_GHST - GET_HOST, v8 */ | |
4911 | "get_host", | |
4912 | "ghst", | |
4913 | 8, | |
4914 | RETRIEVE, | |
4915 | "m", | |
4916 | MACHINE_TABLE, | |
4917 | "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", | |
4918 | ghst_fields, | |
4919 | 23, | |
4920 | "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", | |
4921 | 4, | |
4922 | "m.name", | |
4923 | &ghst_validate, | |
4924 | }, | |
4925 | ||
e4ae0190 | 4926 | { |
4927 | /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */ | |
9333756a | 4928 | "get_host_by_hwaddr", |
4929 | "ghbh", | |
c44ddfa7 | 4930 | 2, |
9333756a | 4931 | RETRIEVE, |
4932 | "m", | |
4933 | MACHINE_TABLE, | |
4934 | "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 | 4935 | ghbh2_fields, |
9333756a | 4936 | 21, |
4937 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4938 | 1, | |
4939 | "m.name", | |
012e079f | 4940 | &ghst_validate, |
9333756a | 4941 | }, |
4942 | ||
e4ae0190 | 4943 | { |
4944 | /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */ | |
4945 | "get_host_by_hwaddr", | |
4946 | "ghbh", | |
4947 | 6, | |
4948 | RETRIEVE, | |
4949 | "m", | |
4950 | MACHINE_TABLE, | |
4951 | "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 | 4952 | ghbh6_fields, |
e4ae0190 | 4953 | 22, |
4954 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4955 | 1, | |
4956 | "m.name", | |
4957 | &ghst_validate, | |
4958 | }, | |
4959 | ||
4f6b1a05 | 4960 | { |
4961 | /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */ | |
4962 | "get_host_by_hwaddr", | |
4963 | "ghbh", | |
4964 | 8, | |
4965 | RETRIEVE, | |
4966 | "m", | |
4967 | MACHINE_TABLE, | |
4968 | "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", | |
4969 | ghbh_fields, | |
4970 | 23, | |
4971 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4972 | 1, | |
4973 | "m.name", | |
4974 | &ghst_validate, | |
4975 | }, | |
4976 | ||
4977 | { | |
4978 | /* Q_GHBA - GET_HOST_BY_ACCOUNT_NUMBER, v8 */ | |
4979 | "get_host_by_account_number", | |
4980 | "ghba", | |
4981 | 8, | |
4982 | RETRIEVE, | |
4983 | "m", | |
4984 | MACHINE_TABLE, | |
4985 | "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", | |
4986 | ghba_fields, | |
4987 | 23, | |
4988 | "m.account_number LIKE '%s' AND m.mach_id != 0 and s.snet_id = m.snet_id", | |
4989 | 1, | |
4990 | "m.name", | |
4991 | &ghst_validate, | |
4992 | }, | |
4993 | ||
2884200f | 4994 | { |
4995 | /* Q_GHHA - GET_HOST_HWADDR */ | |
4996 | "get_host_hwaddr", | |
4997 | "ghha", | |
c44ddfa7 | 4998 | 2, |
2884200f | 4999 | RETRIEVE, |
5000 | "m", | |
5001 | MACHINE_TABLE, | |
5002 | "m.hwaddr FROM machine m", | |
5003 | ghha_fields, | |
5004 | 1, | |
5005 | "m.name LIKE UPPER('%s')", | |
5006 | 1, | |
5007 | NULL, | |
5008 | NULL, | |
5009 | }, | |
5010 | ||
a66a2204 | 5011 | { |
e4ae0190 | 5012 | /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */ |
a66a2204 | 5013 | "add_host", |
5014 | "ahst", | |
c44ddfa7 | 5015 | 2, |
d33e787c | 5016 | APPEND, |
5017 | "m", | |
03c05291 | 5018 | MACHINE_TABLE, |
5eaef520 | 5019 | "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 | 5020 | ahst2_fields, |
a66a2204 | 5021 | 14, |
45bf7573 | 5022 | 0, |
d33e787c | 5023 | 0, |
29028043 | 5024 | NULL, |
e4ae0190 | 5025 | &ahst2_validate, |
5026 | }, | |
5027 | ||
5028 | { | |
5029 | /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */ | |
5030 | "add_host", | |
5031 | "ahst", | |
5032 | 6, | |
5033 | APPEND, | |
5034 | "m", | |
5035 | MACHINE_TABLE, | |
5036 | "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 | 5037 | ahst6_fields, |
2c593a9e | 5038 | 15, |
751f43da | 5039 | 0, |
5040 | 0, | |
5041 | NULL, | |
4f6b1a05 | 5042 | &ahst6_validate, |
5043 | }, | |
5044 | ||
5045 | { | |
5046 | /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */ | |
5047 | "add_host", | |
5048 | "ahst", | |
5049 | 8, | |
5050 | APPEND, | |
5051 | "m", | |
5052 | MACHINE_TABLE, | |
5053 | "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)", | |
5054 | ahst_fields, | |
5055 | 16, | |
5056 | 0, | |
5057 | 0, | |
5058 | NULL, | |
a66a2204 | 5059 | &ahst_validate, |
d33e787c | 5060 | }, |
5061 | ||
5062 | { | |
e4ae0190 | 5063 | /* Q_UHST - UPDATE_HOST, v2 */ |
a66a2204 | 5064 | "update_host", |
5065 | "uhst", | |
c44ddfa7 | 5066 | 2, |
d33e787c | 5067 | UPDATE, |
5068 | "m", | |
03c05291 | 5069 | MACHINE_TABLE, |
5eaef520 | 5070 | "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 | 5071 | uhst2_fields, |
a66a2204 | 5072 | 14, |
4e5ec77f | 5073 | "mach_id = %d", |
d33e787c | 5074 | 1, |
29028043 | 5075 | NULL, |
e4ae0190 | 5076 | &uhst2_validate, |
5077 | }, | |
5078 | ||
5079 | { | |
5080 | /* Q_UHST - UPDATE_HOST, v6 */ | |
5081 | "update_host", | |
5082 | "uhst", | |
5083 | 6, | |
5084 | UPDATE, | |
5085 | "m", | |
5086 | MACHINE_TABLE, | |
5087 | "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 | 5088 | uhst6_fields, |
2c593a9e | 5089 | 15, |
751f43da | 5090 | "mach_id = %d", |
5091 | 1, | |
5092 | NULL, | |
4f6b1a05 | 5093 | &uhst6_validate, |
5094 | }, | |
5095 | ||
5096 | { | |
5097 | /* Q_UHST - UPDATE_HOST, v8 */ | |
5098 | "update_host", | |
5099 | "uhst", | |
5100 | 8, | |
5101 | UPDATE, | |
5102 | "m", | |
5103 | MACHINE_TABLE, | |
5104 | "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", | |
5105 | uhst_fields, | |
5106 | 16, | |
5107 | "mach_id = %d", | |
5108 | 1, | |
5109 | NULL, | |
a66a2204 | 5110 | &uhst_validate, |
d33e787c | 5111 | }, |
5112 | ||
2884200f | 5113 | { |
5114 | /* Q_UHHA - UPDATE_HOST_HWADDR */ | |
5115 | "update_host_hwaddr", | |
5116 | "uhha", | |
c44ddfa7 | 5117 | 2, |
2884200f | 5118 | UPDATE, |
5119 | "m", | |
5120 | MACHINE_TABLE, | |
1fdf882a | 5121 | "machine SET hwaddr = NVL('%s', CHR(0))", |
2884200f | 5122 | uhha_fields, |
5123 | 1, | |
5124 | "mach_id = %d", | |
5125 | 1, | |
5126 | NULL, | |
5127 | &uhha_validate, | |
5128 | }, | |
5129 | ||
d33e787c | 5130 | { |
a66a2204 | 5131 | /* Q_DHST - DELETE_HOST */ |
5132 | "delete_host", | |
5133 | "dhst", | |
c44ddfa7 | 5134 | 2, |
d33e787c | 5135 | DELETE, |
5136 | "m", | |
03c05291 | 5137 | MACHINE_TABLE, |
7ac48069 | 5138 | NULL, |
a66a2204 | 5139 | dhst_fields, |
d33e787c | 5140 | 0, |
4e5ec77f | 5141 | "mach_id = %d", |
d33e787c | 5142 | 1, |
29028043 | 5143 | NULL, |
a66a2204 | 5144 | &dhst_validate, |
5145 | }, | |
5146 | ||
03c05291 | 5147 | { |
5148 | /* Q_GMAC - GET_MACHINE */ | |
5149 | "get_machine", | |
5150 | "gmac", | |
c44ddfa7 | 5151 | 2, |
03c05291 | 5152 | RETRIEVE, |
5153 | "m", | |
5154 | MACHINE_TABLE, | |
5155 | "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine", | |
5156 | gmac_fields, | |
5157 | 5, | |
263a36d4 | 5158 | "name LIKE UPPER('%s') AND mach_id != 0", |
03c05291 | 5159 | 1, |
29028043 | 5160 | "name", |
263a36d4 | 5161 | &VDfix_modby, |
03c05291 | 5162 | }, |
5163 | ||
a66a2204 | 5164 | { |
5165 | /* Q_GHAL - GET_HOSTALIAS */ | |
5166 | "get_hostalias", | |
5167 | "ghal", | |
c44ddfa7 | 5168 | 2, |
a66a2204 | 5169 | RETRIEVE, |
03c05291 | 5170 | "a", |
5171 | HOSTALIAS_TABLE, | |
5172 | "a.name, m.name FROM hostalias a, machine m", | |
a66a2204 | 5173 | ghal_fields, |
5174 | 2, | |
263a36d4 | 5175 | "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')", |
a66a2204 | 5176 | 2, |
29028043 | 5177 | "a.name", |
a66a2204 | 5178 | &ghal_validate, |
5179 | }, | |
5180 | ||
5181 | { | |
5182 | /* Q_AHAL - ADD_HOSTALIAS */ | |
5183 | "add_hostalias", | |
5184 | "ahal", | |
c44ddfa7 | 5185 | 2, |
a66a2204 | 5186 | APPEND, |
5187 | "a", | |
03c05291 | 5188 | HOSTALIAS_TABLE, |
5eaef520 | 5189 | "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)", |
a66a2204 | 5190 | ghal_fields, |
5191 | 2, | |
5192 | 0, | |
5193 | 0, | |
29028043 | 5194 | NULL, |
a66a2204 | 5195 | &ahal_validate, |
5196 | }, | |
5197 | ||
5198 | { | |
5199 | /* Q_DHAL - DELETE_HOSTALIAS */ | |
5200 | "delete_hostalias", | |
5201 | "dhal", | |
c44ddfa7 | 5202 | 2, |
a66a2204 | 5203 | DELETE, |
5204 | "a", | |
03c05291 | 5205 | HOSTALIAS_TABLE, |
7ac48069 | 5206 | NULL, |
a66a2204 | 5207 | ghal_fields, |
5208 | 0, | |
03c05291 | 5209 | "name = UPPER('%s') AND mach_id = %d", |
a66a2204 | 5210 | 2, |
29028043 | 5211 | NULL, |
a66a2204 | 5212 | &dhal_validate, |
d33e787c | 5213 | }, |
5214 | ||
3c1d412c | 5215 | { |
4f6b1a05 | 5216 | /* Q_GSNT - GET_SUBNET, v2 */ |
3c1d412c | 5217 | "get_subnet", |
5218 | "gsnt", | |
c44ddfa7 | 5219 | 2, |
3c1d412c | 5220 | RETRIEVE, |
5221 | "s", | |
03c05291 | 5222 | SUBNET_TABLE, |
5223 | "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 | 5224 | gsnt2_fields, |
bd8c26ff | 5225 | 12, |
5e8fdad1 | 5226 | "name LIKE UPPER('%s')", |
3c1d412c | 5227 | 1, |
29028043 | 5228 | "name", |
3c1d412c | 5229 | &gsnt_validate, |
5230 | }, | |
5231 | ||
5232 | { | |
4f6b1a05 | 5233 | /* Q_GSNT - GET_SUBNET, v8 */ |
5234 | "get_subnet", | |
5235 | "gsnt", | |
5236 | 8, | |
5237 | RETRIEVE, | |
5238 | "s", | |
5239 | SUBNET_TABLE, | |
5240 | "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", | |
5241 | gsnt_fields, | |
5242 | 15, | |
5243 | "name LIKE UPPER('%s')", | |
5244 | 1, | |
5245 | "name", | |
5246 | &gsnt_validate, | |
5247 | }, | |
5248 | ||
5249 | { | |
5250 | /* Q_ASNT - ADD_SUBNET, v2 */ | |
3c1d412c | 5251 | "add_subnet", |
5252 | "asnt", | |
c44ddfa7 | 5253 | 2, |
3c1d412c | 5254 | APPEND, |
5255 | "s", | |
03c05291 | 5256 | SUBNET_TABLE, |
5eaef520 | 5257 | "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 | 5258 | asnt2_fields, |
bd8c26ff | 5259 | 9, |
3c1d412c | 5260 | 0, |
5261 | 0, | |
29028043 | 5262 | NULL, |
4f6b1a05 | 5263 | &asnt2_validate, |
5264 | }, | |
5265 | ||
5266 | { | |
5267 | /* Q_ASNT - ADD_SUBNET, v8 */ | |
5268 | "add_subnet", | |
5269 | "asnt", | |
5270 | 8, | |
5271 | APPEND, | |
5272 | "s", | |
5273 | SUBNET_TABLE, | |
8dc7d749 | 5274 | "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 | 5275 | asnt_fields, |
5276 | 12, | |
5277 | 0, | |
5278 | 0, | |
5279 | NULL, | |
3c1d412c | 5280 | &asnt_validate, |
5281 | }, | |
5282 | ||
5283 | { | |
4f6b1a05 | 5284 | /* Q_USNT - UPDATE_SUBNET, v2 */ |
3c1d412c | 5285 | "update_subnet", |
5286 | "usnt", | |
c44ddfa7 | 5287 | 2, |
3c1d412c | 5288 | UPDATE, |
5289 | "s", | |
03c05291 | 5290 | SUBNET_TABLE, |
5eaef520 | 5291 | "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 | 5292 | usnt2_fields, |
bd8c26ff | 5293 | 9, |
3c1d412c | 5294 | "snet_id = %d", |
5295 | 1, | |
29028043 | 5296 | NULL, |
4f6b1a05 | 5297 | &usnt2_validate, |
5298 | }, | |
5299 | ||
5300 | { | |
5301 | /* Q_USNT - UPDATE_SUBNET, v8 */ | |
5302 | "update_subnet", | |
5303 | "usnt", | |
5304 | 8, | |
5305 | UPDATE, | |
5306 | "s", | |
5307 | SUBNET_TABLE, | |
5308 | "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", | |
5309 | usnt_fields, | |
5310 | 12, | |
5311 | "snet_id = %d", | |
5312 | 1, | |
5313 | NULL, | |
3c1d412c | 5314 | &usnt_validate, |
5315 | }, | |
5316 | ||
5317 | { | |
5318 | /* Q_DSNT - DELETE_SUBNET */ | |
5319 | "delete_subnet", | |
5320 | "dsnt", | |
c44ddfa7 | 5321 | 2, |
3c1d412c | 5322 | DELETE, |
5323 | "s", | |
03c05291 | 5324 | SUBNET_TABLE, |
7ac48069 | 5325 | NULL, |
3c1d412c | 5326 | dsnt_fields, |
5327 | 0, | |
5328 | "snet_id = %d", | |
5329 | 1, | |
29028043 | 5330 | NULL, |
3c1d412c | 5331 | &dsnt_validate, |
5332 | }, | |
5333 | ||
d33e787c | 5334 | { |
5335 | /* Q_GCLU - GET_CLUSTER */ | |
5336 | "get_cluster", | |
5337 | "gclu", | |
c44ddfa7 | 5338 | 2, |
d33e787c | 5339 | RETRIEVE, |
5340 | "c", | |
e688520a | 5341 | CLUSTERS_TABLE, |
03c05291 | 5342 | "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters", |
d33e787c | 5343 | gclu_fields, |
5344 | 6, | |
263a36d4 | 5345 | "name LIKE '%s' AND clu_id != 0", |
d33e787c | 5346 | 1, |
29028043 | 5347 | "name", |
263a36d4 | 5348 | &VDfix_modby, |
d33e787c | 5349 | }, |
5350 | ||
5351 | { | |
45bf7573 | 5352 | /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */ |
d33e787c | 5353 | "add_cluster", |
5354 | "aclu", | |
c44ddfa7 | 5355 | 2, |
d33e787c | 5356 | APPEND, |
5357 | "c", | |
e688520a | 5358 | CLUSTERS_TABLE, |
5eaef520 | 5359 | "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)", |
d33e787c | 5360 | aclu_fields, |
5361 | 3, | |
45bf7573 | 5362 | 0, |
d33e787c | 5363 | 0, |
29028043 | 5364 | NULL, |
d33e787c | 5365 | &aclu_validate, |
5366 | }, | |
5367 | ||
5368 | { | |
5369 | /* Q_UCLU - UPDATE_CLUSTER */ | |
5370 | "update_cluster", | |
5371 | "uclu", | |
c44ddfa7 | 5372 | 2, |
d33e787c | 5373 | UPDATE, |
5374 | "c", | |
e688520a | 5375 | CLUSTERS_TABLE, |
5eaef520 | 5376 | "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))", |
d33e787c | 5377 | uclu_fields, |
5378 | 3, | |
4e5ec77f | 5379 | "clu_id = %d", |
d33e787c | 5380 | 1, |
29028043 | 5381 | NULL, |
d33e787c | 5382 | &uclu_validate, |
5383 | }, | |
5384 | ||
5385 | { | |
5386 | /* Q_DCLU - DELETE_CLUSTER */ | |
5387 | "delete_cluster", | |
5388 | "dclu", | |
c44ddfa7 | 5389 | 2, |
d33e787c | 5390 | DELETE, |
5391 | "c", | |
e688520a | 5392 | CLUSTERS_TABLE, |
7ac48069 | 5393 | NULL, |
d33e787c | 5394 | dclu_fields, |
5395 | 0, | |
4e5ec77f | 5396 | "clu_id = %d", |
d33e787c | 5397 | 1, |
29028043 | 5398 | NULL, |
d33e787c | 5399 | &dclu_validate, |
5400 | }, | |
5401 | ||
5402 | { | |
5eaef520 | 5403 | /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */ |
d33e787c | 5404 | "get_machine_to_cluster_map", |
5405 | "gmcm", | |
c44ddfa7 | 5406 | 2, |
d33e787c | 5407 | RETRIEVE, |
0c345c78 | 5408 | "mcm", |
03c05291 | 5409 | MCMAP_TABLE, |
5410 | "m.name, c.name FROM machine m, clusters c, mcmap mcm", | |
d33e787c | 5411 | gmcm_fields, |
5412 | 2, | |
263a36d4 | 5413 | "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 | 5414 | 2, |
29028043 | 5415 | "m.name", |
263a36d4 | 5416 | NULL, |
d33e787c | 5417 | }, |
5eaef520 | 5418 | |
d33e787c | 5419 | { |
5420 | /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */ | |
5421 | "add_machine_to_cluster", | |
5422 | "amtc", | |
c44ddfa7 | 5423 | 2, |
d33e787c | 5424 | APPEND, |
0c345c78 | 5425 | "mcm", |
03c05291 | 5426 | MCMAP_TABLE, |
4e5ec77f | 5427 | "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)", |
d33e787c | 5428 | gmcm_fields, |
5429 | 2, | |
5430 | 0, | |
5431 | 0, | |
29028043 | 5432 | NULL, |
d33e787c | 5433 | &amtc_validate, |
5434 | }, | |
5435 | ||
5436 | { | |
5437 | /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */ | |
5438 | "delete_machine_from_cluster", | |
5439 | "dmfc", | |
c44ddfa7 | 5440 | 2, |
d33e787c | 5441 | DELETE, |
0c345c78 | 5442 | "mcm", |
03c05291 | 5443 | MCMAP_TABLE, |
d33e787c | 5444 | 0, |
5445 | gmcm_fields, | |
5446 | 0, | |
4e5ec77f | 5447 | "mach_id = %d AND clu_id = %d", |
d33e787c | 5448 | 2, |
29028043 | 5449 | NULL, |
d33e787c | 5450 | &amtc_validate, |
5451 | }, | |
5452 | ||
5453 | { | |
68dd808d | 5454 | /* Q_GCLD - GET_CLUSTER_DATA */ |
d33e787c | 5455 | "get_cluster_data", |
5456 | "gcld", | |
c44ddfa7 | 5457 | 2, |
d33e787c | 5458 | RETRIEVE, |
d33e787c | 5459 | "svc", |
03c05291 | 5460 | SVC_TABLE, |
5461 | "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c", | |
d33e787c | 5462 | gcld_fields, |
5463 | 3, | |
263a36d4 | 5464 | "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'", |
d33e787c | 5465 | 2, |
29028043 | 5466 | "c.name, svc.serv_label", |
263a36d4 | 5467 | NULL, |
d33e787c | 5468 | }, |
5469 | ||
5470 | { | |
5471 | /* Q_ACLD - ADD_CLUSTER_DATA */ | |
5472 | "add_cluster_data", | |
5473 | "acld", | |
c44ddfa7 | 5474 | 2, |
d33e787c | 5475 | APPEND, |
0c345c78 | 5476 | "svc", |
03c05291 | 5477 | SVC_TABLE, |
5eaef520 | 5478 | "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')", |
88343c5e | 5479 | acld_fields, |
d33e787c | 5480 | 3, |
7ac48069 | 5481 | NULL, |
d33e787c | 5482 | 0, |
29028043 | 5483 | NULL, |
d33e787c | 5484 | &acld_validate, |
5485 | }, | |
5486 | ||
5487 | { | |
5488 | /* Q_DCLD - DELETE_CLUSTER_DATA */ | |
5489 | "delete_cluster_data", | |
5490 | "dcld", | |
c44ddfa7 | 5491 | 2, |
d33e787c | 5492 | DELETE, |
0c345c78 | 5493 | "svc", |
03c05291 | 5494 | SVC_TABLE, |
7ac48069 | 5495 | NULL, |
88343c5e | 5496 | acld_fields, |
d33e787c | 5497 | 0, |
5eaef520 | 5498 | "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'", |
d33e787c | 5499 | 3, |
29028043 | 5500 | NULL, |
99e09b48 | 5501 | &dcld_validate, |
d33e787c | 5502 | }, |
5503 | ||
03c05291 | 5504 | { |
44da57b2 | 5505 | /* Q_GLIN - GET_LIST_INFO, v2 */ |
03c05291 | 5506 | "get_list_info", |
5507 | "glin", | |
c44ddfa7 | 5508 | 2, |
03c05291 | 5509 | RETRIEVE, |
263a36d4 | 5510 | "l", |
03c05291 | 5511 | LIST_TABLE, |
ccdbc974 | 5512 | "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 | 5513 | glin2_fields, |
03c05291 | 5514 | 13, |
263a36d4 | 5515 | "name LIKE '%s'", |
5eaef520 | 5516 | 1, |
263a36d4 | 5517 | "name", |
5eaef520 | 5518 | &glin_validate, |
03c05291 | 5519 | }, |
5eaef520 | 5520 | |
44da57b2 | 5521 | { |
5522 | /* Q_GLIN - GET_LIST_INFO, v3 */ | |
5523 | "get_list_info", | |
5524 | "glin", | |
5525 | 3, | |
5526 | RETRIEVE, | |
5527 | "l", | |
5528 | LIST_TABLE, | |
5529 | "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 | 5530 | glin3_fields, |
44da57b2 | 5531 | 14, |
5532 | "name LIKE '%s'", | |
5533 | 1, | |
5534 | "name", | |
5535 | &glin_validate, | |
5536 | }, | |
5537 | ||
59c3208b | 5538 | { |
5539 | /* Q_GLIN - GET_LIST_INFO, v4 */ | |
5540 | "get_list_info", | |
5541 | "glin", | |
5542 | 4, | |
5543 | RETRIEVE, | |
5544 | "l", | |
5545 | LIST_TABLE, | |
5546 | "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 | 5547 | glin4_fields, |
59c3208b | 5548 | 16, |
5549 | "name LIKE '%s'", | |
5550 | 1, | |
5551 | "name", | |
5552 | &glin_validate, | |
5553 | }, | |
5554 | ||
8e3761a2 | 5555 | { |
5556 | /* Q_GLIN - GET_LIST_INFO, v10 */ | |
5557 | "get_list_info", | |
5558 | "glin", | |
5559 | 10, | |
5560 | RETRIEVE, | |
5561 | "l", | |
5562 | LIST_TABLE, | |
5563 | "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", | |
5564 | glin_fields, | |
5565 | 18, | |
5566 | "l.name LIKE '%s' AND m.mach_id = l.mailman_id", | |
5567 | 1, | |
5568 | "l.name", | |
5569 | &glin_validate, | |
5570 | }, | |
5571 | ||
03c05291 | 5572 | { |
5573 | /* Q_EXLN - EXPAND_LIST_NAMES */ | |
5574 | "expand_list_names", | |
5575 | "exln", | |
c44ddfa7 | 5576 | 2, |
03c05291 | 5577 | RETRIEVE, |
5578 | "l", | |
5579 | LIST_TABLE, | |
5580 | "name FROM list", | |
5581 | glin_fields, | |
5582 | 1, | |
263a36d4 | 5583 | "name LIKE '%s' AND list_id != 0", |
03c05291 | 5584 | 1, |
29028043 | 5585 | "name", |
263a36d4 | 5586 | NULL, |
03c05291 | 5587 | }, |
5eaef520 | 5588 | |
03c05291 | 5589 | { |
44da57b2 | 5590 | /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */ |
03c05291 | 5591 | "add_list", |
5592 | "alis", | |
c44ddfa7 | 5593 | 2, |
03c05291 | 5594 | APPEND, |
5595 | "l", | |
5eaef520 | 5596 | LIST_TABLE, |
5597 | "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 | 5598 | alis2_fields, |
03c05291 | 5599 | 10, |
5600 | 0, | |
5601 | 0, | |
29028043 | 5602 | NULL, |
44da57b2 | 5603 | &alis2_validate, |
5604 | }, | |
5605 | ||
5606 | { | |
5607 | /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */ | |
5608 | "add_list", | |
5609 | "alis", | |
5610 | 3, | |
5611 | APPEND, | |
5612 | "l", | |
5613 | LIST_TABLE, | |
5614 | "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 | 5615 | alis3_fields, |
44da57b2 | 5616 | 11, |
5617 | 0, | |
5618 | 0, | |
5619 | NULL, | |
59c3208b | 5620 | &alis3_validate, |
5621 | }, | |
5622 | ||
5623 | { | |
5624 | /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */ | |
5625 | "add_list", | |
5626 | "alis", | |
5627 | 4, | |
5628 | APPEND, | |
5629 | "l", | |
5630 | LIST_TABLE, | |
5631 | "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 | 5632 | alis4_fields, |
59c3208b | 5633 | 13, |
5634 | 0, | |
5635 | 0, | |
5636 | NULL, | |
8e3761a2 | 5637 | &alis4_validate, |
5638 | }, | |
5639 | ||
5640 | { | |
5641 | /* Q_ALIS - ADD_LIST, v10 */ /* uses prefetch_value() for list_id */ | |
5642 | "add_list", | |
5643 | "alis", | |
5644 | 10, | |
5645 | APPEND, | |
5646 | "l", | |
5647 | LIST_TABLE, | |
5648 | "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)", | |
5649 | alis_fields, | |
5650 | 15, | |
5651 | 0, | |
5652 | 0, | |
5653 | NULL, | |
03c05291 | 5654 | &alis_validate, |
5655 | }, | |
5656 | ||
5657 | { | |
44da57b2 | 5658 | /* Q_ULIS - UPDATE_LIST, v2 */ |
03c05291 | 5659 | "update_list", |
5660 | "ulis", | |
c44ddfa7 | 5661 | 2, |
03c05291 | 5662 | UPDATE, |
5663 | "l", | |
5664 | LIST_TABLE, | |
5eaef520 | 5665 | "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 | 5666 | ulis2_fields, |
03c05291 | 5667 | 10, |
5668 | "list_id = %d", | |
5669 | 1, | |
29028043 | 5670 | NULL, |
44da57b2 | 5671 | &ulis2_validate, |
5672 | }, | |
5673 | ||
5674 | { | |
5675 | /* Q_ULIS - UPDATE_LIST, v3 */ | |
5676 | "update_list", | |
5677 | "ulis", | |
5678 | 3, | |
5679 | UPDATE, | |
5680 | "l", | |
5681 | LIST_TABLE, | |
5682 | "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 | 5683 | ulis3_fields, |
44da57b2 | 5684 | 11, |
5685 | "list_id = %d", | |
5686 | 1, | |
5687 | NULL, | |
59c3208b | 5688 | &ulis3_validate, |
5689 | }, | |
5690 | ||
5691 | { | |
5692 | /* Q_ULIS, UPDATE_LIST, v4 */ | |
5693 | "update_list", | |
5694 | "ulis", | |
5695 | 4, | |
5696 | UPDATE, | |
5697 | "l", | |
5698 | LIST_TABLE, | |
5699 | "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 | 5700 | ulis4_fields, |
59c3208b | 5701 | 13, |
5702 | "list_id = %d", | |
5703 | 1, | |
5704 | NULL, | |
8e3761a2 | 5705 | &ulis4_validate, |
5706 | }, | |
5707 | ||
5708 | { | |
5709 | /* Q_ULIS, UPDATE_LIST, v10 */ | |
5710 | "update_list", | |
5711 | "ulis", | |
5712 | 10, | |
5713 | UPDATE, | |
5714 | "l", | |
5715 | LIST_TABLE, | |
5716 | "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))", | |
5717 | ulis_fields, | |
5718 | 15, | |
5719 | "list_id = %d", | |
5720 | 1, | |
5721 | NULL, | |
03c05291 | 5722 | &ulis_validate, |
5723 | }, | |
5724 | ||
5725 | { | |
5726 | /* Q_DLIS - DELETE_LIST */ | |
5727 | "delete_list", | |
5728 | "dlis", | |
c44ddfa7 | 5729 | 2, |
03c05291 | 5730 | DELETE, |
5731 | "l", | |
5732 | LIST_TABLE, | |
7ac48069 | 5733 | NULL, |
03c05291 | 5734 | dlis_fields, |
5735 | 0, | |
5736 | "list_id = %d", | |
5737 | 1, | |
29028043 | 5738 | NULL, |
03c05291 | 5739 | &dlis_validate, |
5740 | }, | |
5741 | ||
5742 | { | |
5743 | /* Q_AMTL - ADD_MEMBER_TO_LIST */ | |
5744 | "add_member_to_list", | |
5745 | "amtl", | |
c44ddfa7 | 5746 | 2, |
03c05291 | 5747 | APPEND, |
5748 | 0, | |
5749 | IMEMBERS_TABLE, | |
5750 | 0, | |
5751 | amtl_fields, | |
5752 | 3, | |
7ac48069 | 5753 | NULL, |
03c05291 | 5754 | 0, |
29028043 | 5755 | NULL, |
03c05291 | 5756 | &amtl_validate, |
5757 | }, | |
5758 | ||
46b6f1f6 | 5759 | { |
5760 | /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */ | |
5761 | "add_tagged_member_to_list", | |
5762 | "atml", | |
c44ddfa7 | 5763 | 2, |
46b6f1f6 | 5764 | APPEND, |
5765 | 0, | |
5766 | IMEMBERS_TABLE, | |
5767 | 0, | |
5768 | atml_fields, | |
5769 | 4, | |
5770 | NULL, | |
5771 | 0, | |
5772 | NULL, | |
5773 | &atml_validate, | |
5774 | }, | |
5775 | ||
5776 | { | |
5777 | /* Q_TMOL - TAG_MEMBER_OF_LIST */ | |
5778 | "tag_member_of_list", | |
5779 | "tmol", | |
c44ddfa7 | 5780 | 2, |
46b6f1f6 | 5781 | UPDATE, |
20541c25 | 5782 | 0, |
46b6f1f6 | 5783 | IMEMBERS_TABLE, |
20541c25 | 5784 | 0, |
46b6f1f6 | 5785 | atml_fields, |
5786 | 1, | |
20541c25 | 5787 | 0, |
46b6f1f6 | 5788 | 3, |
5789 | NULL, | |
5790 | &tmol_validate, | |
5791 | }, | |
5792 | ||
03c05291 | 5793 | { |
5794 | /* Q_DMFL - DELETE_MEMBER_FROM_LIST */ | |
5795 | "delete_member_from_list", | |
5796 | "dmfl", | |
c44ddfa7 | 5797 | 2, |
03c05291 | 5798 | DELETE, |
5799 | 0, | |
5800 | IMEMBERS_TABLE, | |
7ac48069 | 5801 | NULL, |
03c05291 | 5802 | amtl_fields, |
5803 | 0, | |
5804 | 0, | |
5805 | 3, | |
29028043 | 5806 | NULL, |
03c05291 | 5807 | &dmfl_validate, |
5808 | }, | |
5809 | ||
5810 | { | |
5811 | /* Q_GAUS - GET_ACE_USE */ | |
5812 | "get_ace_use", | |
5813 | "gaus", | |
c44ddfa7 | 5814 | 2, |
03c05291 | 5815 | RETRIEVE, |
5816 | 0, | |
5817 | 0, | |
5818 | 0, | |
5819 | gaus_fields, | |
5820 | 2, | |
5821 | 0, | |
5822 | 2, | |
29028043 | 5823 | NULL, |
03c05291 | 5824 | &gaus_validate, |
5825 | }, | |
5826 | ||
d3051625 | 5827 | { |
5828 | /* Q_GHBO - GET_HOST_BY_OWNER */ | |
5829 | "get_host_by_owner", | |
5830 | "ghbo", | |
5831 | 2, | |
5832 | RETRIEVE, | |
5833 | 0, | |
5834 | 0, | |
5835 | 0, | |
5836 | ghbo_fields, | |
5837 | 1, | |
5838 | 0, | |
5839 | 2, | |
5840 | NULL, | |
5841 | &ghbo_validate, | |
5842 | }, | |
5843 | ||
03c05291 | 5844 | { |
5845 | /* Q_QGLI - QUALIFIED_GET_LISTS */ | |
5846 | "qualified_get_lists", | |
5847 | "qgli", | |
c44ddfa7 | 5848 | 2, |
03c05291 | 5849 | RETRIEVE, |
5850 | 0, | |
5851 | LIST_TABLE, | |
5852 | 0, | |
5853 | qgli_fields, | |
5854 | 1, | |
5855 | 0, | |
5856 | 5, | |
29028043 | 5857 | NULL, |
03c05291 | 5858 | &qgli_validate, |
5859 | }, | |
5860 | ||
5861 | { | |
5862 | /* Q_GMOL - GET_MEMBERS_OF_LIST */ | |
5863 | "get_members_of_list", | |
5864 | "gmol", | |
c44ddfa7 | 5865 | 2, |
03c05291 | 5866 | RETRIEVE, |
7ac48069 | 5867 | NULL, |
03c05291 | 5868 | IMEMBERS_TABLE, |
7ac48069 | 5869 | NULL, |
03c05291 | 5870 | gmol_fields, |
5871 | 2, | |
7ac48069 | 5872 | NULL, |
03c05291 | 5873 | 1, |
29028043 | 5874 | NULL, |
03c05291 | 5875 | &gmol_validate, |
5876 | }, | |
5877 | ||
5878 | { | |
5879 | /* Q_GEML - GET_END_MEMBERS_OF_LIST */ | |
5880 | "get_end_members_of_list", | |
5881 | "geml", | |
c44ddfa7 | 5882 | 2, |
03c05291 | 5883 | RETRIEVE, |
7ac48069 | 5884 | NULL, |
03c05291 | 5885 | IMEMBERS_TABLE, |
7ac48069 | 5886 | NULL, |
03c05291 | 5887 | gmol_fields, |
fd8d2149 | 5888 | 2, |
7ac48069 | 5889 | NULL, |
03c05291 | 5890 | 1, |
29028043 | 5891 | NULL, |
46b6f1f6 | 5892 | &gmol_validate, |
5893 | }, | |
5894 | ||
5895 | { | |
5896 | /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */ | |
5897 | "get_tagged_members_of_list", | |
5898 | "gtml", | |
c44ddfa7 | 5899 | 2, |
46b6f1f6 | 5900 | RETRIEVE, |
5901 | NULL, | |
5902 | IMEMBERS_TABLE, | |
5903 | NULL, | |
5904 | gtml_fields, | |
5905 | 3, | |
5906 | NULL, | |
5907 | 1, | |
5908 | NULL, | |
5909 | &gmol_validate, | |
03c05291 | 5910 | }, |
5eaef520 | 5911 | |
03c05291 | 5912 | { |
5913 | /* Q_GLOM - GET_LISTS_OF_MEMBER */ | |
5914 | "get_lists_of_member", | |
5915 | "glom", | |
c44ddfa7 | 5916 | 2, |
03c05291 | 5917 | RETRIEVE, |
5918 | 0, | |
5919 | IMEMBERS_TABLE, | |
5920 | 0, | |
5921 | glom_fields, | |
5922 | 6, | |
5923 | 0, | |
5924 | 2, | |
29028043 | 5925 | NULL, |
03c05291 | 5926 | &glom_validate, |
5927 | }, | |
5928 | ||
5929 | { | |
5930 | /* Q_CMOL - COUNT_MEMBERS_OF_LIST */ | |
5931 | "count_members_of_list", | |
5932 | "cmol", | |
c44ddfa7 | 5933 | 2, |
03c05291 | 5934 | RETRIEVE, |
5935 | 0, | |
5936 | IMEMBERS_TABLE, | |
5937 | 0, | |
5938 | cmol_fields, | |
5939 | 1, | |
5940 | 0, | |
5941 | 1, | |
29028043 | 5942 | NULL, |
03c05291 | 5943 | &cmol_validate, |
5944 | }, | |
5945 | ||
d33e787c | 5946 | { |
5947 | /* Q_GSIN - GET_SERVER_INFO */ | |
5948 | "get_server_info", | |
5949 | "gsin", | |
c44ddfa7 | 5950 | 2, |
d33e787c | 5951 | RETRIEVE, |
5952 | "s", | |
03c05291 | 5953 | SERVERS_TABLE, |
5954 | "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 | 5955 | gsin_fields, |
7ac4c1b1 | 5956 | 16, |
263a36d4 | 5957 | "name LIKE UPPER('%s')", |
d33e787c | 5958 | 1, |
29028043 | 5959 | "name", |
d33e787c | 5960 | &gsin_validate, |
5961 | }, | |
5962 | ||
5963 | { | |
5964 | /* Q_QGSV - QUALIFIED_GET_SERVER */ | |
5965 | "qualified_get_server", | |
5966 | "qgsv", | |
c44ddfa7 | 5967 | 2, |
d33e787c | 5968 | RETRIEVE, |
5969 | 0, | |
03c05291 | 5970 | SERVERS_TABLE, |
d33e787c | 5971 | 0, |
5972 | qgsv_fields, | |
5973 | 1, | |
5974 | 0, | |
5975 | 3, | |
29028043 | 5976 | NULL, |
d33e787c | 5977 | &qgsv_validate, |
5978 | }, | |
5979 | ||
5980 | { | |
5981 | /* Q_ASIN - ADD_SERVER_INFO */ | |
5982 | "add_server_info", | |
5983 | "asin", | |
c44ddfa7 | 5984 | 2, |
d33e787c | 5985 | APPEND, |
5986 | "s", | |
03c05291 | 5987 | SERVERS_TABLE, |
5eaef520 | 5988 | "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 | 5989 | asin_fields, |
5990 | 8, | |
7ac48069 | 5991 | NULL, |
d33e787c | 5992 | 0, |
29028043 | 5993 | NULL, |
d33e787c | 5994 | &asin_validate, |
5995 | }, | |
5996 | ||
5997 | { | |
5998 | /* Q_USIN - UPDATE_SERVER_INFO */ | |
5999 | "update_server_info", | |
6000 | "usin", | |
c44ddfa7 | 6001 | 2, |
d33e787c | 6002 | UPDATE, |
6003 | "s", | |
03c05291 | 6004 | SERVERS_TABLE, |
4e5ec77f | 6005 | "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d", |
d33e787c | 6006 | asin_fields, |
6007 | 7, | |
03c05291 | 6008 | "name = UPPER('%s')", |
d33e787c | 6009 | 1, |
29028043 | 6010 | NULL, |
d33e787c | 6011 | &asin_validate, |
6012 | }, | |
6013 | ||
6014 | { | |
6015 | /* Q_RSVE - RESET_SERVER_ERROR */ | |
6016 | "reset_server_error", | |
6017 | "rsve", | |
c44ddfa7 | 6018 | 2, |
d33e787c | 6019 | UPDATE, |
6020 | "s", | |
03c05291 | 6021 | SERVERS_TABLE, |
4e5ec77f | 6022 | "servers SET harderror = 0, dfcheck = dfgen", |
d33e787c | 6023 | dsin_fields, |
6024 | 0, | |
03c05291 | 6025 | "name = UPPER('%s')", |
d33e787c | 6026 | 1, |
29028043 | 6027 | NULL, |
d33e787c | 6028 | &rsve_validate, |
6029 | }, | |
6030 | ||
6031 | { | |
6032 | /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */ | |
6033 | "set_server_internal_flags", | |
6034 | "ssif", | |
c44ddfa7 | 6035 | 2, |
d33e787c | 6036 | UPDATE, |
6037 | "s", | |
03c05291 | 6038 | SERVERS_TABLE, |
5eaef520 | 6039 | "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))", |
d33e787c | 6040 | ssif_fields, |
7ac4c1b1 | 6041 | 5, |
03c05291 | 6042 | "name = UPPER('%s')", |
d33e787c | 6043 | 1, |
29028043 | 6044 | NULL, |
d33e787c | 6045 | &ssif_validate, |
6046 | }, | |
6047 | ||
6048 | { | |
6049 | /* Q_DSIN - DELETE_SERVER_INFO */ | |
6050 | "delete_server_info", | |
6051 | "dsin", | |
c44ddfa7 | 6052 | 2, |
d33e787c | 6053 | DELETE, |
6054 | "s", | |
03c05291 | 6055 | SERVERS_TABLE, |
7ac48069 | 6056 | NULL, |
d33e787c | 6057 | dsin_fields, |
6058 | 0, | |
03c05291 | 6059 | "name = UPPER('%s')", |
d33e787c | 6060 | 1, |
29028043 | 6061 | NULL, |
d33e787c | 6062 | &dsin_validate, |
6063 | }, | |
6064 | ||
6065 | { | |
5eaef520 | 6066 | /* Q_GSHI - GET_SERVER_HOST_INFO */ |
d33e787c | 6067 | "get_server_host_info", |
6068 | "gshi", | |
c44ddfa7 | 6069 | 2, |
d33e787c | 6070 | RETRIEVE, |
6071 | "sh", | |
03c05291 | 6072 | SERVERHOSTS_TABLE, |
6073 | "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 | 6074 | gshi_fields, |
6075 | 16, | |
263a36d4 | 6076 | "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id", |
d33e787c | 6077 | 2, |
29028043 | 6078 | "sh.service, m.name", |
d33e787c | 6079 | &gshi_validate, |
6080 | }, | |
6081 | ||
6082 | { | |
135dcb80 | 6083 | /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */ |
d33e787c | 6084 | "qualified_get_server_host", |
6085 | "qgsh", | |
c44ddfa7 | 6086 | 2, |
d33e787c | 6087 | RETRIEVE, |
135dcb80 | 6088 | 0, |
03c05291 | 6089 | SERVERHOSTS_TABLE, |
d33e787c | 6090 | 0, |
6091 | qgsh_fields, | |
6092 | 2, | |
6093 | 0, | |
6094 | 6, | |
29028043 | 6095 | NULL, |
d33e787c | 6096 | &qgsh_validate, |
6097 | }, | |
6098 | ||
6099 | { | |
6100 | /* Q_ASHI - ADD_SERVER_HOST_INFO */ | |
6101 | "add_server_host_info", | |
6102 | "ashi", | |
c44ddfa7 | 6103 | 2, |
d33e787c | 6104 | APPEND, |
6105 | "sh", | |
03c05291 | 6106 | SERVERHOSTS_TABLE, |
5eaef520 | 6107 | "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))", |
d33e787c | 6108 | ashi_fields, |
6109 | 6, | |
7ac48069 | 6110 | NULL, |
d33e787c | 6111 | 0, |
29028043 | 6112 | NULL, |
d33e787c | 6113 | &ashi_validate, |
6114 | }, | |
6115 | ||
6116 | { | |
6117 | /* Q_USHI - UPDATE_SERVER_HOST_INFO */ | |
6118 | "update_server_host_info", | |
6119 | "ushi", | |
c44ddfa7 | 6120 | 2, |
d33e787c | 6121 | UPDATE, |
6122 | "sh", | |
03c05291 | 6123 | SERVERHOSTS_TABLE, |
5eaef520 | 6124 | "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))", |
d33e787c | 6125 | ashi_fields, |
6126 | 4, | |
03c05291 | 6127 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 6128 | 2, |
29028043 | 6129 | NULL, |
d33e787c | 6130 | &ashi_validate, |
6131 | }, | |
6132 | ||
6133 | { | |
6134 | /* Q_RSHE - RESET_SERVER_HOST_ERROR */ | |
6135 | "reset_server_host_error", | |
6136 | "rshe", | |
c44ddfa7 | 6137 | 2, |
d33e787c | 6138 | UPDATE, |
6139 | "sh", | |
03c05291 | 6140 | SERVERHOSTS_TABLE, |
4e5ec77f | 6141 | "serverhosts SET hosterror = 0", |
d33e787c | 6142 | dshi_fields, |
6143 | 0, | |
03c05291 | 6144 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 6145 | 2, |
29028043 | 6146 | NULL, |
d33e787c | 6147 | &rshe_validate, |
6148 | }, | |
6149 | ||
6150 | { | |
6151 | /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */ | |
6152 | "set_server_host_override", | |
6153 | "ssho", | |
c44ddfa7 | 6154 | 2, |
d33e787c | 6155 | UPDATE, |
6156 | "sh", | |
03c05291 | 6157 | SERVERHOSTS_TABLE, |
4e5ec77f | 6158 | "serverhosts SET override = 1", |
d33e787c | 6159 | dshi_fields, |
6160 | 0, | |
03c05291 | 6161 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 6162 | 2, |
29028043 | 6163 | NULL, |
d33e787c | 6164 | &ssho_validate, |
6165 | }, | |
6166 | ||
6167 | { | |
e41960ac | 6168 | /* Q_SSHI - SET_SERVER_HOST_INTERNAL */ |
d33e787c | 6169 | "set_server_host_internal", |
6170 | "sshi", | |
c44ddfa7 | 6171 | 2, |
d33e787c | 6172 | UPDATE, |
7ac4c1b1 | 6173 | "s", |
03c05291 | 6174 | SERVERHOSTS_TABLE, |
5eaef520 | 6175 | "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s", |
d33e787c | 6176 | sshi_fields, |
6177 | 7, | |
5eaef520 | 6178 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 6179 | 2, |
29028043 | 6180 | NULL, |
d33e787c | 6181 | &sshi_validate, |
6182 | }, | |
6183 | ||
6184 | { | |
03c05291 | 6185 | /* Q_DSHI - DELETE_SERVER_HOST_INFO */ |
6186 | "delete_server_host_info", | |
6187 | "dshi", | |
c44ddfa7 | 6188 | 2, |
d33e787c | 6189 | DELETE, |
03c05291 | 6190 | "sh", |
6191 | SERVERHOSTS_TABLE, | |
7ac48069 | 6192 | NULL, |
03c05291 | 6193 | dshi_fields, |
d33e787c | 6194 | 0, |
03c05291 | 6195 | "service = UPPER('%s') AND mach_id = %d", |
6196 | 2, | |
29028043 | 6197 | NULL, |
03c05291 | 6198 | &dshi_validate, |
d33e787c | 6199 | }, |
6200 | ||
6201 | { | |
5eaef520 | 6202 | /* Q_GSLO - GET_SERVER_LOCATIONS */ |
d33e787c | 6203 | "get_server_locations", |
6204 | "gslo", | |
c44ddfa7 | 6205 | 2, |
d33e787c | 6206 | RETRIEVE, |
6207 | "sh", | |
03c05291 | 6208 | SERVERHOSTS_TABLE, |
6209 | "sh.service, m.name FROM serverhosts sh, machine m", | |
d33e787c | 6210 | gslo_fields, |
6211 | 2, | |
263a36d4 | 6212 | "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id", |
d33e787c | 6213 | 1, |
29028043 | 6214 | "sh.service, m.name", |
263a36d4 | 6215 | NULL, |
d33e787c | 6216 | }, |
6217 | ||
6218 | { | |
5eaef520 | 6219 | /* Q_GFSL - GET_FILESYS_BY_LABEL */ |
d33e787c | 6220 | "get_filesys_by_label", |
6221 | "gfsl", | |
c44ddfa7 | 6222 | 2, |
d33e787c | 6223 | RETRIEVE, |
6224 | "fs", | |
03c05291 | 6225 | FILESYS_TABLE, |
6226 | "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 | 6227 | gfsl_fields, |
6228 | 14, | |
263a36d4 | 6229 | "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 6230 | 1, |
29028043 | 6231 | "fs.label", |
5a8887d8 | 6232 | &gfsl_validate, |
d33e787c | 6233 | }, |
6234 | ||
6235 | { | |
5eaef520 | 6236 | /* Q_GFSM - GET_FILESYS_BY_MACHINE */ |
d33e787c | 6237 | "get_filesys_by_machine", |
6238 | "gfsm", | |
c44ddfa7 | 6239 | 2, |
d33e787c | 6240 | RETRIEVE, |
6241 | "fs", | |
03c05291 | 6242 | FILESYS_TABLE, |
6243 | "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 | 6244 | gfsm_fields, |
6245 | 14, | |
4e5ec77f | 6246 | "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 6247 | 1, |
29028043 | 6248 | "fs.label", |
d33e787c | 6249 | &gfsm_validate, |
6250 | }, | |
6251 | ||
88343c5e | 6252 | { |
5eaef520 | 6253 | /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */ |
88343c5e | 6254 | "get_filesys_by_nfsphys", |
6255 | "gfsn", | |
c44ddfa7 | 6256 | 2, |
88343c5e | 6257 | RETRIEVE, |
6258 | "fs", | |
03c05291 | 6259 | FILESYS_TABLE, |
6260 | "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 | 6261 | gfsn_fields, |
6262 | 14, | |
cc1bca5c | 6263 | "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 | 6264 | 2, |
29028043 | 6265 | "fs.label", |
99e09b48 | 6266 | &gfsn_validate, |
88343c5e | 6267 | }, |
6268 | ||
d33e787c | 6269 | { |
5eaef520 | 6270 | /* Q_GFSG - GET_FILESYS_BY_GROUP */ |
d33e787c | 6271 | "get_filesys_by_group", |
6272 | "gfsg", | |
c44ddfa7 | 6273 | 2, |
d33e787c | 6274 | RETRIEVE, |
6275 | "fs", | |
03c05291 | 6276 | FILESYS_TABLE, |
6277 | "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 | 6278 | gfsg_fields, |
6279 | 14, | |
4e5ec77f | 6280 | "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 6281 | 1, |
29028043 | 6282 | "fs.label", |
d33e787c | 6283 | &gfsg_validate, |
6284 | }, | |
6285 | ||
4ffa124a | 6286 | { |
76f86976 | 6287 | /* Q_GFSP - GET_FILESYS_BY_PATH */ |
4ffa124a | 6288 | "get_filesys_by_path", |
6289 | "gfsp", | |
c44ddfa7 | 6290 | 2, |
4ffa124a | 6291 | RETRIEVE, |
6292 | "fs", | |
03c05291 | 6293 | FILESYS_TABLE, |
6294 | "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 | 6295 | gfsp_fields, |
6296 | 14, | |
263a36d4 | 6297 | "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id", |
4ffa124a | 6298 | 1, |
29028043 | 6299 | "fs.label", |
263a36d4 | 6300 | &VDfix_modby, |
4ffa124a | 6301 | }, |
5eaef520 | 6302 | |
d33e787c | 6303 | { |
45bf7573 | 6304 | /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */ |
d33e787c | 6305 | "add_filesys", |
6306 | "afil", | |
c44ddfa7 | 6307 | 2, |
d33e787c | 6308 | APPEND, |
6309 | "fs", | |
03c05291 | 6310 | FILESYS_TABLE, |
d4296047 | 6311 | "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 | 6312 | afil_fields, |
6313 | 11, | |
45bf7573 | 6314 | 0, |
d33e787c | 6315 | 0, |
29028043 | 6316 | NULL, |
d33e787c | 6317 | &afil_validate, |
6318 | }, | |
6319 | ||
6320 | { | |
6321 | /* Q_UFIL - UPDATE_FILESYS */ | |
6322 | "update_filesys", | |
6323 | "ufil", | |
c44ddfa7 | 6324 | 2, |
d33e787c | 6325 | UPDATE, |
6326 | "fs", | |
03c05291 | 6327 | FILESYS_TABLE, |
d4296047 | 6328 | "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 | 6329 | ufil_fields, |
6330 | 11, | |
4e5ec77f | 6331 | "filsys_id = %d", |
d33e787c | 6332 | 1, |
29028043 | 6333 | NULL, |
5eaef520 | 6334 | &ufil_validate, |
d33e787c | 6335 | }, |
6336 | ||
6337 | { | |
6338 | /* Q_DFIL - DELETE_FILESYS */ | |
6339 | "delete_filesys", | |
6340 | "dfil", | |
c44ddfa7 | 6341 | 2, |
d33e787c | 6342 | DELETE, |
6343 | "fs", | |
03c05291 | 6344 | FILESYS_TABLE, |
7ac48069 | 6345 | NULL, |
d33e787c | 6346 | dfil_fields, |
6347 | 0, | |
4e5ec77f | 6348 | "filsys_id = %d", |
d33e787c | 6349 | 1, |
29028043 | 6350 | NULL, |
d33e787c | 6351 | &dfil_validate, |
6352 | }, | |
6353 | ||
95127ba8 | 6354 | { |
5eaef520 | 6355 | /* Q_GFGM - GET_FSGROUP_MEMBERS */ |
95127ba8 | 6356 | "get_fsgroup_members", |
6357 | "gfgm", | |
c44ddfa7 | 6358 | 2, |
95127ba8 | 6359 | RETRIEVE, |
6360 | "fg", | |
03c05291 | 6361 | FSGROUP_TABLE, |
6362 | "fs.label, fg.key FROM fsgroup fg, filesys fs", | |
95127ba8 | 6363 | gfgm_fields, |
6364 | 2, | |
4e5ec77f | 6365 | "fg.group_id = %d AND fs.filsys_id = fg.filsys_id", |
95127ba8 | 6366 | 1, |
29028043 | 6367 | "fs.label, fg.key", |
95127ba8 | 6368 | &gfgm_validate, |
6369 | }, | |
6370 | ||
6371 | { | |
76f86976 | 6372 | /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */ |
95127ba8 | 6373 | "add_filesys_to_fsgroup", |
6374 | "aftg", | |
c44ddfa7 | 6375 | 2, |
95127ba8 | 6376 | APPEND, |
6377 | "fg", | |
03c05291 | 6378 | FSGROUP_TABLE, |
5eaef520 | 6379 | "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')", |
95127ba8 | 6380 | gfgm_fields, |
76f86976 | 6381 | 3, |
7ac48069 | 6382 | NULL, |
76f86976 | 6383 | 0, |
29028043 | 6384 | NULL, |
95127ba8 | 6385 | &aftg_validate, |
6386 | }, | |
6387 | ||
6388 | { | |
6389 | /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */ | |
6390 | "remove_filesys_from_fsgroup", | |
6391 | "rffg", | |
c44ddfa7 | 6392 | 2, |
95127ba8 | 6393 | DELETE, |
6394 | "fg", | |
03c05291 | 6395 | FSGROUP_TABLE, |
7ac48069 | 6396 | NULL, |
95127ba8 | 6397 | gfgm_fields, |
6398 | 0, | |
4e5ec77f | 6399 | "group_id = %d AND filsys_id = %d", |
95127ba8 | 6400 | 2, |
29028043 | 6401 | NULL, |
95127ba8 | 6402 | &aftg_validate, |
6403 | }, | |
6404 | ||
d33e787c | 6405 | { |
5eaef520 | 6406 | /* Q_GANF - GET_ALL_NFSPHYS */ |
d33e787c | 6407 | "get_all_nfsphys", |
6408 | "ganf", | |
c44ddfa7 | 6409 | 2, |
d33e787c | 6410 | RETRIEVE, |
6411 | "np", | |
03c05291 | 6412 | NFSPHYS_TABLE, |
6413 | "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 | 6414 | ganf_fields, |
6415 | 9, | |
4e5ec77f | 6416 | "m.mach_id = np.mach_id", |
d33e787c | 6417 | 0, |
29028043 | 6418 | "m.name, np.dir", |
6419 | &VDfix_modby, | |
d33e787c | 6420 | }, |
6421 | ||
6422 | { | |
5eaef520 | 6423 | /* Q_GNFP - GET_NFSPHYS */ |
d33e787c | 6424 | "get_nfsphys", |
6425 | "gnfp", | |
c44ddfa7 | 6426 | 2, |
d33e787c | 6427 | RETRIEVE, |
6428 | "np", | |
03c05291 | 6429 | NFSPHYS_TABLE, |
6430 | "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 | 6431 | gnfp_fields, |
6432 | 9, | |
263a36d4 | 6433 | "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id", |
d33e787c | 6434 | 2, |
29028043 | 6435 | "m.name, np.dir", |
d33e787c | 6436 | &gnfp_validate, |
6437 | }, | |
6438 | ||
6439 | { | |
45bf7573 | 6440 | /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */ |
d33e787c | 6441 | "add_nfsphys", |
6442 | "anfp", | |
c44ddfa7 | 6443 | 2, |
d33e787c | 6444 | APPEND, |
6445 | "np", | |
03c05291 | 6446 | NFSPHYS_TABLE, |
5eaef520 | 6447 | "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)", |
d33e787c | 6448 | ganf_fields, |
6449 | 6, | |
45bf7573 | 6450 | 0, |
d33e787c | 6451 | 0, |
29028043 | 6452 | NULL, |
d33e787c | 6453 | &anfp_validate, |
6454 | }, | |
6455 | ||
6456 | { | |
6457 | /* Q_UNFP - UPDATE_NFSPHYS */ | |
6458 | "update_nfsphys", | |
6459 | "unfp", | |
c44ddfa7 | 6460 | 2, |
d33e787c | 6461 | UPDATE, |
6462 | "np", | |
03c05291 | 6463 | NFSPHYS_TABLE, |
5eaef520 | 6464 | "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s", |
135dcb80 | 6465 | ganf_fields, |
d33e787c | 6466 | 4, |
5eaef520 | 6467 | "mach_id = %d AND dir = '%s'", |
d33e787c | 6468 | 2, |
29028043 | 6469 | NULL, |
45bf7573 | 6470 | &unfp_validate, |
d33e787c | 6471 | }, |
6472 | ||
6473 | { | |
6474 | /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */ | |
6475 | "adjust_nfsphys_allocation", | |
6476 | "ajnf", | |
c44ddfa7 | 6477 | 2, |
d33e787c | 6478 | UPDATE, |
6479 | "np", | |
03c05291 | 6480 | NFSPHYS_TABLE, |
4e5ec77f | 6481 | "nfsphys SET allocated = allocated + %s", |
99e09b48 | 6482 | ajnf_fields, |
d33e787c | 6483 | 1, |
4e5ec77f | 6484 | "mach_id = %d AND dir = '%s'", |
d33e787c | 6485 | 2, |
29028043 | 6486 | NULL, |
f802fd0d | 6487 | &ajnf_validate, |
d33e787c | 6488 | }, |
6489 | ||
6490 | { | |
6491 | /* Q_DNFP - DELETE_NFSPHYS */ | |
6492 | "delete_nfsphys", | |
6493 | "dnfp", | |
c44ddfa7 | 6494 | 2, |
d33e787c | 6495 | DELETE, |
6496 | "np", | |
03c05291 | 6497 | NFSPHYS_TABLE, |
7ac48069 | 6498 | NULL, |
d33e787c | 6499 | dnfp_fields, |
6500 | 0, | |
4e5ec77f | 6501 | "mach_id = %d AND dir = '%s'", |
d33e787c | 6502 | 2, |
29028043 | 6503 | NULL, |
d33e787c | 6504 | &dnfp_validate, |
6505 | }, | |
6506 | ||
368be132 | 6507 | { |
5eaef520 | 6508 | /* Q_GQOT - GET_QUOTA */ |
368be132 | 6509 | "get_quota", |
6510 | "gqot", | |
c44ddfa7 | 6511 | 2, |
368be132 | 6512 | RETRIEVE, |
6513 | "q", | |
03c05291 | 6514 | QUOTA_TABLE, |
6515 | "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 | 6516 | gqot_fields, |
6517 | 9, | |
263a36d4 | 6518 | "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 | 6519 | 3, |
29028043 | 6520 | NULL, |
368be132 | 6521 | &gqot_validate, |
6522 | }, | |
6523 | ||
6524 | { | |
5eaef520 | 6525 | /* Q_GQBF - GET_QUOTA_BY_FILESYS */ |
368be132 | 6526 | "get_quota_by_filesys", |
6527 | "gqbf", | |
c44ddfa7 | 6528 | 2, |
368be132 | 6529 | RETRIEVE, |
6530 | "q", | |
03c05291 | 6531 | QUOTA_TABLE, |
6532 | "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 | 6533 | gqbf_fields, |
6534 | 9, | |
263a36d4 | 6535 | "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id", |
368be132 | 6536 | 1, |
29028043 | 6537 | "fs.label, q.type", |
368be132 | 6538 | &gqbf_validate, |
6539 | }, | |
6540 | ||
6541 | { | |
135dcb80 | 6542 | /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */ |
368be132 | 6543 | "add_quota", |
6544 | "aqot", | |
c44ddfa7 | 6545 | 2, |
368be132 | 6546 | APPEND, |
135dcb80 | 6547 | 0, |
03c05291 | 6548 | QUOTA_TABLE, |
135dcb80 | 6549 | "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)", |
368be132 | 6550 | aqot_fields, |
135dcb80 | 6551 | 4, |
7ac48069 | 6552 | NULL, |
76f86976 | 6553 | 0, |
29028043 | 6554 | NULL, |
368be132 | 6555 | &aqot_validate, |
6556 | }, | |
6557 | ||
6558 | { | |
6559 | /* Q_UQOT - UPDATE_QUOTA */ | |
6560 | "update_quota", | |
6561 | "uqot", | |
c44ddfa7 | 6562 | 2, |
368be132 | 6563 | UPDATE, |
135dcb80 | 6564 | 0, |
03c05291 | 6565 | QUOTA_TABLE, |
4e5ec77f | 6566 | "quota SET quota = %s", |
368be132 | 6567 | aqot_fields, |
6568 | 1, | |
135dcb80 | 6569 | 0, |
368be132 | 6570 | 3, |
29028043 | 6571 | NULL, |
368be132 | 6572 | &uqot_validate, |
6573 | }, | |
6574 | ||
6575 | { | |
6576 | /* Q_DQOT - DELETE_QUOTA */ | |
6577 | "delete_quota", | |
6578 | "dqot", | |
c44ddfa7 | 6579 | 2, |
368be132 | 6580 | DELETE, |
135dcb80 | 6581 | 0, |
03c05291 | 6582 | QUOTA_TABLE, |
7ac48069 | 6583 | NULL, |
368be132 | 6584 | aqot_fields, |
6585 | 0, | |
135dcb80 | 6586 | 0, |
368be132 | 6587 | 3, |
29028043 | 6588 | NULL, |
368be132 | 6589 | &dqot_validate, |
6590 | }, | |
6591 | ||
d33e787c | 6592 | { |
5eaef520 | 6593 | /* Q_GNFQ - GET_NFS_QUOTAS */ |
88343c5e | 6594 | "get_nfs_quota", |
d33e787c | 6595 | "gnfq", |
c44ddfa7 | 6596 | 2, |
d33e787c | 6597 | RETRIEVE, |
368be132 | 6598 | "q", |
03c05291 | 6599 | QUOTA_TABLE, |
6600 | "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 | 6601 | gnfq_fields, |
6602 | 8, | |
263a36d4 | 6603 | "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 | 6604 | 2, |
29028043 | 6605 | "fs.label, u.login", |
d33e787c | 6606 | &gnfq_validate, |
6607 | }, | |
6608 | ||
6609 | { | |
5eaef520 | 6610 | /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */ |
d33e787c | 6611 | "get_nfs_quotas_by_partition", |
6612 | "gnqp", | |
c44ddfa7 | 6613 | 2, |
d33e787c | 6614 | RETRIEVE, |
368be132 | 6615 | "q", |
03c05291 | 6616 | QUOTA_TABLE, |
6617 | "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m", | |
d33e787c | 6618 | gnqp_fields, |
6619 | 5, | |
263a36d4 | 6620 | "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 | 6621 | 2, |
29028043 | 6622 | "fs.label", |
263a36d4 | 6623 | NULL, |
d33e787c | 6624 | }, |
6625 | ||
d33e787c | 6626 | { |
135dcb80 | 6627 | /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */ |
d33e787c | 6628 | "add_nfs_quota", |
6629 | "anfq", | |
c44ddfa7 | 6630 | 2, |
d33e787c | 6631 | APPEND, |
135dcb80 | 6632 | 0, |
03c05291 | 6633 | QUOTA_TABLE, |
135dcb80 | 6634 | "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)", |
d33e787c | 6635 | anfq_fields, |
135dcb80 | 6636 | 3, |
7ac48069 | 6637 | NULL, |
76f86976 | 6638 | 0, |
29028043 | 6639 | NULL, |
d33e787c | 6640 | &anfq_validate, |
6641 | }, | |
6642 | ||
6643 | { | |
5eaef520 | 6644 | /* Q_UNFQ - UPDATE_NFS_QUOTA */ |
d33e787c | 6645 | "update_nfs_quota", |
6646 | "unfq", | |
c44ddfa7 | 6647 | 2, |
d33e787c | 6648 | UPDATE, |
135dcb80 | 6649 | 0, |
03c05291 | 6650 | QUOTA_TABLE, |
4e5ec77f | 6651 | "quota SET quota = %s", |
d33e787c | 6652 | anfq_fields, |
6653 | 1, | |
135dcb80 | 6654 | 0, |
d33e787c | 6655 | 2, |
29028043 | 6656 | NULL, |
d33e787c | 6657 | &unfq_validate, |
6658 | }, | |
6659 | ||
6660 | { | |
6661 | /* Q_DNFQ - DELETE_NFS_QUOTA */ | |
6662 | "delete_nfs_quota", | |
6663 | "dnfq", | |
c44ddfa7 | 6664 | 2, |
d33e787c | 6665 | DELETE, |
135dcb80 | 6666 | 0, |
03c05291 | 6667 | QUOTA_TABLE, |
7ac48069 | 6668 | NULL, |
d33e787c | 6669 | anfq_fields, |
6670 | 0, | |
135dcb80 | 6671 | 0, |
d33e787c | 6672 | 2, |
29028043 | 6673 | NULL, |
d33e787c | 6674 | &dnfq_validate, |
6675 | }, | |
6676 | ||
d33e787c | 6677 | { |
d7ddc011 | 6678 | /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */ |
d33e787c | 6679 | "get_zephyr_class", |
6680 | "gzcl", | |
c44ddfa7 | 6681 | 2, |
d33e787c | 6682 | RETRIEVE, |
6683 | "z", | |
03c05291 | 6684 | ZEPHYR_TABLE, |
6685 | "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 | 6686 | gzcl2_fields, |
d33e787c | 6687 | 12, |
263a36d4 | 6688 | "class LIKE '%s'", |
d33e787c | 6689 | 1, |
29028043 | 6690 | "class", |
d33e787c | 6691 | &gzcl_validate, |
03c05291 | 6692 | }, |
d33e787c | 6693 | |
6694 | { | |
d7ddc011 | 6695 | /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */ |
6696 | "get_zephyr_class", | |
6697 | "gzcl", | |
6698 | 5, | |
6699 | RETRIEVE, | |
6700 | "z", | |
6701 | ZEPHYR_TABLE, | |
6702 | "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", | |
6703 | gzcl_fields, | |
6704 | 14, | |
6705 | "class LIKE '%s'", | |
6706 | 1, | |
6707 | "class", | |
6708 | &gzcl_validate, | |
6709 | }, | |
6710 | ||
6711 | { | |
6712 | /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */ | |
d33e787c | 6713 | "add_zephyr_class", |
6714 | "azcl", | |
c44ddfa7 | 6715 | 2, |
d33e787c | 6716 | APPEND, |
6717 | "z", | |
03c05291 | 6718 | ZEPHYR_TABLE, |
5eaef520 | 6719 | "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 | 6720 | azcl2_fields, |
d33e787c | 6721 | 9, |
6722 | 0, | |
6723 | 0, | |
29028043 | 6724 | NULL, |
d7ddc011 | 6725 | &azcl2_validate, |
6726 | }, | |
6727 | ||
6728 | { | |
6729 | /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */ | |
6730 | "add_zephyr_class", | |
6731 | "azcl", | |
6732 | 5, | |
6733 | APPEND, | |
6734 | "z", | |
6735 | ZEPHYR_TABLE, | |
6736 | "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)", | |
6737 | azcl_fields, | |
6738 | 11, | |
6739 | 0, | |
6740 | 0, | |
6741 | NULL, | |
d33e787c | 6742 | &azcl_validate, |
5eaef520 | 6743 | }, |
d33e787c | 6744 | |
6745 | { | |
d7ddc011 | 6746 | /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */ |
d33e787c | 6747 | "update_zephyr_class", |
6748 | "uzcl", | |
c44ddfa7 | 6749 | 2, |
d33e787c | 6750 | UPDATE, |
6751 | "z", | |
03c05291 | 6752 | ZEPHYR_TABLE, |
135dcb80 | 6753 | "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 | 6754 | uzcl2_fields, |
d33e787c | 6755 | 9, |
99e09b48 | 6756 | "class = '%s'", |
d33e787c | 6757 | 1, |
29028043 | 6758 | NULL, |
d7ddc011 | 6759 | &uzcl2_validate, |
6760 | }, | |
6761 | ||
6762 | { | |
6763 | /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */ | |
6764 | "update_zephyr_class", | |
6765 | "uzcl", | |
6766 | 5, | |
6767 | UPDATE, | |
6768 | "z", | |
6769 | ZEPHYR_TABLE, | |
6770 | "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", | |
6771 | uzcl_fields, | |
6772 | 11, | |
6773 | "class = '%s'", | |
6774 | 1, | |
6775 | NULL, | |
d33e787c | 6776 | &uzcl_validate, |
5eaef520 | 6777 | }, |
d33e787c | 6778 | |
6779 | { | |
6780 | /* Q_DZCL - DELETE_ZEPHYR_CLASS */ | |
6781 | "delete_zephyr_class", | |
6782 | "dzcl", | |
c44ddfa7 | 6783 | 2, |
d33e787c | 6784 | DELETE, |
6785 | "z", | |
03c05291 | 6786 | ZEPHYR_TABLE, |
d33e787c | 6787 | 0, |
6788 | uzcl_fields, | |
6789 | 0, | |
99e09b48 | 6790 | "class = '%s'", |
d33e787c | 6791 | 1, |
29028043 | 6792 | NULL, |
d33e787c | 6793 | &dzcl_validate, |
5eaef520 | 6794 | }, |
fd5b2340 | 6795 | |
03c05291 | 6796 | { |
5eaef520 | 6797 | /* Q_GSHA - GET_SERVER_HOST_ACCESS */ |
03c05291 | 6798 | "get_server_host_access", |
6799 | "gsha", | |
c44ddfa7 | 6800 | 2, |
03c05291 | 6801 | RETRIEVE, |
6802 | "ha", | |
6803 | HOSTACCESS_TABLE, | |
6804 | "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", | |
6805 | gsha_fields, | |
6806 | 6, | |
263a36d4 | 6807 | "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id", |
03c05291 | 6808 | 1, |
29028043 | 6809 | "m.name", |
03c05291 | 6810 | &gsha_validate, |
6811 | }, | |
6812 | ||
6813 | { | |
6814 | /* Q_ASHA - ADD_SERVER_HOST_ACCESS */ | |
6815 | "add_server_host_access", | |
6816 | "asha", | |
c44ddfa7 | 6817 | 2, |
03c05291 | 6818 | APPEND, |
6819 | "ha", | |
6820 | HOSTACCESS_TABLE, | |
5eaef520 | 6821 | "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)", |
03c05291 | 6822 | asha_fields, |
6823 | 3, | |
6824 | 0, | |
6825 | 0, | |
29028043 | 6826 | NULL, |
03c05291 | 6827 | &asha_validate, |
6828 | }, | |
6829 | ||
6830 | { | |
6831 | /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */ | |
6832 | "update_server_host_access", | |
6833 | "usha", | |
c44ddfa7 | 6834 | 2, |
03c05291 | 6835 | UPDATE, |
6836 | "ha", | |
6837 | HOSTACCESS_TABLE, | |
6838 | "hostaccess SET acl_type = '%s', acl_id = %d", | |
6839 | asha_fields, | |
6840 | 2, | |
6841 | "mach_id = %d", | |
6842 | 1, | |
29028043 | 6843 | NULL, |
03c05291 | 6844 | &asha_validate, |
6845 | }, | |
6846 | ||
6847 | { | |
6848 | /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */ | |
6849 | "delete_server_host_access", | |
6850 | "dsha", | |
c44ddfa7 | 6851 | 2, |
03c05291 | 6852 | DELETE, |
6853 | "ha", | |
6854 | HOSTACCESS_TABLE, | |
6855 | 0, | |
6856 | asha_fields, | |
6857 | 0, | |
6858 | "mach_id = %d", | |
6859 | 1, | |
29028043 | 6860 | NULL, |
03c05291 | 6861 | &VDmach, |
6862 | }, | |
6863 | ||
46b6f1f6 | 6864 | { |
6865 | /* Q_GACL - GET_ACL */ | |
6866 | "get_acl", | |
6867 | "gacl", | |
c44ddfa7 | 6868 | 2, |
46b6f1f6 | 6869 | RETRIEVE, |
6870 | "ac", | |
6871 | ACL_TABLE, | |
6872 | "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l", | |
6873 | gacl_fields, | |
6874 | 4, | |
6875 | "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id", | |
6876 | 2, | |
6877 | "m.name, ac.target, ac.kind", | |
6878 | &gacl_validate, | |
6879 | }, | |
6880 | ||
6881 | { | |
6882 | /* Q_AACL - ADD_ACL */ | |
6883 | "add_acl", | |
6884 | "aacl", | |
c44ddfa7 | 6885 | 2, |
46b6f1f6 | 6886 | APPEND, |
6887 | "ac", | |
6888 | ACL_TABLE, | |
6889 | "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)", | |
6890 | aacl_fields, | |
6891 | 4, | |
6892 | 0, | |
6893 | 0, | |
6894 | NULL, | |
6895 | &aacl_validate, | |
6896 | }, | |
6897 | ||
6898 | { | |
6899 | /* Q_DACL - DELETE_ACL */ | |
6900 | "delete_acl", | |
6901 | "dacl", | |
c44ddfa7 | 6902 | 2, |
46b6f1f6 | 6903 | DELETE, |
6904 | "ac", | |
6905 | ACL_TABLE, | |
6906 | 0, | |
6907 | dacl_fields, | |
6908 | 0, | |
6909 | "mach_id = %d AND target = '%s'", | |
6910 | 2, | |
6911 | NULL, | |
6912 | &gacl_validate, | |
6913 | }, | |
6914 | ||
d33e787c | 6915 | { |
6916 | /* Q_GSVC - GET_SERVICE */ | |
6917 | "get_service", | |
6918 | "gsvc", | |
c44ddfa7 | 6919 | 2, |
d33e787c | 6920 | RETRIEVE, |
0c345c78 | 6921 | "ss", |
03c05291 | 6922 | SERVICES_TABLE, |
6923 | "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services", | |
fd5b2340 | 6924 | gsvc_fields, |
d33e787c | 6925 | 7, |
69eb9470 | 6926 | "name LIKE '%s' AND protocol LIKE '%s'", |
6927 | 2, | |
29028043 | 6928 | "name", |
263a36d4 | 6929 | &VDfix_modby, |
d33e787c | 6930 | }, |
6931 | ||
6932 | { | |
6933 | /* Q_ASVC - ADD_SERVICE */ | |
6934 | "add_service", | |
6935 | "asvc", | |
c44ddfa7 | 6936 | 2, |
d33e787c | 6937 | APPEND, |
0c345c78 | 6938 | "ss", |
03c05291 | 6939 | SERVICES_TABLE, |
5eaef520 | 6940 | "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))", |
fd5b2340 | 6941 | asvc_fields, |
d33e787c | 6942 | 4, |
7ac48069 | 6943 | NULL, |
d33e787c | 6944 | 0, |
29028043 | 6945 | NULL, |
d33e787c | 6946 | &asvc_validate, |
6947 | }, | |
6948 | ||
6949 | { | |
6950 | /* Q_DSVC - DELETE_SERVICE */ | |
6951 | "delete_service", | |
6952 | "dsvc", | |
c44ddfa7 | 6953 | 2, |
d33e787c | 6954 | DELETE, |
0c345c78 | 6955 | "ss", |
03c05291 | 6956 | SERVICES_TABLE, |
d33e787c | 6957 | 0, |
69eb9470 | 6958 | dsvc_fields, |
d33e787c | 6959 | 0, |
69eb9470 | 6960 | "name = '%s' AND protocol = '%s'", |
6961 | 2, | |
29028043 | 6962 | NULL, |
69eb9470 | 6963 | &dsvc_validate, |
d33e787c | 6964 | }, |
fd5b2340 | 6965 | |
d33e787c | 6966 | { |
2884200f | 6967 | /* Q_GPRN - GET_PRINTER */ |
6968 | "get_printer", | |
6969 | "gprn", | |
c44ddfa7 | 6970 | 2, |
d33e787c | 6971 | RETRIEVE, |
2884200f | 6972 | "pr", |
6973 | PRINTERS_TABLE, | |
e5a63571 | 6974 | "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 | 6975 | gprn_fields, |
e5a63571 | 6976 | 19, |
2884200f | 6977 | "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 | 6978 | 1, |
2884200f | 6979 | "pr.name", |
6980 | &VDfix_modby, | |
d33e787c | 6981 | }, |
6982 | ||
6983 | { | |
2884200f | 6984 | /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */ |
6985 | "get_printer_by_duplexname", | |
6986 | "gpbd", | |
c44ddfa7 | 6987 | 2, |
2884200f | 6988 | RETRIEVE, |
6989 | "pr", | |
6990 | PRINTERS_TABLE, | |
e5a63571 | 6991 | "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 | 6992 | gpbd_fields, |
e5a63571 | 6993 | 19, |
2884200f | 6994 | "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", |
6995 | 1, | |
6996 | "pr.name", | |
6997 | &VDfix_modby, | |
fd5b2340 | 6998 | }, |
6999 | ||
7000 | { | |
2884200f | 7001 | /* Q_GPBE - GET_PRINTER_BY_ETHERNET */ |
7002 | "get_printer_by_ethernet", | |
7003 | "gpbe", | |
c44ddfa7 | 7004 | 2, |
2884200f | 7005 | RETRIEVE, |
7006 | "pr", | |
7007 | PRINTERS_TABLE, | |
e5a63571 | 7008 | "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 | 7009 | gpbd_fields, |
e5a63571 | 7010 | 19, |
59841cdb | 7011 | "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 | 7012 | 1, |
2884200f | 7013 | "pr.name", |
7014 | &VDfix_modby, | |
fd5b2340 | 7015 | }, |
7016 | ||
7017 | { | |
2884200f | 7018 | /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */ |
7019 | "get_printer_by_hostname", | |
7020 | "gpbh", | |
c44ddfa7 | 7021 | 2, |
fd5b2340 | 7022 | RETRIEVE, |
2884200f | 7023 | "pr", |
7024 | PRINTERS_TABLE, | |
e5a63571 | 7025 | "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 | 7026 | gpbh_fields, |
e5a63571 | 7027 | 19, |
2884200f | 7028 | "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 | 7029 | 1, |
2884200f | 7030 | "pr.name", |
263a36d4 | 7031 | &VDfix_modby, |
d33e787c | 7032 | }, |
7033 | ||
7034 | { | |
2884200f | 7035 | /* Q_GPBR - GET_PRINTER_BY_RM */ |
7036 | "get_printer_by_rm", | |
7037 | "gpbr", | |
c44ddfa7 | 7038 | 2, |
2884200f | 7039 | RETRIEVE, |
7040 | "pr", | |
7041 | PRINTERS_TABLE, | |
e5a63571 | 7042 | "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 | 7043 | gpbr_fields, |
e5a63571 | 7044 | 19, |
2884200f | 7045 | "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 | 7046 | 1, |
2884200f | 7047 | "pr.name", |
7048 | &VDfix_modby, | |
d33e787c | 7049 | }, |
7050 | ||
012fc215 | 7051 | { |
2884200f | 7052 | /* Q_GPBL - GET_PRINTER_BY_LOCATION */ |
7053 | "get_printer_by_location", | |
7054 | "gpbl", | |
c44ddfa7 | 7055 | 2, |
012fc215 | 7056 | RETRIEVE, |
2884200f | 7057 | "pr", |
7058 | PRINTERS_TABLE, | |
e5a63571 | 7059 | "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 | 7060 | gpbl_fields, |
e5a63571 | 7061 | 19, |
2884200f | 7062 | "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", |
7063 | 1, | |
7064 | "pr.name", | |
7065 | &VDfix_modby, | |
7066 | }, | |
7067 | ||
7068 | { | |
7069 | /* Q_GPBC - GET_PRINTER_BY_CONTACT */ | |
7070 | "get_printer_by_contact", | |
7071 | "gpbc", | |
c44ddfa7 | 7072 | 2, |
2884200f | 7073 | RETRIEVE, |
7074 | "pr", | |
7075 | PRINTERS_TABLE, | |
e5a63571 | 7076 | "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 | 7077 | gpbc_fields, |
e5a63571 | 7078 | 19, |
2884200f | 7079 | "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 | 7080 | 1, |
2884200f | 7081 | "pr.name", |
263a36d4 | 7082 | &VDfix_modby, |
012fc215 | 7083 | }, |
7084 | ||
7085 | { | |
2884200f | 7086 | /* Q_APRN - ADD_PRINTER */ |
7087 | "add_printer", | |
7088 | "aprn", | |
c44ddfa7 | 7089 | 2, |
012fc215 | 7090 | APPEND, |
2884200f | 7091 | "pr", |
7092 | PRINTERS_TABLE, | |
e5a63571 | 7093 | "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 | 7094 | aprn_fields, |
e5a63571 | 7095 | 16, |
012fc215 | 7096 | 0, |
7097 | 0, | |
29028043 | 7098 | NULL, |
2884200f | 7099 | &aprn_validate, |
012fc215 | 7100 | }, |
7101 | ||
1a9a0a59 | 7102 | { |
7103 | /* Q_UPRN - UPDATE_PRINTER */ | |
7104 | "update_printer", | |
7105 | "uprn", | |
c44ddfa7 | 7106 | 2, |
1a9a0a59 | 7107 | UPDATE, |
7108 | "pr", | |
7109 | PRINTERS_TABLE, | |
7110 | "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))", | |
7111 | uprn_fields, | |
7112 | 16, | |
7113 | 0, | |
7114 | 0, | |
7115 | NULL, | |
7116 | &uprn_validate, | |
7117 | }, | |
7118 | ||
012fc215 | 7119 | { |
2884200f | 7120 | /* Q_DPRN - DELETE_PRINTER */ |
7121 | "delete_printer", | |
7122 | "dprn", | |
c44ddfa7 | 7123 | 2, |
012fc215 | 7124 | DELETE, |
2884200f | 7125 | "pr", |
7126 | PRINTERS_TABLE, | |
012fc215 | 7127 | 0, |
2884200f | 7128 | aprn_fields, |
012fc215 | 7129 | 0, |
99e09b48 | 7130 | "name = '%s'", |
012fc215 | 7131 | 1, |
29028043 | 7132 | NULL, |
2884200f | 7133 | &dprn_validate, |
012fc215 | 7134 | }, |
7135 | ||
1a9a0a59 | 7136 | { |
7137 | /* Q_GPSV - GET_PRINT_SERVER */ | |
7138 | "get_print_server", | |
7139 | "gpsv", | |
c44ddfa7 | 7140 | 2, |
1a9a0a59 | 7141 | RETRIEVE, |
7142 | "ps", | |
7143 | PRINTSERVERS_TABLE, | |
7144 | "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", | |
7145 | gpsv_fields, | |
7146 | 9, | |
7147 | "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", | |
7148 | 1, | |
7149 | NULL, | |
7150 | &gpsv_validate, | |
7151 | }, | |
7152 | ||
7153 | { | |
7154 | /* Q_APSV - ADD_PRINT_SERVER */ | |
7155 | "add_print_server", | |
7156 | "apsv", | |
c44ddfa7 | 7157 | 2, |
1a9a0a59 | 7158 | APPEND, |
7159 | "ps", | |
7160 | PRINTSERVERS_TABLE, | |
7161 | "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)", | |
7162 | apsv_fields, | |
7163 | 6, | |
7164 | 0, | |
7165 | 0, | |
7166 | NULL, | |
7167 | &apsv_validate, | |
7168 | }, | |
7169 | ||
7170 | { | |
7171 | /* Q_UPSV - UPDATE_PRINT_SERVER */ | |
7172 | "update_print_server", | |
7173 | "upsv", | |
c44ddfa7 | 7174 | 2, |
1a9a0a59 | 7175 | UPDATE, |
7176 | "ps", | |
7177 | PRINTSERVERS_TABLE, | |
7178 | "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d", | |
7179 | apsv_fields, | |
7180 | 5, | |
7181 | "mach_id = %d", | |
7182 | 1, | |
7183 | NULL, | |
7184 | &apsv_validate, | |
7185 | }, | |
7186 | ||
7187 | { | |
7188 | /* Q_DPSV - DELETE_PRINT_SERVER */ | |
7189 | "delete_print_server", | |
7190 | "dpsv", | |
c44ddfa7 | 7191 | 2, |
1a9a0a59 | 7192 | DELETE, |
7193 | "ps", | |
7194 | PRINTSERVERS_TABLE, | |
7195 | 0, | |
7196 | dpsv_fields, | |
7197 | 0, | |
7198 | "mach_id = %d", | |
7199 | 1, | |
7200 | NULL, | |
7201 | &dpsv_validate, | |
7202 | }, | |
7203 | ||
d33e787c | 7204 | { |
7205 | /* Q_GALI - GET_ALIAS */ | |
7206 | "get_alias", | |
7207 | "gali", | |
c44ddfa7 | 7208 | 2, |
d33e787c | 7209 | RETRIEVE, |
7210 | "a", | |
03c05291 | 7211 | ALIAS_TABLE, |
7212 | "name, type, trans FROM alias", | |
d33e787c | 7213 | gali_fields, |
7214 | 3, | |
263a36d4 | 7215 | "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'", |
d33e787c | 7216 | 3, |
29028043 | 7217 | "type, name, trans", |
263a36d4 | 7218 | NULL, |
d33e787c | 7219 | }, |
7220 | ||
7221 | { | |
7222 | /* Q_AALI - ADD_ALIAS */ | |
7223 | "add_alias", | |
7224 | "aali", | |
c44ddfa7 | 7225 | 2, |
d33e787c | 7226 | APPEND, |
7227 | "a", | |
03c05291 | 7228 | ALIAS_TABLE, |
4e5ec77f | 7229 | "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')", |
d33e787c | 7230 | aali_fields, |
7231 | 3, | |
7ac48069 | 7232 | NULL, |
d33e787c | 7233 | 0, |
29028043 | 7234 | NULL, |
d33e787c | 7235 | &aali_validate, |
7236 | }, | |
7237 | ||
7238 | { | |
7239 | /* Q_DALI - DELETE_ALIAS */ | |
7240 | "delete_alias", | |
7241 | "dali", | |
c44ddfa7 | 7242 | 2, |
d33e787c | 7243 | DELETE, |
7244 | "a", | |
03c05291 | 7245 | ALIAS_TABLE, |
7ac48069 | 7246 | NULL, |
d33e787c | 7247 | aali_fields, |
7248 | 0, | |
5eaef520 | 7249 | "name = '%s' AND type = '%s' AND trans = '%s'", |
d33e787c | 7250 | 3, |
29028043 | 7251 | NULL, |
d33e787c | 7252 | &dali_validate, |
7253 | }, | |
7254 | ||
7255 | { | |
7256 | /* Q_GVAL - GET_VALUE */ | |
7257 | "get_value", | |
7258 | "gval", | |
c44ddfa7 | 7259 | 2, |
d33e787c | 7260 | RETRIEVE, |
0c345c78 | 7261 | "val", |
03c05291 | 7262 | NUMVALUES_TABLE, |
7263 | "value FROM numvalues", | |
d33e787c | 7264 | gval_fields, |
7265 | 1, | |
03c05291 | 7266 | "name = '%s'", |
d33e787c | 7267 | 1, |
29028043 | 7268 | NULL, |
d33e787c | 7269 | &gval_validate, |
7270 | }, | |
7271 | ||
7272 | { | |
7273 | /* Q_AVAL - ADD_VALUE */ | |
7274 | "add_value", | |
7275 | "aval", | |
c44ddfa7 | 7276 | 2, |
d33e787c | 7277 | APPEND, |
0c345c78 | 7278 | "val", |
03c05291 | 7279 | NUMVALUES_TABLE, |
4e5ec77f | 7280 | "INTO numvalues (name, value) VALUES ('%s', %s)", |
d33e787c | 7281 | aval_fields, |
7282 | 2, | |
7ac48069 | 7283 | NULL, |
d33e787c | 7284 | 0, |
29028043 | 7285 | NULL, |
d33e787c | 7286 | &aval_validate, |
7287 | }, | |
7288 | ||
7289 | { | |
7290 | /* Q_UVAL - UPDATE_VALUE */ | |
7291 | "update_value", | |
7292 | "uval", | |
c44ddfa7 | 7293 | 2, |
d33e787c | 7294 | UPDATE, |
0c345c78 | 7295 | "val", |
03c05291 | 7296 | NUMVALUES_TABLE, |
4e5ec77f | 7297 | "numvalues SET value = %s", |
d33e787c | 7298 | aval_fields, |
7299 | 1, | |
99e09b48 | 7300 | "name = '%s'", |
d33e787c | 7301 | 1, |
29028043 | 7302 | NULL, |
d33e787c | 7303 | &aval_validate, |
7304 | }, | |
7305 | ||
7306 | { | |
7307 | /* Q_DVAL - DELETE_VALUE */ | |
7308 | "delete_value", | |
7309 | "dval", | |
c44ddfa7 | 7310 | 2, |
d33e787c | 7311 | DELETE, |
0c345c78 | 7312 | "val", |
03c05291 | 7313 | NUMVALUES_TABLE, |
7ac48069 | 7314 | NULL, |
d33e787c | 7315 | dval_fields, |
7316 | 0, | |
99e09b48 | 7317 | "name = '%s'", |
d33e787c | 7318 | 1, |
29028043 | 7319 | NULL, |
d33e787c | 7320 | &aval_validate, |
7321 | }, | |
7322 | ||
7323 | { | |
7324 | /* Q_GATS - GET_ALL_TABLE_STATS */ | |
7325 | "get_all_table_stats", | |
7326 | "gats", | |
c44ddfa7 | 7327 | 2, |
d33e787c | 7328 | RETRIEVE, |
7329 | "tbs", | |
03c05291 | 7330 | TBLSTATS_TABLE, |
7331 | "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats", | |
d33e787c | 7332 | gats_fields, |
45bf7573 | 7333 | 5, |
7ac48069 | 7334 | NULL, |
d33e787c | 7335 | 0, |
29028043 | 7336 | "table_name", |
d33e787c | 7337 | 0, |
7338 | }, | |
7339 | ||
2962e9ec | 7340 | { |
7341 | /* Q__SDL - _SET_DEBUG_LEVEL */ | |
7342 | "_set_debug_level", | |
7343 | "_sdl", | |
c44ddfa7 | 7344 | 2, |
2962e9ec | 7345 | UPDATE, |
7ac48069 | 7346 | NULL, |
03c05291 | 7347 | 0, |
7ac48069 | 7348 | NULL, |
2962e9ec | 7349 | _sdl_fields, |
7350 | 1, | |
7ac48069 | 7351 | NULL, |
2962e9ec | 7352 | 0, |
29028043 | 7353 | NULL, |
2962e9ec | 7354 | &_sdl_validate, |
7355 | }, | |
7356 | ||
2fb668b0 | 7357 | { |
7358 | /* Q_GCON - GET_CONTAINER, v7 */ | |
7359 | "get_container", | |
7360 | "gcon", | |
7361 | 7, | |
7362 | RETRIEVE, | |
7363 | "c", | |
7364 | CONTAINERS_TABLE, | |
7365 | "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 | 7366 | gcon7_fields, |
2fb668b0 | 7367 | 11, |
73155abd | 7368 | "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0", |
7369 | 1, | |
7370 | NULL, | |
7371 | &gcon_validate, | |
7372 | }, | |
7373 | ||
7374 | { | |
7375 | /* Q_GCON - GET_CONTAINER, v9 */ | |
7376 | "get_container", | |
7377 | "gcon", | |
7378 | 9, | |
7379 | RETRIEVE, | |
7380 | "c", | |
7381 | CONTAINERS_TABLE, | |
7382 | "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", | |
7383 | gcon_fields, | |
7384 | 12, | |
7385 | "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0", | |
2fb668b0 | 7386 | 1, |
7387 | NULL, | |
7388 | &gcon_validate, | |
7389 | }, | |
7390 | ||
7391 | { | |
7392 | /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */ | |
7393 | "add_container", | |
7394 | "acon", | |
7395 | 7, | |
7396 | APPEND, | |
7397 | "c", | |
7398 | CONTAINERS_TABLE, | |
7399 | "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 | 7400 | acon7_fields, |
2fb668b0 | 7401 | 8, |
7402 | 0, | |
7403 | 0, | |
7404 | NULL, | |
73155abd | 7405 | &acon7_validate, |
7406 | }, | |
7407 | ||
7408 | { | |
7409 | /* Q_ACON - ADD_CONTAINER, v9 */ /* uses prefetch_value() for cnt_id */ | |
7410 | "add_container", | |
7411 | "acon", | |
7412 | 9, | |
7413 | APPEND, | |
7414 | "c", | |
7415 | CONTAINERS_TABLE, | |
7416 | "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)", | |
7417 | acon_fields, | |
7418 | 9, | |
7419 | 0, | |
7420 | 0, | |
7421 | NULL, | |
2fb668b0 | 7422 | &acon_validate, |
7423 | }, | |
7424 | ||
7425 | { | |
7426 | /* Q_UCON - UPDATE_CONTAINER, v7 */ | |
7427 | "update_container", | |
7428 | "ucon", | |
7429 | 7, | |
7430 | UPDATE, | |
7431 | 0, | |
7432 | CONTAINERS_TABLE, | |
7433 | 0, | |
73155abd | 7434 | ucon7_fields, |
2fb668b0 | 7435 | 8, |
7436 | 0, | |
7437 | 1, | |
7438 | NULL, | |
73155abd | 7439 | &ucon7_validate, |
7440 | }, | |
7441 | ||
7442 | { | |
7443 | /* Q_UCON - UPDATE_CONTAINER, v9 */ | |
7444 | "update_container", | |
7445 | "ucon", | |
7446 | 9, | |
7447 | UPDATE, | |
7448 | 0, | |
7449 | CONTAINERS_TABLE, | |
7450 | 0, | |
7451 | ucon_fields, | |
7452 | 9, | |
7453 | 0, | |
7454 | 1, | |
7455 | NULL, | |
2fb668b0 | 7456 | &ucon_validate, |
7457 | }, | |
7458 | ||
7459 | { | |
7460 | /* Q_DCON - DELETE_CONTAINER, v7 */ | |
7461 | "delete_container", | |
7462 | "dcon", | |
7463 | 7, | |
7464 | DELETE, | |
7465 | "c", | |
7466 | CONTAINERS_TABLE, | |
7467 | NULL, | |
7468 | dcon_fields, | |
7469 | 0, | |
7470 | "cnt_id = %d", | |
7471 | 1, | |
7472 | NULL, | |
7473 | &dcon_validate, | |
7474 | }, | |
7475 | ||
7476 | { | |
7477 | /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */ | |
7478 | "add_machine_to_container", | |
7479 | "amcn", | |
7480 | 7, | |
7481 | APPEND, | |
7482 | "mcn", | |
7483 | MCNTMAP_TABLE, | |
7484 | "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)", | |
7485 | amcn_fields, | |
7486 | 2, | |
7487 | 0, | |
7488 | 0, | |
7489 | NULL, | |
7490 | &amcn_validate, | |
7491 | }, | |
7492 | ||
7493 | { | |
7494 | /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */ | |
7495 | "delete_machine_from_container", | |
7496 | "dmcn", | |
7497 | 7, | |
7498 | DELETE, | |
7499 | "mcn", | |
7500 | MCNTMAP_TABLE, | |
7501 | 0, | |
7502 | amcn_fields, | |
7503 | 0, | |
7504 | "mach_id = %d AND cnt_id = %d", | |
7505 | 2, | |
7506 | NULL, | |
d16a0628 | 7507 | &dmcn_validate, |
2fb668b0 | 7508 | }, |
7509 | ||
7510 | { | |
7511 | /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */ | |
7512 | "get_machine_to_container_map", | |
7513 | "gmnm", | |
7514 | 7, | |
7515 | RETRIEVE, | |
7516 | "mcn", | |
7517 | MCNTMAP_TABLE, | |
7807f2e6 | 7518 | "m.name, c.name FROM machine m, containers c, mcntmap mcn", |
7519 | gmnm_fields, | |
7520 | 2, | |
59aecfaf | 7521 | "m.name LIKE UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id", |
2fb668b0 | 7522 | 1, |
7523 | NULL, | |
7524 | NULL, | |
7525 | }, | |
7526 | ||
7527 | { | |
7528 | /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */ | |
7529 | "get_machines_of_container", | |
7530 | "gmoc", | |
7531 | 7, | |
7532 | RETRIEVE, | |
7533 | NULL, | |
7534 | MCNTMAP_TABLE, | |
7535 | NULL, | |
7536 | gmoc_fields, | |
7537 | 2, | |
7538 | NULL, | |
7539 | 2, | |
7540 | NULL, | |
7541 | &gmoc_validate, | |
7542 | }, | |
7543 | ||
7544 | { | |
7545 | /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */ | |
7546 | "get_subcontainers_of_container", | |
7547 | "gsoc", | |
7548 | 7, | |
7549 | RETRIEVE, | |
7550 | NULL, | |
7551 | CONTAINERS_TABLE, | |
7552 | NULL, | |
7553 | gsoc_fields, | |
7554 | 1, | |
7555 | NULL, | |
7556 | 2, | |
7557 | NULL, | |
7558 | &gsoc_validate, | |
7559 | }, | |
7560 | ||
0ef13dc2 | 7561 | { |
52581841 | 7562 | /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v7 */ |
0ef13dc2 | 7563 | "get_toplevel_containers", |
7564 | "gtlc", | |
52581841 | 7565 | 7, |
0ef13dc2 | 7566 | RETRIEVE, |
7567 | "c", | |
7568 | CONTAINERS_TABLE, | |
7569 | "name FROM containers", | |
7570 | gtlc_fields, | |
7571 | 1, | |
7572 | "name NOT LIKE '%%/%%'", | |
7573 | 0, | |
7574 | "name", | |
7575 | NULL, | |
7576 | }, | |
7577 | ||
73155abd | 7578 | { |
7579 | /* Q_SCLI - SET_CONTAINER_LIST, v9 */ | |
7580 | "set_container_list", | |
7581 | "scli", | |
7582 | 9, | |
7583 | UPDATE, | |
7584 | 0, | |
7585 | CONTAINERS_TABLE, | |
7586 | 0, | |
7587 | scli_fields, | |
7588 | 1, | |
7589 | 0, | |
7590 | 1, | |
7591 | NULL, | |
7592 | &scli_validate, | |
7593 | }, | |
7594 | ||
7595 | { | |
7596 | /* Q_GCLI - GET_CONTAINER_LIST, v9 */ | |
7597 | "get_container_list", | |
7598 | "gcli", | |
7599 | 9, | |
7600 | RETRIEVE, | |
7601 | "c", | |
7602 | CONTAINERS_TABLE, | |
7603 | "c.name, l.name FROM containers c, list l", | |
7604 | gcli_fields, | |
7605 | 2, | |
7606 | "LOWER(c.name) = LOWER('%s') AND c.list_id = l.list_id AND c.list_id != 0", | |
7607 | 1, | |
7608 | NULL, | |
7609 | NULL, | |
7610 | }, | |
7611 | ||
6e442c45 | 7612 | { |
7613 | /* G_GLIC - GET_LIST_CONTAINER, v9 */ | |
7614 | "get_list_container", | |
7615 | "glic", | |
7616 | 9, | |
7617 | RETRIEVE, | |
7618 | "c", | |
7619 | CONTAINERS_TABLE, | |
7620 | "c.name, l.name FROM containers c, list l", | |
7621 | glic_fields, | |
7622 | 2, | |
7623 | "l.list_id = %d AND l.list_id = c.list_id and c.list_id != 0", | |
7624 | 1, | |
7625 | NULL, | |
7626 | &glic_validate, | |
7627 | }, | |
7628 | ||
d33e787c | 7629 | }; |
7630 | ||
c44ddfa7 | 7631 | int QueryCount = (sizeof(Queries) / sizeof(struct query)); |