]>
Commit | Line | Data |
---|---|---|
d33e787c | 1 | /* This file defines the query dispatch table for version 2 of the protocol |
2 | * | |
3 | * $Header$ | |
4 | * | |
5 | * Copyright 1987, 1988 by the Massachusetts Institute of Technology. | |
6 | */ | |
7 | ||
8 | #include "query.h" | |
9 | #include "sms_et.h" | |
10 | ||
11 | /* Specialized Support Query Routines */ | |
12 | ||
13 | /* Special Access Check Routines */ | |
14 | int access_user(); | |
15 | int access_login(); | |
16 | int access_list(); | |
17 | int access_visible_list(); | |
18 | int access_vis_list_by_name(); | |
19 | int access_member(); | |
20 | int access_qgli(); | |
21 | int access_service(); | |
22 | int access_filesys(); | |
23 | ||
24 | /* Query Setup Routines */ | |
25 | int setup_ausr(); | |
26 | int setup_dusr(); | |
27 | int setup_spop(); | |
28 | int setup_dpob(); | |
29 | int setup_dmac(); | |
30 | int setup_dclu(); | |
31 | int setup_alis(); | |
32 | int setup_dlis(); | |
33 | int setup_dsin(); | |
34 | int setup_dshi(); | |
35 | int setup_afil(); | |
36 | int setup_ufil(); | |
37 | int setup_dfil(); | |
d33e787c | 38 | int setup_dnfp(); |
39 | int setup_dnfq(); | |
40 | ||
41 | /* Query Followup Routines */ | |
42 | int followup_fix_modby(); | |
43 | int followup_ausr(); | |
44 | int followup_gpob(); | |
45 | int followup_glin(); | |
46 | int followup_amtl(); | |
47 | int followup_anfq(); | |
48 | int followup_gzcl(); | |
49 | int followup_gsha(); | |
7ac4c1b1 | 50 | int followup_gnfq(); |
d33e787c | 51 | |
52 | int set_modtime(); | |
53 | int set_modtime_by_id(); | |
54 | int set_finger_modtime(); | |
55 | int set_pobox_modtime(); | |
56 | int set_mach_modtime(); | |
57 | int set_mach_modtime_by_id(); | |
58 | int set_cluster_modtime_by_id(); | |
59 | int set_serverhost_modtime(); | |
60 | int set_nfsphys_modtime(); | |
61 | int set_filesys_modtime(); | |
62 | int set_zephyr_modtime(); | |
63 | ||
64 | /* Special Queries */ | |
65 | int set_pobox(); | |
66 | int get_list_info(); | |
88343c5e | 67 | int get_ace_use(); |
d33e787c | 68 | int qualified_get_lists(); |
69 | int get_members_of_list(); | |
70 | int qualified_get_server(); | |
71 | int qualified_get_serverhost(); | |
72 | int trigger_dcm(); | |
73 | int count_members_of_list(); | |
74 | int get_lists_of_member(); | |
75 | int register_user(); | |
76 | int add_user_group(); | |
77 | ||
78 | ||
79 | \f | |
80 | /* String compression | |
81 | * These are commonly used strings in the table, defined here so that | |
82 | * they can be shared. | |
83 | */ | |
84 | ||
88343c5e | 85 | static char ACE_NAME[] = "ace_name"; |
86 | static char ACE_TYPE[] = "ace_type"; | |
d33e787c | 87 | static char CLASS[] = "class"; |
88 | static char CLU_ID[] = "clu_id"; | |
89 | static char CLUSTER[] = "cluster"; | |
90 | static char DESC[] = "description"; | |
91 | static char DEVICE[] = "device"; | |
92 | static char DIR[] = "dir"; | |
93 | static char FILESYS[] = "filesys"; | |
94 | static char FILSYS_ID[] = "filsys_id"; | |
95 | static char FIRST[] = "firstname"; | |
96 | static char LABEL[] = "label"; | |
97 | static char LAST[] = "lastname"; | |
98 | static char LIST[] = "list"; | |
99 | static char LIST_ID[] = "list_id"; | |
100 | static char LOCATION[] = "location"; | |
101 | static char LOGIN[] = "login"; | |
102 | static char MACH_ID[] = "mach_id"; | |
103 | static char MACHINE[] = "machine"; | |
104 | static char MIDDLE[] = "middle"; | |
105 | static char MIT_ID[] = "mit_id"; | |
106 | static char MOD1[] = "modtime"; | |
107 | static char MOD2[] = "modby"; | |
108 | static char MOD3[] = "modwith"; | |
109 | static char NAME[] = "name"; | |
110 | static char SERVICE[] = "service"; | |
111 | static char SHELL[] = "shell"; | |
112 | static char STATUS[] = "status"; | |
113 | static char TYPE[] = "type"; | |
114 | static char USERS[] = "users"; | |
115 | static char USERS_ID[] = "users_id"; | |
116 | static char UID[] = "uid"; | |
117 | ||
118 | ||
119 | ||
120 | /* VALOBJS | |
121 | * These are commonly used validation objects, defined here so that they | |
122 | * can be shared. | |
123 | */ | |
124 | ||
125 | static struct valobj VOsort0[] = { | |
126 | {V_SORT, 0, 0, 0, 0, 0}, | |
127 | }; | |
128 | ||
129 | static struct valobj VOdate1[] = { | |
130 | {V_DATE, 1, 0, 0, 0, SMS_DATE}, | |
131 | }; | |
132 | ||
133 | static struct valobj VOuser0[] = { | |
134 | {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER}, | |
135 | }; | |
136 | ||
137 | static struct valobj VOmach0[] = { | |
138 | {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
139 | }; | |
140 | ||
141 | static struct valobj VOclu0[] = { | |
142 | {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER}, | |
143 | }; | |
144 | ||
145 | static struct valobj VOlist0[] = { | |
146 | {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST}, | |
147 | }; | |
148 | ||
149 | static struct valobj VOchar0[] = { | |
150 | {V_CHAR, 0}, | |
151 | }; | |
152 | ||
153 | static struct valobj VOsort01[] = { | |
154 | {V_SORT, 1}, | |
155 | {V_SORT, 0}, | |
156 | }; | |
157 | ||
158 | static struct valobj VOuser0sort[] = { | |
159 | {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER}, | |
160 | {V_SORT, 0}, | |
161 | }; | |
162 | ||
163 | static struct valobj VOfilsys0user1[] = { | |
164 | {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS}, | |
165 | {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER}, | |
166 | }; | |
167 | ||
168 | ||
169 | /* Validations | |
170 | * Commonly used validation records defined here so that they may | |
171 | * be shared. | |
172 | */ | |
173 | ||
174 | static struct validate VDmach = { VOmach0, 1 }; | |
175 | static struct validate VDsort2= { VOsort01,2 }; | |
176 | static struct validate VDsortf = { | |
177 | VOsort0, | |
178 | 1, | |
179 | 0, | |
180 | 0, | |
181 | 0, | |
182 | 0, | |
183 | 0, | |
184 | 0, | |
185 | followup_fix_modby, | |
186 | }; | |
187 | ||
188 | ||
189 | \f | |
190 | /* Query data */ | |
191 | ||
192 | static char *galo_fields[] = { | |
193 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, | |
194 | }; | |
195 | ||
196 | static char *gubl_fields[] = { | |
197 | LOGIN, | |
198 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
199 | MIT_ID, CLASS, MOD1, MOD2, MOD3 | |
200 | }; | |
201 | ||
202 | static struct validate gubx_validate = /* gubl, gubu */ | |
203 | { | |
204 | VOsort0, | |
205 | 1, | |
206 | 0, | |
207 | 0, | |
208 | 0, | |
209 | 0, | |
210 | access_login, | |
211 | 0, | |
212 | followup_fix_modby, | |
213 | }; | |
214 | ||
215 | static char *gubu_fields[] = { | |
216 | UID, | |
217 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
218 | MIT_ID, CLASS, MOD1, MOD2, MOD3, | |
219 | }; | |
220 | ||
221 | static char *gubn_fields[] = { | |
222 | FIRST, LAST, | |
223 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
224 | MIT_ID, CLASS, MOD1, MOD2, MOD3, | |
225 | }; | |
226 | ||
227 | static char *gubc_fields[] = { | |
228 | CLASS, | |
229 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
230 | MIT_ID, CLASS, MOD1, MOD2, MOD3, | |
231 | }; | |
232 | ||
233 | static char *gubm_fields[] = { | |
234 | MIT_ID, | |
235 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
236 | MIT_ID, CLASS, MOD1, MOD2, MOD3, | |
237 | }; | |
238 | ||
239 | static char *ausr_fields[] = { | |
240 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
241 | MIT_ID, CLASS, | |
242 | }; | |
243 | ||
244 | static struct valobj ausr_valobj[] = { | |
245 | {V_CHAR, 0}, | |
246 | {V_CHAR, 3}, | |
247 | {V_CHAR, 4}, | |
248 | {V_CHAR, 5}, | |
249 | {V_CHAR, 7}, | |
250 | {V_TYPE, 8, CLASS, 0, 0, SMS_BAD_CLASS}, | |
251 | }; | |
252 | ||
253 | static struct validate ausr_validate = { | |
254 | ausr_valobj, | |
255 | 6, | |
256 | LOGIN, | |
257 | "u.login = \"%s\"", | |
258 | 1, | |
259 | USERS_ID, | |
260 | 0, | |
261 | setup_ausr, | |
262 | followup_ausr, | |
263 | }; | |
264 | ||
265 | static char *rusr_fields[] = { | |
266 | UID, LOGIN, "fs_type" | |
267 | }; | |
268 | ||
269 | static struct validate rusr_validate = { | |
270 | 0, | |
271 | 0, | |
272 | 0, | |
273 | 0, | |
274 | 0, | |
275 | 0, | |
276 | 0, | |
277 | register_user, | |
278 | 0, | |
279 | }; | |
280 | ||
281 | static char *uusr_fields[] = { | |
282 | LOGIN, | |
283 | "newlogin", UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
284 | MIT_ID, CLASS, | |
285 | }; | |
286 | ||
287 | static struct valobj uusr_valobj[] = { | |
288 | {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER}, | |
289 | {V_RENAME, 1, USERS, LOGIN, USERS_ID, SMS_NOT_UNIQUE}, | |
290 | {V_CHAR, 4}, | |
291 | {V_CHAR, 5}, | |
292 | {V_CHAR, 6}, | |
293 | {V_CHAR, 8}, | |
294 | {V_TYPE, 9, CLASS, 0, 0, SMS_BAD_CLASS}, | |
295 | }; | |
296 | ||
297 | static struct validate uusr_validate = { | |
298 | uusr_valobj, | |
299 | 7, | |
300 | 0, | |
301 | 0, | |
302 | 0, | |
303 | USERS_ID, | |
304 | 0, | |
305 | 0, | |
306 | set_modtime_by_id, | |
307 | }; | |
308 | ||
309 | static char *uush_fields[] = { | |
310 | LOGIN, | |
311 | SHELL, | |
312 | }; | |
313 | ||
314 | static struct validate uush_validate = { | |
315 | VOuser0, | |
316 | 1, | |
317 | 0, | |
318 | 0, | |
319 | 0, | |
320 | USERS_ID, | |
321 | access_user, | |
322 | 0, | |
323 | set_modtime_by_id, | |
324 | }; | |
325 | ||
326 | static char *uust_fields[] = { | |
327 | LOGIN, | |
328 | STATUS, | |
329 | }; | |
330 | ||
331 | static struct validate uust_validate = { | |
332 | VOuser0, | |
333 | 1, | |
334 | 0, | |
335 | 0, | |
336 | 0, | |
337 | USERS_ID, | |
338 | 0, | |
339 | 0, | |
340 | set_modtime_by_id, | |
341 | }; | |
342 | ||
343 | static char *dusr_fields[] = { | |
344 | LOGIN, | |
345 | }; | |
346 | ||
347 | static struct validate dusr_validate = { | |
348 | VOuser0, | |
349 | 1, | |
350 | 0, | |
351 | 0, | |
352 | 0, | |
353 | 0, | |
354 | 0, | |
355 | setup_dusr, | |
356 | 0, | |
357 | }; | |
358 | ||
359 | static char *dubu_fields[] = { | |
360 | UID, | |
361 | }; | |
362 | ||
363 | static struct valobj dubu_valobj[] = { | |
364 | {V_ID, 0, USERS, UID, USERS_ID, SMS_USER} | |
365 | }; | |
366 | ||
367 | static struct validate dubu_validate = { | |
368 | dubu_valobj, | |
369 | 1, | |
370 | 0, | |
371 | 0, | |
372 | 0, | |
373 | 0, | |
374 | 0, | |
375 | setup_dusr, | |
376 | 0, | |
377 | }; | |
378 | ||
379 | static char *gfbl_fields[] = { | |
380 | LOGIN, | |
381 | LOGIN, "fullname", "nickname", "home_addr", | |
382 | "home_phone", "office_address", "office_phone", "mit_dept", | |
383 | "mit_affil", MOD1, MOD2, MOD3, | |
384 | }; | |
385 | ||
386 | static struct validate gfbl_validate = { | |
387 | VOuser0, | |
388 | 1, | |
389 | 0, | |
390 | 0, | |
391 | 0, | |
392 | 0, | |
393 | access_user, | |
394 | 0, | |
395 | followup_fix_modby, | |
396 | }; | |
397 | ||
398 | static char *ufbl_fields[] = { | |
399 | LOGIN, | |
400 | "fullname", "nickname", "home_addr", | |
401 | "home_phone", "office_address", "office_phone", "mit_dept", | |
402 | "mit_affil", | |
403 | }; | |
404 | ||
405 | static struct validate ufbl_validate = { | |
406 | VOuser0, | |
407 | 1, | |
408 | 0, | |
409 | 0, | |
410 | 0, | |
411 | 0, | |
412 | access_user, | |
413 | 0, | |
414 | set_finger_modtime, | |
415 | }; | |
416 | ||
417 | static char *gpob_fields[] = { | |
418 | LOGIN, | |
419 | LOGIN, TYPE, "box", MOD1, MOD2, MOD3, | |
420 | }; | |
421 | ||
422 | static struct validate gpob_validate = { | |
423 | VOuser0, | |
424 | 1, | |
425 | "potype", | |
426 | "u.potype != \"NONE\" and u.users_id=%d", | |
427 | 1, | |
428 | 0, | |
429 | access_user, | |
430 | 0, | |
431 | followup_gpob, | |
432 | }; | |
433 | ||
434 | static char *gpox_fields[] = { | |
435 | LOGIN, TYPE, "box", | |
436 | }; | |
437 | ||
438 | static struct validate gpox_validate = { | |
439 | 0, | |
440 | 0, | |
441 | 0, | |
442 | 0, | |
443 | 0, | |
444 | 0, | |
445 | 0, | |
446 | 0, | |
447 | followup_gpob, | |
448 | }; | |
449 | ||
450 | static char *spob_fields[] = { | |
451 | LOGIN, TYPE, "box", | |
452 | }; | |
453 | ||
454 | static struct valobj spob_valobj[] = { | |
455 | {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER}, | |
456 | {V_TYPE, 1, "pobox", 0, 0, SMS_TYPE}, | |
457 | }; | |
458 | ||
459 | static struct validate spob_validate = /* SET_POBOX */ | |
460 | { | |
461 | spob_valobj, | |
462 | 2, | |
463 | 0, | |
464 | 0, | |
465 | 0, | |
466 | 0, | |
467 | access_user, | |
468 | 0, | |
469 | set_pobox, | |
470 | }; | |
471 | ||
472 | static struct validate spop_validate = /* SET_POBOX_POP */ | |
473 | { | |
474 | VOuser0, | |
475 | 1, | |
476 | 0, | |
477 | 0, | |
478 | 0, | |
479 | 0, | |
480 | access_user, | |
481 | setup_spop, | |
482 | set_pobox_modtime, | |
483 | }; | |
484 | ||
485 | static struct validate dpob_validate = /* DELETE_POBOX */ | |
486 | { | |
487 | VOuser0, | |
488 | 1, | |
489 | 0, | |
490 | 0, | |
491 | 0, | |
492 | 0, | |
493 | access_user, | |
494 | setup_dpob, | |
495 | set_pobox_modtime, | |
496 | }; | |
497 | ||
498 | static char *gmac_fields[] = { | |
499 | NAME, | |
500 | NAME, TYPE, MOD1, MOD2, MOD3, | |
501 | }; | |
502 | ||
503 | static char *amac_fields[] = { | |
504 | NAME, TYPE | |
505 | }; | |
506 | ||
507 | static struct valobj amac_valobj[] = { | |
508 | {V_CHAR, 0}, | |
509 | {V_TYPE, 1, "mac_type", 0, 0, SMS_TYPE}, | |
510 | }; | |
511 | ||
512 | static struct validate amac_validate = { | |
513 | amac_valobj, | |
514 | 2, | |
515 | NAME, | |
516 | "m.name = uppercase(\"%s\")", | |
517 | 1, | |
518 | MACH_ID, | |
519 | 0, | |
520 | 0, | |
521 | set_mach_modtime, | |
522 | }; | |
523 | ||
524 | static char *umac_fields[] = { | |
525 | NAME, | |
526 | "newname", TYPE, | |
527 | }; | |
528 | ||
529 | static struct valobj umac_valobj[] = { | |
530 | {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
531 | {V_RENAME, 1, MACHINE, NAME, MACH_ID, SMS_NOT_UNIQUE}, | |
532 | {V_TYPE, 2, "mac_type", 0, 0, SMS_TYPE}, | |
533 | }; | |
534 | ||
535 | static struct validate umac_validate = { | |
536 | umac_valobj, | |
537 | 3, | |
538 | 0, | |
539 | 0, | |
540 | 0, | |
541 | MACH_ID, | |
542 | 0, | |
543 | 0, | |
544 | set_modtime_by_id, | |
545 | }; | |
546 | ||
547 | static char *dmac_fields[] = { | |
548 | NAME, | |
549 | }; | |
550 | ||
551 | static struct validate dmac_validate = { | |
552 | VOmach0, | |
553 | 1, | |
554 | 0, | |
555 | 0, | |
556 | 0, | |
557 | 0, | |
558 | 0, | |
559 | setup_dmac, | |
560 | 0, | |
561 | }; | |
562 | ||
563 | static char *gclu_fields[] = { | |
564 | NAME, | |
565 | NAME, DESC, LOCATION, MOD1, MOD2, MOD3, | |
566 | }; | |
567 | ||
568 | static char *aclu_fields[] = { | |
569 | NAME, DESC, LOCATION, | |
570 | }; | |
571 | ||
572 | static struct validate aclu_validate = /* for aclu */ | |
573 | { | |
574 | VOchar0, | |
575 | 1, | |
576 | NAME, | |
577 | "c.name = \"%s\"", | |
578 | 1, | |
579 | "clu_id", | |
580 | 0, | |
581 | 0, | |
582 | set_modtime, | |
583 | }; | |
584 | ||
585 | static char *uclu_fields[] = { | |
586 | NAME, | |
587 | "newname", DESC, LOCATION, | |
588 | }; | |
589 | ||
590 | static struct valobj uclu_valobj[] = { | |
591 | {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER}, | |
592 | {V_RENAME, 1, CLUSTER, NAME, CLU_ID, SMS_NOT_UNIQUE}, | |
593 | }; | |
594 | ||
595 | static struct validate uclu_validate = { | |
596 | uclu_valobj, | |
597 | 2, | |
598 | 0, | |
599 | 0, | |
600 | 0, | |
601 | CLU_ID, | |
602 | 0, | |
603 | 0, | |
604 | set_modtime_by_id, | |
605 | }; | |
606 | ||
607 | static char *dclu_fields[] = { | |
608 | NAME, | |
609 | }; | |
610 | ||
611 | static struct validate dclu_validate = { | |
612 | VOclu0, | |
613 | 1, | |
614 | 0, | |
615 | 0, | |
616 | 0, | |
617 | 0, | |
618 | 0, | |
619 | setup_dclu, | |
620 | 0, | |
621 | }; | |
622 | ||
623 | static char *gmcm_fields[] = { | |
624 | MACHINE, CLUSTER, | |
625 | MACHINE, CLUSTER, | |
626 | }; | |
627 | ||
628 | static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */ | |
629 | { /* DELETE_MACHINE_FROM_CLUSTER */ | |
630 | {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
631 | {V_ID, 1, CLUSTER, NAME, CLU_ID, SMS_CLUSTER}, | |
632 | }; | |
633 | ||
634 | static struct validate amtc_validate = /* for amtc and dmfc */ | |
635 | { | |
636 | amtc_valobj, | |
637 | 2, | |
638 | MACH_ID, | |
639 | "m.mach_id = %d and m.clu_id = %d", | |
640 | 2, | |
641 | 0, | |
642 | 0, | |
643 | 0, | |
644 | set_mach_modtime_by_id, | |
645 | }; | |
646 | ||
647 | static char *gcld_fields[] = { | |
88343c5e | 648 | CLUSTER, "serv_label", |
649 | CLUSTER, "serv_label", "serv_cluster", | |
650 | }; | |
651 | ||
652 | static char *acld_fields[] = { | |
d33e787c | 653 | CLUSTER, "serv_label", "serv_cluster", |
654 | }; | |
655 | ||
656 | static struct valobj acld_valobj[] = | |
657 | { | |
658 | {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER}, | |
d33e787c | 659 | {V_CHAR, 2}, |
660 | }; | |
661 | ||
662 | static struct validate acld_validate = /* ADD_CLUSTER_DATA */ | |
663 | { /* DELETE_CLUSTER_DATA */ | |
664 | acld_valobj, | |
665 | 2, | |
666 | CLU_ID, | |
667 | "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"", | |
668 | 3, | |
669 | 0, | |
670 | 0, | |
671 | 0, | |
672 | set_cluster_modtime_by_id, | |
673 | }; | |
674 | ||
675 | static char *gsin_fields[] = { | |
676 | SERVICE, | |
7ac4c1b1 | 677 | SERVICE, "update_int", "target_file", "script", "dfgen", "dfcheck", |
d33e787c | 678 | TYPE, "enable", "inprogress", "harderror", "errmsg", |
88343c5e | 679 | ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3, |
d33e787c | 680 | }; |
681 | ||
682 | static struct validate gsin_validate = | |
683 | { | |
684 | 0, | |
685 | 0, | |
686 | 0, | |
687 | 0, | |
688 | 0, | |
689 | 0, | |
690 | access_service, | |
691 | 0, | |
692 | followup_glin, | |
693 | }; | |
694 | ||
695 | static char *qgsv_fields[] = { | |
696 | "enable", "inprogress", "harderror", | |
697 | "service", | |
698 | }; | |
699 | ||
700 | static struct valobj qgsv_valobj[] = { | |
701 | {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE}, | |
702 | {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE}, | |
703 | {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE}, | |
704 | }; | |
705 | ||
706 | static struct validate qgsv_validate = { | |
707 | qgsv_valobj, | |
708 | 3, | |
709 | 0, | |
710 | 0, | |
711 | 0, | |
712 | 0, | |
713 | 0, | |
714 | 0, | |
715 | qualified_get_server, | |
716 | }; | |
717 | ||
718 | static char *asin_fields[] = { | |
719 | SERVICE, "update_int", "target_file", "script", TYPE, "enable", | |
88343c5e | 720 | ACE_TYPE, ACE_NAME, |
d33e787c | 721 | }; |
722 | ||
723 | static struct valobj asin_valobj[] = { | |
724 | {V_CHAR, 0}, | |
725 | {V_TYPE, 4, "service", 0, 0, SMS_TYPE}, | |
88343c5e | 726 | {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE}, |
727 | {V_TYPEDATA, 7, 0, 0, 0, SMS_ACE}, | |
d33e787c | 728 | }; |
729 | ||
730 | static struct validate asin_validate = /* for asin, usin */ | |
731 | { | |
732 | asin_valobj, | |
733 | 4, | |
734 | NAME, | |
88343c5e | 735 | "s.name = uppercase(\"%s\")", |
d33e787c | 736 | 1, |
737 | 0, | |
738 | 0, | |
739 | 0, | |
740 | set_modtime, | |
741 | }; | |
742 | ||
743 | static struct validate rsve_validate = { | |
744 | 0, | |
745 | 0, | |
746 | NAME, | |
88343c5e | 747 | "s.name = uppercase(\"%s\")", |
d33e787c | 748 | 1, |
749 | 0, | |
750 | access_service, | |
751 | 0, | |
752 | set_modtime, | |
753 | }; | |
754 | ||
755 | static char *ssif_fields[] = { | |
7ac4c1b1 | 756 | SERVICE, "dfgen", "dfcheck", "inprogress", "harderror", "errmsg", |
d33e787c | 757 | }; |
758 | ||
759 | static struct validate ssif_validate = { | |
87167924 | 760 | 0, |
761 | 0, | |
d33e787c | 762 | NAME, |
88343c5e | 763 | "s.name = uppercase(\"%s\")", |
d33e787c | 764 | 1, |
765 | 0, | |
766 | 0, | |
87167924 | 767 | 0, |
d33e787c | 768 | 0, |
769 | }; | |
770 | ||
771 | static char *dsin_fields[] = { | |
772 | SERVICE, | |
773 | }; | |
774 | ||
775 | static struct validate dsin_validate = { | |
776 | 0, | |
777 | 0, | |
778 | NAME, | |
88343c5e | 779 | "s.name = uppercase(\"%s\")", |
d33e787c | 780 | 1, |
781 | 0, | |
782 | 0, | |
783 | setup_dsin, | |
784 | 0, | |
785 | }; | |
786 | ||
787 | static char *gshi_fields[] = { | |
788 | SERVICE, MACHINE, | |
789 | SERVICE, MACHINE, "enable", "override", "success", "inprogress", | |
790 | "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2", | |
791 | "value3", MOD1, MOD2, MOD3, | |
792 | }; | |
793 | ||
794 | static struct validate gshi_validate = { | |
795 | 0, | |
796 | 0, | |
797 | 0, | |
798 | 0, | |
799 | 0, | |
800 | 0, | |
801 | access_service, | |
802 | 0, | |
803 | followup_fix_modby, | |
804 | }; | |
805 | ||
806 | static char *qgsh_fields[] = { | |
807 | "service", "enable", "override", "success", "inprogress", "hosterror", | |
808 | "service", MACHINE, | |
809 | }; | |
810 | ||
811 | static struct valobj qgsh_valobj[] = { | |
812 | {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE}, | |
813 | {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE}, | |
814 | {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE}, | |
815 | {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE}, | |
816 | {V_TYPE, 5, "boolean", 0, 0, SMS_TYPE}, | |
817 | }; | |
818 | ||
819 | static struct validate qgsh_validate = { | |
820 | qgsh_valobj, | |
821 | 5, | |
822 | 0, | |
823 | 0, | |
824 | 0, | |
825 | 0, | |
826 | 0, | |
827 | 0, | |
828 | qualified_get_serverhost, | |
829 | }; | |
830 | ||
831 | static char *ashi_fields[] = { | |
832 | SERVICE, MACHINE, "enable", "value1", "value2", "value3", | |
833 | }; | |
834 | ||
835 | static struct valobj ashi_valobj[] = { | |
836 | {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE}, | |
837 | {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
838 | }; | |
839 | ||
840 | static struct validate ashi_validate = /* ashi & ushi */ | |
841 | { | |
842 | ashi_valobj, | |
843 | 2, | |
844 | SERVICE, | |
88343c5e | 845 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 846 | 2, |
847 | 0, | |
848 | access_service, | |
849 | 0, | |
850 | set_serverhost_modtime, | |
851 | }; | |
852 | ||
853 | static struct validate rshe_validate = | |
854 | { | |
855 | ashi_valobj, | |
856 | 2, | |
857 | SERVICE, | |
88343c5e | 858 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 859 | 2, |
860 | 0, | |
861 | access_service, | |
862 | 0, | |
863 | set_serverhost_modtime, | |
864 | }; | |
865 | ||
866 | static struct validate ssho_validate = | |
867 | { | |
868 | ashi_valobj, | |
869 | 2, | |
870 | SERVICE, | |
88343c5e | 871 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 872 | 2, |
873 | 0, | |
874 | access_service, | |
875 | 0, | |
876 | trigger_dcm, | |
877 | }; | |
878 | ||
879 | static char *sshi_fields[] = { | |
880 | "service", MACHINE, "override", "success", "inprogress", | |
881 | "hosterror", "errmsg", "ltt", "lts" | |
882 | }; | |
883 | ||
884 | static struct valobj sshi_valobj[] = { | |
885 | {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE}, | |
886 | {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
d33e787c | 887 | }; |
888 | ||
889 | static struct validate sshi_validate = | |
890 | { | |
891 | sshi_valobj, | |
87167924 | 892 | 2, |
d33e787c | 893 | SERVICE, |
7ac4c1b1 | 894 | "s.service = uppercase(\"%s\") and s.mach_id = %d", |
d33e787c | 895 | 2, |
896 | 0, | |
897 | 0, | |
87167924 | 898 | 0, |
d33e787c | 899 | 0, |
900 | }; | |
901 | ||
902 | static char *dshi_fields[] = { | |
903 | SERVICE, MACHINE, | |
904 | }; | |
905 | ||
906 | static struct validate dshi_validate = | |
907 | { | |
908 | ashi_valobj, | |
909 | 2, | |
910 | SERVICE, | |
88343c5e | 911 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 912 | 2, |
913 | 0, | |
914 | access_service, | |
915 | setup_dshi, | |
916 | 0, | |
917 | }; | |
918 | ||
919 | static char *gsha_fields[] = { | |
920 | MACHINE, | |
88343c5e | 921 | MACHINE, ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3, |
d33e787c | 922 | }; |
923 | ||
924 | static struct validate gsha_validate = | |
925 | { | |
926 | 0, | |
927 | 0, | |
928 | 0, | |
929 | 0, | |
930 | 0, | |
931 | 0, | |
932 | 0, | |
933 | 0, | |
934 | followup_gsha, | |
935 | }; | |
936 | ||
937 | static char *asha_fields[] = { | |
88343c5e | 938 | MACHINE, ACE_TYPE, ACE_NAME, |
d33e787c | 939 | }; |
940 | ||
941 | static struct valobj asha_valobj[] = { | |
942 | {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
88343c5e | 943 | {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE}, |
944 | {V_TYPEDATA, 2, 0, 0, 0, SMS_ACE}, | |
d33e787c | 945 | }; |
946 | ||
947 | static struct validate asha_validate = | |
948 | { | |
949 | asha_valobj, | |
950 | 3, | |
951 | MACH_ID, | |
952 | "ha.mach_id = %d", | |
953 | 1, | |
954 | MACH_ID, | |
955 | 0, | |
956 | 0, | |
957 | set_modtime_by_id, | |
958 | }; | |
959 | ||
960 | static char *gslo_fields[] = { | |
961 | "server", | |
962 | "server", MACHINE, | |
963 | }; | |
964 | ||
965 | static char *gfsl_fields[] = { | |
966 | LABEL, | |
967 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
968 | "create", "lockertype", MOD1, MOD2, MOD3, | |
969 | }; | |
970 | ||
971 | static char *gfsm_fields[] = { | |
972 | MACHINE, | |
973 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
974 | "create", "lockertype", MOD1, MOD2, MOD3, | |
975 | }; | |
976 | ||
977 | static struct validate gfsm_validate = { | |
978 | VOmach0, | |
979 | 1, | |
980 | 0, | |
981 | 0, | |
982 | 0, | |
983 | 0, | |
984 | 0, | |
985 | 0, | |
986 | followup_fix_modby, | |
987 | }; | |
988 | ||
88343c5e | 989 | static char *gfsn_fields[] = { |
990 | MACHINE, "parition", | |
991 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
992 | "create", "lockertype", MOD1, MOD2, MOD3, | |
993 | }; | |
994 | ||
d33e787c | 995 | static char *gfsg_fields[] = { |
996 | LIST, | |
997 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
998 | "create", "lockertype", MOD1, MOD2, MOD3, | |
999 | }; | |
1000 | ||
1001 | static struct validate gfsg_validate = { | |
1002 | VOlist0, | |
1003 | 1, | |
1004 | 0, | |
1005 | 0, | |
1006 | 0, | |
1007 | 0, | |
1008 | access_list, | |
1009 | 0, | |
1010 | followup_fix_modby, | |
1011 | }; | |
1012 | ||
1013 | static char *afil_fields[] = { | |
1014 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
1015 | "create", "lockertype", | |
1016 | }; | |
1017 | ||
1018 | static struct valobj afil_valobj[] = { | |
1019 | {V_CHAR, 0}, | |
88343c5e | 1020 | {V_TYPE, 1, FILESYS, 0, 0, SMS_FSTYPE}, |
d33e787c | 1021 | {V_ID, 2, MACHINE, NAME, MACH_ID, SMS_MACHINE}, |
1022 | {V_CHAR, 3}, | |
1023 | {V_ID, 7, USERS, LOGIN, USERS_ID, SMS_USER}, | |
1024 | {V_ID, 8, LIST, NAME, LIST_ID, SMS_LIST}, | |
1025 | {V_TYPE, 10, "lockertype", 0, 0, SMS_TYPE} | |
1026 | }; | |
1027 | ||
1028 | static struct validate afil_validate = { | |
1029 | afil_valobj, | |
1030 | 7, | |
1031 | LABEL, | |
1032 | "fs.label = \"%s\"", | |
1033 | 1, | |
1034 | FILSYS_ID, | |
1035 | 0, | |
1036 | setup_afil, | |
1037 | set_filesys_modtime, | |
1038 | }; | |
1039 | ||
1040 | static char *ufil_fields[] = { | |
1041 | LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments", | |
1042 | "owner", "owners", "create", "lockertype", | |
1043 | }; | |
1044 | ||
1045 | static struct valobj ufil_valobj[] = { | |
1046 | {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS}, | |
1047 | {V_RENAME, 1, FILESYS, LABEL, FILSYS_ID, SMS_NOT_UNIQUE}, | |
88343c5e | 1048 | {V_TYPE, 2, FILESYS, 0, 0, SMS_FSTYPE}, |
d33e787c | 1049 | {V_ID, 3, MACHINE, NAME, MACH_ID, SMS_MACHINE}, |
1050 | {V_CHAR, 4}, | |
1051 | {V_ID, 8, USERS, LOGIN, USERS_ID, SMS_USER}, | |
1052 | {V_ID, 9, LIST, NAME, LIST_ID, SMS_LIST}, | |
1053 | {V_TYPE, 11, "lockertype", 0, 0, SMS_TYPE} | |
1054 | }; | |
1055 | ||
1056 | static struct validate ufil_validate = { | |
1057 | ufil_valobj, | |
1058 | 8, | |
1059 | LABEL, | |
1060 | "fs.filsys_id = %d", | |
1061 | 1, | |
1062 | FILSYS_ID, | |
1063 | 0, | |
1064 | setup_ufil, | |
1065 | set_filesys_modtime, | |
1066 | }; | |
1067 | ||
1068 | static char *dfil_fields[] = { | |
1069 | LABEL, | |
1070 | }; | |
1071 | ||
1072 | static struct valobj dfil_valobj[] = { | |
1073 | {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS}, | |
1074 | }; | |
1075 | ||
1076 | static struct validate dfil_validate = { | |
1077 | dfil_valobj, | |
1078 | 1, | |
1079 | "label", | |
1080 | "fs.filsys_id = %d", | |
1081 | 1, | |
1082 | 0, | |
1083 | 0, | |
1084 | setup_dfil, | |
1085 | 0, | |
1086 | }; | |
1087 | ||
1088 | static char *ganf_fields[] = { | |
1089 | MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3, | |
1090 | }; | |
1091 | ||
1092 | static char *gnfp_fields[] = { | |
1093 | MACHINE, DIR, | |
1094 | MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3, | |
1095 | }; | |
1096 | ||
1097 | static struct validate gnfp_validate = { | |
1098 | VOmach0, | |
1099 | 1, | |
1100 | 0, | |
1101 | 0, | |
1102 | 0, | |
1103 | 0, | |
1104 | 0, | |
1105 | 0, | |
1106 | followup_fix_modby, | |
1107 | }; | |
1108 | ||
1109 | static struct valobj anfp_valobj[] = { | |
1110 | {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
1111 | {V_CHAR, 1}, | |
1112 | }; | |
1113 | ||
1114 | static struct validate anfp_validate = { | |
1115 | anfp_valobj, | |
1116 | 2, | |
1117 | DIR, | |
1118 | "np.mach_id = %d and np.dir = \"%s\"", | |
1119 | 2, | |
1120 | "nfsphys_id", | |
1121 | 0, | |
1122 | 0, | |
1123 | set_nfsphys_modtime, | |
1124 | }; | |
1125 | ||
1126 | static char *dnfp_fields[] = { | |
1127 | MACHINE, DIR, | |
1128 | }; | |
1129 | ||
1130 | static struct validate dnfp_validate = { | |
1131 | VOmach0, | |
1132 | 1, | |
1133 | DIR, | |
1134 | "np.mach_id = %d and np.dir = \"%s\"", | |
1135 | 2, | |
1136 | "nfsphys_id", | |
1137 | 0, | |
1138 | setup_dnfp, | |
1139 | set_nfsphys_modtime, | |
1140 | }; | |
1141 | ||
1142 | static char *gnfq_fields[] = { | |
88343c5e | 1143 | FILESYS, LOGIN, |
d33e787c | 1144 | FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3, |
1145 | }; | |
1146 | ||
88343c5e | 1147 | static struct valobj gnfq_valobj[] = { |
1148 | {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER}, | |
1149 | {V_SORT, 0}, | |
1150 | }; | |
1151 | ||
d33e787c | 1152 | static struct validate gnfq_validate = { |
88343c5e | 1153 | gnfq_valobj, |
1154 | 2, | |
d33e787c | 1155 | 0, |
1156 | 0, | |
1157 | 0, | |
1158 | 0, | |
1159 | access_filesys, | |
1160 | 0, | |
1161 | followup_fix_modby, | |
1162 | }; | |
1163 | ||
1164 | static char *gnqp_fields[] = { | |
1165 | MACHINE, DIR, | |
1166 | FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3, | |
1167 | }; | |
1168 | ||
d33e787c | 1169 | static char *anfq_fields[] = { |
1170 | FILESYS, LOGIN, "quota", | |
1171 | }; | |
1172 | ||
1173 | static struct validate anfq_validate = { | |
1174 | VOfilsys0user1, | |
1175 | 2, | |
1176 | USERS_ID, | |
1177 | "nq.filsys_id = %d and nq.users_id = %d", | |
1178 | 2, | |
1179 | 0, | |
1180 | 0, | |
1181 | 0, | |
1182 | followup_anfq, | |
1183 | }; | |
1184 | ||
1185 | static struct validate unfq_validate = { | |
1186 | VOfilsys0user1, | |
1187 | 2, | |
1188 | USERS_ID, | |
1189 | "nq.filsys_id = %d and nq.users_id = %d", | |
1190 | 2, | |
1191 | 0, | |
1192 | 0, | |
1193 | setup_dnfq, | |
1194 | followup_anfq, | |
1195 | }; | |
1196 | ||
1197 | static struct validate dnfq_validate = { | |
1198 | VOfilsys0user1, | |
1199 | 2, | |
1200 | USERS_ID, | |
1201 | "nq.filsys_id = %d and nq.users_id = %d", | |
1202 | 2, | |
1203 | 0, | |
1204 | 0, | |
1205 | setup_dnfq, | |
1206 | 0, | |
1207 | }; | |
1208 | ||
1209 | static char *glin_fields[] = { | |
1210 | NAME, | |
1211 | NAME, "active", "public", "hidden", "maillist", "group", "gid", | |
88343c5e | 1212 | ACE_TYPE, ACE_NAME, DESC, MOD1, MOD2, MOD3, |
d33e787c | 1213 | }; |
1214 | ||
1215 | static struct validate glin_validate = { | |
1216 | 0, | |
1217 | 0, | |
1218 | 0, | |
1219 | 0, | |
1220 | 0, | |
1221 | 0, | |
1222 | access_vis_list_by_name, | |
1223 | 0, | |
1224 | get_list_info, | |
1225 | }; | |
1226 | ||
1227 | static char *alis_fields[] = { | |
1228 | NAME, "active", "public", "hidden", "maillist", "group", "gid", | |
88343c5e | 1229 | ACE_TYPE, ACE_NAME, DESC, |
d33e787c | 1230 | }; |
1231 | ||
1232 | static struct valobj alis_valobj[] = { | |
1233 | {V_CHAR, 0}, | |
88343c5e | 1234 | {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE}, |
1235 | {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE}, | |
d33e787c | 1236 | }; |
1237 | ||
1238 | static struct validate alis_validate = { | |
1239 | alis_valobj, | |
1240 | 3, | |
1241 | NAME, | |
1242 | "l.name = \"%s\"", | |
1243 | 1, | |
1244 | LIST_ID, | |
1245 | 0, | |
1246 | setup_alis, | |
1247 | set_modtime, | |
1248 | }; | |
1249 | ||
1250 | static char *ulis_fields[] = { | |
1251 | NAME, | |
1252 | "newname", "active", "public", "hidden", "maillist", "group", "gid", | |
88343c5e | 1253 | ACE_TYPE, ACE_NAME, DESC, |
d33e787c | 1254 | }; |
1255 | ||
1256 | static struct valobj ulis_valobj[] = { | |
1257 | {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST}, | |
1258 | {V_RENAME, 1, LIST, NAME, LIST_ID, SMS_NOT_UNIQUE}, | |
88343c5e | 1259 | {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE}, |
1260 | {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE}, | |
d33e787c | 1261 | }; |
1262 | ||
1263 | static struct validate ulis_validate = { | |
1264 | ulis_valobj, | |
1265 | 4, | |
1266 | NAME, | |
1267 | "l.list_id = %d", | |
1268 | 1, | |
1269 | LIST_ID, | |
1270 | access_list, | |
1271 | setup_alis, | |
1272 | set_modtime_by_id, | |
1273 | }; | |
1274 | ||
1275 | static char *dlis_fields[] = { | |
1276 | NAME, | |
1277 | }; | |
1278 | ||
1279 | static struct validate dlis_validate = { | |
1280 | VOlist0, | |
1281 | 1, | |
1282 | NAME, | |
1283 | "l.list_id = %d", | |
1284 | 1, | |
1285 | 0, | |
1286 | access_list, | |
1287 | setup_dlis, | |
1288 | 0, | |
1289 | }; | |
1290 | ||
1291 | static char *amtl_fields[] = { | |
1292 | "list_name", "member_type", "member_name", | |
1293 | }; | |
1294 | ||
1295 | static struct valobj amtl_valobj[] = { | |
1296 | {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST}, | |
1297 | {V_TYPE, 1, "member", 0, 0, SMS_TYPE}, | |
1298 | {V_TYPEDATA, 2, 0, 0, 0, SMS_NO_MATCH}, | |
1299 | }; | |
1300 | ||
1301 | static struct validate amtl_validate = /* for amtl and dmfl */ | |
1302 | { | |
1303 | amtl_valobj, | |
1304 | 3, | |
1305 | "member_id", | |
1306 | "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d", | |
1307 | 3, | |
1308 | 0, | |
1309 | access_list, | |
1310 | 0, | |
1311 | followup_amtl, | |
1312 | }; | |
1313 | ||
1314 | static char *gaus_fields[] = { | |
88343c5e | 1315 | ACE_TYPE, ACE_NAME, |
d33e787c | 1316 | "use_type", "use_name", |
1317 | }; | |
1318 | ||
1319 | static struct valobj gaus_valobj[] = { | |
1320 | {V_TYPE, 0, "gaus", 0, 0, SMS_TYPE}, | |
1321 | {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH}, | |
1322 | }; | |
1323 | ||
1324 | static struct validate gaus_validate = { | |
1325 | gaus_valobj, | |
1326 | 2, | |
1327 | 0, | |
1328 | 0, | |
1329 | 0, | |
1330 | 0, | |
1331 | access_member, | |
1332 | 0, | |
88343c5e | 1333 | get_ace_use, |
d33e787c | 1334 | }; |
1335 | ||
1336 | static char *qgli_fields[] = { | |
1337 | "active", "public", "hidden", "maillist", "group", | |
1338 | "list", | |
1339 | }; | |
1340 | ||
1341 | static struct valobj qgli_valobj[] = { | |
1342 | {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE}, | |
1343 | {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE}, | |
1344 | {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE}, | |
1345 | {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE}, | |
1346 | {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE}, | |
1347 | }; | |
1348 | ||
1349 | static struct validate qgli_validate = { | |
1350 | qgli_valobj, | |
1351 | 5, | |
1352 | 0, | |
1353 | 0, | |
1354 | 0, | |
1355 | 0, | |
1356 | access_qgli, | |
1357 | 0, | |
1358 | qualified_get_lists, | |
1359 | }; | |
1360 | ||
1361 | static char *gmol_fields[] = { | |
1362 | "list_name", | |
1363 | "member_type", "member_name", | |
1364 | }; | |
1365 | ||
1366 | static struct validate gmol_validate = { | |
1367 | VOlist0, | |
1368 | 1, | |
1369 | 0, | |
1370 | 0, | |
1371 | 0, | |
1372 | 0, | |
1373 | access_visible_list, | |
1374 | 0, | |
1375 | get_members_of_list, | |
1376 | }; | |
1377 | ||
1378 | static char *glom_fields[] = { | |
1379 | "member_type", "member_name", | |
1380 | "list_name", "active", "public", "hidden", "maillist", "group", | |
1381 | }; | |
1382 | ||
1383 | static struct valobj glom_valobj[] = { | |
1384 | {V_TYPE, 0, "rmember", 0, 0, SMS_TYPE}, | |
1385 | {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH}, | |
1386 | {V_SORT, 0}, | |
1387 | }; | |
1388 | ||
1389 | static struct validate glom_validate = { | |
1390 | glom_valobj, | |
1391 | 3, | |
1392 | 0, | |
1393 | 0, | |
1394 | 0, | |
1395 | 0, | |
1396 | access_member, | |
1397 | 0, | |
1398 | get_lists_of_member, | |
1399 | }; | |
1400 | ||
1401 | static char *cmol_fields[] = { | |
1402 | "list_name", | |
1403 | "count", | |
1404 | }; | |
1405 | ||
1406 | static struct validate cmol_validate = { | |
1407 | VOlist0, | |
1408 | 1, | |
1409 | 0, | |
1410 | 0, | |
1411 | 0, | |
1412 | 0, | |
1413 | access_visible_list, | |
1414 | 0, | |
1415 | count_members_of_list, | |
1416 | }; | |
1417 | ||
1418 | static char *augr_fields[] = { | |
1419 | LOGIN, | |
1420 | }; | |
1421 | ||
1422 | static struct validate augr_validate = { | |
1423 | 0, | |
1424 | 0, | |
1425 | 0, | |
1426 | 0, | |
1427 | 0, | |
1428 | 0, | |
1429 | 0, | |
1430 | 0, | |
1431 | add_user_group, | |
1432 | }; | |
1433 | ||
1434 | static char *gzcl_fields[] = { | |
1435 | CLASS, | |
1436 | CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name", | |
1437 | "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3, | |
1438 | }; | |
1439 | ||
1440 | static struct validate gzcl_validate = { | |
1441 | VOsort0, | |
1442 | 1, | |
1443 | 0, | |
1444 | 0, | |
1445 | 0, | |
1446 | 0, | |
1447 | 0, | |
1448 | 0, | |
1449 | followup_gzcl, | |
1450 | }; | |
1451 | ||
1452 | static char *azcl_fields[] = { | |
1453 | CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name", | |
1454 | "iws_type", "iws_name", "iui_type", "iui_name", | |
1455 | }; | |
1456 | ||
1457 | static struct valobj azcl_valobj[] = { | |
1458 | {V_CHAR, 0}, | |
88343c5e | 1459 | {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE}, |
1460 | {V_TYPEDATA, 2, 0, 0, LIST_ID, SMS_ACE}, | |
1461 | {V_TYPE, 3, ACE_TYPE, 0, 0, SMS_ACE}, | |
1462 | {V_TYPEDATA, 4, 0, 0, LIST_ID, SMS_ACE}, | |
1463 | {V_TYPE, 5, ACE_TYPE, 0, 0, SMS_ACE}, | |
1464 | {V_TYPEDATA, 6, 0, 0, LIST_ID, SMS_ACE}, | |
1465 | {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE}, | |
1466 | {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE}, | |
d33e787c | 1467 | }; |
1468 | ||
1469 | static struct validate azcl_validate = { | |
1470 | azcl_valobj, | |
1471 | 8, | |
1472 | CLASS, | |
1473 | "z.class = \"%s\"", | |
1474 | 1, | |
1475 | 0, | |
1476 | 0, | |
1477 | 0, | |
1478 | set_zephyr_modtime, | |
1479 | }; | |
1480 | ||
1481 | static char *uzcl_fields[] = { | |
1482 | CLASS, "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
1483 | "iws_type", "iws_name", "iui_type", "iui_name", | |
1484 | }; | |
1485 | ||
1486 | static struct valobj uzcl_valobj[] = { | |
1487 | {V_RENAME, 1, "zephyr", CLASS, 0, SMS_NOT_UNIQUE}, | |
88343c5e | 1488 | {V_TYPE, 2, ACE_TYPE, 0, 0, SMS_ACE}, |
1489 | {V_TYPEDATA, 3, 0, 0, LIST_ID, SMS_ACE}, | |
1490 | {V_TYPE, 4, ACE_TYPE, 0, 0, SMS_ACE}, | |
1491 | {V_TYPEDATA, 5, 0, 0, LIST_ID, SMS_ACE}, | |
1492 | {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE}, | |
1493 | {V_TYPEDATA, 7, 0, 0, LIST_ID, SMS_ACE}, | |
1494 | {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE}, | |
1495 | {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE}, | |
d33e787c | 1496 | }; |
1497 | ||
1498 | static struct validate uzcl_validate = { | |
1499 | uzcl_valobj, | |
1500 | 9, | |
1501 | CLASS, | |
1502 | "z.class = \"%s\"", | |
1503 | 1, | |
1504 | 0, | |
1505 | 0, | |
1506 | 0, | |
1507 | set_zephyr_modtime, | |
1508 | }; | |
1509 | ||
1510 | static struct validate dzcl_validate = { | |
1511 | 0, | |
1512 | 0, | |
1513 | CLASS, | |
1514 | "z.class = \"%s\"", | |
1515 | 1, | |
1516 | 0, | |
1517 | 0, | |
1518 | 0, | |
1519 | 0, | |
1520 | }; | |
1521 | ||
1522 | static char *gasv_fields[] = { | |
1523 | SERVICE, "protocol", "port", DESC, | |
1524 | }; | |
1525 | ||
1526 | static char *gpcp_fields[] = { | |
1527 | "printer", | |
fad88070 | 1528 | "printer", "spooling_host", "spool_directory", "rprinter", "comments", |
1529 | MOD1, MOD2, MOD3, | |
d33e787c | 1530 | }; |
1531 | ||
1532 | static char *apcp_fields[] = { | |
fad88070 | 1533 | "printer", "spooling_host", "spool_directory", "rprinter", "comments", |
1534 | MOD1, MOD2, MOD3, | |
1535 | }; | |
1536 | ||
1537 | static struct valobj apcp_valobj[] = { | |
1538 | {V_CHAR, 0}, | |
1539 | {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
d33e787c | 1540 | }; |
1541 | ||
1542 | static struct validate apcp_validate = { | |
fad88070 | 1543 | apcp_valobj, |
1544 | 2, | |
d33e787c | 1545 | NAME, |
1546 | "p.name = \"%s\"", | |
1547 | 1, | |
1548 | 0, | |
1549 | 0, | |
1550 | 0, | |
1551 | set_modtime, | |
1552 | }; | |
1553 | ||
fad88070 | 1554 | static struct validate dpcp_validate = { |
1555 | 0, | |
1556 | 0, | |
1557 | NAME, | |
1558 | "p.name = \"%s\"", | |
1559 | 1, | |
1560 | 0, | |
1561 | 0, | |
1562 | 0, | |
1563 | 0, | |
1564 | }; | |
1565 | ||
d33e787c | 1566 | static char *gali_fields[] = { |
1567 | NAME, TYPE, "trans", | |
1568 | NAME, TYPE, "trans", | |
1569 | }; | |
1570 | ||
1571 | static char *aali_fields[] = { | |
1572 | NAME, TYPE, "trans", | |
1573 | }; | |
1574 | ||
1575 | static struct valobj aali_valobj[] = { | |
1576 | {V_CHAR, 0}, | |
1577 | {V_TYPE, 1, "alias", 0, 0, SMS_TYPE}, | |
1578 | {V_CHAR, 2}, | |
1579 | }; | |
1580 | ||
1581 | static struct validate aali_validate = { | |
1582 | aali_valobj, | |
1583 | 3, | |
1584 | "trans", | |
1585 | "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"", | |
1586 | 3, | |
1587 | 0, | |
1588 | 0, | |
1589 | 0, | |
1590 | 0, | |
1591 | }; | |
1592 | ||
1593 | static struct validate dali_validate = /* DELETE_ALIAS */ | |
1594 | { | |
1595 | 0, | |
1596 | 0, | |
1597 | "trans", | |
1598 | "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"", | |
1599 | 3, | |
1600 | 0, | |
1601 | 0, | |
1602 | 0, | |
1603 | 0, | |
1604 | }; | |
1605 | ||
1606 | static char *gval_fields[] = { | |
1607 | NAME, "value", | |
1608 | }; | |
1609 | ||
1610 | static struct valobj gval_valobj[] = { | |
1611 | {V_NAME, 0, "values", NAME, 0, SMS_NO_MATCH}, | |
1612 | }; | |
1613 | ||
1614 | static struct validate gval_validate = { | |
1615 | gval_valobj, | |
1616 | 1, | |
1617 | 0, | |
1618 | 0, | |
1619 | 0, | |
1620 | 0, | |
1621 | 0, | |
1622 | 0, | |
1623 | 0, | |
1624 | }; | |
1625 | ||
1626 | static char *aval_fields[] = { | |
1627 | NAME, "value", | |
1628 | }; | |
1629 | ||
1630 | static struct validate aval_validate = /* for aval, uval, and dval */ | |
1631 | { | |
1632 | VOchar0, | |
1633 | 1, | |
1634 | NAME, | |
1635 | "v.name = \"%s\"", | |
1636 | 1, | |
1637 | 0, | |
1638 | 0, | |
1639 | 0, | |
1640 | 0, | |
1641 | }; | |
1642 | ||
1643 | static char *dval_fields[] = { | |
1644 | NAME, | |
1645 | }; | |
1646 | ||
1647 | static char *gats_fields[] = { | |
1648 | "table", "retrieves", "appends", "updates", "deletes", MOD1, MOD2, MOD3, | |
1649 | }; | |
1650 | ||
1651 | ||
1652 | \f | |
1653 | /* Generalized Query Definitions */ | |
1654 | ||
1655 | struct query Queries2[] = { | |
1656 | { | |
1657 | /* Q_GALO - GET_ALL_LOGINS */ | |
1658 | "get_all_logins", | |
1659 | "galo", | |
1660 | RETRIEVE, | |
1661 | "u", | |
1662 | USERS, | |
1663 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle", | |
1664 | galo_fields, | |
1665 | 6, | |
1666 | "u.users_id != 0", | |
1667 | 0, | |
1668 | 0, | |
1669 | }, | |
1670 | ||
1671 | { | |
1672 | /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */ | |
1673 | "get_all_active_logins", | |
1674 | "gaal", | |
1675 | RETRIEVE, | |
1676 | "u", | |
1677 | USERS, | |
1678 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle", | |
1679 | galo_fields, | |
1680 | 6, | |
91cdc7c5 | 1681 | "u.status = 1", |
d33e787c | 1682 | 0, |
1683 | 0, | |
1684 | }, | |
1685 | ||
1686 | { | |
1687 | /* Q_GUBL - GET_USER_BY_LOGIN */ | |
1688 | "get_user_by_login", | |
1689 | "gubl", | |
1690 | RETRIEVE, | |
1691 | "u", | |
1692 | USERS, | |
1693 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith", | |
1694 | gubl_fields, | |
1695 | 12, | |
1696 | "u.login = \"%s\" and u.users_id != 0", | |
1697 | 1, | |
1698 | &gubx_validate, | |
1699 | }, | |
1700 | ||
1701 | { | |
1702 | /* Q_GUBU - GET_USER_BY_UID */ | |
1703 | "get_user_by_uid", | |
1704 | "gubu", | |
1705 | RETRIEVE, | |
1706 | "u", | |
1707 | USERS, | |
1708 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith", | |
1709 | gubu_fields, | |
1710 | 12, | |
1711 | "u.uid = %s and u.users_id != 0", | |
1712 | 1, | |
1713 | &gubx_validate, | |
1714 | }, | |
1715 | ||
1716 | { | |
1717 | /* Q_GUBN - GET_USER_BY_NAME */ | |
1718 | "get_user_by_name", | |
1719 | "gubn", | |
1720 | RETRIEVE, | |
1721 | "u", | |
1722 | USERS, | |
1723 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith", | |
1724 | gubn_fields, | |
1725 | 12, | |
1726 | "u.first = \"%s\" and u.last = \"%s\" and u.users_id != 0", | |
1727 | 2, | |
1728 | &VDsortf, | |
1729 | }, | |
1730 | ||
1731 | { | |
1732 | /* Q_GUBC - GET_USER_BY_CLASS */ | |
1733 | "get_user_by_class", | |
1734 | "gubc", | |
1735 | RETRIEVE, | |
1736 | "u", | |
1737 | USERS, | |
1738 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith", | |
1739 | gubc_fields, | |
1740 | 12, | |
1741 | "u.mit_year = uppercase(\"%s\") and u.users_id != 0", | |
1742 | 1, | |
1743 | &VDsortf, | |
1744 | }, | |
1745 | ||
1746 | { | |
1747 | /* Q_GUBM - GET_USER_BY_MITID */ | |
1748 | "get_user_by_mitid", | |
1749 | "gubm", | |
1750 | RETRIEVE, | |
1751 | "u", | |
1752 | USERS, | |
1753 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith", | |
1754 | gubm_fields, | |
1755 | 12, | |
1756 | "u.mit_id = \"%s\" and u.users_id != 0", | |
1757 | 1, | |
1758 | &VDsortf, | |
1759 | }, | |
1760 | ||
1761 | { | |
1762 | /* Q_AUSR - ADD_USER */ | |
1763 | "add_user", | |
1764 | "ausr", | |
1765 | APPEND, | |
1766 | "u", | |
1767 | USERS, | |
1768 | "login = %c, users_id = values.value, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c", | |
1769 | ausr_fields, | |
1770 | 9, | |
1771 | "values.name = \"users_id\"", | |
1772 | 0, | |
1773 | &ausr_validate, | |
1774 | }, | |
1775 | ||
1776 | { | |
1777 | /* Q_RUSR - REGISTER_USER */ | |
1778 | "register_user", | |
1779 | "rusr", | |
1780 | APPEND, | |
1781 | 0, | |
1782 | 0, | |
1783 | 0, | |
1784 | rusr_fields, | |
1785 | 3, | |
1786 | 0, | |
1787 | 0, | |
1788 | &rusr_validate, | |
1789 | }, | |
1790 | ||
1791 | { | |
1792 | /* Q_UUSR - UPDATE_USER */ | |
1793 | "update_user", | |
1794 | "uusr", | |
1795 | UPDATE, | |
1796 | "u", | |
1797 | USERS, | |
1798 | "login = %c, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c", | |
1799 | uusr_fields, | |
1800 | 9, | |
1801 | "u.users_id = %d", | |
1802 | 1, | |
1803 | &uusr_validate, | |
1804 | }, | |
1805 | ||
1806 | { | |
1807 | /* Q_UUSH - UPDATE_USER_SHELL */ | |
1808 | "update_user_shell", | |
1809 | "uush", | |
1810 | UPDATE, | |
1811 | "u", | |
1812 | USERS, | |
1813 | "shell = %c", | |
1814 | uush_fields, | |
1815 | 1, | |
1816 | "u.users_id = %d", | |
1817 | 1, | |
1818 | &uush_validate, | |
1819 | }, | |
1820 | ||
1821 | { | |
1822 | /* Q_UUST - UPDATE_USER_STATUS */ | |
1823 | "update_user_status", | |
1824 | "uust", | |
1825 | UPDATE, | |
1826 | "u", | |
1827 | USERS, | |
1828 | "status = int4(%c)", | |
1829 | uust_fields, | |
1830 | 1, | |
1831 | "u.users_id = %d", | |
1832 | 1, | |
1833 | &uust_validate, | |
1834 | }, | |
1835 | ||
1836 | { | |
1837 | /* Q_DUSR - DELETE_USER */ | |
1838 | "delete_user", | |
1839 | "dusr", | |
1840 | DELETE, | |
1841 | "u", | |
1842 | USERS, | |
1843 | (char *)0, | |
1844 | dusr_fields, | |
1845 | 0, | |
1846 | "u.users_id = %d", | |
1847 | 1, | |
1848 | &dusr_validate, | |
1849 | }, | |
1850 | ||
1851 | { | |
1852 | /* Q_DUBU - DELETE_USER_BY_UID */ | |
1853 | "delete_user_by_uid", | |
1854 | "dubu", | |
1855 | DELETE, | |
1856 | "u", | |
1857 | USERS, | |
1858 | (char *)0, | |
1859 | dubu_fields, | |
1860 | 0, | |
1861 | "u.users_id = %d", | |
1862 | 1, | |
1863 | &dubu_validate, | |
1864 | }, | |
1865 | ||
1866 | { | |
1867 | /* Q_GFBL - GET_FINGER_BY_LOGIN */ | |
1868 | "get_finger_by_login", | |
1869 | "gfbl", | |
1870 | RETRIEVE, | |
1871 | "u", | |
1872 | USERS, | |
1873 | "%c = u.login,%c=u.fullname,%c=u.nickname,%c=u.home_addr,%c=u.home_phone,%c=u.office_addr,%c=u.office_phone,%c=u.mit_dept,%c=u.mit_affil,%c=u.fmodtime,%c=text(u.fmodby),%c=u.fmodwith", | |
1874 | gfbl_fields, | |
1875 | 12, | |
1876 | "u.users_id = %d", | |
1877 | 1, | |
1878 | &gfbl_validate, | |
1879 | }, | |
1880 | ||
1881 | { | |
1882 | /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */ | |
1883 | "update_finger_by_login", | |
1884 | "ufbl", | |
1885 | UPDATE, | |
1886 | "u", | |
1887 | USERS, | |
1888 | "fullname=%c,nickname=%c,home_addr=%c,home_phone=%c,office_addr=%c,office_phone=%c,mit_dept=%c,mit_affil=%c", | |
1889 | ufbl_fields, | |
1890 | 8, | |
1891 | "u.users_id = %d", | |
1892 | 1, | |
1893 | &ufbl_validate, | |
1894 | }, | |
1895 | ||
1896 | { | |
1897 | /* Q_GPOB - GET_POBOX */ | |
1898 | "get_pobox", | |
1899 | "gpob", | |
1900 | RETRIEVE, | |
1901 | "u", | |
1902 | USERS, | |
1903 | "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id), %c = u.pmodtime, %c = text(u.pmodby), %c = u.pmodwith", | |
1904 | gpob_fields, | |
1905 | 6, | |
1906 | "u.users_id = %d", | |
1907 | 1, | |
1908 | &gpob_validate, | |
1909 | }, | |
1910 | ||
1911 | { | |
1912 | /* Q_GAPO - GET_ALL_POBOXES */ | |
1913 | "get_all_poboxes", | |
1914 | "gapo", | |
1915 | RETRIEVE, | |
1916 | "u", | |
1917 | USERS, | |
1918 | "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)", | |
1919 | gpox_fields, | |
1920 | 3, | |
1921 | "u.potype != \"NONE\"", | |
1922 | 0, | |
1923 | &gpox_validate, | |
1924 | }, | |
1925 | ||
1926 | { | |
1927 | /* Q_GPOP - GET_POBOXES_POP */ | |
1928 | "get_poboxes_pop", | |
1929 | "gpop", | |
1930 | RETRIEVE, | |
1931 | "u", | |
1932 | USERS, | |
1933 | "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)", | |
1934 | gpox_fields, | |
1935 | 3, | |
1936 | "u.potype = \"POP\"", | |
1937 | 0, | |
1938 | &gpox_validate | |
1939 | }, | |
1940 | ||
1941 | { | |
1942 | /* Q_GPOF - GET_POBOXES_SMTP */ | |
1943 | "get_poboxes_smtp", | |
1944 | "gpos", | |
1945 | RETRIEVE, | |
1946 | "u", | |
1947 | USERS, | |
1948 | "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)", | |
1949 | gpox_fields, | |
1950 | 3, | |
1951 | "u.potype = \"SMTP\"", | |
1952 | 0, | |
1953 | &gpox_validate | |
1954 | }, | |
1955 | ||
1956 | { | |
1957 | /* Q_SPOB - SET_POBOX */ | |
1958 | "set_pobox", | |
1959 | "spob", | |
1960 | UPDATE, | |
1961 | 0, | |
1962 | USERS, | |
1963 | 0, | |
1964 | spob_fields, | |
1965 | 3, | |
1966 | (char *)0, | |
1967 | 0, | |
1968 | &spob_validate, | |
1969 | }, | |
1970 | ||
1971 | { | |
1972 | /* Q_SPOP - SET_POBOX_POP */ | |
1973 | "set_pobox_pop", | |
1974 | "spop", | |
1975 | UPDATE, | |
1976 | "u", | |
1977 | USERS, | |
1978 | "potype = \"POP\"", | |
1979 | spob_fields, | |
1980 | 0, | |
1981 | "u.users_id = %d", | |
1982 | 1, | |
1983 | &spop_validate, | |
1984 | }, | |
1985 | ||
1986 | { | |
1987 | /* Q_DPOB - DELETE_POBOX */ | |
1988 | "delete_pobox", | |
1989 | "dpob", | |
1990 | UPDATE, | |
1991 | "u", | |
1992 | USERS, | |
1993 | "potype = \"NONE\"", | |
1994 | spob_fields, | |
1995 | 0, | |
1996 | "u.users_id = %d", | |
1997 | 1, | |
1998 | &dpob_validate, | |
1999 | }, | |
2000 | ||
2001 | { | |
2002 | /* Q_GMAC - GET_MACHINE */ | |
2003 | "get_machine", | |
2004 | "gmac", | |
2005 | RETRIEVE, | |
2006 | "m", | |
2007 | MACHINE, | |
2008 | "%c = m.name, %c = m.type, %c = m.modtime, %c = text(m.modby), %c =m.modwith", | |
2009 | gmac_fields, | |
2010 | 5, | |
2011 | "m.name = uppercase(\"%s\") and m.mach_id != 0", | |
2012 | 1, | |
2013 | &VDsortf, | |
2014 | }, | |
2015 | ||
2016 | { | |
2017 | /* Q_AMAC - ADD_MACHINE */ | |
2018 | "add_machine", | |
2019 | "amac", | |
2020 | APPEND, | |
2021 | "m", | |
2022 | MACHINE, | |
2023 | "name = uppercase(%c), mach_id = values.value, type = %c", | |
2024 | amac_fields, | |
2025 | 2, | |
2026 | "values.name = \"mach_id\"", | |
2027 | 0, | |
2028 | &amac_validate, | |
2029 | }, | |
2030 | ||
2031 | { | |
2032 | /* Q_UMAC - UPDATE_MACHINE */ | |
2033 | "update_machine", | |
2034 | "umac", | |
2035 | UPDATE, | |
2036 | "m", | |
2037 | MACHINE, | |
2038 | "name = uppercase(%c), type = %c", | |
2039 | umac_fields, | |
2040 | 2, | |
2041 | "m.mach_id = %d", | |
2042 | 1, | |
2043 | &umac_validate, | |
2044 | }, | |
2045 | ||
2046 | { | |
2047 | /* Q_DMAC - DELETE_MACHINE */ | |
2048 | "delete_machine", | |
2049 | "dmac", | |
2050 | DELETE, | |
2051 | "m", | |
2052 | MACHINE, | |
2053 | (char *)0, | |
2054 | dmac_fields, | |
2055 | 0, | |
2056 | "m.mach_id = %d", | |
2057 | 1, | |
2058 | &dmac_validate, | |
2059 | }, | |
2060 | ||
2061 | { | |
2062 | /* Q_GCLU - GET_CLUSTER */ | |
2063 | "get_cluster", | |
2064 | "gclu", | |
2065 | RETRIEVE, | |
2066 | "c", | |
2067 | CLUSTER, | |
2068 | "%c = c.name, %c = c.desc, %c = c.location, %c = c.modtime, %c = text(c.modby), %c = c.modwith", | |
2069 | gclu_fields, | |
2070 | 6, | |
2071 | "c.name = \"%s\" and c.clu_id != 0", | |
2072 | 1, | |
2073 | &VDsortf, | |
2074 | }, | |
2075 | ||
2076 | { | |
2077 | /* Q_ACLU - ADD_CLUSTER */ | |
2078 | "add_cluster", | |
2079 | "aclu", | |
2080 | APPEND, | |
2081 | "c", | |
2082 | CLUSTER, | |
2083 | "name = %c, clu_id = values.value, desc = %c, location = %c", | |
2084 | aclu_fields, | |
2085 | 3, | |
2086 | "values.name = \"clu_id\"", | |
2087 | 0, | |
2088 | &aclu_validate, | |
2089 | }, | |
2090 | ||
2091 | { | |
2092 | /* Q_UCLU - UPDATE_CLUSTER */ | |
2093 | "update_cluster", | |
2094 | "uclu", | |
2095 | UPDATE, | |
2096 | "c", | |
2097 | CLUSTER, | |
2098 | "name = %c, desc = %c, location = %c", | |
2099 | uclu_fields, | |
2100 | 3, | |
2101 | "c.clu_id = %d", | |
2102 | 1, | |
2103 | &uclu_validate, | |
2104 | }, | |
2105 | ||
2106 | { | |
2107 | /* Q_DCLU - DELETE_CLUSTER */ | |
2108 | "delete_cluster", | |
2109 | "dclu", | |
2110 | DELETE, | |
2111 | "c", | |
2112 | CLUSTER, | |
2113 | (char *)0, | |
2114 | dclu_fields, | |
2115 | 0, | |
2116 | "c.clu_id = %d", | |
2117 | 1, | |
2118 | &dclu_validate, | |
2119 | }, | |
2120 | ||
2121 | { | |
2122 | /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */ | |
2123 | "get_machine_to_cluster_map", | |
2124 | "gmcm", | |
2125 | RETRIEVE, | |
2126 | "m", | |
2127 | "mcmap", | |
2128 | "%c = machine.name, %c = cluster.name", | |
2129 | gmcm_fields, | |
2130 | 2, | |
2131 | "machine.name = uppercase(\"%s\") and cluster.name = \"%s\" and m.clu_id = cluster.clu_id and m.mach_id = machine.mach_id", | |
2132 | 2, | |
2133 | &VDsort2, | |
2134 | }, | |
2135 | ||
2136 | { | |
2137 | /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */ | |
2138 | "add_machine_to_cluster", | |
2139 | "amtc", | |
2140 | APPEND, | |
2141 | "m", | |
2142 | "mcmap", | |
2143 | "mach_id = %i4, clu_id = %i4", | |
2144 | gmcm_fields, | |
2145 | 2, | |
2146 | 0, | |
2147 | 0, | |
2148 | &amtc_validate, | |
2149 | }, | |
2150 | ||
2151 | { | |
2152 | /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */ | |
2153 | "delete_machine_from_cluster", | |
2154 | "dmfc", | |
2155 | DELETE, | |
2156 | "m", | |
2157 | "mcmap", | |
2158 | 0, | |
2159 | gmcm_fields, | |
2160 | 0, | |
2161 | "m.mach_id = %d and m.clu_id = %d", | |
2162 | 2, | |
2163 | &amtc_validate, | |
2164 | }, | |
2165 | ||
2166 | { | |
2167 | /* Q_GCLD - GET_CLUSTER_DATA */ | |
2168 | "get_cluster_data", | |
2169 | "gcld", | |
2170 | RETRIEVE, | |
2171 | "s", | |
2172 | "svc", | |
2173 | "%c = cluster.name, %c = s.serv_label, %c = s.serv_cluster", | |
2174 | gcld_fields, | |
2175 | 3, | |
2176 | "cluster.clu_id = s.clu_id and cluster.name = \"%s\" and s.serv_label = \"%s\"", | |
2177 | 2, | |
2178 | &VDsort2, | |
2179 | }, | |
2180 | ||
2181 | { | |
2182 | /* Q_ACLD - ADD_CLUSTER_DATA */ | |
2183 | "add_cluster_data", | |
2184 | "acld", | |
2185 | APPEND, | |
2186 | "s", | |
2187 | "svc", | |
2188 | "clu_id = %i4, serv_label = %c, serv_cluster = %c", | |
88343c5e | 2189 | acld_fields, |
d33e787c | 2190 | 3, |
2191 | (char *)0, | |
2192 | 0, | |
2193 | &acld_validate, | |
2194 | }, | |
2195 | ||
2196 | { | |
2197 | /* Q_DCLD - DELETE_CLUSTER_DATA */ | |
2198 | "delete_cluster_data", | |
2199 | "dcld", | |
2200 | DELETE, | |
2201 | "s", | |
2202 | "svc", | |
2203 | (char *)0, | |
88343c5e | 2204 | acld_fields, |
d33e787c | 2205 | 0, |
2206 | "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"", | |
2207 | 3, | |
2208 | &acld_validate, | |
2209 | }, | |
2210 | ||
2211 | { | |
2212 | /* Q_GSIN - GET_SERVER_INFO */ | |
2213 | "get_server_info", | |
2214 | "gsin", | |
2215 | RETRIEVE, | |
2216 | "s", | |
2217 | "servers", | |
7ac4c1b1 | 2218 | "%c = s.name, %c = text(s.update_int), %c = s.target_file, %c = s.script, %c = text(s.dfgen), %c = text(s.dfcheck), %c = s.type, %c = text(s.enable), %c = text(s.inprogress), %c = text(s.harderror), %c = s.errmsg, %c = s.acl_type, %c = text(s.acl_id), %c = s.modtime, %c = text(s.modby), %c = s.modwith", |
d33e787c | 2219 | gsin_fields, |
7ac4c1b1 | 2220 | 16, |
88343c5e | 2221 | "s.name = uppercase(\"%s\")", |
d33e787c | 2222 | 1, |
2223 | &gsin_validate, | |
2224 | }, | |
2225 | ||
2226 | { | |
2227 | /* Q_QGSV - QUALIFIED_GET_SERVER */ | |
2228 | "qualified_get_server", | |
2229 | "qgsv", | |
2230 | RETRIEVE, | |
2231 | 0, | |
2232 | "servers", | |
2233 | 0, | |
2234 | qgsv_fields, | |
2235 | 1, | |
2236 | 0, | |
2237 | 3, | |
2238 | &qgsv_validate, | |
2239 | }, | |
2240 | ||
2241 | { | |
2242 | /* Q_ASIN - ADD_SERVER_INFO */ | |
2243 | "add_server_info", | |
2244 | "asin", | |
2245 | APPEND, | |
2246 | "s", | |
2247 | "servers", | |
88343c5e | 2248 | "name = uppercase(%c), update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4", |
d33e787c | 2249 | asin_fields, |
2250 | 8, | |
2251 | (char *)0, | |
2252 | 0, | |
2253 | &asin_validate, | |
2254 | }, | |
2255 | ||
2256 | { | |
2257 | /* Q_USIN - UPDATE_SERVER_INFO */ | |
2258 | "update_server_info", | |
2259 | "usin", | |
2260 | UPDATE, | |
2261 | "s", | |
2262 | "servers", | |
2263 | "update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4", | |
2264 | asin_fields, | |
2265 | 7, | |
88343c5e | 2266 | "s.name = uppercase(\"%s\")", |
d33e787c | 2267 | 1, |
2268 | &asin_validate, | |
2269 | }, | |
2270 | ||
2271 | { | |
2272 | /* Q_RSVE - RESET_SERVER_ERROR */ | |
2273 | "reset_server_error", | |
2274 | "rsve", | |
2275 | UPDATE, | |
2276 | "s", | |
2277 | "servers", | |
7ac4c1b1 | 2278 | "harderror = 0, dfcheck = s.dfgen", |
d33e787c | 2279 | dsin_fields, |
2280 | 0, | |
88343c5e | 2281 | "s.name = uppercase(\"%s\")", |
d33e787c | 2282 | 1, |
2283 | &rsve_validate, | |
2284 | }, | |
2285 | ||
2286 | { | |
2287 | /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */ | |
2288 | "set_server_internal_flags", | |
2289 | "ssif", | |
2290 | UPDATE, | |
2291 | "s", | |
2292 | "servers", | |
7ac4c1b1 | 2293 | "dfgen = int4(%c), dfcheck = int4(%c), inprogress = int1(%c), harderror = int1(%c), errmsg = %c", |
d33e787c | 2294 | ssif_fields, |
7ac4c1b1 | 2295 | 5, |
88343c5e | 2296 | "s.name = uppercase(\"%s\")", |
d33e787c | 2297 | 1, |
2298 | &ssif_validate, | |
2299 | }, | |
2300 | ||
2301 | { | |
2302 | /* Q_DSIN - DELETE_SERVER_INFO */ | |
2303 | "delete_server_info", | |
2304 | "dsin", | |
2305 | DELETE, | |
2306 | "s", | |
2307 | "servers", | |
2308 | (char *)0, | |
2309 | dsin_fields, | |
2310 | 0, | |
88343c5e | 2311 | "s.name = uppercase(\"%s\")", |
d33e787c | 2312 | 1, |
2313 | &dsin_validate, | |
2314 | }, | |
2315 | ||
2316 | { | |
2317 | /* Q_GSHI - GET_SERVER_HOST_INFO */ | |
2318 | "get_server_host_info", | |
2319 | "gshi", | |
2320 | RETRIEVE, | |
2321 | "sh", | |
2322 | "serverhosts", | |
87167924 | 2323 | "%c = sh.service, %c = machine.name, %c = text(sh.enable), %c = text(sh.override), %c = text(sh.success), %c = text(sh.inprogress), %c = text(sh.hosterror), %c = sh.hosterrmsg, %c = text(sh.ltt), %c = text(sh.lts), %c = text(sh.value1), %c = text(sh.value2), %c = sh.value3, %c = sh.modtime, %c = text(sh.modby), %c = sh.modwith", |
d33e787c | 2324 | gshi_fields, |
2325 | 16, | |
88343c5e | 2326 | "sh.service = uppercase(\"%s\") and machine.name = uppercase(\"%s\") and machine.mach_id = sh.mach_id", |
d33e787c | 2327 | 2, |
2328 | &gshi_validate, | |
2329 | }, | |
2330 | ||
2331 | { | |
2332 | /* Q_QGSV - QUALIFIED_GET_SERVER_HOST */ | |
2333 | "qualified_get_server_host", | |
2334 | "qgsh", | |
2335 | RETRIEVE, | |
2336 | 0, | |
2337 | "serverhosts", | |
2338 | 0, | |
2339 | qgsh_fields, | |
2340 | 2, | |
2341 | 0, | |
2342 | 6, | |
2343 | &qgsh_validate, | |
2344 | }, | |
2345 | ||
2346 | { | |
2347 | /* Q_ASHI - ADD_SERVER_HOST_INFO */ | |
2348 | "add_server_host_info", | |
2349 | "ashi", | |
2350 | APPEND, | |
2351 | "sh", | |
2352 | "serverhosts", | |
88343c5e | 2353 | "service = uppercase(%c), mach_id = %i4, enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c", |
d33e787c | 2354 | ashi_fields, |
2355 | 6, | |
2356 | (char *)0, | |
2357 | 0, | |
2358 | &ashi_validate, | |
2359 | }, | |
2360 | ||
2361 | { | |
2362 | /* Q_USHI - UPDATE_SERVER_HOST_INFO */ | |
2363 | "update_server_host_info", | |
2364 | "ushi", | |
2365 | UPDATE, | |
2366 | "sh", | |
2367 | "serverhosts", | |
2368 | "enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c", | |
2369 | ashi_fields, | |
2370 | 4, | |
88343c5e | 2371 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 2372 | 2, |
2373 | &ashi_validate, | |
2374 | }, | |
2375 | ||
2376 | { | |
2377 | /* Q_RSHE - RESET_SERVER_HOST_ERROR */ | |
2378 | "reset_server_host_error", | |
2379 | "rshe", | |
2380 | UPDATE, | |
2381 | "sh", | |
2382 | "serverhosts", | |
2383 | "hosterror = 0", | |
2384 | dshi_fields, | |
2385 | 0, | |
88343c5e | 2386 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 2387 | 2, |
2388 | &rshe_validate, | |
2389 | }, | |
2390 | ||
2391 | { | |
2392 | /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */ | |
2393 | "set_server_host_override", | |
2394 | "ssho", | |
2395 | UPDATE, | |
2396 | "sh", | |
2397 | "serverhosts", | |
2398 | "override = 1", | |
2399 | dshi_fields, | |
2400 | 0, | |
88343c5e | 2401 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 2402 | 2, |
2403 | &ssho_validate, | |
2404 | }, | |
2405 | ||
2406 | { | |
2407 | /* Q_SSHI - SET_SERVER_HOST_INTERNAL */ | |
2408 | "set_server_host_internal", | |
2409 | "sshi", | |
2410 | UPDATE, | |
7ac4c1b1 | 2411 | "s", |
d33e787c | 2412 | "serverhosts", |
87167924 | 2413 | "override = int1(%c), success = int1(%c), inprogress = int1(%c), hosterror = int1(%c), hosterrmsg = %c, ltt = int4(%c), lts = int4(%c)", |
d33e787c | 2414 | sshi_fields, |
2415 | 7, | |
7ac4c1b1 | 2416 | "s.service = uppercase(\"%s\") and s.mach_id = %d", |
d33e787c | 2417 | 2, |
2418 | &sshi_validate, | |
2419 | }, | |
2420 | ||
2421 | { | |
2422 | /* Q_DSHI - DELETE_SERVER_HOST_INFO */ | |
2423 | "delete_server_host_info", | |
2424 | "dshi", | |
2425 | DELETE, | |
2426 | "sh", | |
2427 | "serverhosts", | |
2428 | (char *)0, | |
2429 | dshi_fields, | |
2430 | 0, | |
88343c5e | 2431 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 2432 | 2, |
2433 | &dshi_validate, | |
2434 | }, | |
2435 | ||
2436 | { | |
2437 | /* Q_GSHA - GET_SERVER_HOST_ACCESS */ | |
2438 | "get_server_host_access", | |
2439 | "gsha", | |
2440 | RETRIEVE, | |
2441 | "ha", | |
2442 | "hostaccess", | |
2443 | "%c = machine.name, %c = ha.acl_type, %c = text(ha.acl_id), %c = ha.modtime, %c = text(ha.modby), %c = ha.modwith", | |
2444 | gsha_fields, | |
2445 | 6, | |
2446 | "machine.name = uppercase(\"%s\") and ha.mach_id = machine.mach_id", | |
2447 | 1, | |
2448 | &gsha_validate, | |
2449 | }, | |
2450 | ||
2451 | { | |
2452 | /* Q_ASHA - ADD_SERVER_HOST_ACCESS */ | |
2453 | "add_server_host_access", | |
2454 | "asha", | |
2455 | APPEND, | |
2456 | "ha", | |
2457 | "hostaccess", | |
2458 | "mach_id = %i4, acl_type = %c, acl_id = %i4", | |
2459 | asha_fields, | |
2460 | 3, | |
2461 | 0, | |
2462 | 0, | |
2463 | &asha_validate, | |
2464 | }, | |
2465 | ||
2466 | { | |
2467 | /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */ | |
2468 | "update_server_host_access", | |
2469 | "usha", | |
2470 | UPDATE, | |
2471 | "ha", | |
2472 | "hostaccess", | |
2473 | "acl_type = %c, acl_id = %i4", | |
2474 | asha_fields, | |
2475 | 2, | |
2476 | "ha.mach_id = %d", | |
2477 | 1, | |
2478 | &asha_validate, | |
2479 | }, | |
2480 | ||
2481 | { | |
2482 | /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */ | |
2483 | "delete_server_host_access", | |
2484 | "dsha", | |
2485 | DELETE, | |
2486 | "ha", | |
2487 | "hostaccess", | |
2488 | 0, | |
2489 | asha_fields, | |
2490 | 0, | |
2491 | "ha.mach_id = %d", | |
2492 | 1, | |
2493 | &VDmach, | |
2494 | }, | |
2495 | ||
2496 | { | |
2497 | /* Q_GSLO - GET_SERVER_LOCATIONS */ | |
2498 | "get_server_locations", | |
2499 | "gslo", | |
2500 | RETRIEVE, | |
2501 | "sh", | |
2502 | "serverhosts", | |
2503 | "%c = sh.service, %c = machine.name", | |
2504 | gslo_fields, | |
2505 | 2, | |
88343c5e | 2506 | "sh.service = uppercase(\"%s\") and sh.mach_id = machine.mach_id", |
d33e787c | 2507 | 1, |
2508 | 0, | |
2509 | }, | |
2510 | ||
2511 | { | |
2512 | /* Q_GFSL - GET_FILESYS_BY_LABEL */ | |
2513 | "get_filesys_by_label", | |
2514 | "gfsl", | |
2515 | RETRIEVE, | |
2516 | "fs", | |
2517 | FILESYS, | |
2518 | "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith", | |
2519 | gfsl_fields, | |
2520 | 14, | |
2521 | "fs.label = \"%s\" and fs.mach_id = machine.mach_id and fs.owner = users.users_id and fs.owners = list.list_id", | |
2522 | 1, | |
2523 | &VDsortf, | |
2524 | }, | |
2525 | ||
2526 | { | |
2527 | /* Q_GFSM - GET_FILESYS_BY_MACHINE */ | |
2528 | "get_filesys_by_machine", | |
2529 | "gfsm", | |
2530 | RETRIEVE, | |
2531 | "fs", | |
2532 | FILESYS, | |
2533 | "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith", | |
2534 | gfsm_fields, | |
2535 | 14, | |
2536 | "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id", | |
2537 | 1, | |
2538 | &gfsm_validate, | |
2539 | }, | |
2540 | ||
88343c5e | 2541 | { |
2542 | /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */ | |
2543 | "get_filesys_by_nfsphys", | |
2544 | "gfsn", | |
2545 | RETRIEVE, | |
2546 | "fs", | |
2547 | FILESYS, | |
2548 | "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith", | |
2549 | gfsn_fields, | |
2550 | 14, | |
2551 | "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id and nfsphys.nfsphys_id = fs.phys_id and nfsphys.dir = \"%s\" and fs.type = \"NFS\"", | |
2552 | 2, | |
2553 | &gfsm_validate, | |
2554 | }, | |
2555 | ||
d33e787c | 2556 | { |
2557 | /* Q_GFSG - GET_FILESYS_BY_GROUP */ | |
2558 | "get_filesys_by_group", | |
2559 | "gfsg", | |
2560 | RETRIEVE, | |
2561 | "fs", | |
2562 | FILESYS, | |
2563 | "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith", | |
2564 | gfsg_fields, | |
2565 | 14, | |
2566 | "fs.owners = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id", | |
2567 | 1, | |
2568 | &gfsg_validate, | |
2569 | }, | |
2570 | ||
2571 | { | |
2572 | /* Q_AFIL - ADD_FILESYS */ | |
2573 | "add_filesys", | |
2574 | "afil", | |
2575 | APPEND, | |
2576 | "fs", | |
2577 | FILESYS, | |
2578 | "filsys_id = values.value, label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c", | |
2579 | afil_fields, | |
2580 | 11, | |
2581 | "values.name = \"filsys_id\"", | |
2582 | 0, | |
2583 | &afil_validate, | |
2584 | }, | |
2585 | ||
2586 | { | |
2587 | /* Q_UFIL - UPDATE_FILESYS */ | |
2588 | "update_filesys", | |
2589 | "ufil", | |
2590 | UPDATE, | |
2591 | "fs", | |
2592 | FILESYS, | |
2593 | "label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c", | |
2594 | ufil_fields, | |
2595 | 11, | |
2596 | "fs.filsys_id = %d", | |
2597 | 1, | |
2598 | &ufil_validate, | |
2599 | }, | |
2600 | ||
2601 | { | |
2602 | /* Q_DFIL - DELETE_FILESYS */ | |
2603 | "delete_filesys", | |
2604 | "dfil", | |
2605 | DELETE, | |
2606 | "fs", | |
2607 | FILESYS, | |
2608 | (char *)0, | |
2609 | dfil_fields, | |
2610 | 0, | |
2611 | "fs.filsys_id = %d", | |
2612 | 1, | |
2613 | &dfil_validate, | |
2614 | }, | |
2615 | ||
2616 | { | |
2617 | /* Q_GANF - GET_ALL_NFSPHYS */ | |
2618 | "get_all_nfsphys", | |
2619 | "ganf", | |
2620 | RETRIEVE, | |
2621 | "np", | |
2622 | "nfsphys", | |
2623 | "%c = machine.name, %c = np.dir, %c = np.device, %c = text(np.status), %c = text(np.allocated), %c = text(np.size), %c = np.modtime, %c = text(np.modby), %c = np.modwith", | |
2624 | ganf_fields, | |
2625 | 9, | |
2626 | "machine.mach_id = np.mach_id", | |
2627 | 0, | |
2628 | &VDsortf, | |
2629 | }, | |
2630 | ||
2631 | { | |
2632 | /* Q_GNFP - GET_NFSPHYS */ | |
2633 | "get_nfsphys", | |
2634 | "gnfp", | |
2635 | RETRIEVE, | |
2636 | "np", | |
2637 | "nfsphys", | |
2638 | "%c = machine.name, %c = np.dir, %c = np.device, %c = text(np.status), %c = text(np.allocated), %c = text(np.size), %c = np.modtime, %c = text(np.modby), %c = np.modwith", | |
2639 | gnfp_fields, | |
2640 | 9, | |
2641 | "np.mach_id = %d and np.dir = \"%s\" and machine.mach_id = np.mach_id", | |
2642 | 2, | |
2643 | &gnfp_validate, | |
2644 | }, | |
2645 | ||
2646 | { | |
2647 | /* Q_ANFP - ADD_NFSPHYS */ | |
2648 | "add_nfsphys", | |
2649 | "anfp", | |
2650 | APPEND, | |
2651 | "np", | |
2652 | "nfsphys", | |
2653 | "nfsphys_id = values.value, mach_id = %i4, dir = %c, device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)", | |
2654 | ganf_fields, | |
2655 | 6, | |
2656 | "values.name = \"nfsphys_id\"", | |
2657 | 0, | |
2658 | &anfp_validate, | |
2659 | }, | |
2660 | ||
2661 | { | |
2662 | /* Q_UNFP - UPDATE_NFSPHYS */ | |
2663 | "update_nfsphys", | |
2664 | "unfp", | |
2665 | UPDATE, | |
2666 | "np", | |
2667 | "nfsphys", | |
2668 | "device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)", | |
2669 | gnfp_fields, | |
2670 | 4, | |
2671 | "np.mach_id = %d and np.dir = \"%s\"", | |
2672 | 2, | |
2673 | &anfp_validate, | |
2674 | }, | |
2675 | ||
2676 | { | |
2677 | /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */ | |
2678 | "adjust_nfsphys_allocation", | |
2679 | "ajnf", | |
2680 | UPDATE, | |
2681 | "np", | |
2682 | "nfsphys", | |
2683 | "allocated = np.allocated + int4(%c)", | |
2684 | dnfp_fields, | |
2685 | 1, | |
2686 | "np.mach_id = %d and np.dir = \"%s\"", | |
2687 | 2, | |
2688 | &anfp_validate, | |
2689 | }, | |
2690 | ||
2691 | { | |
2692 | /* Q_DNFP - DELETE_NFSPHYS */ | |
2693 | "delete_nfsphys", | |
2694 | "dnfp", | |
2695 | DELETE, | |
2696 | "np", | |
2697 | "nfsphys", | |
2698 | (char *)0, | |
2699 | dnfp_fields, | |
2700 | 0, | |
2701 | "np.mach_id = %d and np.dir = \"%s\"", | |
2702 | 2, | |
2703 | &dnfp_validate, | |
2704 | }, | |
2705 | ||
2706 | { | |
2707 | /* Q_GNFQ - GET_NFS_QUOTAS */ | |
88343c5e | 2708 | "get_nfs_quota", |
d33e787c | 2709 | "gnfq", |
2710 | RETRIEVE, | |
2711 | "nq", | |
2712 | "nfsquota", | |
2713 | "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name, %c = nq.modtime, %c = text(nq.modby), %c = nq.modwith", | |
2714 | gnfq_fields, | |
2715 | 8, | |
d90d5c45 | 2716 | "filesys.label = \"%s\" and nq.users_id = %d and filesys.filsys_id = nq.filsys_id and nfsphys.nfsphys_id = nq.phys_id and machine.mach_id = filesys.mach_id and users.users_id = nq.users_id", |
88343c5e | 2717 | 2, |
d33e787c | 2718 | &gnfq_validate, |
2719 | }, | |
2720 | ||
2721 | { | |
2722 | /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */ | |
2723 | "get_nfs_quotas_by_partition", | |
2724 | "gnqp", | |
2725 | RETRIEVE, | |
2726 | "nq", | |
2727 | "nfsquota", | |
2728 | "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name", | |
2729 | gnqp_fields, | |
2730 | 5, | |
d90d5c45 | 2731 | "nfsphys.mach_id = %d and nfsphys.dir = \"%s\" and nq.phys_id = nfsphys.nfsphys_id and filesys.filsys_id = nq.filsys_id and users.users_id = nq.users_id and machine.mach_id = nfsphys.mach_id", |
d33e787c | 2732 | 2, |
2733 | &VDmach, | |
2734 | }, | |
2735 | ||
d33e787c | 2736 | { |
2737 | /* Q_ANFQ - ADD_NFS_QUOTA */ | |
2738 | "add_nfs_quota", | |
2739 | "anfq", | |
2740 | APPEND, | |
2741 | "nq", | |
2742 | "nfsquota", | |
d90d5c45 | 2743 | "filsys_id = filesys.filsys_id, users_id = %i4, quota = int4(%c), phys_id = filesys.phys_id", |
d33e787c | 2744 | anfq_fields, |
d90d5c45 | 2745 | 2, |
2746 | "filesys.filsys_id = %d", | |
2747 | 1, | |
d33e787c | 2748 | &anfq_validate, |
2749 | }, | |
2750 | ||
2751 | { | |
2752 | /* Q_UNFQ - UPDATE_NFS_QUOTA */ | |
2753 | "update_nfs_quota", | |
2754 | "unfq", | |
2755 | UPDATE, | |
2756 | "nq", | |
2757 | "nfsquota", | |
2758 | "quota = int4(%c)", | |
2759 | anfq_fields, | |
2760 | 1, | |
2761 | "nq.filsys_id = %d and nq.users_id = %d", | |
2762 | 2, | |
2763 | &unfq_validate, | |
2764 | }, | |
2765 | ||
2766 | { | |
2767 | /* Q_DNFQ - DELETE_NFS_QUOTA */ | |
2768 | "delete_nfs_quota", | |
2769 | "dnfq", | |
2770 | DELETE, | |
2771 | "nq", | |
2772 | "nfsquota", | |
2773 | (char *)0, | |
2774 | anfq_fields, | |
2775 | 0, | |
2776 | "nq.filsys_id = %d and nq.users_id = %d", | |
2777 | 2, | |
2778 | &dnfq_validate, | |
2779 | }, | |
2780 | ||
2781 | { | |
2782 | /* Q_GLIN - GET_LIST_INFO */ | |
2783 | "get_list_info", | |
2784 | "glin", | |
2785 | RETRIEVE, | |
2786 | 0, | |
2787 | LIST, | |
2788 | 0, | |
2789 | glin_fields, | |
2790 | 13, | |
2791 | 0, | |
2792 | 1, | |
2793 | &glin_validate, | |
2794 | }, | |
2795 | ||
2796 | { | |
2797 | /* Q_EXLN - EXPAND_LIST_NAMES */ | |
2798 | "expand_list_names", | |
2799 | "exln", | |
2800 | RETRIEVE, | |
2801 | "l", | |
2802 | LIST, | |
2803 | "%c = l.name", | |
2804 | glin_fields, | |
2805 | 1, | |
2806 | "l.name = \"%s\" and l.list_id != 0", | |
2807 | 1, | |
2808 | 0 | |
2809 | }, | |
2810 | ||
2811 | { | |
2812 | /* Q_ALIS - ADD_LIST */ | |
2813 | "add_list", | |
2814 | "alis", | |
2815 | APPEND, | |
2816 | "l", | |
2817 | LIST, | |
2818 | "list_id=values.value, name=%c, active=int1(%c), public=int1(%c), hidden=int1(%c), maillist=int1(%c), group=int1(%c), gid=int2(%c), acl_type=%c, acl_id=%i4, desc=%c", | |
2819 | alis_fields, | |
2820 | 10, | |
2821 | "values.name = \"list_id\"", | |
2822 | 0, | |
2823 | &alis_validate, | |
2824 | }, | |
2825 | ||
2826 | { | |
2827 | /* Q_ULIS - UPDATE_LIST */ | |
2828 | "update_list", | |
2829 | "ulis", | |
2830 | UPDATE, | |
2831 | "l", | |
2832 | LIST, | |
2833 | "name=%c, active=int1(%c), public=int1(%c), hidden=int1(%c), maillist=int1(%c), group=int1(%c), gid=int2(%c), acl_type=%c, acl_id=%i4, desc=%c", | |
2834 | ulis_fields, | |
2835 | 10, | |
2836 | "l.list_id = %d", | |
2837 | 1, | |
2838 | &ulis_validate, | |
2839 | }, | |
2840 | ||
2841 | { | |
2842 | /* Q_DLIS - DELETE_LIST */ | |
2843 | "delete_list", | |
2844 | "dlis", | |
2845 | DELETE, | |
2846 | "l", | |
2847 | LIST, | |
2848 | (char *)0, | |
2849 | dlis_fields, | |
2850 | 0, | |
2851 | "l.list_id = %d", | |
2852 | 1, | |
2853 | &dlis_validate, | |
2854 | }, | |
2855 | ||
2856 | { | |
2857 | /* Q_AMTL - ADD_MEMBER_TO_LIST */ | |
2858 | "add_member_to_list", | |
2859 | "amtl", | |
2860 | APPEND, | |
2861 | "m", | |
2862 | "members", | |
2863 | "list_id=%i4, member_type=%c, member_id=%i4", | |
2864 | amtl_fields, | |
2865 | 3, | |
2866 | (char *)0, | |
2867 | 0, | |
2868 | &amtl_validate, | |
2869 | }, | |
2870 | ||
2871 | { | |
2872 | /* Q_DMFL - DELETE_MEMBER_FROM_LIST */ | |
2873 | "delete_member_from_list", | |
2874 | "dmfl", | |
2875 | DELETE, | |
2876 | "m", | |
2877 | "members", | |
2878 | (char *)0, | |
2879 | amtl_fields, | |
2880 | 0, | |
2881 | "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d", | |
2882 | 3, | |
2883 | &amtl_validate, | |
2884 | }, | |
2885 | ||
2886 | { | |
88343c5e | 2887 | /* Q_GAUS - GET_ACE_USE */ |
2888 | "get_ace_use", | |
d33e787c | 2889 | "gaus", |
2890 | RETRIEVE, | |
2891 | 0, | |
2892 | 0, | |
2893 | 0, | |
2894 | gaus_fields, | |
2895 | 2, | |
2896 | 0, | |
2897 | 2, | |
2898 | &gaus_validate, | |
2899 | }, | |
2900 | ||
2901 | { | |
2902 | /* Q_QGLI - QUALIFIED_GET_LISTS */ | |
2903 | "qualified_get_lists", | |
2904 | "qgli", | |
2905 | RETRIEVE, | |
2906 | 0, | |
2907 | LIST, | |
2908 | 0, | |
2909 | qgli_fields, | |
2910 | 1, | |
2911 | 0, | |
2912 | 5, | |
2913 | &qgli_validate, | |
2914 | }, | |
2915 | ||
2916 | { | |
2917 | /* Q_GMOL - GET_MEMBERS_OF_LIST */ | |
2918 | "get_members_of_list", | |
2919 | "gmol", | |
2920 | RETRIEVE, | |
2921 | (char *)0, | |
2922 | "members", | |
2923 | (char *)0, | |
2924 | gmol_fields, | |
2925 | 0, | |
2926 | (char *)0, | |
2927 | 1, | |
2928 | &gmol_validate, | |
2929 | }, | |
2930 | ||
2931 | { | |
2932 | /* Q_GLOM - GET_LISTS_OF_MEMBER */ | |
2933 | "get_lists_of_member", | |
2934 | "glom", | |
2935 | RETRIEVE, | |
2936 | 0, | |
2937 | "members", | |
2938 | 0, | |
2939 | glom_fields, | |
2940 | 6, | |
2941 | 0, | |
2942 | 2, | |
2943 | &glom_validate, | |
2944 | }, | |
2945 | ||
2946 | { | |
2947 | /* Q_CMOL - COUNT_MEMBERS_OF_LIST */ | |
2948 | "count_members_of_list", | |
2949 | "cmol", | |
2950 | RETRIEVE, | |
2951 | 0, | |
2952 | "members", | |
2953 | 0, | |
2954 | cmol_fields, | |
2955 | 1, | |
2956 | 0, | |
2957 | 1, | |
2958 | &cmol_validate, | |
2959 | }, | |
7ac4c1b1 | 2960 | #ifdef notdef |
d33e787c | 2961 | { |
2962 | /* Q_AUGR - ADD_USER_GROUP */ | |
2963 | "add_user_group", | |
2964 | "augr", | |
2965 | APPEND, | |
2966 | (char *)0, | |
2967 | (char *)0, | |
2968 | (char *)0, | |
2969 | augr_fields, | |
2970 | 1, | |
2971 | (char *)0, | |
2972 | 0, | |
2973 | &augr_validate, | |
2974 | }, | |
7ac4c1b1 | 2975 | #endif |
d33e787c | 2976 | { |
2977 | /* Q_GZCL - GET_ZEPHYR_CLASS */ | |
2978 | "get_zephyr_class", | |
2979 | "gzcl", | |
2980 | RETRIEVE, | |
2981 | "z", | |
2982 | "zephyr", | |
2983 | "%c = z.class, %c = z.xmt_type, %c = text(z.xmt_id),%c = z.sub_type, %c = text(z.sub_id),%c = z.iws_type, %c = text(z.iws_id),%c = z.iui_type, %c = text(z.iui_id), %c=z.modtime, %c = text(z.modby), %c = z.modwith", | |
2984 | gzcl_fields, | |
2985 | 12, | |
2986 | "z.class = \"%s\"", | |
2987 | 1, | |
2988 | &gzcl_validate, | |
2989 | }, | |
2990 | ||
2991 | { | |
2992 | /* Q_AZCL - ADD_ZEPHYR_CLASS */ | |
2993 | "add_zephyr_class", | |
2994 | "azcl", | |
2995 | APPEND, | |
2996 | "z", | |
2997 | "zephyr", | |
2998 | "class = %c, xmt_type = %c, xmt_id = %i4, sub_type = %c, sub_id = %i4, iws_type = %c, iws_id = %i4, iui_type = %c, iui_id = %i4", | |
2999 | azcl_fields, | |
3000 | 9, | |
3001 | 0, | |
3002 | 0, | |
3003 | &azcl_validate, | |
3004 | }, | |
3005 | ||
3006 | { | |
3007 | /* Q_UZCL - UPDATE_ZEPHYR_CLASS */ | |
3008 | "update_zephyr_class", | |
3009 | "uzcl", | |
3010 | UPDATE, | |
3011 | "z", | |
3012 | "zephyr", | |
3013 | "class = %c, xmt_type = %c, xmt_id = %i4, sub_type = %c, sub_id = %i4, iws_type = %c, iws_id = %i4, iui_type = %c, iui_id = %i4", | |
3014 | uzcl_fields, | |
3015 | 9, | |
3016 | "z.class = \"%s\"", | |
3017 | 1, | |
3018 | &uzcl_validate, | |
3019 | }, | |
3020 | ||
3021 | { | |
3022 | /* Q_DZCL - DELETE_ZEPHYR_CLASS */ | |
3023 | "delete_zephyr_class", | |
3024 | "dzcl", | |
3025 | DELETE, | |
3026 | "z", | |
3027 | "zephyr", | |
3028 | 0, | |
3029 | uzcl_fields, | |
3030 | 0, | |
3031 | "z.class = \"%s\"", | |
3032 | 1, | |
3033 | &dzcl_validate, | |
3034 | }, | |
3035 | #ifdef notdef | |
3036 | { | |
3037 | /* Q_GSVC - GET_SERVICE */ | |
3038 | "get_service", | |
3039 | "gsvc", | |
3040 | RETRIEVE, | |
3041 | "s", | |
3042 | "services", | |
3043 | "%c = s.name, %c = s.protocol, %c = text(s.port), %c = s.desc, %c = s.modtime, %c = text(s.modby), %c = s.modwith", | |
3044 | gasv_fields, | |
3045 | 7, | |
3046 | (char *)0, | |
3047 | 0, | |
3048 | &gsvc_validate, | |
3049 | }, | |
3050 | ||
3051 | { | |
3052 | /* Q_ASVC - ADD_SERVICE */ | |
3053 | "add_service", | |
3054 | "asvc", | |
3055 | APPEND, | |
3056 | "s", | |
3057 | "services", | |
3058 | "name = %c, protocol = %c, port = int2(%c), desc = %c", | |
3059 | gasv_fields, | |
3060 | 4, | |
3061 | (char *)0, | |
3062 | 0, | |
3063 | &asvc_validate, | |
3064 | }, | |
3065 | ||
3066 | { | |
3067 | /* Q_DSVC - DELETE_SERVICE */ | |
3068 | "delete_service", | |
3069 | "dsvc", | |
3070 | DELETE, | |
3071 | "s", | |
3072 | "services", | |
3073 | 0, | |
3074 | gasv_fields, | |
3075 | 0, | |
3076 | "s.name = \"%s\"", | |
3077 | 1, | |
3078 | &dsvc_validate, | |
3079 | }, | |
3080 | #endif | |
3081 | { | |
3082 | /* Q_GPCP - GET_PRINTCAP */ | |
3083 | "get_printcap", | |
3084 | "gpcp", | |
3085 | RETRIEVE, | |
3086 | "p", | |
3087 | "printcap", | |
fad88070 | 3088 | "%c = p.name, %c = machine.name, %c = p.dir, %c = p.rp, %c = p.comments, %c = p.modtime, %c = text(p.modby), %c = p.modwith", |
d33e787c | 3089 | gpcp_fields, |
fad88070 | 3090 | 8, |
3091 | "p.name = \"%s\" and machine.mach_id = p.mach_id", | |
d33e787c | 3092 | 1, |
3093 | &VDsortf, | |
3094 | }, | |
3095 | ||
3096 | { | |
3097 | /* Q_APCP - ADD_PRINTCAP */ | |
3098 | "add_printcap", | |
3099 | "apcp", | |
3100 | APPEND, | |
3101 | "p", | |
3102 | "printcap", | |
fad88070 | 3103 | "name = %c, mach_id = %i4, dir = %c, rp = %c, comments = %c", |
d33e787c | 3104 | apcp_fields, |
fad88070 | 3105 | 5, |
d33e787c | 3106 | 0, |
3107 | 0, | |
3108 | &apcp_validate, | |
3109 | }, | |
3110 | ||
3111 | { | |
3112 | /* Q_DPCP - DELETE_PRINTCAP */ | |
3113 | "delete_printcap", | |
3114 | "dpcp", | |
3115 | DELETE, | |
3116 | "p", | |
3117 | "printcap", | |
3118 | 0, | |
3119 | apcp_fields, | |
3120 | 0, | |
3121 | "p.name = \"%s\"", | |
3122 | 1, | |
fad88070 | 3123 | &dpcp_validate, |
d33e787c | 3124 | }, |
3125 | ||
3126 | { | |
3127 | /* Q_GALI - GET_ALIAS */ | |
3128 | "get_alias", | |
3129 | "gali", | |
3130 | RETRIEVE, | |
3131 | "a", | |
3132 | "alias", | |
3133 | "%c = a.name, %c = a.type, %c = a.trans", | |
3134 | gali_fields, | |
3135 | 3, | |
3136 | "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"", | |
3137 | 3, | |
3138 | 0, | |
3139 | }, | |
3140 | ||
3141 | { | |
3142 | /* Q_AALI - ADD_ALIAS */ | |
3143 | "add_alias", | |
3144 | "aali", | |
3145 | APPEND, | |
3146 | "a", | |
3147 | "alias", | |
3148 | "name = %c, type = %c, trans = %c", | |
3149 | aali_fields, | |
3150 | 3, | |
3151 | (char *)0, | |
3152 | 0, | |
3153 | &aali_validate, | |
3154 | }, | |
3155 | ||
3156 | { | |
3157 | /* Q_DALI - DELETE_ALIAS */ | |
3158 | "delete_alias", | |
3159 | "dali", | |
3160 | DELETE, | |
3161 | "a", | |
3162 | "alias", | |
3163 | (char *)0, | |
3164 | aali_fields, | |
3165 | 0, | |
3166 | "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"", | |
3167 | 3, | |
3168 | &dali_validate, | |
3169 | }, | |
3170 | ||
3171 | { | |
3172 | /* Q_GVAL - GET_VALUE */ | |
3173 | "get_value", | |
3174 | "gval", | |
3175 | RETRIEVE, | |
3176 | "v", | |
3177 | "values", | |
3178 | "%c = text(v.value)", | |
3179 | gval_fields, | |
3180 | 1, | |
3181 | "v.name = \"%s\"", | |
3182 | 1, | |
3183 | &gval_validate, | |
3184 | }, | |
3185 | ||
3186 | { | |
3187 | /* Q_AVAL - ADD_VALUE */ | |
3188 | "add_value", | |
3189 | "aval", | |
3190 | APPEND, | |
3191 | "v", | |
3192 | "values", | |
3193 | "name = %c, value = int4(%c)", | |
3194 | aval_fields, | |
3195 | 2, | |
3196 | (char *)0, | |
3197 | 0, | |
3198 | &aval_validate, | |
3199 | }, | |
3200 | ||
3201 | { | |
3202 | /* Q_UVAL - UPDATE_VALUE */ | |
3203 | "update_value", | |
3204 | "uval", | |
3205 | UPDATE, | |
3206 | "v", | |
3207 | "values", | |
3208 | "value = int4(%c)", | |
3209 | aval_fields, | |
3210 | 1, | |
3211 | "v.name = \"%s\"", | |
3212 | 1, | |
3213 | &aval_validate, | |
3214 | }, | |
3215 | ||
3216 | { | |
3217 | /* Q_DVAL - DELETE_VALUE */ | |
3218 | "delete_value", | |
3219 | "dval", | |
3220 | DELETE, | |
3221 | "v", | |
3222 | "values", | |
3223 | (char *)0, | |
3224 | dval_fields, | |
3225 | 0, | |
3226 | "v.name = \"%s\"", | |
3227 | 1, | |
3228 | &aval_validate, | |
3229 | }, | |
3230 | ||
3231 | { | |
3232 | /* Q_GATS - GET_ALL_TABLE_STATS */ | |
3233 | "get_all_table_stats", | |
3234 | "gats", | |
3235 | RETRIEVE, | |
3236 | "tbs", | |
3237 | "tblstats", | |
3238 | "%c = tbs.table, %c = text(tbs.retrieves), %c = text(tbs.appends), %c = text(tbs.updates), %c = text(tbs.deletes), %c = tbs.modtime", | |
3239 | gats_fields, | |
3240 | 6, | |
3241 | (char *)0, | |
3242 | 0, | |
3243 | 0, | |
3244 | }, | |
3245 | ||
3246 | }; | |
3247 | ||
3248 | int QueryCount2 = (sizeof Queries2 / sizeof (struct query)); |