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", "modtime",
109 "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", "modtime",
178 "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", "modtime",
208 "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", "modtime",
264 "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", "modtime",
294 "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, "ace_type", 0, MR_ACE},
304 {V_TYPEDATA, 1, 0, "list_id", 0, MR_ACE},
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",
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},
510 static struct validate auac2_validate = {
522 static struct validate auac3_validate = {
534 static struct validate auac11_validate = {
546 static struct validate auac_validate = {
558 static struct validate ausr2_validate = {
570 static struct validate ausr3_validate = {
582 static struct validate ausr11_validate = {
594 static struct validate ausr_validate = {
606 static char *rusr_fields[] = {
607 "unix_uid", "login", "pobox_type"
610 static struct valobj rusr_valobj[] = {
612 {V_CHAR, 1, USERS_TABLE, "login"},
615 static struct validate rusr_validate = {
627 static char *uuac2_fields[] = {
629 "newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
630 "clearid", "class", "comments", "signature", "secure",
633 static char *uuac3_fields[] = {
635 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
636 "middle", "status", "clearid", "class", "comments", "signature", "secure",
639 static char *uuac11_fields[] = {
641 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
642 "middle", "status", "clearid", "class", "comments", "signature", "secure",
643 "winhomedir", "winprofiledir",
646 static char *uuac_fields[] = {
648 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
649 "middle", "status", "clearid", "class", "comments", "signature", "secure",
650 "winhomedir", "winprofiledir, sponsor_type, sponsor_name",
653 static struct valobj uuac2_valobj[] = {
654 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
655 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
657 {V_CHAR, 3, USERS_TABLE, "shell"},
658 {V_CHAR, 4, USERS_TABLE, "first"},
659 {V_CHAR, 5, USERS_TABLE, "last"},
660 {V_CHAR, 6, USERS_TABLE, "middle"},
662 {V_CHAR, 8, USERS_TABLE, "clearid"},
663 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
664 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
668 static struct valobj uuac3_valobj[] = {
669 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
670 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
672 {V_CHAR, 3, USERS_TABLE, "shell"},
673 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
674 {V_CHAR, 5, USERS_TABLE, "first"},
675 {V_CHAR, 6, USERS_TABLE, "last"},
676 {V_CHAR, 7, USERS_TABLE, "middle"},
678 {V_CHAR, 9, USERS_TABLE, "clearid"},
679 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
680 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
684 static struct valobj uuac11_valobj[] = {
685 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
686 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
688 {V_CHAR, 3, USERS_TABLE, "shell"},
689 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
690 {V_CHAR, 5, USERS_TABLE, "first"},
691 {V_CHAR, 6, USERS_TABLE, "last"},
692 {V_CHAR, 7, USERS_TABLE, "middle"},
694 {V_CHAR, 9, USERS_TABLE, "clearid"},
695 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
696 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
698 {V_LEN, 14, USERS_TABLE, "winhomedir"},
699 {V_LEN, 15, USERS_TABLE, "winprofiledir"},
702 static struct valobj uuac_valobj[] = {
703 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
704 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
706 {V_CHAR, 3, USERS_TABLE, "shell"},
707 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
708 {V_CHAR, 5, USERS_TABLE, "first"},
709 {V_CHAR, 6, USERS_TABLE, "last"},
710 {V_CHAR, 7, USERS_TABLE, "middle"},
712 {V_CHAR, 9, USERS_TABLE, "clearid"},
713 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
714 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
716 {V_LEN, 14, USERS_TABLE, "winhomedir"},
717 {V_LEN, 15, USERS_TABLE, "winprofiledir"},
718 {V_TYPE, 16, 0, "ace_type", 0, MR_ACE},
719 {V_TYPEDATA, 17, 0, 0, "list_id", MR_ACE},
722 static struct validate uuac2_validate = {
734 static struct validate uuac3_validate = {
746 static struct validate uuac11_validate = {
758 static struct validate uuac_validate = {
770 static struct validate uusr2_validate = {
782 static struct validate uusr3_validate = {
794 static struct validate uusr11_validate = {
806 static struct validate uusr_validate = {
818 static char *uush_fields[] = {
823 static struct valobj uush_valobj[] = {
824 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
825 {V_CHAR, 1, USERS_TABLE, "shell"},
828 static struct validate uush_validate = {
840 static char *uuws_fields[] = {
845 static struct valobj uuws_valobj[] = {
846 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
847 {V_CHAR, 1, USERS_TABLE, "winconsoleshell"},
850 static struct validate uuws_validate = {
862 static char *uust_fields[] = {
867 static char *uuss_fields[] = {
872 static struct valobj uust_valobj[] = {
873 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
878 static struct validate uust_validate = {
890 static char *dusr_fields[] = {
894 static struct validate dusr_validate = {
906 static char *aurv_fields[] = {
907 "login", "reservation",
910 static struct validate aurv_validate = {
922 static char *gurv_fields[] = {
927 static struct validate gurv_validate = {
936 get_user_reservations,
939 static char *gubr_fields[] = {
944 static struct validate gubr_validate = {
953 get_user_by_reservation,
956 static char *gkum_fields[] = { "login", "kerberos",
957 "login", "kerberos" };
959 static char *akum_fields[] = { "login", "kerberos" };
961 static struct valobj akum_valobj[] =
963 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
964 {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
967 static struct validate akum_validate =
972 "users_id = %d or string_id = %d",
980 static struct validate dkum_validate =
985 "users_id = %d and string_id = %d",
993 static char *gfbl_fields[] = {
995 "login", "fullname", "nickname", "home_addr",
996 "home_phone", "office_addr", "office_phone", "department",
997 "affiliation", "modtime", "modby", "modwith",
1000 static struct validate gfbl_validate = {
1012 static char *ufbl_fields[] = {
1014 "fullname", "nickname", "home_addr",
1015 "home_phone", "office_addr", "office_phone", "department",
1019 static struct valobj ufbl_valobj[] = {
1020 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
1021 {V_LEN, 1, USERS_TABLE, "fullname"},
1022 {V_LEN, 2, USERS_TABLE, "nickname"},
1023 {V_LEN, 3, USERS_TABLE, "home_addr"},
1024 {V_LEN, 4, USERS_TABLE, "home_phone"},
1025 {V_LEN, 5, USERS_TABLE, "office_addr"},
1026 {V_LEN, 6, USERS_TABLE, "office_phone"},
1027 {V_LEN, 7, USERS_TABLE, "department"},
1028 {V_LEN, 8, USERS_TABLE, "affiliation"},
1031 static struct validate ufbl_validate = {
1043 static char *gpob_fields[] = {
1045 "login", "type", "box", "address", "modtime", "modby", "modwith",
1048 static struct validate gpob_validate = {
1052 "potype != 'NONE' and users_id = %d",
1060 static char *gpox_fields[] = {
1061 "login", "type", "box",
1064 static struct validate gpox_validate = {
1076 static char *spob_fields[] = {
1077 "login", "type", "box",
1080 static struct valobj spob_valobj[] = {
1081 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
1082 {V_TYPE, 1, 0, "pobox", 0, MR_TYPE},
1085 static struct validate spob_validate = /* SET_POBOX */
1098 static struct validate spop_validate = /* SET_POBOX_POP */
1111 static struct validate dpob_validate = /* DELETE_POBOX */
1124 static char *gmac_fields[] = {
1126 "name", "type", "modtime", "modby", "modwith",
1129 static char *ghst2_fields[] = {
1130 "name", "address", "location", "network",
1131 "name", "vendor", "model", "os", "location", "contact", "use",
1132 "status", "status_change", "network", "address", "ace_type",
1133 "ace_name", "admin_comment", "ops_comment", "created", "creator",
1134 "inuse", "modtime", "modby", "modwith",
1137 static char *ghbh2_fields[] = {
1139 "name", "vendor", "model", "os", "location", "contact", "use",
1140 "status", "status_change", "network", "address", "ace_type",
1141 "ace_name", "admin_comment", "ops_comment", "created", "creator",
1142 "inuse", "modtime", "modby", "modwith",
1145 static char *ghst6_fields[] = {
1146 "name", "address", "location", "network",
1147 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1148 "use", "status", "status_change", "network", "address", "ace_type",
1149 "ace_name", "admin_comment", "ops_comment", "created", "creator",
1150 "inuse", "modtime", "modby", "modwith",
1153 static char *ghbh6_fields[] = {
1155 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1156 "use", "status", "status_change", "network", "address", "ace_type",
1157 "ace_name", "admin_comment", "ops_comment", "created", "creator",
1158 "inuse", "modtime", "modby", "modwith",
1161 static char *ghst_fields[] = {
1162 "name", "address", "location", "network",
1163 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1164 "account_number", "use", "status", "status_change", "network", "address",
1165 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1166 "inuse", "modtime", "modby", "modwith",
1169 static char *ghbh_fields[] = {
1171 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1172 "account_number", "use", "status", "status_change", "network", "address",
1173 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1174 "inuse", "modtime", "modby", "modwith",
1177 static char *ghba_fields[] = {
1179 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1180 "account_number", "use", "status", "status_change", "network", "address",
1181 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1182 "inuse", "modtime", "modby", "modwith",
1185 static struct validate ghst_validate = {
1197 static char *ghha_fields[] = {
1202 static char *ahst2_fields[] = {
1203 "name", "vendor", "model", "os", "location", "contact", "use",
1204 "status", "subnet", "address", "ace_type", "ace_name",
1205 "admin_comment", "ops_comment",
1208 static struct valobj ahst2_valobj[] = {
1209 {V_CHAR, 0, MACHINE_TABLE, "name"},
1210 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1211 {V_CHAR, 2, MACHINE_TABLE, "model"},
1212 {V_CHAR, 3, MACHINE_TABLE, "os"},
1213 {V_CHAR, 4, MACHINE_TABLE, "location"},
1214 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1217 {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1218 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1219 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
1220 {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1221 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1224 static struct validate ahst2_validate = {
1228 "name = UPPER('%s')",
1233 set_uppercase_modtime,
1236 static char *ahst6_fields[] = {
1237 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1238 "use", "status", "subnet", "address", "ace_type", "ace_name",
1239 "admin_comment", "ops_comment",
1242 static struct valobj ahst6_valobj[] = {
1243 {V_CHAR, 0, MACHINE_TABLE, "name"},
1244 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1245 {V_CHAR, 2, MACHINE_TABLE, "model"},
1246 {V_CHAR, 3, MACHINE_TABLE, "os"},
1247 {V_CHAR, 4, MACHINE_TABLE, "location"},
1248 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1249 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
1252 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1253 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1254 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1255 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1256 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1259 static struct validate ahst6_validate = {
1263 "name = UPPER('%s')",
1268 set_uppercase_modtime,
1271 static char *ahst_fields[] = {
1272 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1273 "account_number", "use", "status", "subnet", "address", "ace_type",
1274 "ace_name", "admin_comment", "ops_comment",
1277 static struct valobj ahst_valobj[] = {
1278 {V_CHAR, 0, MACHINE_TABLE, "name"},
1279 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1280 {V_CHAR, 2, MACHINE_TABLE, "model"},
1281 {V_CHAR, 3, MACHINE_TABLE, "os"},
1282 {V_CHAR, 4, MACHINE_TABLE, "location"},
1283 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1284 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
1285 {V_CHAR, 7, MACHINE_TABLE, "account_number"},
1288 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1289 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1290 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
1291 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1292 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1295 static struct validate ahst_validate = {
1299 "name = UPPER('%s')",
1304 set_uppercase_modtime,
1307 static char *uhst2_fields[] = {
1309 "newname", "vendor", "model", "os", "location", "contact", "use",
1310 "status", "subnet", "address", "ace_type", "ace_name",
1311 "admin_comment", "ops_comment",
1314 static struct valobj uhst2_valobj[] = {
1315 {V_CHAR, 0, MACHINE_TABLE, "name"},
1316 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1317 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1318 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1319 {V_CHAR, 3, MACHINE_TABLE, "model"},
1320 {V_CHAR, 4, MACHINE_TABLE, "os"},
1321 {V_CHAR, 5, MACHINE_TABLE, "location"},
1322 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1325 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1326 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1327 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1328 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1329 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1332 static struct validate uhst2_validate = {
1344 static char *uhst6_fields[] = {
1346 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1347 "use", "status", "subnet", "address", "ace_type", "ace_name",
1348 "admin_comment", "ops_comment",
1351 static struct valobj uhst6_valobj[] = {
1352 {V_CHAR, 0, MACHINE_TABLE, "name"},
1353 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1354 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1355 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1356 {V_CHAR, 3, MACHINE_TABLE, "model"},
1357 {V_CHAR, 4, MACHINE_TABLE, "os"},
1358 {V_CHAR, 5, MACHINE_TABLE, "location"},
1359 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1360 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1363 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1364 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1365 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
1366 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1367 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1370 static struct validate uhst6_validate = {
1382 static char *uhst_fields[] = {
1384 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1385 "account_number", "use", "status", "subnet", "address", "ace_type",
1386 "ace_name", "admin_comment", "ops_comment",
1389 static struct valobj uhst_valobj[] = {
1390 {V_CHAR, 0, MACHINE_TABLE, "name"},
1391 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1392 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1393 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1394 {V_CHAR, 3, MACHINE_TABLE, "model"},
1395 {V_CHAR, 4, MACHINE_TABLE, "os"},
1396 {V_CHAR, 5, MACHINE_TABLE, "location"},
1397 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1398 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1399 {V_CHAR, 8, MACHINE_TABLE, "account_number"},
1402 {V_ID, 11, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1403 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
1404 {V_TYPEDATA, 14, 0, 0, 0, MR_ACE},
1405 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1406 {V_ID, 16, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1409 static struct validate uhst_validate = {
1421 static char *uhha_fields[] = {
1426 static struct valobj uhha_valobj[] = {
1427 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1428 {V_CHAR, 1, MACHINE_TABLE, "hwaddr"},
1431 static struct validate uhha_validate = {
1443 static char *dhst_fields[] = {
1447 static struct validate dhst_validate = {
1459 static char *ghal_fields[] = {
1460 "alias", "canonical_hostname",
1461 "alias", "canonical_hostname"
1464 static struct validate ghal_validate = {
1476 static struct valobj ahal_valobj[] = {
1477 {V_CHAR, 0, HOSTALIAS_TABLE, "name"},
1478 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1481 static struct validate ahal_validate = {
1485 "name = UPPER('%s')",
1493 static struct valobj dhal_valobj[] = {
1494 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1497 static struct validate dhal_validate = {
1501 "name = UPPER('%s') AND mach_id = %d",
1509 static char *gsnt2_fields[] = {
1511 "name", "description", "address", "mask", "low", "high", "prefix",
1512 "ace_type", "ace_name", "modtime", "modby", "modwith"
1515 static char *gsnt_fields[] = {
1517 "name", "description", "status", "contact", "account_number", "address",
1518 "mask", "low", "high", "prefix", "ace_type", "ace_name", "modtime",
1522 static struct validate gsnt_validate = {
1534 static char *asnt2_fields[] = {
1535 "name", "description", "address", "mask", "low", "high", "prefix",
1536 "ace_type", "ace_name",
1539 static struct valobj asnt2_valobj[] = {
1540 {V_CHAR, 0, SUBNET_TABLE, "name"},
1541 {V_LEN, 1, SUBNET_TABLE, "description"},
1546 {V_LEN, 6, SUBNET_TABLE, "prefix"},
1547 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1548 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
1551 static struct validate asnt2_validate =
1556 "name = UPPER('%s')",
1561 set_uppercase_modtime,
1564 static char *asnt_fields[] = {
1565 "name", "description", "status", "contact", "account_number", "address",
1566 "mask", "low", "high", "prefix", "ace_type", "ace_name",
1569 static struct valobj asnt_valobj[] = {
1570 {V_CHAR, 0, SUBNET_TABLE, "name"},
1571 {V_LEN, 1, SUBNET_TABLE, "description"},
1573 {V_CHAR, 3, SUBNET_TABLE, "contact"},
1574 {V_CHAR, 4, SUBNET_TABLE, "account_number"},
1579 {V_LEN, 9, SUBNET_TABLE, "prefix"},
1580 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1581 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
1584 static struct validate asnt_validate =
1589 "name = UPPER('%s')",
1594 set_uppercase_modtime,
1597 static char *usnt2_fields[] = {
1599 "newname", "description", "address", "mask", "low", "high", "prefix",
1600 "ace_type", "ace_name",
1603 static struct valobj usnt2_valobj[] = {
1604 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1605 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1606 {V_LEN, 2, SUBNET_TABLE, "description"},
1611 {V_LEN, 7, SUBNET_TABLE, "prefix"},
1612 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1613 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
1616 static struct validate usnt2_validate =
1629 static char *usnt_fields[] = {
1631 "newname", "description", "status", "contact", "account_number", "address",
1632 "mask", "low", "high", "prefix", "ace_type", "ace_name",
1635 static struct valobj usnt_valobj[] = {
1636 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1637 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1638 {V_LEN, 2, SUBNET_TABLE, "description"},
1640 {V_CHAR, 4, SUBNET_TABLE, "contact"},
1641 {V_CHAR, 5, SUBNET_TABLE, "account_number"},
1646 {V_LEN, 10, SUBNET_TABLE, "prefix"},
1647 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1648 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1651 static struct validate usnt_validate =
1664 static char *dsnt_fields[] = {
1668 static struct validate dsnt_validate = {
1680 static char *gclu_fields[] = {
1682 "name", "description", "location", "modtime", "modby", "modwith",
1685 static char *aclu_fields[] = {
1686 "name", "description", "location",
1689 static struct valobj aclu_valobj[] = {
1690 {V_CHAR, 0, CLUSTERS_TABLE, "name"},
1691 {V_LEN, 1, CLUSTERS_TABLE, "description"},
1692 {V_LEN, 2, CLUSTERS_TABLE, "location"},
1695 static struct validate aclu_validate =
1708 static char *uclu_fields[] = {
1710 "newname", "description", "location",
1713 static struct valobj uclu_valobj[] = {
1714 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1715 {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE},
1716 {V_LEN, 2, CLUSTERS_TABLE, "description"},
1717 {V_LEN, 3, CLUSTERS_TABLE, "location"},
1720 static struct validate uclu_validate = {
1732 static char *dclu_fields[] = {
1736 static struct validate dclu_validate = {
1748 static char *gmcm_fields[] = {
1749 "machine", "cluster",
1750 "machine", "cluster",
1753 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
1754 { /* DELETE_MACHINE_FROM_CLUSTER */
1755 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1756 {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1759 static struct validate amtc_validate = /* for amtc and dmfc */
1764 "mach_id = %d and clu_id = %d",
1769 set_mach_modtime_by_id,
1772 static char *gcld_fields[] = {
1773 "cluster", "serv_label",
1774 "cluster", "serv_label", "serv_cluster",
1777 static char *acld_fields[] = {
1778 "cluster", "serv_label", "serv_cluster",
1781 static struct valobj acld_valobj[] =
1783 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1784 {V_CHAR, 1, SVC_TABLE, "serv_label"},
1785 {V_CHAR, 2, SVC_TABLE, "serv_cluster"}
1788 static struct validate acld_validate =
1793 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1798 set_cluster_modtime_by_id,
1801 static struct validate dcld_validate =
1806 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1811 set_cluster_modtime_by_id,
1814 static char *glin2_fields[] = {
1816 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1817 "ace_type", "ace_name", "description", "modtime", "modby", "modwith",
1820 static char *glin3_fields[] = {
1822 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1823 "nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby",
1827 static char *glin4_fields[] = {
1829 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1830 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1831 "description", "modtime", "modby", "modwith",
1834 static char *glin_fields[] = {
1836 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1837 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1838 "memace_type", "memace_name", "description", "modtime", "modby", "modwith",
1841 static struct validate glin_validate = {
1848 access_vis_list_by_name,
1853 static char *alis2_fields[] = {
1854 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1855 "ace_type", "ace_name", "description",
1858 static struct valobj alis2_valobj[] = {
1859 {V_CHAR, 0, LIST_TABLE, "name"},
1866 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1867 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1868 {V_LEN, 9, LIST_TABLE, "description"},
1871 static struct validate alis2_validate = {
1883 static char *alis3_fields[] = {
1884 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1885 "nfsgroup", "ace_type", "ace_name", "description",
1888 static struct valobj alis3_valobj[] = {
1889 {V_CHAR, 0, LIST_TABLE, "name"},
1897 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1898 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1899 {V_LEN, 10, LIST_TABLE, "description"},
1902 static struct validate alis3_validate = {
1914 static char *alis4_fields[] = {
1915 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1916 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1920 static struct valobj alis4_valobj[] = {
1921 {V_CHAR, 0, LIST_TABLE, "name"},
1929 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1930 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1931 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1932 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1933 {V_LEN, 12, LIST_TABLE, "description"},
1936 static struct validate alis4_validate = {
1948 static char *alis_fields[] = {
1949 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1950 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1951 "memace_type", "memace_name", "description",
1954 static struct valobj alis_valobj[] = {
1955 {V_CHAR, 0, LIST_TABLE, "name"},
1964 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1965 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1966 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1967 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1968 {V_TYPEDATA, 13, 0, 0, "list_id", MR_ACE},
1969 {V_LEN, 14, LIST_TABLE, "description"},
1972 static struct validate alis_validate = {
1984 static char *ulis2_fields[] = {
1986 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1987 "ace_type", "ace_name", "description",
1990 static struct valobj ulis2_valobj[] = {
1991 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1992 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1999 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
2000 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2001 {V_LEN, 10, LIST_TABLE, "description"},
2004 static struct validate ulis2_validate = {
2016 static char *ulis3_fields[] = {
2018 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
2019 "nfsgroup", "ace_type", "ace_name", "description",
2022 static struct valobj ulis3_valobj[] = {
2023 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
2024 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
2032 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2033 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2034 {V_LEN, 11, LIST_TABLE, "description"},
2037 static struct validate ulis3_validate = {
2049 static char *ulis4_fields[] = {
2051 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
2052 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
2056 static struct valobj ulis4_valobj[] = {
2057 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
2058 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
2066 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2067 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2068 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
2069 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
2070 {V_LEN, 13, LIST_TABLE, "description"},
2073 static struct validate ulis4_validate = {
2085 static char *ulis_fields[] = {
2087 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
2088 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
2089 "memace_type", "memace_name", "description",
2092 static struct valobj ulis_valobj[] = {
2093 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
2094 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
2103 {V_ID, 10, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2104 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
2105 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
2106 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
2107 {V_TYPEDATA, 14, 0, 0, "list_id", MR_ACE},
2108 {V_LEN, 15, LIST_TABLE, "description"},
2111 static struct validate ulis_validate = {
2123 static char *dlis_fields[] = {
2127 static struct validate dlis_validate = {
2139 static char *amtl_fields[] = {
2140 "list_name", "member_type", "member_name",
2143 static char *atml_fields[] = {
2144 "list_name", "member_type", "member_name", "tag",
2147 static struct valobj amtl_valobj[] = {
2148 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
2149 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
2150 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
2151 {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
2154 static struct validate amtl_validate =
2167 static struct validate atml_validate =
2180 static struct validate tmol_validate =
2193 static struct validate dmfl_validate =
2203 delete_member_from_list,
2206 static char *gaus_fields[] = {
2207 "ace_type", "ace_name",
2208 "use_type", "use_name",
2211 static struct valobj gaus_valobj[] = {
2212 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
2213 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2216 static struct validate gaus_validate = {
2228 static char *ghbo_fields[] = {
2229 "ace_type", "ace_name",
2233 static struct valobj ghbo_valobj[] = {
2234 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
2235 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2238 static struct validate ghbo_validate = {
2250 static char *qgli_fields[] = {
2251 "active", "publicflg", "hidden", "maillist", "grouplist",
2255 static struct valobj qgli_valobj[] = {
2256 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
2257 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2258 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2259 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2260 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2263 static struct validate qgli_validate = {
2272 qualified_get_lists,
2275 static char *gmol_fields[] = {
2277 "member_type", "member_name",
2280 static char *gtml_fields[] = {
2282 "member_type", "member_name", "tag",
2285 static struct validate gmol_validate = {
2292 access_visible_list,
2294 get_members_of_list,
2297 static char *glom_fields[] = {
2298 "member_type", "member_name",
2299 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
2302 static struct valobj glom_valobj[] = {
2303 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
2304 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2307 static struct validate glom_validate = {
2316 get_lists_of_member,
2319 static char *cmol_fields[] = {
2324 static struct validate cmol_validate = {
2331 access_visible_list,
2333 count_members_of_list,
2336 static char *gsin_fields[] = {
2338 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
2339 "type", "enable", "inprogress", "harderror", "errmsg",
2340 "ace_type", "ace_name", "modtime", "modby", "modwith",
2343 static struct validate gsin_validate =
2356 static char *qgsv_fields[] = {
2357 "enable", "inprogress", "harderror",
2361 static struct valobj qgsv_valobj[] = {
2362 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
2363 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2364 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2367 static struct validate qgsv_validate = {
2376 qualified_get_server,
2379 static char *asin_fields[] = {
2380 "service", "update_int", "target_file", "script", "type", "enable",
2381 "ace_type", "ace_name",
2384 static struct valobj asin_valobj[] = {
2385 {V_CHAR, 0, SERVERS_TABLE, "name"},
2387 {V_LEN, 2, SERVERS_TABLE, "target_file"},
2388 {V_LEN, 3, SERVERS_TABLE, "script"},
2389 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
2391 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
2392 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
2395 static struct validate asin_validate = /* for asin, usin */
2400 "name = UPPER('%s')",
2405 set_uppercase_modtime,
2408 static struct validate rsve_validate = {
2412 "name = UPPER('%s')",
2417 set_uppercase_modtime,
2420 static char *ssif_fields[] = {
2421 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
2424 static struct valobj ssif_valobj[] = {
2425 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2430 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
2433 static struct validate ssif_validate = {
2437 "name = UPPER('%s')",
2445 static char *dsin_fields[] = {
2449 static struct validate dsin_validate = {
2453 "name = UPPER('%s')",
2461 static char *gshi_fields[] = {
2462 "service", "machine",
2463 "service", "machine", "enable", "override", "success", "inprogress",
2464 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
2465 "value3", "modtime", "modby", "modwith",
2468 static struct validate gshi_validate = {
2480 static char *qgsh_fields[] = {
2481 "service", "enable", "override", "success", "inprogress", "hosterror",
2482 "service", "machine",
2485 static struct valobj qgsh_valobj[] = {
2486 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2487 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2488 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2489 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2490 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
2493 static struct validate qgsh_validate = {
2502 qualified_get_serverhost,
2505 static char *ashi_fields[] = {
2506 "service", "machine", "enable", "value1", "value2", "value3",
2509 static struct valobj ashi_valobj[] = {
2510 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2511 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2515 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
2518 static struct validate ashi_validate = /* ashi & ushi */
2523 "service = UPPER('%s') AND mach_id = %d",
2528 set_serverhost_modtime,
2531 static struct validate rshe_validate =
2536 "service = UPPER('%s') AND mach_id = %d",
2541 set_serverhost_modtime,
2544 static struct validate ssho_validate =
2549 "service = UPPER('%s') AND mach_id = %d",
2557 static char *sshi_fields[] = {
2558 "service", "machine", "override", "success", "inprogress",
2559 "hosterror", "errmsg", "ltt", "lts",
2562 static struct valobj sshi_valobj[] = {
2563 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2564 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2569 {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"},
2574 static struct validate sshi_validate =
2587 static char *dshi_fields[] = {
2588 "service", "machine",
2591 static struct validate dshi_validate =
2596 "service = UPPER('%s') AND mach_id = %d",
2604 static char *gslo_fields[] = {
2606 "server", "machine",
2609 static char *gfsl_fields[] = {
2611 "label", "type", "machine", "name", "mount", "access", "comments",
2612 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2615 static struct validate gfsl_validate = {
2627 static char *gfsm_fields[] = {
2629 "label", "type", "machine", "name", "mount", "access", "comments",
2630 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2633 static struct validate gfsm_validate = {
2645 static char *gfsn_fields[] = {
2646 "machine", "partition",
2647 "label", "type", "machine", "name", "mount", "access", "comments",
2648 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2651 static struct validate gfsn_validate = {
2663 static char *gfsp_fields[] = {
2665 "label", "type", "machine", "name", "mount", "access", "comments",
2666 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2669 static char *gfsg_fields[] = {
2671 "label", "type", "machine", "name", "mount", "access", "comments",
2672 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2675 static struct validate gfsg_validate = {
2687 static char *afil_fields[] = {
2688 "label", "type", "machine", "name", "mount", "access", "comments",
2689 "owner", "owners", "create", "lockertype",
2692 static struct valobj afil_valobj[] = {
2693 {V_CHAR, 0, FILESYS_TABLE, "label"},
2694 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
2695 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2696 {V_CHAR, 3, FILESYS_TABLE, "name"},
2697 {V_LEN, 4, FILESYS_TABLE, "mount"},
2698 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
2699 {V_LEN, 6, FILESYS_TABLE, "comments"},
2700 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
2701 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
2703 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
2706 static struct validate afil_validate = {
2715 set_filesys_modtime,
2718 static char *ufil_fields[] = {
2719 "label", "newlabel", "type", "machine", "name", "mount", "access",
2720 "comments", "owner", "owners", "create", "lockertype",
2723 static struct valobj ufil_valobj[] = {
2724 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2725 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
2726 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
2727 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2728 {V_CHAR, 4, FILESYS_TABLE, "name"},
2729 {V_LEN, 5, FILESYS_TABLE, "mount"},
2730 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
2731 {V_LEN, 7, FILESYS_TABLE, "comments"},
2732 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
2733 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
2735 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
2738 static struct validate ufil_validate = {
2747 set_filesys_modtime,
2750 static char *dfil_fields[] = {
2754 static struct validate dfil_validate = {
2766 static char *gfgm_fields[] = {
2767 "fsgroup", "filesys", "sortkey"
2770 static struct validate gfgm_validate = {
2782 static struct valobj aftg_valobj[] = {
2783 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2784 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2787 static struct validate aftg_validate = {
2791 "group_id = %d and filsys_id = %d",
2799 static char *ganf_fields[] = {
2800 "machine", "dir", "device", "status", "allocated", "size",
2801 "modtime", "modby", "modwith",
2804 static char *gnfp_fields[] = {
2806 "machine", "dir", "device", "status", "allocated", "size",
2807 "modtime", "modby", "modwith",
2810 static struct validate gnfp_validate = {
2822 static struct valobj anfp_valobj[] = {
2823 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2824 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2825 {V_LEN, 2, NFSPHYS_TABLE, "device"},
2831 static struct validate anfp_validate = {
2835 "mach_id = %d and dir = '%s'",
2840 set_nfsphys_modtime,
2843 static struct validate unfp_validate = {
2847 "mach_id = %d and dir = '%s'",
2852 set_nfsphys_modtime,
2855 static char *ajnf_fields[] = {
2856 "machine", "dir", "adjustment",
2859 static struct valobj ajnf_valobj[] = {
2860 {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE},
2861 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2865 static struct validate ajnf_validate = {
2869 "mach_id = %d and dir = '%s'",
2874 set_nfsphys_modtime,
2877 static char *dnfp_fields[] = {
2881 static struct validate dnfp_validate = {
2885 "mach_id = %d and dir = '%s'",
2890 set_nfsphys_modtime,
2893 static char *gqot_fields[] = {
2894 "filesys", "type", "name",
2895 "filesys", "type", "name", "quota", "dir", "machine",
2896 "modtime", "modby", "modwith",
2899 static struct valobj gqot_valobj[] = {
2900 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2901 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2904 static struct validate gqot_validate = {
2916 static char *gqbf_fields[] = {
2918 "filesys", "type", "name", "quota", "dir", "machine",
2919 "modtime", "modby", "modwith",
2922 static struct validate gqbf_validate = {
2934 static char *aqot_fields[] = {
2935 "filesys", "type", "name", "quota",
2938 static struct valobj aqot_valobj[] = {
2939 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2940 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2941 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2945 static struct validate aqot_validate = {
2949 "filsys_id = %d and type = '%s' and entity_id = %d",
2957 static struct validate uqot_validate = {
2961 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2969 static struct validate dqot_validate = {
2973 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2981 static char *gnfq_fields[] = {
2983 "filesys", "login", "quota", "dir", "machine",
2984 "modtime", "modby", "modwith",
2987 static struct validate gnfq_validate = {
2999 static char *gnqp_fields[] = {
3001 "filesys", "login", "quota", "dir", "machine",
3002 "modtime", "modby", "modwith",
3005 static char *anfq_fields[] = {
3006 "filesys", "login", "quota",
3009 static struct valobj anfq_valobj[] = {
3010 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
3011 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
3015 static struct validate anfq_validate = {
3019 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
3027 static struct validate unfq_validate = {
3031 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
3039 static struct validate dnfq_validate = {
3043 "filsys_id = %d AND entity_id = %d",
3051 static char *gzcl2_fields[] = {
3053 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
3054 "iws_type", "iws_name", "iui_type", "iui_name",
3055 "modtime", "modby", "modwith",
3058 static char *gzcl_fields[] = {
3060 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
3061 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
3062 "owner_id", "modtime", "modby", "modwith",
3065 static struct validate gzcl_validate = {
3077 static char *azcl2_fields[] = {
3078 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
3079 "iws_type", "iws_name", "iui_type", "iui_name",
3082 static struct valobj azcl2_valobj[] = {
3083 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
3084 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
3085 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
3086 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
3087 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
3088 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
3089 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
3090 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
3091 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
3094 static struct validate azcl2_validate = {
3106 static char *azcl_fields[] = {
3107 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
3108 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
3112 static struct valobj azcl_valobj[] = {
3113 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
3114 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
3115 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
3116 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
3117 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
3118 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
3119 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
3120 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
3121 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
3122 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
3123 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
3126 static struct validate azcl_validate = {
3138 static char *uzcl2_fields[] = {
3139 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
3140 "iws_type", "iws_name", "iui_type", "iui_name",
3143 static struct valobj uzcl2_valobj[] = {
3144 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
3145 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
3146 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
3147 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
3148 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
3149 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
3150 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
3151 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
3152 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
3153 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
3156 static struct validate uzcl2_validate = {
3168 static char *uzcl_fields[] = {
3169 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
3170 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id",
3173 static struct valobj uzcl_valobj[] = {
3174 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
3175 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
3176 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
3177 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
3178 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
3179 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
3180 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
3181 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
3182 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
3183 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
3184 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
3185 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
3188 static struct validate uzcl_validate = {
3200 static struct validate dzcl_validate = {
3212 static char *gsha_fields[] = {
3214 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
3217 static struct validate gsha_validate =
3230 static char *asha_fields[] = {
3231 "machine", "ace_type", "ace_name",
3234 static struct valobj asha_valobj[] = {
3235 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3236 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
3237 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
3240 static struct validate asha_validate =
3253 static char *gacl_fields[] = {
3254 "machine", "target",
3255 "machine", "target", "kind", "list",
3258 static char *aacl_fields[] = {
3259 "machine", "target", "kind", "list",
3262 static char *dacl_fields[] = {
3263 "machine", "target",
3266 static struct valobj aacl_valobj[] = {
3267 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3268 {V_CHAR, 1, ACL_TABLE, "target"},
3269 {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE},
3270 {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST},
3273 static struct validate gacl_validate =
3286 static struct validate aacl_validate =
3291 "mach_id = %d AND target = '%s'",
3299 static char *gsvc_fields[] = {
3300 "service", "protocol",
3301 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
3304 static char *asvc_fields[] = {
3305 "service", "protocol", "port", "description",
3308 static char *dsvc_fields[] = {
3309 "service", "protocol",
3312 static struct valobj asvc_valobj[] = {
3313 {V_CHAR, 0, SERVICES_TABLE, "name"},
3314 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
3316 {V_CHAR, 3, SERVICES_TABLE, "description"},
3319 static struct validate asvc_validate = {
3323 "name = '%s' AND protocol = '%s'",
3328 set_service_modtime,
3331 static struct validate dsvc_validate = {
3335 "name = '%s' AND protocol = '%s'",
3343 static char *gprn_fields[] = {
3345 "name", "type", "hwtype", "duplexname", "hostname",
3346 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3347 "banner", "location", "contact", "modtime", "modby", "modwith"
3350 static char *gpbd_fields[] = {
3352 "name", "type", "hwtype", "duplexname", "hostname",
3353 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3354 "banner", "location", "contact", "modtime", "modby", "modwith"
3357 static char *gpbe_fields[] = {
3359 "name", "type", "hwtype", "duplexname", "hostname",
3360 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3361 "banner", "location", "contact", "modtime", "modby", "modwith"
3364 static char *gpbh_fields[] = {
3366 "name", "type", "hwtype", "duplexname", "hostname",
3367 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3368 "banner", "location", "contact", "modtime", "modby", "modwith"
3371 static char *gpbr_fields[] = {
3373 "name", "type", "hwtype", "duplexname", "hostname",
3374 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3375 "banner", "location", "contact", "modtime", "modby", "modwith"
3378 static char *gpbl_fields[] = {
3380 "name", "type", "hwtype", "duplexname", "hostname",
3381 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3382 "banner", "location", "contact", "modtime", "modby", "modwith"
3385 static char *gpbc_fields[] = {
3387 "name", "type", "hwtype", "duplexname", "hostname",
3388 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3389 "banner", "location", "contact", "modtime", "modby", "modwith"
3392 static char *aprn_fields[] = {
3393 "printer", "type", "hwtype", "duplexname", "hostname",
3394 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3395 "banner", "location", "contact",
3398 static struct valobj aprn_valobj[] = {
3399 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3400 {V_TYPE, 1, 0, "printertype", 0, MR_TYPE},
3401 {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE},
3402 {V_CHAR, 3, PRINTERS_TABLE, "duplexname"},
3403 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3404 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3405 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3406 {V_CHAR, 7, PRINTERS_TABLE, "rp"},
3407 {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3410 {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST},
3411 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3413 {V_CHAR, 14, PRINTERS_TABLE, "location"},
3414 {V_CHAR, 15, PRINTERS_TABLE, "contact"},
3417 static struct validate aprn_validate = {
3429 static char *uprn_fields[] = {
3431 "printer", "type", "hwtype", "duplexname", "hostname",
3432 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3433 "banner", "location", "contact",
3436 static struct valobj uprn_valobj[] = {
3437 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3438 {V_CHAR, 1, PRINTERS_TABLE, "name"},
3439 {V_TYPE, 2, 0, "printertype", 0, MR_TYPE},
3440 {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE},
3441 {V_CHAR, 4, PRINTERS_TABLE, "duplexname"},
3442 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3443 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3444 {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3445 {V_CHAR, 8, PRINTERS_TABLE, "rp"},
3446 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3449 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3450 {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST},
3452 {V_CHAR, 15, PRINTERS_TABLE, "location"},
3453 {V_CHAR, 16, PRINTERS_TABLE, "contact"},
3456 static struct validate uprn_validate = {
3468 static struct validate dprn_validate = {
3480 static char *gpsv_fields[] = {
3482 "host", "kind", "printer_types", "owner_type", "owner_name",
3483 "lpc_acl", "modtime", "modby", "modwith"
3486 static struct valobj gpsv_valobj[] = {
3487 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3490 static struct validate gpsv_validate = {
3502 static char *apsv_fields[] = {
3503 "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl"
3506 static struct valobj apsv_valobj[] = {
3507 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3508 {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE},
3509 {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING},
3510 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
3511 {V_TYPEDATA, 4, 0, 0, 0, MR_ACE},
3512 {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST},
3515 static struct validate apsv_validate = {
3527 static char *dpsv_fields[] = {
3531 static struct validate dpsv_validate = {
3543 static char *gali_fields[] = {
3544 "name", "type", "trans",
3545 "name", "type", "trans",
3548 static char *aali_fields[] = {
3549 "name", "type", "trans",
3552 static struct valobj aali_valobj[] = {
3553 {V_CHAR, 0, ALIAS_TABLE, "name"},
3554 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
3555 {V_CHAR, 2, ALIAS_TABLE, "trans"},
3558 static struct validate aali_validate = {
3562 "name = '%s' and type = '%s' and trans = '%s'",
3570 static struct validate dali_validate = /* DELETE_ALIAS */
3575 "name = '%s' and type = '%s' and trans = '%s'",
3583 static char *gval_fields[] = {
3587 static struct valobj gval_valobj[] = {
3588 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
3591 static struct validate gval_validate = {
3603 static char *aval_fields[] = {
3607 static struct valobj aval_valobj[] = {
3608 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
3612 static struct validate aval_validate = /* for aval, uval, and dval */
3625 static char *dval_fields[] = {
3629 static char *gats_fields[] = {
3630 "table_name", "appends", "updates", "deletes",
3631 "modtime", "modby", "modwith",
3634 static char *_sdl_fields[] = {
3638 static struct validate _sdl_validate =
3651 static char *gcon7_fields[] = {
3653 "name", "description", "location", "contact",
3654 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3657 static struct validate gcon_validate = {
3669 static char *gcon_fields[] = {
3671 "name", "publicflg", "description", "location", "contact",
3672 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3675 static char *acon7_fields[] = {
3676 "name", "description", "location", "contact",
3677 "ace_type", "ace_name", "memace_type", "memace_name",
3680 static struct valobj acon7_valobj[] = {
3681 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3682 {V_LEN, 1, CONTAINERS_TABLE, "description"},
3683 {V_CHAR, 2, CONTAINERS_TABLE, "location"},
3684 {V_CHAR, 3, CONTAINERS_TABLE, "contact"},
3685 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
3686 {V_TYPEDATA, 5, 0, 0, 0, MR_ACE},
3687 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3688 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3691 static struct validate acon7_validate =
3704 static char *acon_fields[] = {
3705 "name", "publicflg", "description", "location", "contact",
3706 "ace_type", "ace_name", "memace_type", "memace_name",
3709 static struct valobj acon_valobj[] = {
3710 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3712 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3713 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3714 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3715 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3716 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3717 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3718 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3721 static struct validate acon_validate =
3734 static char *ucon7_fields[] = {
3736 "newname", "description", "location", "contact",
3737 "ace_type", "ace_name", "memace_type", "memace_name",
3740 static struct valobj ucon7_valobj[] = {
3741 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3742 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3743 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3744 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3745 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3746 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3747 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3748 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3749 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3752 static struct validate ucon7_validate =
3765 static char *ucon_fields[] = {
3767 "newname", "publicflg", "description", "location", "contact",
3768 "ace_type", "ace_name", "memace_type", "memace_name",
3771 static struct valobj ucon_valobj[] = {
3772 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3773 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3775 {V_LEN, 3, CONTAINERS_TABLE, "description"},
3776 {V_CHAR, 4, CONTAINERS_TABLE, "location"},
3777 {V_CHAR, 5, CONTAINERS_TABLE, "contact"},
3778 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3779 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3780 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
3781 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
3784 static struct validate ucon_validate =
3797 static char *dcon_fields[] = {
3801 static struct validate dcon_validate =
3814 static char *amcn_fields[] = {
3815 "machine", "container",
3818 static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */
3819 { /* DELETE_MACHINE_FROM_CONTAINER */
3820 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3821 {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3824 static struct validate amcn_validate = /* for amtn and dmfn */
3834 set_mach_modtime_by_id,
3837 static struct validate dmcn_validate = /* for amtn and dmfn */
3842 "mach_id = %d and cnt_id = %d",
3847 set_mach_modtime_by_id,
3850 static char *gmnm_fields[] = {
3852 "machine", "container",
3855 static char *gmoc_fields[] = {
3862 static struct validate gmoc_validate =
3872 get_machines_of_container,
3875 static char *gsoc_fields[] = {
3881 static struct validate gsoc_validate =
3891 get_subcontainers_of_container,
3894 static char *gtlc_fields[] = {
3898 static char *scli_fields[] = {
3903 static struct valobj scli_valobj[] = {
3904 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3905 {V_ID, 1, LIST_TABLE, "name", "list_id", MR_LIST},
3908 static struct validate scli_validate = {
3920 static char *gcli_fields[] = {
3922 "containername", "listname",
3925 static struct validate glic_validate =
3938 static char *glic_fields[] = {
3940 "containername", "listname",
3943 /* Generalized Query Definitions */
3945 /* Multiple versions of the same query MUST be listed in ascending
3949 /* Note: For any query which uses prefetch_value, the vcnt should be
3950 * one less than the number of %-format specifiers in the tlist.
3953 struct query Queries[] = {
3955 /* Q_GALO - GET_ALL_LOGINS, v2 */
3962 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3972 /* Q_GALO - GET_ALL_LOGINS, v3 */
3979 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3989 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */
3990 "get_all_active_logins",
3996 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
4006 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */
4007 "get_all_active_logins",
4013 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
4023 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */
4024 "get_user_account_by_login",
4030 "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",
4033 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4040 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */
4041 "get_user_account_by_login",
4047 "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",
4050 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4057 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v11 */
4058 "get_user_account_by_login",
4064 "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",
4067 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4074 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v12 */
4075 "get_user_account_by_login",
4081 "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, 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",
4084 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4091 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */
4092 "get_user_account_by_uid",
4098 "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",
4101 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4108 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */
4109 "get_user_account_by_uid",
4115 "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",
4118 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4125 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v11 */
4126 "get_user_account_by_uid",
4132 "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",
4135 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4142 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v12 */
4143 "get_user_account_by_uid",
4149 "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, 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",
4152 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4159 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */
4160 "get_user_account_by_name",
4166 "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",
4169 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4176 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */
4177 "get_user_account_by_name",
4183 "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",
4186 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4193 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v11 */
4194 "get_user_account_by_name",
4200 "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",
4203 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4210 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v12 */
4211 "get_user_account_by_name",
4217 "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, 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",
4220 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4227 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */
4228 "get_user_account_by_class",
4234 "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",
4237 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4244 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */
4245 "get_user_account_by_class",
4251 "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",
4254 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4261 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v11 */
4262 "get_user_account_by_class",
4268 "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",
4271 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4278 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v12 */
4279 "get_user_account_by_class",
4285 "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, 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",
4288 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4295 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */
4296 "get_user_account_by_id",
4302 "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",
4305 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4312 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */
4313 "get_user_account_by_id",
4319 "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",
4322 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4329 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v11 */
4330 "get_user_account_by_id",
4336 "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",
4339 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4346 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v12 */
4347 "get_user_account_by_id",
4353 "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, 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",
4356 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4363 /* Q_GUAS - GET_USER_ACCOUNT_BY_SPONSOR, v12 */
4364 "get_user_account_by_sponsor",
4380 /* Q_GUBL - GET_USER_BY_LOGIN, v2 */
4381 "get_user_by_login",
4387 "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",
4390 "u.login LIKE '%s' AND u.users_id != 0",
4397 /* Q_GUBL - GET_USER_BY_LOGIN, v3 */
4398 "get_user_by_login",
4404 "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",
4407 "u.login LIKE '%s' AND u.users_id != 0",
4414 /* Q_GUBU - GET_USER_BY_UID, v2 */
4421 "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",
4424 "u.unix_uid = %s AND u.users_id != 0",
4431 /* Q_GUBU - GET_USER_BY_UID, v3 */
4438 "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",
4441 "u.unix_uid = %s AND u.users_id != 0",
4448 /* Q_GUBN - GET_USER_BY_NAME, v2 */
4455 "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",
4458 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
4465 /* Q_GUBN - GET_USER_BY_NAME, v3 */
4472 "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",
4475 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
4482 /* Q_GUBC - GET_USER_BY_CLASS, v2 */
4483 "get_user_by_class",
4489 "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",
4492 "u.type = UPPER('%s') AND u.users_id != 0",
4499 /* Q_GUBC - GET_USER_BY_CLASS, v3 */
4500 "get_user_by_class",
4506 "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",
4509 "u.type = UPPER('%s') AND u.users_id != 0",
4516 /* Q_GUBM - GET_USER_BY_MITID, v2 */
4517 "get_user_by_mitid",
4523 "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",
4526 "u.clearid LIKE '%s' AND u.users_id != 0",
4533 /* Q_GUBM - GET_USER_BY_MITID, v3 */
4534 "get_user_by_mitid",
4540 "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",
4543 "u.clearid LIKE '%s' AND u.users_id != 0",
4550 /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */
4557 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4558 * but using up one argv element.
4560 "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)",
4570 /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */
4577 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4578 * but using up one argv element.
4580 "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)",
4590 /* Q_AUAC - ADD_USER_ACCOUNT, v11 */ /* uses prefetch_value() for users_id */
4597 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4598 * but using up one argv element.
4600 "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)",
4610 /* Q_AUAC - ADD_USER_ACCOUNT, v12 */ /* uses prefetch_value() for users_id */
4617 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4618 * but using up one argv element.
4620 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, winhomedir, winprofiledir, sponsor_type, sponsor_id, 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, %s, SYSDATE, %s)",
4630 /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */
4637 "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)",
4647 /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */
4654 "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)",
4664 /* Q_AUSR - ADD_USER, v11 */ /* uses prefetch_value() for users_id */
4671 "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)",
4681 /* Q_AUSR - ADD_USER, v12 */ /* uses prefetch_value() for users_id */
4688 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, winhomedir, winprofiledir, sponsor_type, sponsor_id, 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, %s, SYSDATE, %s)",
4698 /* Q_RUSR - REGISTER_USER */
4715 /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */
4716 "update_user_account",
4722 /* See comment in auac about signature. */
4723 "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",
4733 /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */
4734 "update_user_account",
4740 /* See comment in auac about signature. */
4741 "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",
4751 /* Q_UUAC - UPDATE_USER_ACCOUNT, v11 */
4752 "update_user_account",
4758 /* See comment in auac about signature. */
4759 "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))",
4769 /* Q_UUAC - UPDATE_USER_ACCOUNT, v12 */
4770 "update_user_account",
4776 /* See comment in auac about signature. */
4777 "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",
4787 /* Q_UUSR - UPDATE_USER, v2 */
4794 "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'",
4804 /* Q_UUSR - UPDATE_USER, v3 */
4811 "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'",
4821 /* Q_UUSR - UPDATE_USER, v11 */
4828 "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)) ",
4838 /* Q_UUSR - UPDATE_USER, v12 */
4845 "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 ",
4855 /* Q_UUSH - UPDATE_USER_SHELL */
4856 "update_user_shell",
4862 "users SET shell = '%s'",
4872 /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
4873 "update_user_windows_shell",
4879 "users SET winconsoleshell = '%s'",
4889 /* Q_UUST - UPDATE_USER_STATUS */
4890 "update_user_status",
4896 "users SET status = %s",
4906 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
4907 "update_user_security_status",
4913 "users SET secure = %s",
4923 /* Q_DUSR - DELETE_USER */
4940 /* Q_AURV - ADD_USER_RESERVATION */
4941 "add_user_reservation",
4957 /* Q_GURV - GET_USER_RESERVATIONS */
4958 "get_user_reservations",
4974 /* Q_GUBR - GET_USER_BY_RESERVATION */
4975 "get_user_by_reservation",
4991 /* Q_DURV - DELETE_USER_RESERVATION */
4992 "delete_user_reservation",
5008 /* Q_GKUM - GET_KERBEROS_USER_MAP */
5009 "get_kerberos_user_map",
5015 "u.login, str.string FROM krbmap km, users u, strings str",
5018 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
5020 "u.login, str.string",
5025 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
5026 "add_kerberos_user_map",
5032 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
5042 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
5043 "delete_kerberos_user_map",
5052 "users_id = %d AND string_id = %d",
5059 /* Q_GFBL - GET_FINGER_BY_LOGIN */
5060 "get_finger_by_login",
5066 "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",
5076 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
5077 "update_finger_by_login",
5083 "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))",
5093 /* Q_GPOB - GET_POBOX */
5100 "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
5110 /* Q_GAPO - GET_ALL_POBOXES */
5117 "login, potype, pop_id || ':' || box_id FROM users",
5127 /* Q_GPOP - GET_POBOXES_POP */
5134 "login, potype, users_id FROM users",
5144 /* Q_GPOF - GET_POBOXES_SMTP */
5151 "login, potype, users_id FROM users",
5161 /* Q_SPOB - SET_POBOX */
5178 /* Q_SPOP - SET_POBOX_POP */
5195 /* Q_DPOB - DELETE_POBOX */
5202 "users SET potype = 'NONE'",
5212 /* Q_GHST - GET_HOST, v2 */
5219 "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",
5222 "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",
5229 /* Q_GHST - GET_HOST, v6 */
5236 "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",
5239 "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",
5246 /* Q_GHST - GET_HOST, v8 */
5253 "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",
5256 "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",
5263 /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */
5264 "get_host_by_hwaddr",
5270 "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",
5273 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5280 /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */
5281 "get_host_by_hwaddr",
5287 "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",
5290 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5297 /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */
5298 "get_host_by_hwaddr",
5304 "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",
5307 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5314 /* Q_GHBA - GET_HOST_BY_ACCOUNT_NUMBER, v8 */
5315 "get_host_by_account_number",
5321 "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",
5324 "m.account_number LIKE '%s' AND m.mach_id != 0 and s.snet_id = m.snet_id",
5331 /* Q_GHHA - GET_HOST_HWADDR */
5338 "m.hwaddr FROM machine m",
5341 "m.name LIKE UPPER('%s')",
5348 /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */
5355 "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)",
5365 /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */
5372 "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)",
5382 /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */
5389 "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)",
5399 /* Q_UHST - UPDATE_HOST, v2 */
5406 "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",
5416 /* Q_UHST - UPDATE_HOST, v6 */
5423 "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",
5433 /* Q_UHST - UPDATE_HOST, v8 */
5440 "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",
5450 /* Q_UHHA - UPDATE_HOST_HWADDR */
5451 "update_host_hwaddr",
5457 "machine SET hwaddr = NVL('%s', CHR(0))",
5467 /* Q_DHST - DELETE_HOST */
5484 /* Q_GMAC - GET_MACHINE */
5491 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
5494 "name LIKE UPPER('%s') AND mach_id != 0",
5501 /* Q_GHAL - GET_HOSTALIAS */
5508 "a.name, m.name FROM hostalias a, machine m",
5511 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
5518 /* Q_AHAL - ADD_HOSTALIAS */
5525 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)",
5535 /* Q_DHAL - DELETE_HOSTALIAS */
5545 "name = UPPER('%s') AND mach_id = %d",
5552 /* Q_GSNT - GET_SUBNET, v2 */
5559 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
5562 "name LIKE UPPER('%s')",
5569 /* Q_GSNT - GET_SUBNET, v8 */
5576 "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",
5579 "name LIKE UPPER('%s')",
5586 /* Q_ASNT - ADD_SUBNET, v2 */
5593 "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)",
5603 /* Q_ASNT - ADD_SUBNET, v8 */
5610 "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)",
5620 /* Q_USNT - UPDATE_SUBNET, v2 */
5627 "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",
5637 /* Q_USNT - UPDATE_SUBNET, v8 */
5644 "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",
5654 /* Q_DSNT - DELETE_SUBNET */
5671 /* Q_GCLU - GET_CLUSTER */
5678 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
5681 "name LIKE '%s' AND clu_id != 0",
5688 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
5695 "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)",
5705 /* Q_UCLU - UPDATE_CLUSTER */
5712 "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))",
5722 /* Q_DCLU - DELETE_CLUSTER */
5739 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
5740 "get_machine_to_cluster_map",
5746 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
5749 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
5756 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
5757 "add_machine_to_cluster",
5763 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
5773 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
5774 "delete_machine_from_cluster",
5783 "mach_id = %d AND clu_id = %d",
5790 /* Q_GCLD - GET_CLUSTER_DATA */
5797 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
5800 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
5802 "c.name, svc.serv_label",
5807 /* Q_ACLD - ADD_CLUSTER_DATA */
5814 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')",
5824 /* Q_DCLD - DELETE_CLUSTER_DATA */
5825 "delete_cluster_data",
5834 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
5841 /* Q_GLIN - GET_LIST_INFO, v2 */
5848 "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",
5858 /* Q_GLIN - GET_LIST_INFO, v3 */
5865 "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",
5875 /* Q_GLIN - GET_LIST_INFO, v4 */
5882 "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",
5892 /* Q_GLIN - GET_LIST_INFO, v10 */
5899 "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",
5902 "l.name LIKE '%s' AND m.mach_id = l.mailman_id",
5909 /* Q_EXLN - EXPAND_LIST_NAMES */
5910 "expand_list_names",
5919 "name LIKE '%s' AND list_id != 0",
5926 /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */
5933 "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)",
5943 /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */
5950 "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)",
5960 /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */
5967 "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)",
5977 /* Q_ALIS - ADD_LIST, v10 */ /* uses prefetch_value() for list_id */
5984 "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)",
5994 /* Q_ULIS - UPDATE_LIST, v2 */
6001 "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))",
6011 /* Q_ULIS - UPDATE_LIST, v3 */
6018 "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))",
6028 /* Q_ULIS, UPDATE_LIST, v4 */
6035 "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))",
6045 /* Q_ULIS, UPDATE_LIST, v10 */
6052 "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))",
6062 /* Q_DLIS - DELETE_LIST */
6079 /* Q_AMTL - ADD_MEMBER_TO_LIST */
6080 "add_member_to_list",
6096 /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */
6097 "add_tagged_member_to_list",
6113 /* Q_TMOL - TAG_MEMBER_OF_LIST */
6114 "tag_member_of_list",
6130 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
6131 "delete_member_from_list",
6147 /* Q_GAUS - GET_ACE_USE */
6164 /* Q_GHBO - GET_HOST_BY_OWNER */
6165 "get_host_by_owner",
6181 /* Q_QGLI - QUALIFIED_GET_LISTS */
6182 "qualified_get_lists",
6198 /* Q_GMOL - GET_MEMBERS_OF_LIST */
6199 "get_members_of_list",
6215 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
6216 "get_end_members_of_list",
6232 /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */
6233 "get_tagged_members_of_list",
6249 /* Q_GLOM - GET_LISTS_OF_MEMBER */
6250 "get_lists_of_member",
6266 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
6267 "count_members_of_list",
6283 /* Q_GSIN - GET_SERVER_INFO */
6290 "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",
6293 "name LIKE UPPER('%s')",
6300 /* Q_QGSV - QUALIFIED_GET_SERVER */
6301 "qualified_get_server",
6317 /* Q_ASIN - ADD_SERVER_INFO */
6324 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)",
6334 /* Q_USIN - UPDATE_SERVER_INFO */
6335 "update_server_info",
6341 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
6344 "name = UPPER('%s')",
6351 /* Q_RSVE - RESET_SERVER_ERROR */
6352 "reset_server_error",
6358 "servers SET harderror = 0, dfcheck = dfgen",
6361 "name = UPPER('%s')",
6368 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
6369 "set_server_internal_flags",
6375 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))",
6378 "name = UPPER('%s')",
6385 /* Q_DSIN - DELETE_SERVER_INFO */
6386 "delete_server_info",
6395 "name = UPPER('%s')",
6402 /* Q_GSHI - GET_SERVER_HOST_INFO */
6403 "get_server_host_info",
6409 "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",
6412 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
6414 "sh.service, m.name",
6419 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
6420 "qualified_get_server_host",
6436 /* Q_ASHI - ADD_SERVER_HOST_INFO */
6437 "add_server_host_info",
6443 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))",
6453 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
6454 "update_server_host_info",
6460 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))",
6463 "service = UPPER('%s') AND mach_id = %d",
6470 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
6471 "reset_server_host_error",
6477 "serverhosts SET hosterror = 0",
6480 "service = UPPER('%s') AND mach_id = %d",
6487 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
6488 "set_server_host_override",
6494 "serverhosts SET override = 1",
6497 "service = UPPER('%s') AND mach_id = %d",
6504 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
6505 "set_server_host_internal",
6511 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s",
6514 "service = UPPER('%s') AND mach_id = %d",
6521 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
6522 "delete_server_host_info",
6531 "service = UPPER('%s') AND mach_id = %d",
6538 /* Q_GSLO - GET_SERVER_LOCATIONS */
6539 "get_server_locations",
6545 "sh.service, m.name FROM serverhosts sh, machine m",
6548 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
6550 "sh.service, m.name",
6555 /* Q_GFSL - GET_FILESYS_BY_LABEL */
6556 "get_filesys_by_label",
6562 "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",
6565 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6572 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
6573 "get_filesys_by_machine",
6579 "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",
6582 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6589 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
6590 "get_filesys_by_nfsphys",
6596 "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",
6599 "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'",
6606 /* Q_GFSG - GET_FILESYS_BY_GROUP */
6607 "get_filesys_by_group",
6613 "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",
6616 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6623 /* Q_GFSP - GET_FILESYS_BY_PATH */
6624 "get_filesys_by_path",
6630 "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",
6633 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
6640 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
6647 "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)",
6657 /* Q_UFIL - UPDATE_FILESYS */
6664 "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'",
6674 /* Q_DFIL - DELETE_FILESYS */
6691 /* Q_GFGM - GET_FSGROUP_MEMBERS */
6692 "get_fsgroup_members",
6698 "fs.label, fg.key FROM fsgroup fg, filesys fs",
6701 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
6708 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
6709 "add_filesys_to_fsgroup",
6715 "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')",
6725 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
6726 "remove_filesys_from_fsgroup",
6735 "group_id = %d AND filsys_id = %d",
6742 /* Q_GANF - GET_ALL_NFSPHYS */
6749 "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",
6752 "m.mach_id = np.mach_id",
6759 /* Q_GNFP - GET_NFSPHYS */
6766 "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",
6769 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
6776 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
6783 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)",
6793 /* Q_UNFP - UPDATE_NFSPHYS */
6800 "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s",
6803 "mach_id = %d AND dir = '%s'",
6810 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
6811 "adjust_nfsphys_allocation",
6817 "nfsphys SET allocated = allocated + %s",
6820 "mach_id = %d AND dir = '%s'",
6827 /* Q_DNFP - DELETE_NFSPHYS */
6837 "mach_id = %d AND dir = '%s'",
6844 /* Q_GQOT - GET_QUOTA */
6851 "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",
6854 "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",
6861 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
6862 "get_quota_by_filesys",
6868 "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",
6871 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
6878 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
6885 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
6895 /* Q_UQOT - UPDATE_QUOTA */
6902 "quota SET quota = %s",
6912 /* Q_DQOT - DELETE_QUOTA */
6929 /* Q_GNFQ - GET_NFS_QUOTAS */
6936 "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",
6939 "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'",
6941 "fs.label, u.login",
6946 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
6947 "get_nfs_quotas_by_partition",
6953 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
6956 "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",
6963 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
6970 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
6980 /* Q_UNFQ - UPDATE_NFS_QUOTA */
6987 "quota SET quota = %s",
6997 /* Q_DNFQ - DELETE_NFS_QUOTA */
7014 /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */
7021 "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",
7031 /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */
7038 "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",
7048 /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */
7055 "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)",
7065 /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */
7072 "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)",
7082 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */
7083 "update_zephyr_class",
7089 "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",
7099 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */
7100 "update_zephyr_class",
7106 "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",
7116 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
7117 "delete_zephyr_class",
7133 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
7134 "get_server_host_access",
7140 "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",
7143 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
7150 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
7151 "add_server_host_access",
7157 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)",
7167 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
7168 "update_server_host_access",
7174 "hostaccess SET acl_type = '%s', acl_id = %d",
7184 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
7185 "delete_server_host_access",
7201 /* Q_GACL - GET_ACL */
7208 "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l",
7211 "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id",
7213 "m.name, ac.target, ac.kind",
7218 /* Q_AACL - ADD_ACL */
7225 "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)",
7235 /* Q_DACL - DELETE_ACL */
7245 "mach_id = %d AND target = '%s'",
7252 /* Q_GSVC - GET_SERVICE */
7259 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
7262 "name LIKE '%s' AND protocol LIKE '%s'",
7269 /* Q_ASVC - ADD_SERVICE */
7276 "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))",
7286 /* Q_DSVC - DELETE_SERVICE */
7296 "name = '%s' AND protocol = '%s'",
7303 /* Q_GPRN - GET_PRINTER */
7310 "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",
7313 "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",
7320 /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */
7321 "get_printer_by_duplexname",
7327 "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",
7330 "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",
7337 /* Q_GPBE - GET_PRINTER_BY_ETHERNET */
7338 "get_printer_by_ethernet",
7344 "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",
7347 "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",
7354 /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */
7355 "get_printer_by_hostname",
7361 "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",
7364 "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",
7371 /* Q_GPBR - GET_PRINTER_BY_RM */
7372 "get_printer_by_rm",
7378 "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",
7381 "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",
7388 /* Q_GPBL - GET_PRINTER_BY_LOCATION */
7389 "get_printer_by_location",
7395 "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",
7398 "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",
7405 /* Q_GPBC - GET_PRINTER_BY_CONTACT */
7406 "get_printer_by_contact",
7412 "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",
7415 "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",
7422 /* Q_APRN - ADD_PRINTER */
7429 "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)))",
7439 /* Q_UPRN - UPDATE_PRINTER */
7446 "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))",
7456 /* Q_DPRN - DELETE_PRINTER */
7473 /* Q_GPSV - GET_PRINT_SERVER */
7480 "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",
7483 "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",
7490 /* Q_APSV - ADD_PRINT_SERVER */
7497 "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)",
7507 /* Q_UPSV - UPDATE_PRINT_SERVER */
7508 "update_print_server",
7514 "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d",
7524 /* Q_DPSV - DELETE_PRINT_SERVER */
7525 "delete_print_server",
7541 /* Q_GALI - GET_ALIAS */
7548 "name, type, trans FROM alias",
7551 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
7553 "type, name, trans",
7558 /* Q_AALI - ADD_ALIAS */
7565 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
7575 /* Q_DALI - DELETE_ALIAS */
7585 "name = '%s' AND type = '%s' AND trans = '%s'",
7592 /* Q_GVAL - GET_VALUE */
7599 "value FROM numvalues",
7609 /* Q_AVAL - ADD_VALUE */
7616 "INTO numvalues (name, value) VALUES ('%s', %s)",
7626 /* Q_UVAL - UPDATE_VALUE */
7633 "numvalues SET value = %s",
7643 /* Q_DVAL - DELETE_VALUE */
7660 /* Q_GATS - GET_ALL_TABLE_STATS */
7661 "get_all_table_stats",
7667 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
7677 /* Q__SDL - _SET_DEBUG_LEVEL */
7694 /* Q_GCON - GET_CONTAINER, v7 */
7701 "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",
7704 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7711 /* Q_GCON - GET_CONTAINER, v9 */
7718 "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",
7721 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7728 /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */
7735 "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)",
7745 /* Q_ACON - ADD_CONTAINER, v9 */ /* uses prefetch_value() for cnt_id */
7752 "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)",
7762 /* Q_UCON - UPDATE_CONTAINER, v7 */
7779 /* Q_UCON - UPDATE_CONTAINER, v9 */
7796 /* Q_DCON - DELETE_CONTAINER, v7 */
7813 /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */
7814 "add_machine_to_container",
7820 "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)",
7830 /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */
7831 "delete_machine_from_container",
7840 "mach_id = %d AND cnt_id = %d",
7847 /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */
7848 "get_machine_to_container_map",
7854 "m.name, c.name FROM machine m, containers c, mcntmap mcn",
7857 "m.name LIKE UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id",
7864 /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */
7865 "get_machines_of_container",
7881 /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */
7882 "get_subcontainers_of_container",
7898 /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v7 */
7899 "get_toplevel_containers",
7905 "name FROM containers",
7908 "name NOT LIKE '%%/%%'",
7915 /* Q_SCLI - SET_CONTAINER_LIST, v9 */
7916 "set_container_list",
7932 /* Q_GCLI - GET_CONTAINER_LIST, v9 */
7933 "get_container_list",
7939 "c.name, l.name FROM containers c, list l",
7942 "LOWER(c.name) = LOWER('%s') AND c.list_id = l.list_id AND c.list_id != 0",
7949 /* G_GLIC - GET_LIST_CONTAINER, v9 */
7950 "get_list_container",
7956 "c.name, l.name FROM containers c, list l",
7959 "l.list_id = %d AND l.list_id = c.list_id and c.list_id != 0",
7967 int QueryCount = (sizeof(Queries) / sizeof(struct query));