3 * This file defines the query dispatch table
5 * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
11 #include "mr_server.h"
17 * These are commonly used validation objects, defined here so that they
21 static struct valobj VOuser0[] = {
22 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
25 static struct valobj VOmach0[] = {
26 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
29 static struct valobj VOclu0[] = {
30 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
33 static struct valobj VOsnet0[] = {
34 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
37 static struct valobj VOlist0[] = {
38 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
41 static struct valobj VOfilesys0[] = {
42 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
45 static struct valobj VOcon0[] = {
46 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
49 static struct valobj VOnum0[] = {
54 * Commonly used validation records defined here so that they may
58 static struct validate VDmach = { VOmach0, 1 };
60 static struct validate VDfix_modby = {
74 static char *galo2_fields[] = {
75 "login", "unix_uid", "shell", "last", "first", "middle",
78 static char *galo_fields[] = {
79 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
82 static char *gual2_fields[] = {
84 "login", "unix_uid", "shell", "last", "first", "middle", "status",
85 "clearid", "class", "comments", "signature", "secure",
86 "modtime", "modby", "modwith",
89 static char *gual3_fields[] = {
91 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
92 "status", "clearid", "class", "comments", "signature", "secure", "modtime",
93 "modby", "modwith", "created", "creator",
96 static char *gual11_fields[] = {
98 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
99 "status", "clearid", "class", "comments", "signature", "secure",
100 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
104 static char *gual_fields[] = {
106 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
107 "status", "clearid", "class", "comments", "signature", "secure",
108 "winhomedir", "winprofiledir", "sponsor_type", "sponsor_name", "expiration",
109 "modtime", "modby", "modwith", "created", "creator",
112 static char *gubl2_fields[] = {
114 "login", "unix_uid", "shell", "last", "first", "middle", "status",
115 "clearid", "class", "modtime", "modby", "modwith",
118 static char *gubl_fields[] = {
120 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
121 "status", "clearid", "class", "modtime", "modby", "modwith", "created",
125 static struct validate gubl2_validate =
138 static struct validate gubl_validate =
151 static char *guau2_fields[] = {
153 "login", "unix_uid", "shell", "last", "first", "middle", "status",
154 "clearid", "class", "comments", "signature", "secure",
155 "modtime", "modby", "modwith",
158 static char *guau3_fields[] = {
160 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
161 "status", "clearid", "class", "comments", "signature", "secure",
162 "modtime", "modby", "modwith", "created", "creator",
165 static char *guau11_fields[] = {
167 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
168 "status", "clearid", "class", "comments", "signature", "secure",
169 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
173 static char *guau_fields[] = {
175 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
176 "status", "clearid", "class", "comments", "signature", "secure",
177 "winhomedir", "winprofiledir", "sponsor_type", "sponsor_name", "expiration",
178 "modtime", "modby", "modwith", "created", "creator",
181 static char *guan2_fields[] = {
183 "login", "unix_uid", "shell", "last", "first", "middle", "status",
184 "clearid", "class", "comments", "signature", "secure",
185 "modtime", "modby", "modwith",
188 static char *guan3_fields[] = {
190 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
191 "status", "clearid", "class", "comments", "signature", "secure",
192 "modtime", "modby", "modwith", "created", "creator",
195 static char *guan11_fields[] = {
197 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
198 "status", "clearid", "class", "comments", "signature", "secure",
199 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
203 static char *guan_fields[] = {
205 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
206 "status", "clearid", "class", "comments", "signature", "secure",
207 "winhomedir", "winprofiledir", "sponsor_type", "sponsor_name", "expiration",
208 "modtime", "modby", "modwith", "created", "creator",
211 static struct validate guan2_validate =
224 static struct validate guan_validate =
237 static char *guac2_fields[] = {
239 "login", "unix_uid", "shell", "last", "first", "middle", "status",
240 "clearid", "class", "comments", "signature", "secure",
241 "modtime", "modby", "modwith",
244 static char *guac3_fields[] = {
246 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
247 "status", "clearid", "class", "comments", "signature", "secure",
248 "modtime", "modby", "modwith", "created", "creator",
251 static char *guac11_fields[] = {
253 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
254 "status", "clearid", "class", "comments", "signature", "secure",
255 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
259 static char *guac_fields[] = {
261 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
262 "status", "clearid", "class", "comments", "signature", "secure",
263 "winhomedir", "winprofiledir", "sponsor_type", "sponsor_name", "expiration",
264 "modtime", "modby", "modwith", "created", "creator",
267 static char *guam2_fields[] = {
269 "login", "unix_uid", "shell", "last", "first", "middle", "status",
270 "clearid", "class", "comments", "signature", "secure",
271 "modtime", "modby", "modwith",
274 static char *guam3_fields[] = {
276 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
277 "status", "clearid", "class", "comments", "signature", "secure",
278 "modtime", "modby", "modwith", "created", "creator",
281 static char *guam11_fields[] = {
283 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
284 "status", "clearid", "class", "comments", "signature", "secure",
285 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
289 static char *guam_fields[] = {
291 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
292 "status", "clearid", "class", "comments", "signature", "secure",
293 "winhomedir", "winprofiledir", "sponsor_type", "sponsor_name", "expiration",
294 "modtime", "modby", "modwith", "created", "creator",
297 static char *guas_fields[] = {
298 "sponsor_type", "sponsor_name",
302 static struct valobj guas_valobj[] = {
303 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
304 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
307 static struct validate guas_validate = {
316 get_user_account_by_sponsor,
319 static char *gubu2_fields[] = {
321 "login", "unix_uid", "shell", "last", "first", "middle", "status",
322 "clearid", "class", "modtime", "modby", "modwith",
325 static char *gubu_fields[] = {
327 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
328 "status", "clearid", "class", "modtime", "modby", "modwith", "created",
332 static struct validate gubu2_validate =
345 static struct validate gubu_validate =
358 static char *gubn2_fields[] = {
360 "login", "unix_uid", "shell", "last", "first", "middle", "status",
361 "clearid", "class", "modtime", "modby", "modwith",
364 static char *gubn_fields[] = {
366 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
367 "status", "clearid", "class", "modtime", "modby", "modwith", "created",
371 static struct validate gubn2_validate =
384 static struct validate gubn_validate =
397 static char *gubc2_fields[] = {
399 "login", "unix_uid", "shell", "last", "first", "middle", "status",
400 "clearid", "class", "modtime", "modby", "modwith",
403 static char *gubc_fields[] = {
405 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
406 "status", "clearid", "class", "modtime", "modby", "modwith",
407 "created", "creator",
410 static char *gubm2_fields[] = {
412 "login", "unix_uid", "shell", "last", "first", "middle", "status",
413 "clearid", "class", "modtime", "modby", "modwith",
416 static char *gubm_fields[] = {
418 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
419 "middle", "status", "clearid", "class", "modtime", "modby", "modwith",
420 "created", "creator",
423 static char *auac2_fields[] = {
424 "login", "unix_uid", "shell", "last", "first", "middle", "status",
425 "clearid", "class", "comments", "signature", "secure",
428 static char *auac3_fields[] = {
429 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
430 "middle", "status", "clearid", "class", "comments", "signature", "secure",
433 static char *auac11_fields[] = {
434 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
435 "status", "clearid", "class", "comments", "signature", "secure",
436 "winhomedir", "winprofiledir",
439 static char *auac_fields[] = {
440 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
441 "status", "clearid", "class", "comments", "signature", "secure",
442 "winhomedir", "winprofiledir", "sponsor_type", "sponsor_name", "expiration",
445 static struct valobj auac2_valobj[] = {
446 {V_CHAR, 0, USERS_TABLE, "login"},
448 {V_CHAR, 2, USERS_TABLE, "shell"},
449 {V_CHAR, 3, USERS_TABLE, "last"},
450 {V_CHAR, 4, USERS_TABLE, "first"},
451 {V_CHAR, 5, USERS_TABLE, "middle"},
453 {V_CHAR, 7, USERS_TABLE, "clearid"},
454 {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS},
455 {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
459 static struct valobj auac3_valobj[] = {
460 {V_CHAR, 0, USERS_TABLE, "login"},
462 {V_CHAR, 2, USERS_TABLE, "shell"},
463 {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
464 {V_CHAR, 4, USERS_TABLE, "last"},
465 {V_CHAR, 5, USERS_TABLE, "first"},
466 {V_CHAR, 6, USERS_TABLE, "middle"},
468 {V_CHAR, 8, USERS_TABLE, "clearid"},
469 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
470 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
474 static struct valobj auac11_valobj[] = {
475 {V_CHAR, 0, USERS_TABLE, "login"},
477 {V_CHAR, 2, USERS_TABLE, "shell"},
478 {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
479 {V_CHAR, 4, USERS_TABLE, "last"},
480 {V_CHAR, 5, USERS_TABLE, "first"},
481 {V_CHAR, 6, USERS_TABLE, "middle"},
483 {V_CHAR, 8, USERS_TABLE, "clearid"},
484 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
485 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
487 {V_LEN, 13, USERS_TABLE, "winhomedir"},
488 {V_LEN, 14, USERS_TABLE, "winprofiledir"},
491 static struct valobj auac_valobj[] = {
492 {V_CHAR, 0, USERS_TABLE, "login"},
494 {V_CHAR, 2, USERS_TABLE, "shell"},
495 {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
496 {V_CHAR, 4, USERS_TABLE, "last"},
497 {V_CHAR, 5, USERS_TABLE, "first"},
498 {V_CHAR, 6, USERS_TABLE, "middle"},
500 {V_CHAR, 8, USERS_TABLE, "clearid"},
501 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
502 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
504 {V_LEN, 13, USERS_TABLE, "winhomedir"},
505 {V_LEN, 14, USERS_TABLE, "winprofiledir"},
506 {V_TYPE, 15, 0, "ace_type", 0, MR_ACE},
507 {V_TYPEDATA, 16, 0, 0, "list_id", MR_ACE},
508 {V_CHAR, 17, USERS_TABLE, "expiration"},
511 static struct validate auac2_validate = {
523 static struct validate auac3_validate = {
535 static struct validate auac11_validate = {
547 static struct validate auac_validate = {
559 static struct validate ausr2_validate = {
571 static struct validate ausr3_validate = {
583 static struct validate ausr11_validate = {
595 static struct validate ausr_validate = {
607 static char *rusr_fields[] = {
608 "unix_uid", "login", "pobox_type"
611 static struct valobj rusr_valobj[] = {
613 {V_CHAR, 1, USERS_TABLE, "login"},
616 static struct validate rusr_validate = {
628 static char *uuac2_fields[] = {
630 "newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
631 "clearid", "class", "comments", "signature", "secure",
634 static char *uuac3_fields[] = {
636 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
637 "middle", "status", "clearid", "class", "comments", "signature", "secure",
640 static char *uuac11_fields[] = {
642 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
643 "middle", "status", "clearid", "class", "comments", "signature", "secure",
644 "winhomedir", "winprofiledir",
647 static char *uuac_fields[] = {
649 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
650 "middle", "status", "clearid", "class", "comments", "signature", "secure",
651 "winhomedir", "winprofiledir", "sponsor_type", "sponsor_name", "expiration",
654 static struct valobj uuac2_valobj[] = {
655 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
656 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
658 {V_CHAR, 3, USERS_TABLE, "shell"},
659 {V_CHAR, 4, USERS_TABLE, "first"},
660 {V_CHAR, 5, USERS_TABLE, "last"},
661 {V_CHAR, 6, USERS_TABLE, "middle"},
663 {V_CHAR, 8, USERS_TABLE, "clearid"},
664 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
665 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
669 static struct valobj uuac3_valobj[] = {
670 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
671 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
673 {V_CHAR, 3, USERS_TABLE, "shell"},
674 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
675 {V_CHAR, 5, USERS_TABLE, "first"},
676 {V_CHAR, 6, USERS_TABLE, "last"},
677 {V_CHAR, 7, USERS_TABLE, "middle"},
679 {V_CHAR, 9, USERS_TABLE, "clearid"},
680 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
681 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
685 static struct valobj uuac11_valobj[] = {
686 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
687 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
689 {V_CHAR, 3, USERS_TABLE, "shell"},
690 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
691 {V_CHAR, 5, USERS_TABLE, "first"},
692 {V_CHAR, 6, USERS_TABLE, "last"},
693 {V_CHAR, 7, USERS_TABLE, "middle"},
695 {V_CHAR, 9, USERS_TABLE, "clearid"},
696 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
697 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
699 {V_LEN, 14, USERS_TABLE, "winhomedir"},
700 {V_LEN, 15, USERS_TABLE, "winprofiledir"},
703 static struct valobj uuac_valobj[] = {
704 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
705 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
707 {V_CHAR, 3, USERS_TABLE, "shell"},
708 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
709 {V_CHAR, 5, USERS_TABLE, "first"},
710 {V_CHAR, 6, USERS_TABLE, "last"},
711 {V_CHAR, 7, USERS_TABLE, "middle"},
713 {V_CHAR, 9, USERS_TABLE, "clearid"},
714 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
715 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
717 {V_LEN, 14, USERS_TABLE, "winhomedir"},
718 {V_LEN, 15, USERS_TABLE, "winprofiledir"},
719 {V_TYPE, 16, 0, "ace_type", 0, MR_ACE},
720 {V_TYPEDATA, 17, 0, 0, "list_id", MR_ACE},
721 {V_CHAR, 18, USERS_TABLE, "expiration"},
724 static struct validate uuac2_validate = {
736 static struct validate uuac3_validate = {
748 static struct validate uuac11_validate = {
760 static struct validate uuac_validate = {
772 static struct validate uusr2_validate = {
784 static struct validate uusr3_validate = {
796 static struct validate uusr11_validate = {
808 static struct validate uusr_validate = {
820 static char *uush_fields[] = {
825 static struct valobj uush_valobj[] = {
826 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
827 {V_CHAR, 1, USERS_TABLE, "shell"},
830 static struct validate uush_validate = {
842 static char *uuws_fields[] = {
847 static struct valobj uuws_valobj[] = {
848 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
849 {V_CHAR, 1, USERS_TABLE, "winconsoleshell"},
852 static struct validate uuws_validate = {
864 static char *uust_fields[] = {
869 static char *uuss_fields[] = {
874 static struct valobj uust_valobj[] = {
875 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
880 static struct validate uust_validate = {
892 static char *dusr_fields[] = {
896 static struct validate dusr_validate = {
908 static char *aurv_fields[] = {
909 "login", "reservation",
912 static struct validate aurv_validate = {
924 static char *gurv_fields[] = {
929 static struct validate gurv_validate = {
938 get_user_reservations,
941 static char *gubr_fields[] = {
946 static struct validate gubr_validate = {
955 get_user_by_reservation,
958 static char *gkum_fields[] = { "login", "kerberos",
959 "login", "kerberos" };
961 static char *akum_fields[] = { "login", "kerberos" };
963 static struct valobj akum_valobj[] =
965 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
966 {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
969 static struct validate akum_validate =
974 "users_id = %d or string_id = %d",
982 static struct validate dkum_validate =
987 "users_id = %d and string_id = %d",
995 static char *gfbl_fields[] = {
997 "login", "fullname", "nickname", "home_addr",
998 "home_phone", "office_addr", "office_phone", "department",
999 "affiliation", "modtime", "modby", "modwith",
1002 static struct validate gfbl_validate = {
1014 static char *ufbl_fields[] = {
1016 "fullname", "nickname", "home_addr",
1017 "home_phone", "office_addr", "office_phone", "department",
1021 static struct valobj ufbl_valobj[] = {
1022 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
1023 {V_LEN, 1, USERS_TABLE, "fullname"},
1024 {V_LEN, 2, USERS_TABLE, "nickname"},
1025 {V_LEN, 3, USERS_TABLE, "home_addr"},
1026 {V_LEN, 4, USERS_TABLE, "home_phone"},
1027 {V_LEN, 5, USERS_TABLE, "office_addr"},
1028 {V_LEN, 6, USERS_TABLE, "office_phone"},
1029 {V_LEN, 7, USERS_TABLE, "department"},
1030 {V_LEN, 8, USERS_TABLE, "affiliation"},
1033 static struct validate ufbl_validate = {
1045 static char *gpob_fields[] = {
1047 "login", "type", "box", "address", "modtime", "modby", "modwith",
1050 static struct validate gpob_validate = {
1054 "potype != 'NONE' and users_id = %d",
1062 static char *gpox_fields[] = {
1063 "login", "type", "box",
1066 static struct validate gpox_validate = {
1078 static char *spob_fields[] = {
1079 "login", "type", "box",
1082 static struct valobj spob_valobj[] = {
1083 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
1084 {V_TYPE, 1, 0, "pobox", 0, MR_TYPE},
1087 static struct validate spob_validate = /* SET_POBOX */
1100 static struct validate spop_validate = /* SET_POBOX_POP */
1113 static struct validate dpob_validate = /* DELETE_POBOX */
1126 static char *gmac_fields[] = {
1128 "name", "type", "modtime", "modby", "modwith",
1131 static char *ghst2_fields[] = {
1132 "name", "address", "location", "network",
1133 "name", "vendor", "model", "os", "location", "contact", "use",
1134 "status", "status_change", "network", "address", "ace_type",
1135 "ace_name", "admin_comment", "ops_comment", "created", "creator",
1136 "inuse", "modtime", "modby", "modwith",
1139 static char *ghbh2_fields[] = {
1141 "name", "vendor", "model", "os", "location", "contact", "use",
1142 "status", "status_change", "network", "address", "ace_type",
1143 "ace_name", "admin_comment", "ops_comment", "created", "creator",
1144 "inuse", "modtime", "modby", "modwith",
1147 static char *ghst6_fields[] = {
1148 "name", "address", "location", "network",
1149 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1150 "use", "status", "status_change", "network", "address", "ace_type",
1151 "ace_name", "admin_comment", "ops_comment", "created", "creator",
1152 "inuse", "modtime", "modby", "modwith",
1155 static char *ghbh6_fields[] = {
1157 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1158 "use", "status", "status_change", "network", "address", "ace_type",
1159 "ace_name", "admin_comment", "ops_comment", "created", "creator",
1160 "inuse", "modtime", "modby", "modwith",
1163 static char *ghst_fields[] = {
1164 "name", "address", "location", "network",
1165 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1166 "account_number", "use", "status", "status_change", "network", "address",
1167 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1168 "inuse", "modtime", "modby", "modwith",
1171 static char *ghbh_fields[] = {
1173 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1174 "account_number", "use", "status", "status_change", "network", "address",
1175 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1176 "inuse", "modtime", "modby", "modwith",
1179 static char *ghba_fields[] = {
1181 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1182 "account_number", "use", "status", "status_change", "network", "address",
1183 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1184 "inuse", "modtime", "modby", "modwith",
1187 static struct validate ghst_validate = {
1199 static char *ghha_fields[] = {
1204 static char *ahst2_fields[] = {
1205 "name", "vendor", "model", "os", "location", "contact", "use",
1206 "status", "subnet", "address", "ace_type", "ace_name",
1207 "admin_comment", "ops_comment",
1210 static struct valobj ahst2_valobj[] = {
1211 {V_CHAR, 0, MACHINE_TABLE, "name"},
1212 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1213 {V_CHAR, 2, MACHINE_TABLE, "model"},
1214 {V_CHAR, 3, MACHINE_TABLE, "os"},
1215 {V_CHAR, 4, MACHINE_TABLE, "location"},
1216 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1219 {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1220 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1221 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
1222 {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1223 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1226 static struct validate ahst2_validate = {
1230 "name = UPPER('%s')",
1235 set_uppercase_modtime,
1238 static char *ahst6_fields[] = {
1239 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1240 "use", "status", "subnet", "address", "ace_type", "ace_name",
1241 "admin_comment", "ops_comment",
1244 static struct valobj ahst6_valobj[] = {
1245 {V_CHAR, 0, MACHINE_TABLE, "name"},
1246 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1247 {V_CHAR, 2, MACHINE_TABLE, "model"},
1248 {V_CHAR, 3, MACHINE_TABLE, "os"},
1249 {V_CHAR, 4, MACHINE_TABLE, "location"},
1250 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1251 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
1254 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1255 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1256 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1257 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1258 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1261 static struct validate ahst6_validate = {
1265 "name = UPPER('%s')",
1270 set_uppercase_modtime,
1273 static char *ahst_fields[] = {
1274 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1275 "account_number", "use", "status", "subnet", "address", "ace_type",
1276 "ace_name", "admin_comment", "ops_comment",
1279 static struct valobj ahst_valobj[] = {
1280 {V_CHAR, 0, MACHINE_TABLE, "name"},
1281 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1282 {V_CHAR, 2, MACHINE_TABLE, "model"},
1283 {V_CHAR, 3, MACHINE_TABLE, "os"},
1284 {V_CHAR, 4, MACHINE_TABLE, "location"},
1285 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1286 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
1287 {V_CHAR, 7, MACHINE_TABLE, "account_number"},
1290 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1291 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1292 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
1293 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1294 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1297 static struct validate ahst_validate = {
1301 "name = UPPER('%s')",
1306 set_uppercase_modtime,
1309 static char *uhst2_fields[] = {
1311 "newname", "vendor", "model", "os", "location", "contact", "use",
1312 "status", "subnet", "address", "ace_type", "ace_name",
1313 "admin_comment", "ops_comment",
1316 static struct valobj uhst2_valobj[] = {
1317 {V_CHAR, 0, MACHINE_TABLE, "name"},
1318 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1319 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1320 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1321 {V_CHAR, 3, MACHINE_TABLE, "model"},
1322 {V_CHAR, 4, MACHINE_TABLE, "os"},
1323 {V_CHAR, 5, MACHINE_TABLE, "location"},
1324 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1327 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1328 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1329 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1330 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1331 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1334 static struct validate uhst2_validate = {
1346 static char *uhst6_fields[] = {
1348 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1349 "use", "status", "subnet", "address", "ace_type", "ace_name",
1350 "admin_comment", "ops_comment",
1353 static struct valobj uhst6_valobj[] = {
1354 {V_CHAR, 0, MACHINE_TABLE, "name"},
1355 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1356 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1357 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1358 {V_CHAR, 3, MACHINE_TABLE, "model"},
1359 {V_CHAR, 4, MACHINE_TABLE, "os"},
1360 {V_CHAR, 5, MACHINE_TABLE, "location"},
1361 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1362 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1365 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1366 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1367 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
1368 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1369 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1372 static struct validate uhst6_validate = {
1384 static char *uhst_fields[] = {
1386 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1387 "account_number", "use", "status", "subnet", "address", "ace_type",
1388 "ace_name", "admin_comment", "ops_comment",
1391 static struct valobj uhst_valobj[] = {
1392 {V_CHAR, 0, MACHINE_TABLE, "name"},
1393 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1394 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1395 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1396 {V_CHAR, 3, MACHINE_TABLE, "model"},
1397 {V_CHAR, 4, MACHINE_TABLE, "os"},
1398 {V_CHAR, 5, MACHINE_TABLE, "location"},
1399 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1400 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1401 {V_CHAR, 8, MACHINE_TABLE, "account_number"},
1404 {V_ID, 11, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1405 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
1406 {V_TYPEDATA, 14, 0, 0, 0, MR_ACE},
1407 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1408 {V_ID, 16, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1411 static struct validate uhst_validate = {
1423 static char *uhha_fields[] = {
1428 static struct valobj uhha_valobj[] = {
1429 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1430 {V_CHAR, 1, MACHINE_TABLE, "hwaddr"},
1433 static struct validate uhha_validate = {
1445 static char *dhst_fields[] = {
1449 static struct validate dhst_validate = {
1461 static char *ghal_fields[] = {
1462 "alias", "canonical_hostname",
1463 "alias", "canonical_hostname"
1466 static struct validate ghal_validate = {
1478 static struct valobj ahal_valobj[] = {
1479 {V_CHAR, 0, HOSTALIAS_TABLE, "name"},
1480 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1483 static struct validate ahal_validate = {
1487 "name = UPPER('%s')",
1495 static struct valobj dhal_valobj[] = {
1496 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1499 static struct validate dhal_validate = {
1503 "name = UPPER('%s') AND mach_id = %d",
1511 static char *gsnt2_fields[] = {
1513 "name", "description", "address", "mask", "low", "high", "prefix",
1514 "ace_type", "ace_name", "modtime", "modby", "modwith"
1517 static char *gsnt_fields[] = {
1519 "name", "description", "status", "contact", "account_number", "address",
1520 "mask", "low", "high", "prefix", "ace_type", "ace_name", "modtime",
1524 static struct validate gsnt_validate = {
1536 static char *asnt2_fields[] = {
1537 "name", "description", "address", "mask", "low", "high", "prefix",
1538 "ace_type", "ace_name",
1541 static struct valobj asnt2_valobj[] = {
1542 {V_CHAR, 0, SUBNET_TABLE, "name"},
1543 {V_LEN, 1, SUBNET_TABLE, "description"},
1548 {V_LEN, 6, SUBNET_TABLE, "prefix"},
1549 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1550 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
1553 static struct validate asnt2_validate =
1558 "name = UPPER('%s')",
1563 set_uppercase_modtime,
1566 static char *asnt_fields[] = {
1567 "name", "description", "status", "contact", "account_number", "address",
1568 "mask", "low", "high", "prefix", "ace_type", "ace_name",
1571 static struct valobj asnt_valobj[] = {
1572 {V_CHAR, 0, SUBNET_TABLE, "name"},
1573 {V_LEN, 1, SUBNET_TABLE, "description"},
1575 {V_CHAR, 3, SUBNET_TABLE, "contact"},
1576 {V_CHAR, 4, SUBNET_TABLE, "account_number"},
1581 {V_LEN, 9, SUBNET_TABLE, "prefix"},
1582 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1583 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
1586 static struct validate asnt_validate =
1591 "name = UPPER('%s')",
1596 set_uppercase_modtime,
1599 static char *usnt2_fields[] = {
1601 "newname", "description", "address", "mask", "low", "high", "prefix",
1602 "ace_type", "ace_name",
1605 static struct valobj usnt2_valobj[] = {
1606 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1607 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1608 {V_LEN, 2, SUBNET_TABLE, "description"},
1613 {V_LEN, 7, SUBNET_TABLE, "prefix"},
1614 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1615 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
1618 static struct validate usnt2_validate =
1631 static char *usnt_fields[] = {
1633 "newname", "description", "status", "contact", "account_number", "address",
1634 "mask", "low", "high", "prefix", "ace_type", "ace_name",
1637 static struct valobj usnt_valobj[] = {
1638 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1639 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1640 {V_LEN, 2, SUBNET_TABLE, "description"},
1642 {V_CHAR, 4, SUBNET_TABLE, "contact"},
1643 {V_CHAR, 5, SUBNET_TABLE, "account_number"},
1648 {V_LEN, 10, SUBNET_TABLE, "prefix"},
1649 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1650 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1653 static struct validate usnt_validate =
1666 static char *dsnt_fields[] = {
1670 static struct validate dsnt_validate = {
1682 static char *gclu_fields[] = {
1684 "name", "description", "location", "modtime", "modby", "modwith",
1687 static char *aclu_fields[] = {
1688 "name", "description", "location",
1691 static struct valobj aclu_valobj[] = {
1692 {V_CHAR, 0, CLUSTERS_TABLE, "name"},
1693 {V_LEN, 1, CLUSTERS_TABLE, "description"},
1694 {V_LEN, 2, CLUSTERS_TABLE, "location"},
1697 static struct validate aclu_validate =
1710 static char *uclu_fields[] = {
1712 "newname", "description", "location",
1715 static struct valobj uclu_valobj[] = {
1716 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1717 {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE},
1718 {V_LEN, 2, CLUSTERS_TABLE, "description"},
1719 {V_LEN, 3, CLUSTERS_TABLE, "location"},
1722 static struct validate uclu_validate = {
1734 static char *dclu_fields[] = {
1738 static struct validate dclu_validate = {
1750 static char *gmcm_fields[] = {
1751 "machine", "cluster",
1752 "machine", "cluster",
1755 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
1756 { /* DELETE_MACHINE_FROM_CLUSTER */
1757 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1758 {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1761 static struct validate amtc_validate = /* for amtc and dmfc */
1766 "mach_id = %d and clu_id = %d",
1771 set_mach_modtime_by_id,
1774 static char *gcld_fields[] = {
1775 "cluster", "serv_label",
1776 "cluster", "serv_label", "serv_cluster",
1779 static char *acld_fields[] = {
1780 "cluster", "serv_label", "serv_cluster",
1783 static struct valobj acld_valobj[] =
1785 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1786 {V_CHAR, 1, SVC_TABLE, "serv_label"},
1787 {V_CHAR, 2, SVC_TABLE, "serv_cluster"}
1790 static struct validate acld_validate =
1795 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1800 set_cluster_modtime_by_id,
1803 static struct validate dcld_validate =
1808 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1813 set_cluster_modtime_by_id,
1816 static char *glin2_fields[] = {
1818 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1819 "ace_type", "ace_name", "description", "modtime", "modby", "modwith",
1822 static char *glin3_fields[] = {
1824 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1825 "nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby",
1829 static char *glin4_fields[] = {
1831 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1832 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1833 "description", "modtime", "modby", "modwith",
1836 static char *glin_fields[] = {
1838 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1839 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1840 "memace_type", "memace_name", "description", "modtime", "modby", "modwith",
1843 static struct validate glin_validate = {
1850 access_vis_list_by_name,
1855 static char *alis2_fields[] = {
1856 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1857 "ace_type", "ace_name", "description",
1860 static struct valobj alis2_valobj[] = {
1861 {V_CHAR, 0, LIST_TABLE, "name"},
1868 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1869 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1870 {V_LEN, 9, LIST_TABLE, "description"},
1873 static struct validate alis2_validate = {
1885 static char *alis3_fields[] = {
1886 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1887 "nfsgroup", "ace_type", "ace_name", "description",
1890 static struct valobj alis3_valobj[] = {
1891 {V_CHAR, 0, LIST_TABLE, "name"},
1899 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1900 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1901 {V_LEN, 10, LIST_TABLE, "description"},
1904 static struct validate alis3_validate = {
1916 static char *alis4_fields[] = {
1917 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1918 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1922 static struct valobj alis4_valobj[] = {
1923 {V_CHAR, 0, LIST_TABLE, "name"},
1931 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1932 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1933 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1934 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1935 {V_LEN, 12, LIST_TABLE, "description"},
1938 static struct validate alis4_validate = {
1950 static char *alis_fields[] = {
1951 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1952 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1953 "memace_type", "memace_name", "description",
1956 static struct valobj alis_valobj[] = {
1957 {V_CHAR, 0, LIST_TABLE, "name"},
1966 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1967 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1968 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1969 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1970 {V_TYPEDATA, 13, 0, 0, "list_id", MR_ACE},
1971 {V_LEN, 14, LIST_TABLE, "description"},
1974 static struct validate alis_validate = {
1986 static char *ulis2_fields[] = {
1988 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1989 "ace_type", "ace_name", "description",
1992 static struct valobj ulis2_valobj[] = {
1993 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1994 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
2001 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
2002 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2003 {V_LEN, 10, LIST_TABLE, "description"},
2006 static struct validate ulis2_validate = {
2018 static char *ulis3_fields[] = {
2020 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
2021 "nfsgroup", "ace_type", "ace_name", "description",
2024 static struct valobj ulis3_valobj[] = {
2025 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
2026 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
2034 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2035 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2036 {V_LEN, 11, LIST_TABLE, "description"},
2039 static struct validate ulis3_validate = {
2051 static char *ulis4_fields[] = {
2053 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
2054 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
2058 static struct valobj ulis4_valobj[] = {
2059 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
2060 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
2068 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2069 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2070 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
2071 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
2072 {V_LEN, 13, LIST_TABLE, "description"},
2075 static struct validate ulis4_validate = {
2087 static char *ulis_fields[] = {
2089 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
2090 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
2091 "memace_type", "memace_name", "description",
2094 static struct valobj ulis_valobj[] = {
2095 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
2096 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
2105 {V_ID, 10, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2106 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
2107 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
2108 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
2109 {V_TYPEDATA, 14, 0, 0, "list_id", MR_ACE},
2110 {V_LEN, 15, LIST_TABLE, "description"},
2113 static struct validate ulis_validate = {
2125 static char *dlis_fields[] = {
2129 static struct validate dlis_validate = {
2141 static char *amtl_fields[] = {
2142 "list_name", "member_type", "member_name",
2145 static char *atml_fields[] = {
2146 "list_name", "member_type", "member_name", "tag",
2149 static struct valobj amtl_valobj[] = {
2150 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
2151 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
2152 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
2153 {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
2156 static struct validate amtl_validate =
2169 static struct validate atml_validate =
2182 static struct validate tmol_validate =
2195 static struct validate dmfl_validate =
2205 delete_member_from_list,
2208 static char *gaus_fields[] = {
2209 "ace_type", "ace_name",
2210 "use_type", "use_name",
2213 static struct valobj gaus_valobj[] = {
2214 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
2215 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2218 static struct validate gaus_validate = {
2230 static char *ghbo_fields[] = {
2231 "ace_type", "ace_name",
2235 static struct valobj ghbo_valobj[] = {
2236 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
2237 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2240 static struct validate ghbo_validate = {
2252 static char *qgli_fields[] = {
2253 "active", "publicflg", "hidden", "maillist", "grouplist",
2257 static struct valobj qgli_valobj[] = {
2258 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
2259 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2260 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2261 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2262 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2265 static struct validate qgli_validate = {
2274 qualified_get_lists,
2277 static char *gmol_fields[] = {
2279 "member_type", "member_name",
2282 static char *gtml_fields[] = {
2284 "member_type", "member_name", "tag",
2287 static struct validate gmol_validate = {
2294 access_visible_list,
2296 get_members_of_list,
2299 static char *glom_fields[] = {
2300 "member_type", "member_name",
2301 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
2304 static struct valobj glom_valobj[] = {
2305 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
2306 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2309 static struct validate glom_validate = {
2318 get_lists_of_member,
2321 static char *cmol_fields[] = {
2326 static struct validate cmol_validate = {
2333 access_visible_list,
2335 count_members_of_list,
2338 static char *gsin_fields[] = {
2340 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
2341 "type", "enable", "inprogress", "harderror", "errmsg",
2342 "ace_type", "ace_name", "modtime", "modby", "modwith",
2345 static struct validate gsin_validate =
2358 static char *qgsv_fields[] = {
2359 "enable", "inprogress", "harderror",
2363 static struct valobj qgsv_valobj[] = {
2364 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
2365 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2366 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2369 static struct validate qgsv_validate = {
2378 qualified_get_server,
2381 static char *asin_fields[] = {
2382 "service", "update_int", "target_file", "script", "type", "enable",
2383 "ace_type", "ace_name",
2386 static struct valobj asin_valobj[] = {
2387 {V_CHAR, 0, SERVERS_TABLE, "name"},
2389 {V_LEN, 2, SERVERS_TABLE, "target_file"},
2390 {V_LEN, 3, SERVERS_TABLE, "script"},
2391 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
2393 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
2394 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
2397 static struct validate asin_validate = /* for asin, usin */
2402 "name = UPPER('%s')",
2407 set_uppercase_modtime,
2410 static struct validate rsve_validate = {
2414 "name = UPPER('%s')",
2419 set_uppercase_modtime,
2422 static char *ssif_fields[] = {
2423 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
2426 static struct valobj ssif_valobj[] = {
2427 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2432 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
2435 static struct validate ssif_validate = {
2439 "name = UPPER('%s')",
2447 static char *dsin_fields[] = {
2451 static struct validate dsin_validate = {
2455 "name = UPPER('%s')",
2463 static char *gshi_fields[] = {
2464 "service", "machine",
2465 "service", "machine", "enable", "override", "success", "inprogress",
2466 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
2467 "value3", "modtime", "modby", "modwith",
2470 static struct validate gshi_validate = {
2482 static char *qgsh_fields[] = {
2483 "service", "enable", "override", "success", "inprogress", "hosterror",
2484 "service", "machine",
2487 static struct valobj qgsh_valobj[] = {
2488 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2489 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2490 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2491 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2492 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
2495 static struct validate qgsh_validate = {
2504 qualified_get_serverhost,
2507 static char *ashi_fields[] = {
2508 "service", "machine", "enable", "value1", "value2", "value3",
2511 static struct valobj ashi_valobj[] = {
2512 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2513 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2517 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
2520 static struct validate ashi_validate = /* ashi & ushi */
2525 "service = UPPER('%s') AND mach_id = %d",
2530 set_serverhost_modtime,
2533 static struct validate rshe_validate =
2538 "service = UPPER('%s') AND mach_id = %d",
2543 set_serverhost_modtime,
2546 static struct validate ssho_validate =
2551 "service = UPPER('%s') AND mach_id = %d",
2559 static char *sshi_fields[] = {
2560 "service", "machine", "override", "success", "inprogress",
2561 "hosterror", "errmsg", "ltt", "lts",
2564 static struct valobj sshi_valobj[] = {
2565 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2566 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2571 {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"},
2576 static struct validate sshi_validate =
2589 static char *dshi_fields[] = {
2590 "service", "machine",
2593 static struct validate dshi_validate =
2598 "service = UPPER('%s') AND mach_id = %d",
2606 static char *gslo_fields[] = {
2608 "server", "machine",
2611 static char *gfsl_fields[] = {
2613 "label", "type", "machine", "name", "mount", "access", "comments",
2614 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2617 static struct validate gfsl_validate = {
2629 static char *gfsm_fields[] = {
2631 "label", "type", "machine", "name", "mount", "access", "comments",
2632 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2635 static struct validate gfsm_validate = {
2647 static char *gfsn_fields[] = {
2648 "machine", "partition",
2649 "label", "type", "machine", "name", "mount", "access", "comments",
2650 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2653 static struct validate gfsn_validate = {
2665 static char *gfsp_fields[] = {
2667 "label", "type", "machine", "name", "mount", "access", "comments",
2668 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2671 static char *gfsg_fields[] = {
2673 "label", "type", "machine", "name", "mount", "access", "comments",
2674 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2677 static struct validate gfsg_validate = {
2689 static char *afil_fields[] = {
2690 "label", "type", "machine", "name", "mount", "access", "comments",
2691 "owner", "owners", "create", "lockertype",
2694 static struct valobj afil_valobj[] = {
2695 {V_CHAR, 0, FILESYS_TABLE, "label"},
2696 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
2697 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2698 {V_CHAR, 3, FILESYS_TABLE, "name"},
2699 {V_LEN, 4, FILESYS_TABLE, "mount"},
2700 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
2701 {V_LEN, 6, FILESYS_TABLE, "comments"},
2702 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
2703 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
2705 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
2708 static struct validate afil_validate = {
2717 set_filesys_modtime,
2720 static char *ufil_fields[] = {
2721 "label", "newlabel", "type", "machine", "name", "mount", "access",
2722 "comments", "owner", "owners", "create", "lockertype",
2725 static struct valobj ufil_valobj[] = {
2726 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2727 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
2728 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
2729 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2730 {V_CHAR, 4, FILESYS_TABLE, "name"},
2731 {V_LEN, 5, FILESYS_TABLE, "mount"},
2732 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
2733 {V_LEN, 7, FILESYS_TABLE, "comments"},
2734 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
2735 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
2737 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
2740 static struct validate ufil_validate = {
2749 set_filesys_modtime,
2752 static char *dfil_fields[] = {
2756 static struct validate dfil_validate = {
2768 static char *gfgm_fields[] = {
2769 "fsgroup", "filesys", "sortkey"
2772 static struct validate gfgm_validate = {
2784 static struct valobj aftg_valobj[] = {
2785 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2786 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2789 static struct validate aftg_validate = {
2793 "group_id = %d and filsys_id = %d",
2801 static char *ganf_fields[] = {
2802 "machine", "dir", "device", "status", "allocated", "size",
2803 "modtime", "modby", "modwith",
2806 static char *gnfp_fields[] = {
2808 "machine", "dir", "device", "status", "allocated", "size",
2809 "modtime", "modby", "modwith",
2812 static struct validate gnfp_validate = {
2824 static struct valobj anfp_valobj[] = {
2825 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2826 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2827 {V_LEN, 2, NFSPHYS_TABLE, "device"},
2833 static struct validate anfp_validate = {
2837 "mach_id = %d and dir = '%s'",
2842 set_nfsphys_modtime,
2845 static struct validate unfp_validate = {
2849 "mach_id = %d and dir = '%s'",
2854 set_nfsphys_modtime,
2857 static char *ajnf_fields[] = {
2858 "machine", "dir", "adjustment",
2861 static struct valobj ajnf_valobj[] = {
2862 {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE},
2863 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2867 static struct validate ajnf_validate = {
2871 "mach_id = %d and dir = '%s'",
2876 set_nfsphys_modtime,
2879 static char *dnfp_fields[] = {
2883 static struct validate dnfp_validate = {
2887 "mach_id = %d and dir = '%s'",
2892 set_nfsphys_modtime,
2895 static char *gqot_fields[] = {
2896 "filesys", "type", "name",
2897 "filesys", "type", "name", "quota", "dir", "machine",
2898 "modtime", "modby", "modwith",
2901 static struct valobj gqot_valobj[] = {
2902 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2903 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2906 static struct validate gqot_validate = {
2918 static char *gqbf_fields[] = {
2920 "filesys", "type", "name", "quota", "dir", "machine",
2921 "modtime", "modby", "modwith",
2924 static struct validate gqbf_validate = {
2936 static char *aqot_fields[] = {
2937 "filesys", "type", "name", "quota",
2940 static struct valobj aqot_valobj[] = {
2941 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2942 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2943 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2947 static struct validate aqot_validate = {
2951 "filsys_id = %d and type = '%s' and entity_id = %d",
2959 static struct validate uqot_validate = {
2963 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2971 static struct validate dqot_validate = {
2975 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2983 static char *gnfq_fields[] = {
2985 "filesys", "login", "quota", "dir", "machine",
2986 "modtime", "modby", "modwith",
2989 static struct validate gnfq_validate = {
3001 static char *gnqp_fields[] = {
3003 "filesys", "login", "quota", "dir", "machine",
3004 "modtime", "modby", "modwith",
3007 static char *anfq_fields[] = {
3008 "filesys", "login", "quota",
3011 static struct valobj anfq_valobj[] = {
3012 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
3013 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
3017 static struct validate anfq_validate = {
3021 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
3029 static struct validate unfq_validate = {
3033 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
3041 static struct validate dnfq_validate = {
3045 "filsys_id = %d AND entity_id = %d",
3053 static char *gzcl2_fields[] = {
3055 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
3056 "iws_type", "iws_name", "iui_type", "iui_name",
3057 "modtime", "modby", "modwith",
3060 static char *gzcl_fields[] = {
3062 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
3063 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
3064 "owner_id", "modtime", "modby", "modwith",
3067 static struct validate gzcl_validate = {
3079 static char *azcl2_fields[] = {
3080 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
3081 "iws_type", "iws_name", "iui_type", "iui_name",
3084 static struct valobj azcl2_valobj[] = {
3085 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
3086 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
3087 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
3088 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
3089 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
3090 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
3091 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
3092 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
3093 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
3096 static struct validate azcl2_validate = {
3108 static char *azcl_fields[] = {
3109 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
3110 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
3114 static struct valobj azcl_valobj[] = {
3115 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
3116 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
3117 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
3118 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
3119 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
3120 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
3121 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
3122 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
3123 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
3124 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
3125 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
3128 static struct validate azcl_validate = {
3140 static char *uzcl2_fields[] = {
3141 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
3142 "iws_type", "iws_name", "iui_type", "iui_name",
3145 static struct valobj uzcl2_valobj[] = {
3146 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
3147 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
3148 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
3149 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
3150 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
3151 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
3152 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
3153 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
3154 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
3155 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
3158 static struct validate uzcl2_validate = {
3170 static char *uzcl_fields[] = {
3171 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
3172 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id",
3175 static struct valobj uzcl_valobj[] = {
3176 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
3177 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
3178 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
3179 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
3180 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
3181 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
3182 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
3183 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
3184 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
3185 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
3186 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
3187 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
3190 static struct validate uzcl_validate = {
3202 static struct validate dzcl_validate = {
3214 static char *gsha_fields[] = {
3216 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
3219 static struct validate gsha_validate =
3232 static char *asha_fields[] = {
3233 "machine", "ace_type", "ace_name",
3236 static struct valobj asha_valobj[] = {
3237 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3238 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
3239 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
3242 static struct validate asha_validate =
3255 static char *gacl_fields[] = {
3256 "machine", "target",
3257 "machine", "target", "kind", "list",
3260 static char *aacl_fields[] = {
3261 "machine", "target", "kind", "list",
3264 static char *dacl_fields[] = {
3265 "machine", "target",
3268 static struct valobj aacl_valobj[] = {
3269 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3270 {V_CHAR, 1, ACL_TABLE, "target"},
3271 {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE},
3272 {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST},
3275 static struct validate gacl_validate =
3288 static struct validate aacl_validate =
3293 "mach_id = %d AND target = '%s'",
3301 static char *gsvc_fields[] = {
3302 "service", "protocol",
3303 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
3306 static char *asvc_fields[] = {
3307 "service", "protocol", "port", "description",
3310 static char *dsvc_fields[] = {
3311 "service", "protocol",
3314 static struct valobj asvc_valobj[] = {
3315 {V_CHAR, 0, SERVICES_TABLE, "name"},
3316 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
3318 {V_CHAR, 3, SERVICES_TABLE, "description"},
3321 static struct validate asvc_validate = {
3325 "name = '%s' AND protocol = '%s'",
3330 set_service_modtime,
3333 static struct validate dsvc_validate = {
3337 "name = '%s' AND protocol = '%s'",
3345 static char *gprn_fields[] = {
3347 "name", "type", "hwtype", "duplexname", "hostname",
3348 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3349 "banner", "location", "contact", "modtime", "modby", "modwith"
3352 static char *gpbd_fields[] = {
3354 "name", "type", "hwtype", "duplexname", "hostname",
3355 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3356 "banner", "location", "contact", "modtime", "modby", "modwith"
3359 static char *gpbe_fields[] = {
3361 "name", "type", "hwtype", "duplexname", "hostname",
3362 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3363 "banner", "location", "contact", "modtime", "modby", "modwith"
3366 static char *gpbh_fields[] = {
3368 "name", "type", "hwtype", "duplexname", "hostname",
3369 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3370 "banner", "location", "contact", "modtime", "modby", "modwith"
3373 static char *gpbr_fields[] = {
3375 "name", "type", "hwtype", "duplexname", "hostname",
3376 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3377 "banner", "location", "contact", "modtime", "modby", "modwith"
3380 static char *gpbl_fields[] = {
3382 "name", "type", "hwtype", "duplexname", "hostname",
3383 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3384 "banner", "location", "contact", "modtime", "modby", "modwith"
3387 static char *gpbc_fields[] = {
3389 "name", "type", "hwtype", "duplexname", "hostname",
3390 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3391 "banner", "location", "contact", "modtime", "modby", "modwith"
3394 static char *aprn_fields[] = {
3395 "printer", "type", "hwtype", "duplexname", "hostname",
3396 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3397 "banner", "location", "contact",
3400 static struct valobj aprn_valobj[] = {
3401 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3402 {V_TYPE, 1, 0, "printertype", 0, MR_TYPE},
3403 {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE},
3404 {V_CHAR, 3, PRINTERS_TABLE, "duplexname"},
3405 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3406 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3407 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3408 {V_CHAR, 7, PRINTERS_TABLE, "rp"},
3409 {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3412 {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST},
3413 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3415 {V_CHAR, 14, PRINTERS_TABLE, "location"},
3416 {V_CHAR, 15, PRINTERS_TABLE, "contact"},
3419 static struct validate aprn_validate = {
3431 static char *uprn_fields[] = {
3433 "printer", "type", "hwtype", "duplexname", "hostname",
3434 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3435 "banner", "location", "contact",
3438 static struct valobj uprn_valobj[] = {
3439 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3440 {V_CHAR, 1, PRINTERS_TABLE, "name"},
3441 {V_TYPE, 2, 0, "printertype", 0, MR_TYPE},
3442 {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE},
3443 {V_CHAR, 4, PRINTERS_TABLE, "duplexname"},
3444 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3445 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3446 {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3447 {V_CHAR, 8, PRINTERS_TABLE, "rp"},
3448 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3451 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3452 {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST},
3454 {V_CHAR, 15, PRINTERS_TABLE, "location"},
3455 {V_CHAR, 16, PRINTERS_TABLE, "contact"},
3458 static struct validate uprn_validate = {
3470 static struct validate dprn_validate = {
3482 static char *gpsv_fields[] = {
3484 "host", "kind", "printer_types", "owner_type", "owner_name",
3485 "lpc_acl", "modtime", "modby", "modwith"
3488 static struct valobj gpsv_valobj[] = {
3489 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3492 static struct validate gpsv_validate = {
3504 static char *apsv_fields[] = {
3505 "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl"
3508 static struct valobj apsv_valobj[] = {
3509 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3510 {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE},
3511 {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING},
3512 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
3513 {V_TYPEDATA, 4, 0, 0, 0, MR_ACE},
3514 {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST},
3517 static struct validate apsv_validate = {
3529 static char *dpsv_fields[] = {
3533 static struct validate dpsv_validate = {
3545 static char *gali_fields[] = {
3546 "name", "type", "trans",
3547 "name", "type", "trans",
3550 static char *aali_fields[] = {
3551 "name", "type", "trans",
3554 static struct valobj aali_valobj[] = {
3555 {V_CHAR, 0, ALIAS_TABLE, "name"},
3556 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
3557 {V_CHAR, 2, ALIAS_TABLE, "trans"},
3560 static struct validate aali_validate = {
3564 "name = '%s' and type = '%s' and trans = '%s'",
3572 static struct validate dali_validate = /* DELETE_ALIAS */
3577 "name = '%s' and type = '%s' and trans = '%s'",
3585 static char *gval_fields[] = {
3589 static struct valobj gval_valobj[] = {
3590 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
3593 static struct validate gval_validate = {
3605 static char *aval_fields[] = {
3609 static struct valobj aval_valobj[] = {
3610 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
3614 static struct validate aval_validate = /* for aval, uval, and dval */
3627 static char *dval_fields[] = {
3631 static char *gats_fields[] = {
3632 "table_name", "appends", "updates", "deletes",
3633 "modtime", "modby", "modwith",
3636 static char *_sdl_fields[] = {
3640 static struct validate _sdl_validate =
3653 static char *gcon7_fields[] = {
3655 "name", "description", "location", "contact",
3656 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3659 static struct validate gcon_validate = {
3671 static char *gcon_fields[] = {
3673 "name", "publicflg", "description", "location", "contact",
3674 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3677 static char *acon7_fields[] = {
3678 "name", "description", "location", "contact",
3679 "ace_type", "ace_name", "memace_type", "memace_name",
3682 static struct valobj acon7_valobj[] = {
3683 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3684 {V_LEN, 1, CONTAINERS_TABLE, "description"},
3685 {V_CHAR, 2, CONTAINERS_TABLE, "location"},
3686 {V_CHAR, 3, CONTAINERS_TABLE, "contact"},
3687 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
3688 {V_TYPEDATA, 5, 0, 0, 0, MR_ACE},
3689 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3690 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3693 static struct validate acon7_validate =
3706 static char *acon_fields[] = {
3707 "name", "publicflg", "description", "location", "contact",
3708 "ace_type", "ace_name", "memace_type", "memace_name",
3711 static struct valobj acon_valobj[] = {
3712 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3714 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3715 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3716 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3717 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3718 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3719 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3720 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3723 static struct validate acon_validate =
3736 static char *ucon7_fields[] = {
3738 "newname", "description", "location", "contact",
3739 "ace_type", "ace_name", "memace_type", "memace_name",
3742 static struct valobj ucon7_valobj[] = {
3743 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3744 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3745 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3746 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3747 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3748 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3749 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3750 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3751 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3754 static struct validate ucon7_validate =
3767 static char *ucon_fields[] = {
3769 "newname", "publicflg", "description", "location", "contact",
3770 "ace_type", "ace_name", "memace_type", "memace_name",
3773 static struct valobj ucon_valobj[] = {
3774 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3775 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3777 {V_LEN, 3, CONTAINERS_TABLE, "description"},
3778 {V_CHAR, 4, CONTAINERS_TABLE, "location"},
3779 {V_CHAR, 5, CONTAINERS_TABLE, "contact"},
3780 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3781 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3782 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
3783 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
3786 static struct validate ucon_validate =
3799 static char *dcon_fields[] = {
3803 static struct validate dcon_validate =
3816 static char *amcn_fields[] = {
3817 "machine", "container",
3820 static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */
3821 { /* DELETE_MACHINE_FROM_CONTAINER */
3822 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3823 {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3826 static struct validate amcn_validate = /* for amtn and dmfn */
3836 set_mach_modtime_by_id,
3839 static struct validate dmcn_validate = /* for amtn and dmfn */
3844 "mach_id = %d and cnt_id = %d",
3849 set_mach_modtime_by_id,
3852 static char *gmnm_fields[] = {
3854 "machine", "container",
3857 static char *gmoc_fields[] = {
3864 static struct validate gmoc_validate =
3874 get_machines_of_container,
3877 static char *gsoc_fields[] = {
3883 static struct validate gsoc_validate =
3893 get_subcontainers_of_container,
3896 static char *gtlc_fields[] = {
3900 static char *scli_fields[] = {
3905 static struct valobj scli_valobj[] = {
3906 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3907 {V_ID, 1, LIST_TABLE, "name", "list_id", MR_LIST},
3910 static struct validate scli_validate = {
3922 static char *gcli_fields[] = {
3924 "containername", "listname",
3927 static struct validate glic_validate =
3940 static char *glic_fields[] = {
3942 "containername", "listname",
3945 /* Generalized Query Definitions */
3947 /* Multiple versions of the same query MUST be listed in ascending
3951 /* Note: For any query which uses prefetch_value, the vcnt should be
3952 * one less than the number of %-format specifiers in the tlist.
3955 struct query Queries[] = {
3957 /* Q_GALO - GET_ALL_LOGINS, v2 */
3964 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3974 /* Q_GALO - GET_ALL_LOGINS, v3 */
3981 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3991 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */
3992 "get_all_active_logins",
3998 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
4008 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */
4009 "get_all_active_logins",
4015 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
4025 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */
4026 "get_user_account_by_login",
4032 "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",
4035 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4042 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */
4043 "get_user_account_by_login",
4049 "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",
4052 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4059 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v11 */
4060 "get_user_account_by_login",
4066 "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",
4069 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4076 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v12 */
4077 "get_user_account_by_login",
4083 "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, u.sponsor_type, u.sponsor_id, u.expiration, 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",
4086 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4093 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */
4094 "get_user_account_by_uid",
4100 "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",
4103 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4110 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */
4111 "get_user_account_by_uid",
4117 "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",
4120 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4127 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v11 */
4128 "get_user_account_by_uid",
4134 "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",
4137 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4144 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v12 */
4145 "get_user_account_by_uid",
4151 "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, u.sponsor_type, u.sponsor_id, u.expiration, 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",
4154 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4161 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */
4162 "get_user_account_by_name",
4168 "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",
4171 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4178 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */
4179 "get_user_account_by_name",
4185 "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",
4188 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4195 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v11 */
4196 "get_user_account_by_name",
4202 "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",
4205 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4212 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v12 */
4213 "get_user_account_by_name",
4219 "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, u.sponsor_type, u.sponsor_id, u.expiration, 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",
4222 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4229 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */
4230 "get_user_account_by_class",
4236 "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",
4239 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4246 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */
4247 "get_user_account_by_class",
4253 "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",
4256 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4263 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v11 */
4264 "get_user_account_by_class",
4270 "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",
4273 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4280 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v12 */
4281 "get_user_account_by_class",
4287 "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, u.sponsor_type, u.sponsor_id, u.expiration, 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",
4290 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4297 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */
4298 "get_user_account_by_id",
4304 "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",
4307 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4314 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */
4315 "get_user_account_by_id",
4321 "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",
4324 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4331 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v11 */
4332 "get_user_account_by_id",
4338 "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",
4341 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4348 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v12 */
4349 "get_user_account_by_id",
4355 "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, u.sponsor_type, u.sponsor_id, u.expiration, 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",
4358 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4365 /* Q_GUAS - GET_USER_ACCOUNT_BY_SPONSOR, v12 */
4366 "get_user_account_by_sponsor",
4382 /* Q_GUBL - GET_USER_BY_LOGIN, v2 */
4383 "get_user_by_login",
4389 "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",
4392 "u.login LIKE '%s' AND u.users_id != 0",
4399 /* Q_GUBL - GET_USER_BY_LOGIN, v3 */
4400 "get_user_by_login",
4406 "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",
4409 "u.login LIKE '%s' AND u.users_id != 0",
4416 /* Q_GUBU - GET_USER_BY_UID, v2 */
4423 "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",
4426 "u.unix_uid = %s AND u.users_id != 0",
4433 /* Q_GUBU - GET_USER_BY_UID, v3 */
4440 "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",
4443 "u.unix_uid = %s AND u.users_id != 0",
4450 /* Q_GUBN - GET_USER_BY_NAME, v2 */
4457 "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",
4460 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
4467 /* Q_GUBN - GET_USER_BY_NAME, v3 */
4474 "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",
4477 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
4484 /* Q_GUBC - GET_USER_BY_CLASS, v2 */
4485 "get_user_by_class",
4491 "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",
4494 "u.type = UPPER('%s') AND u.users_id != 0",
4501 /* Q_GUBC - GET_USER_BY_CLASS, v3 */
4502 "get_user_by_class",
4508 "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",
4511 "u.type = UPPER('%s') AND u.users_id != 0",
4518 /* Q_GUBM - GET_USER_BY_MITID, v2 */
4519 "get_user_by_mitid",
4525 "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",
4528 "u.clearid LIKE '%s' AND u.users_id != 0",
4535 /* Q_GUBM - GET_USER_BY_MITID, v3 */
4536 "get_user_by_mitid",
4542 "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",
4545 "u.clearid LIKE '%s' AND u.users_id != 0",
4552 /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */
4559 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4560 * but using up one argv element.
4562 "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)",
4572 /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */
4579 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4580 * but using up one argv element.
4582 "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)",
4592 /* Q_AUAC - ADD_USER_ACCOUNT, v11 */ /* uses prefetch_value() for users_id */
4599 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4600 * but using up one argv element.
4602 "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)",
4612 /* Q_AUAC - ADD_USER_ACCOUNT, v12 */ /* uses prefetch_value() for users_id */
4619 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4620 * but using up one argv element.
4622 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, winhomedir, winprofiledir, sponsor_type, sponsor_id, expiration, 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', %d, NVL('%s', CHR(0)), %s, SYSDATE, %s)",
4632 /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */
4639 "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)",
4649 /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */
4656 "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)",
4666 /* Q_AUSR - ADD_USER, v11 */ /* uses prefetch_value() for users_id */
4673 "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)",
4683 /* Q_AUSR - ADD_USER, v12 */ /* uses prefetch_value() for users_id */
4690 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, winhomedir, winprofiledir, sponsor_type, sponsor_id, expiration, 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', %d, NVL('%s', CHR(0)), %s, SYSDATE, %s)",
4700 /* Q_RUSR - REGISTER_USER */
4717 /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */
4718 "update_user_account",
4724 /* See comment in auac about signature. */
4725 "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",
4735 /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */
4736 "update_user_account",
4742 /* See comment in auac about signature. */
4743 "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",
4753 /* Q_UUAC - UPDATE_USER_ACCOUNT, v11 */
4754 "update_user_account",
4760 /* See comment in auac about signature. */
4761 "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))",
4771 /* Q_UUAC - UPDATE_USER_ACCOUNT, v12 */
4772 "update_user_account",
4778 /* See comment in auac about signature. */
4779 "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)), sponsor_type = '%s', sponsor_id = %d, expiration = NVL('%s', CHR(0))",
4789 /* Q_UUSR - UPDATE_USER, v2 */
4796 "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'",
4806 /* Q_UUSR - UPDATE_USER, v3 */
4813 "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'",
4823 /* Q_UUSR - UPDATE_USER, v11 */
4830 "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)) ",
4840 /* Q_UUSR - UPDATE_USER, v12 */
4847 "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)), sponsor_type = '%s', sponsor_id = %d, expiration = NVL('%s', CHR(0)) ",
4857 /* Q_UUSH - UPDATE_USER_SHELL */
4858 "update_user_shell",
4864 "users SET shell = '%s'",
4874 /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
4875 "update_user_windows_shell",
4881 "users SET winconsoleshell = '%s'",
4891 /* Q_UUST - UPDATE_USER_STATUS */
4892 "update_user_status",
4898 "users SET status = %s",
4908 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
4909 "update_user_security_status",
4915 "users SET secure = %s",
4925 /* Q_DUSR - DELETE_USER */
4942 /* Q_AURV - ADD_USER_RESERVATION */
4943 "add_user_reservation",
4959 /* Q_GURV - GET_USER_RESERVATIONS */
4960 "get_user_reservations",
4976 /* Q_GUBR - GET_USER_BY_RESERVATION */
4977 "get_user_by_reservation",
4993 /* Q_DURV - DELETE_USER_RESERVATION */
4994 "delete_user_reservation",
5010 /* Q_GKUM - GET_KERBEROS_USER_MAP */
5011 "get_kerberos_user_map",
5017 "u.login, str.string FROM krbmap km, users u, strings str",
5020 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
5022 "u.login, str.string",
5027 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
5028 "add_kerberos_user_map",
5034 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
5044 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
5045 "delete_kerberos_user_map",
5054 "users_id = %d AND string_id = %d",
5061 /* Q_GFBL - GET_FINGER_BY_LOGIN */
5062 "get_finger_by_login",
5068 "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",
5078 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
5079 "update_finger_by_login",
5085 "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))",
5095 /* Q_GPOB - GET_POBOX */
5102 "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
5112 /* Q_GAPO - GET_ALL_POBOXES */
5119 "login, potype, pop_id || ':' || box_id FROM users",
5129 /* Q_GPOP - GET_POBOXES_POP */
5136 "login, potype, users_id FROM users",
5146 /* Q_GPOF - GET_POBOXES_SMTP */
5153 "login, potype, users_id FROM users",
5163 /* Q_SPOB - SET_POBOX */
5180 /* Q_SPOP - SET_POBOX_POP */
5197 /* Q_DPOB - DELETE_POBOX */
5204 "users SET potype = 'NONE'",
5214 /* Q_GHST - GET_HOST, v2 */
5221 "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",
5224 "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",
5231 /* Q_GHST - GET_HOST, v6 */
5238 "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",
5241 "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",
5248 /* Q_GHST - GET_HOST, v8 */
5255 "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",
5258 "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",
5265 /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */
5266 "get_host_by_hwaddr",
5272 "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",
5275 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5282 /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */
5283 "get_host_by_hwaddr",
5289 "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",
5292 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5299 /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */
5300 "get_host_by_hwaddr",
5306 "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",
5309 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5316 /* Q_GHBA - GET_HOST_BY_ACCOUNT_NUMBER, v8 */
5317 "get_host_by_account_number",
5323 "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",
5326 "m.account_number LIKE '%s' AND m.mach_id != 0 and s.snet_id = m.snet_id",
5333 /* Q_GHHA - GET_HOST_HWADDR */
5340 "m.hwaddr FROM machine m",
5343 "m.name LIKE UPPER('%s')",
5350 /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */
5357 "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)",
5367 /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */
5374 "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)",
5384 /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */
5391 "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)",
5401 /* Q_UHST - UPDATE_HOST, v2 */
5408 "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",
5418 /* Q_UHST - UPDATE_HOST, v6 */
5425 "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",
5435 /* Q_UHST - UPDATE_HOST, v8 */
5442 "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",
5452 /* Q_UHHA - UPDATE_HOST_HWADDR */
5453 "update_host_hwaddr",
5459 "machine SET hwaddr = NVL('%s', CHR(0))",
5469 /* Q_DHST - DELETE_HOST */
5486 /* Q_GMAC - GET_MACHINE */
5493 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
5496 "name LIKE UPPER('%s') AND mach_id != 0",
5503 /* Q_GHAL - GET_HOSTALIAS */
5510 "a.name, m.name FROM hostalias a, machine m",
5513 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
5520 /* Q_AHAL - ADD_HOSTALIAS */
5527 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)",
5537 /* Q_DHAL - DELETE_HOSTALIAS */
5547 "name = UPPER('%s') AND mach_id = %d",
5554 /* Q_GSNT - GET_SUBNET, v2 */
5561 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
5564 "name LIKE UPPER('%s')",
5571 /* Q_GSNT - GET_SUBNET, v8 */
5578 "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",
5581 "name LIKE UPPER('%s')",
5588 /* Q_ASNT - ADD_SUBNET, v2 */
5595 "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)",
5605 /* Q_ASNT - ADD_SUBNET, v8 */
5612 "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)",
5622 /* Q_USNT - UPDATE_SUBNET, v2 */
5629 "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",
5639 /* Q_USNT - UPDATE_SUBNET, v8 */
5646 "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",
5656 /* Q_DSNT - DELETE_SUBNET */
5673 /* Q_GCLU - GET_CLUSTER */
5680 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
5683 "name LIKE '%s' AND clu_id != 0",
5690 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
5697 "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)",
5707 /* Q_UCLU - UPDATE_CLUSTER */
5714 "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))",
5724 /* Q_DCLU - DELETE_CLUSTER */
5741 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
5742 "get_machine_to_cluster_map",
5748 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
5751 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
5758 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
5759 "add_machine_to_cluster",
5765 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
5775 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
5776 "delete_machine_from_cluster",
5785 "mach_id = %d AND clu_id = %d",
5792 /* Q_GCLD - GET_CLUSTER_DATA */
5799 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
5802 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
5804 "c.name, svc.serv_label",
5809 /* Q_ACLD - ADD_CLUSTER_DATA */
5816 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')",
5826 /* Q_DCLD - DELETE_CLUSTER_DATA */
5827 "delete_cluster_data",
5836 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
5843 /* Q_GLIN - GET_LIST_INFO, v2 */
5850 "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",
5860 /* Q_GLIN - GET_LIST_INFO, v3 */
5867 "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",
5877 /* Q_GLIN - GET_LIST_INFO, v4 */
5884 "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",
5894 /* Q_GLIN - GET_LIST_INFO, v10 */
5901 "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",
5904 "l.name LIKE '%s' AND m.mach_id = l.mailman_id",
5911 /* Q_EXLN - EXPAND_LIST_NAMES */
5912 "expand_list_names",
5921 "name LIKE '%s' AND list_id != 0",
5928 /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */
5935 "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)",
5945 /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */
5952 "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)",
5962 /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */
5969 "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)",
5979 /* Q_ALIS - ADD_LIST, v10 */ /* uses prefetch_value() for list_id */
5986 "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)",
5996 /* Q_ULIS - UPDATE_LIST, v2 */
6003 "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))",
6013 /* Q_ULIS - UPDATE_LIST, v3 */
6020 "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))",
6030 /* Q_ULIS, UPDATE_LIST, v4 */
6037 "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))",
6047 /* Q_ULIS, UPDATE_LIST, v10 */
6054 "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))",
6064 /* Q_DLIS - DELETE_LIST */
6081 /* Q_AMTL - ADD_MEMBER_TO_LIST */
6082 "add_member_to_list",
6098 /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */
6099 "add_tagged_member_to_list",
6115 /* Q_TMOL - TAG_MEMBER_OF_LIST */
6116 "tag_member_of_list",
6132 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
6133 "delete_member_from_list",
6149 /* Q_GAUS - GET_ACE_USE */
6166 /* Q_GHBO - GET_HOST_BY_OWNER */
6167 "get_host_by_owner",
6183 /* Q_QGLI - QUALIFIED_GET_LISTS */
6184 "qualified_get_lists",
6200 /* Q_GMOL - GET_MEMBERS_OF_LIST */
6201 "get_members_of_list",
6217 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
6218 "get_end_members_of_list",
6234 /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */
6235 "get_tagged_members_of_list",
6251 /* Q_GLOM - GET_LISTS_OF_MEMBER */
6252 "get_lists_of_member",
6268 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
6269 "count_members_of_list",
6285 /* Q_GSIN - GET_SERVER_INFO */
6292 "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",
6295 "name LIKE UPPER('%s')",
6302 /* Q_QGSV - QUALIFIED_GET_SERVER */
6303 "qualified_get_server",
6319 /* Q_ASIN - ADD_SERVER_INFO */
6326 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)",
6336 /* Q_USIN - UPDATE_SERVER_INFO */
6337 "update_server_info",
6343 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
6346 "name = UPPER('%s')",
6353 /* Q_RSVE - RESET_SERVER_ERROR */
6354 "reset_server_error",
6360 "servers SET harderror = 0, dfcheck = dfgen",
6363 "name = UPPER('%s')",
6370 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
6371 "set_server_internal_flags",
6377 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))",
6380 "name = UPPER('%s')",
6387 /* Q_DSIN - DELETE_SERVER_INFO */
6388 "delete_server_info",
6397 "name = UPPER('%s')",
6404 /* Q_GSHI - GET_SERVER_HOST_INFO */
6405 "get_server_host_info",
6411 "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",
6414 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
6416 "sh.service, m.name",
6421 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
6422 "qualified_get_server_host",
6438 /* Q_ASHI - ADD_SERVER_HOST_INFO */
6439 "add_server_host_info",
6445 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))",
6455 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
6456 "update_server_host_info",
6462 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))",
6465 "service = UPPER('%s') AND mach_id = %d",
6472 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
6473 "reset_server_host_error",
6479 "serverhosts SET hosterror = 0",
6482 "service = UPPER('%s') AND mach_id = %d",
6489 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
6490 "set_server_host_override",
6496 "serverhosts SET override = 1",
6499 "service = UPPER('%s') AND mach_id = %d",
6506 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
6507 "set_server_host_internal",
6513 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s",
6516 "service = UPPER('%s') AND mach_id = %d",
6523 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
6524 "delete_server_host_info",
6533 "service = UPPER('%s') AND mach_id = %d",
6540 /* Q_GSLO - GET_SERVER_LOCATIONS */
6541 "get_server_locations",
6547 "sh.service, m.name FROM serverhosts sh, machine m",
6550 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
6552 "sh.service, m.name",
6557 /* Q_GFSL - GET_FILESYS_BY_LABEL */
6558 "get_filesys_by_label",
6564 "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",
6567 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6574 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
6575 "get_filesys_by_machine",
6581 "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",
6584 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6591 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
6592 "get_filesys_by_nfsphys",
6598 "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",
6601 "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'",
6608 /* Q_GFSG - GET_FILESYS_BY_GROUP */
6609 "get_filesys_by_group",
6615 "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",
6618 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6625 /* Q_GFSP - GET_FILESYS_BY_PATH */
6626 "get_filesys_by_path",
6632 "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",
6635 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
6642 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
6649 "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)",
6659 /* Q_UFIL - UPDATE_FILESYS */
6666 "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'",
6676 /* Q_DFIL - DELETE_FILESYS */
6693 /* Q_GFGM - GET_FSGROUP_MEMBERS */
6694 "get_fsgroup_members",
6700 "fs.label, fg.key FROM fsgroup fg, filesys fs",
6703 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
6710 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
6711 "add_filesys_to_fsgroup",
6717 "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')",
6727 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
6728 "remove_filesys_from_fsgroup",
6737 "group_id = %d AND filsys_id = %d",
6744 /* Q_GANF - GET_ALL_NFSPHYS */
6751 "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",
6754 "m.mach_id = np.mach_id",
6761 /* Q_GNFP - GET_NFSPHYS */
6768 "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",
6771 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
6778 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
6785 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)",
6795 /* Q_UNFP - UPDATE_NFSPHYS */
6802 "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s",
6805 "mach_id = %d AND dir = '%s'",
6812 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
6813 "adjust_nfsphys_allocation",
6819 "nfsphys SET allocated = allocated + %s",
6822 "mach_id = %d AND dir = '%s'",
6829 /* Q_DNFP - DELETE_NFSPHYS */
6839 "mach_id = %d AND dir = '%s'",
6846 /* Q_GQOT - GET_QUOTA */
6853 "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",
6856 "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",
6863 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
6864 "get_quota_by_filesys",
6870 "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",
6873 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
6880 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
6887 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
6897 /* Q_UQOT - UPDATE_QUOTA */
6904 "quota SET quota = %s",
6914 /* Q_DQOT - DELETE_QUOTA */
6931 /* Q_GNFQ - GET_NFS_QUOTAS */
6938 "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",
6941 "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'",
6943 "fs.label, u.login",
6948 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
6949 "get_nfs_quotas_by_partition",
6955 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
6958 "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",
6965 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
6972 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
6982 /* Q_UNFQ - UPDATE_NFS_QUOTA */
6989 "quota SET quota = %s",
6999 /* Q_DNFQ - DELETE_NFS_QUOTA */
7016 /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */
7023 "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",
7033 /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */
7040 "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",
7050 /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */
7057 "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)",
7067 /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */
7074 "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)",
7084 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */
7085 "update_zephyr_class",
7091 "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",
7101 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */
7102 "update_zephyr_class",
7108 "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",
7118 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
7119 "delete_zephyr_class",
7135 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
7136 "get_server_host_access",
7142 "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",
7145 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
7152 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
7153 "add_server_host_access",
7159 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)",
7169 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
7170 "update_server_host_access",
7176 "hostaccess SET acl_type = '%s', acl_id = %d",
7186 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
7187 "delete_server_host_access",
7203 /* Q_GACL - GET_ACL */
7210 "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l",
7213 "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id",
7215 "m.name, ac.target, ac.kind",
7220 /* Q_AACL - ADD_ACL */
7227 "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)",
7237 /* Q_DACL - DELETE_ACL */
7247 "mach_id = %d AND target = '%s'",
7254 /* Q_GSVC - GET_SERVICE */
7261 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
7264 "name LIKE '%s' AND protocol LIKE '%s'",
7271 /* Q_ASVC - ADD_SERVICE */
7278 "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))",
7288 /* Q_DSVC - DELETE_SERVICE */
7298 "name = '%s' AND protocol = '%s'",
7305 /* Q_GPRN - GET_PRINTER */
7312 "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",
7315 "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",
7322 /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */
7323 "get_printer_by_duplexname",
7329 "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",
7332 "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",
7339 /* Q_GPBE - GET_PRINTER_BY_ETHERNET */
7340 "get_printer_by_ethernet",
7346 "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",
7349 "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",
7356 /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */
7357 "get_printer_by_hostname",
7363 "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",
7366 "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",
7373 /* Q_GPBR - GET_PRINTER_BY_RM */
7374 "get_printer_by_rm",
7380 "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",
7383 "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",
7390 /* Q_GPBL - GET_PRINTER_BY_LOCATION */
7391 "get_printer_by_location",
7397 "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",
7400 "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",
7407 /* Q_GPBC - GET_PRINTER_BY_CONTACT */
7408 "get_printer_by_contact",
7414 "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",
7417 "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",
7424 /* Q_APRN - ADD_PRINTER */
7431 "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)))",
7441 /* Q_UPRN - UPDATE_PRINTER */
7448 "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))",
7458 /* Q_DPRN - DELETE_PRINTER */
7475 /* Q_GPSV - GET_PRINT_SERVER */
7482 "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",
7485 "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",
7492 /* Q_APSV - ADD_PRINT_SERVER */
7499 "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)",
7509 /* Q_UPSV - UPDATE_PRINT_SERVER */
7510 "update_print_server",
7516 "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d",
7526 /* Q_DPSV - DELETE_PRINT_SERVER */
7527 "delete_print_server",
7543 /* Q_GALI - GET_ALIAS */
7550 "name, type, trans FROM alias",
7553 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
7555 "type, name, trans",
7560 /* Q_AALI - ADD_ALIAS */
7567 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
7577 /* Q_DALI - DELETE_ALIAS */
7587 "name = '%s' AND type = '%s' AND trans = '%s'",
7594 /* Q_GVAL - GET_VALUE */
7601 "value FROM numvalues",
7611 /* Q_AVAL - ADD_VALUE */
7618 "INTO numvalues (name, value) VALUES ('%s', %s)",
7628 /* Q_UVAL - UPDATE_VALUE */
7635 "numvalues SET value = %s",
7645 /* Q_DVAL - DELETE_VALUE */
7662 /* Q_GATS - GET_ALL_TABLE_STATS */
7663 "get_all_table_stats",
7669 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
7679 /* Q__SDL - _SET_DEBUG_LEVEL */
7696 /* Q_GCON - GET_CONTAINER, v7 */
7703 "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",
7706 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7713 /* Q_GCON - GET_CONTAINER, v9 */
7720 "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",
7723 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7730 /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */
7737 "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)",
7747 /* Q_ACON - ADD_CONTAINER, v9 */ /* uses prefetch_value() for cnt_id */
7754 "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)",
7764 /* Q_UCON - UPDATE_CONTAINER, v7 */
7781 /* Q_UCON - UPDATE_CONTAINER, v9 */
7798 /* Q_DCON - DELETE_CONTAINER, v7 */
7815 /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */
7816 "add_machine_to_container",
7822 "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)",
7832 /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */
7833 "delete_machine_from_container",
7842 "mach_id = %d AND cnt_id = %d",
7849 /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */
7850 "get_machine_to_container_map",
7856 "m.name, c.name FROM machine m, containers c, mcntmap mcn",
7859 "m.name LIKE UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id",
7866 /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */
7867 "get_machines_of_container",
7883 /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */
7884 "get_subcontainers_of_container",
7900 /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v7 */
7901 "get_toplevel_containers",
7907 "name FROM containers",
7910 "name NOT LIKE '%%/%%'",
7917 /* Q_SCLI - SET_CONTAINER_LIST, v9 */
7918 "set_container_list",
7934 /* Q_GCLI - GET_CONTAINER_LIST, v9 */
7935 "get_container_list",
7941 "c.name, l.name FROM containers c, list l",
7944 "LOWER(c.name) = LOWER('%s') AND c.list_id = l.list_id AND c.list_id != 0",
7951 /* G_GLIC - GET_LIST_CONTAINER, v9 */
7952 "get_list_container",
7958 "c.name, l.name FROM containers c, list l",
7961 "l.list_id = %d AND l.list_id = c.list_id and c.list_id != 0",
7969 int QueryCount = (sizeof(Queries) / sizeof(struct query));