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 *gual_fields[] = {
91 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
92 "status", "clearid", "class", "comments", "signature", "secure",
93 "modtime", "modby", "modwith",
96 static char *gubl2_fields[] = {
98 "login", "unix_uid", "shell", "last", "first", "middle", "status",
99 "clearid", "class", "modtime", "modby", "modwith",
102 static char *gubl_fields[] = {
104 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
105 "status", "clearid", "class", "modtime", "modby", "modwith",
108 static struct validate gubl_validate =
121 static char *guau2_fields[] = {
123 "login", "unix_uid", "shell", "last", "first", "middle", "status",
124 "clearid", "class", "comments", "signature", "secure",
125 "modtime", "modby", "modwith",
128 static char *guau_fields[] = {
130 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
131 "status", "clearid", "class", "comments", "signature", "secure",
132 "modtime", "modby", "modwith",
135 static char *guan2_fields[] = {
137 "login", "unix_uid", "shell", "last", "first", "middle", "status",
138 "clearid", "class", "comments", "signature", "secure",
139 "modtime", "modby", "modwith",
142 static char *guan_fields[] = {
144 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
145 "status", "clearid", "class", "comments", "signature", "secure",
146 "modtime", "modby", "modwith",
149 static struct validate guan_validate =
162 static char *guac2_fields[] = {
164 "login", "unix_uid", "shell", "last", "first", "middle", "status",
165 "clearid", "class", "comments", "signature", "secure",
166 "modtime", "modby", "modwith",
169 static char *guac_fields[] = {
171 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
172 "status", "clearid", "class", "comments", "signature", "secure",
173 "modtime", "modby", "modwith",
176 static char *guam2_fields[] = {
178 "login", "unix_uid", "shell", "last", "first", "middle", "status",
179 "clearid", "class", "comments", "signature", "secure",
180 "modtime", "modby", "modwith",
183 static char *guam_fields[] = {
185 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
186 "status", "clearid", "class", "comments", "signature", "secure",
187 "modtime", "modby", "modwith",
190 static char *gubu2_fields[] = {
192 "login", "unix_uid", "shell", "last", "first", "middle", "status",
193 "clearid", "class", "modtime", "modby", "modwith",
196 static char *gubu_fields[] = {
198 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
199 "status", "clearid", "class", "modtime", "modby", "modwith",
202 static struct validate gubu_validate =
215 static char *gubn2_fields[] = {
217 "login", "unix_uid", "shell", "last", "first", "middle", "status",
218 "clearid", "class", "modtime", "modby", "modwith",
221 static char *gubn_fields[] = {
223 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
224 "status", "clearid", "class", "modtime", "modby", "modwith",
227 static struct validate gubn_validate =
240 static char *gubc2_fields[] = {
242 "login", "unix_uid", "shell", "last", "first", "middle", "status",
243 "clearid", "class", "modtime", "modby", "modwith",
246 static char *gubc_fields[] = {
248 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
249 "status", "clearid", "class", "modtime", "modby", "modwith",
252 static char *gubm2_fields[] = {
254 "login", "unix_uid", "shell", "last", "first", "middle", "status",
255 "clearid", "class", "modtime", "modby", "modwith",
258 static char *gubm_fields[] = {
260 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
261 "middle", "status", "clearid", "class", "modtime", "modby", "modwith",
264 static char *auac2_fields[] = {
265 "login", "unix_uid", "shell", "last", "first", "middle", "status",
266 "clearid", "class", "comments", "signature", "secure",
269 static char *auac_fields[] = {
270 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
271 "middle", "status", "clearid", "class", "comments", "signature", "secure",
274 static struct valobj auac2_valobj[] = {
275 {V_CHAR, 0, USERS_TABLE, "login"},
277 {V_CHAR, 2, USERS_TABLE, "shell"},
278 {V_CHAR, 3, USERS_TABLE, "last"},
279 {V_CHAR, 4, USERS_TABLE, "first"},
280 {V_CHAR, 5, USERS_TABLE, "middle"},
282 {V_CHAR, 7, USERS_TABLE, "clearid"},
283 {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS},
284 {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
288 static struct valobj auac_valobj[] = {
289 {V_CHAR, 0, USERS_TABLE, "login"},
291 {V_CHAR, 2, USERS_TABLE, "shell"},
292 {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
293 {V_CHAR, 4, USERS_TABLE, "last"},
294 {V_CHAR, 5, USERS_TABLE, "first"},
295 {V_CHAR, 6, USERS_TABLE, "middle"},
297 {V_CHAR, 8, USERS_TABLE, "clearid"},
298 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
299 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
303 static struct validate auac2_validate = {
315 static struct validate auac_validate = {
327 static struct validate ausr2_validate = {
339 static struct validate ausr_validate = {
351 static char *rusr_fields[] = {
352 "unix_uid", "login", "pobox_type"
355 static struct valobj rusr_valobj[] = {
357 {V_CHAR, 1, USERS_TABLE, "login"},
360 static struct validate rusr_validate = {
372 static char *uuac2_fields[] = {
374 "newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
375 "clearid", "class", "comments", "signature", "secure",
378 static char *uuac_fields[] = {
380 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
381 "middle", "status", "clearid", "class", "comments", "signature", "secure",
384 static struct valobj uuac2_valobj[] = {
385 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
386 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
388 {V_CHAR, 3, USERS_TABLE, "shell"},
389 {V_CHAR, 4, USERS_TABLE, "first"},
390 {V_CHAR, 5, USERS_TABLE, "last"},
391 {V_CHAR, 6, USERS_TABLE, "middle"},
393 {V_CHAR, 8, USERS_TABLE, "clearid"},
394 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
395 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
399 static struct valobj uuac_valobj[] = {
400 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
401 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
403 {V_CHAR, 3, USERS_TABLE, "shell"},
404 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
405 {V_CHAR, 5, USERS_TABLE, "first"},
406 {V_CHAR, 6, USERS_TABLE, "last"},
407 {V_CHAR, 7, USERS_TABLE, "middle"},
409 {V_CHAR, 9, USERS_TABLE, "clearid"},
410 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
411 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
415 static struct validate uuac2_validate = {
427 static struct validate uuac_validate = {
439 static struct validate uusr2_validate = {
451 static struct validate uusr_validate = {
463 static char *uush_fields[] = {
468 static struct valobj uush_valobj[] = {
469 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
470 {V_CHAR, 1, USERS_TABLE, "shell"},
473 static struct validate uush_validate = {
485 static char *uuws_fields[] = {
490 static struct valobj uuws_valobj[] = {
491 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
492 {V_CHAR, 1, USERS_TABLE, "winconsoleshell"},
495 static struct validate uuws_validate = {
507 static char *uust_fields[] = {
512 static char *uuss_fields[] = {
517 static struct valobj uust_valobj[] = {
518 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
523 static struct validate uust_validate = {
535 static char *dusr_fields[] = {
539 static struct validate dusr_validate = {
551 static char *aurv_fields[] = {
552 "login", "reservation",
555 static struct validate aurv_validate = {
567 static char *gurv_fields[] = {
572 static struct validate gurv_validate = {
581 get_user_reservations,
584 static char *gubr_fields[] = {
589 static struct validate gubr_validate = {
598 get_user_by_reservation,
601 static char *gkum_fields[] = { "login", "kerberos",
602 "login", "kerberos" };
604 static char *akum_fields[] = { "login", "kerberos" };
606 static struct valobj akum_valobj[] =
608 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
609 {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
612 static struct validate akum_validate =
617 "users_id = %d or string_id = %d",
625 static struct validate dkum_validate =
630 "users_id = %d and string_id = %d",
638 static char *gfbl_fields[] = {
640 "login", "fullname", "nickname", "home_addr",
641 "home_phone", "office_addr", "office_phone", "department",
642 "affiliation", "modtime", "modby", "modwith",
645 static struct validate gfbl_validate = {
657 static char *ufbl_fields[] = {
659 "fullname", "nickname", "home_addr",
660 "home_phone", "office_addr", "office_phone", "department",
664 static struct valobj ufbl_valobj[] = {
665 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
666 {V_LEN, 1, USERS_TABLE, "fullname"},
667 {V_LEN, 2, USERS_TABLE, "nickname"},
668 {V_LEN, 3, USERS_TABLE, "home_addr"},
669 {V_LEN, 4, USERS_TABLE, "home_phone"},
670 {V_LEN, 5, USERS_TABLE, "office_addr"},
671 {V_LEN, 6, USERS_TABLE, "office_phone"},
672 {V_LEN, 7, USERS_TABLE, "department"},
673 {V_LEN, 8, USERS_TABLE, "affiliation"},
676 static struct validate ufbl_validate = {
688 static char *gpob_fields[] = {
690 "login", "type", "box", "address", "modtime", "modby", "modwith",
693 static struct validate gpob_validate = {
697 "potype != 'NONE' and users_id = %d",
705 static char *gpox_fields[] = {
706 "login", "type", "box",
709 static struct validate gpox_validate = {
721 static char *spob_fields[] = {
722 "login", "type", "box",
725 static struct valobj spob_valobj[] = {
726 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
727 {V_TYPE, 1, 0, "pobox", 0, MR_TYPE},
730 static struct validate spob_validate = /* SET_POBOX */
743 static struct validate spop_validate = /* SET_POBOX_POP */
756 static struct validate dpob_validate = /* DELETE_POBOX */
769 static char *gmac_fields[] = {
771 "name", "type", "modtime", "modby", "modwith",
774 static char *ghst2_fields[] = {
775 "name", "address", "location", "network",
776 "name", "vendor", "model", "os", "location", "contact", "use",
777 "status", "status_change", "network", "address", "ace_type",
778 "ace_name", "admin_comment", "ops_comment", "created", "creator",
779 "inuse", "modtime", "modby", "modwith",
782 static char *ghbh2_fields[] = {
784 "name", "vendor", "model", "os", "location", "contact", "use",
785 "status", "status_change", "network", "address", "ace_type",
786 "ace_name", "admin_comment", "ops_comment", "created", "creator",
787 "inuse", "modtime", "modby", "modwith",
790 static char *ghst_fields[] = {
791 "name", "address", "location", "network",
792 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
793 "use", "status", "status_change", "network", "address", "ace_type",
794 "ace_name", "admin_comment", "ops_comment", "created", "creator",
795 "inuse", "modtime", "modby", "modwith",
798 static char *ghbh_fields[] = {
800 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
801 "use", "status", "status_change", "network", "address", "ace_type",
802 "ace_name", "admin_comment", "ops_comment", "created", "creator",
803 "inuse", "modtime", "modby", "modwith",
806 static struct validate ghst_validate = {
818 static char *ghha_fields[] = {
823 static char *ahst2_fields[] = {
824 "name", "vendor", "model", "os", "location", "contact", "use",
825 "status", "subnet", "address", "ace_type", "ace_name",
826 "admin_comment", "ops_comment",
829 static struct valobj ahst2_valobj[] = {
830 {V_CHAR, 0, MACHINE_TABLE, "name"},
831 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
832 {V_CHAR, 2, MACHINE_TABLE, "model"},
833 {V_CHAR, 3, MACHINE_TABLE, "os"},
834 {V_CHAR, 4, MACHINE_TABLE, "location"},
835 {V_CHAR, 5, MACHINE_TABLE, "contact"},
838 {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
839 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
840 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
841 {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
842 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
845 static struct validate ahst2_validate = {
849 "name = UPPER('%s')",
854 set_uppercase_modtime,
857 static char *ahst6_fields[] = {
858 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
859 "use", "status", "subnet", "address", "ace_type", "ace_name",
860 "admin_comment", "ops_comment",
863 static struct valobj ahst6_valobj[] = {
864 {V_CHAR, 0, MACHINE_TABLE, "name"},
865 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
866 {V_CHAR, 2, MACHINE_TABLE, "model"},
867 {V_CHAR, 3, MACHINE_TABLE, "os"},
868 {V_CHAR, 4, MACHINE_TABLE, "location"},
869 {V_CHAR, 5, MACHINE_TABLE, "contact"},
870 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
873 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
874 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
875 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
876 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
877 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
880 static struct validate ahst6_validate = {
884 "name = UPPER('%s')",
889 set_uppercase_modtime,
892 static char *ahst_fields[] = {
893 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
894 "account_number", "use", "status", "subnet", "address", "ace_type",
895 "ace_name", "admin_comment", "ops_comment",
898 static struct valobj ahst_valobj[] = {
899 {V_CHAR, 0, MACHINE_TABLE, "name"},
900 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
901 {V_CHAR, 2, MACHINE_TABLE, "model"},
902 {V_CHAR, 3, MACHINE_TABLE, "os"},
903 {V_CHAR, 4, MACHINE_TABLE, "location"},
904 {V_CHAR, 5, MACHINE_TABLE, "contact"},
905 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
906 {V_CHAR, 7, MACHINE_TABLE, "account_number"},
909 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
910 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
911 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
912 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
913 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
916 static struct validate ahst_validate = {
920 "name = UPPER('%s')",
925 set_uppercase_modtime,
928 static char *uhst2_fields[] = {
930 "newname", "vendor", "model", "os", "location", "contact", "use",
931 "status", "subnet", "address", "ace_type", "ace_name",
932 "admin_comment", "ops_comment",
935 static struct valobj uhst2_valobj[] = {
936 {V_CHAR, 0, MACHINE_TABLE, "name"},
937 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
938 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
939 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
940 {V_CHAR, 3, MACHINE_TABLE, "model"},
941 {V_CHAR, 4, MACHINE_TABLE, "os"},
942 {V_CHAR, 5, MACHINE_TABLE, "location"},
943 {V_CHAR, 6, MACHINE_TABLE, "contact"},
946 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
947 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
948 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
949 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
950 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
953 static struct validate uhst2_validate = {
965 static char *uhst6_fields[] = {
967 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
968 "use", "status", "subnet", "address", "ace_type", "ace_name",
969 "admin_comment", "ops_comment",
972 static struct valobj uhst6_valobj[] = {
973 {V_CHAR, 0, MACHINE_TABLE, "name"},
974 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
975 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
976 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
977 {V_CHAR, 3, MACHINE_TABLE, "model"},
978 {V_CHAR, 4, MACHINE_TABLE, "os"},
979 {V_CHAR, 5, MACHINE_TABLE, "location"},
980 {V_CHAR, 6, MACHINE_TABLE, "contact"},
981 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
984 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
985 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
986 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
987 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
988 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
991 static struct validate uhst6_validate = {
1003 static char *uhst_fields[] = {
1005 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1006 "account_number", "use", "status", "subnet", "address", "ace_type",
1007 "ace_name", "admin_comment", "ops_comment",
1010 static struct valobj uhst_valobj[] = {
1011 {V_CHAR, 0, MACHINE_TABLE, "name"},
1012 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1013 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1014 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1015 {V_CHAR, 3, MACHINE_TABLE, "model"},
1016 {V_CHAR, 4, MACHINE_TABLE, "os"},
1017 {V_CHAR, 5, MACHINE_TABLE, "location"},
1018 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1019 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1020 {V_CHAR, 8, MACHINE_TABLE, "account_number"},
1023 {V_ID, 11, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1024 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
1025 {V_TYPEDATA, 14, 0, 0, 0, MR_ACE},
1026 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1027 {V_ID, 16, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1030 static struct validate uhst_validate = {
1042 static char *uhha_fields[] = {
1047 static struct valobj uhha_valobj[] = {
1048 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1049 {V_CHAR, 1, MACHINE_TABLE, "hwaddr"},
1052 static struct validate uhha_validate = {
1064 static char *dhst_fields[] = {
1068 static struct validate dhst_validate = {
1080 static char *ghal_fields[] = {
1081 "alias", "canonical_hostname",
1082 "alias", "canonical_hostname"
1085 static struct validate ghal_validate = {
1097 static struct valobj ahal_valobj[] = {
1098 {V_CHAR, 0, HOSTALIAS_TABLE, "name"},
1099 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1102 static struct validate ahal_validate = {
1106 "name = UPPER('%s')",
1114 static struct valobj dhal_valobj[] = {
1115 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1118 static struct validate dhal_validate = {
1122 "name = UPPER('%s') AND mach_id = %d",
1130 static char *gsnt_fields[] = {
1132 "name", "description", "address", "mask", "low", "high", "prefix",
1133 "ace_type", "ace_name", "modtime", "modby", "modwith"
1136 static struct validate gsnt_validate = {
1148 static char *asnt_fields[] = {
1149 "name", "description", "address", "mask", "low", "high", "prefix",
1150 "ace_type", "ace_name",
1153 static struct valobj asnt_valobj[] = {
1154 {V_CHAR, 0, SUBNET_TABLE, "name"},
1155 {V_LEN, 1, SUBNET_TABLE, "description"},
1160 {V_LEN, 6, SUBNET_TABLE, "prefix"},
1161 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1162 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
1165 static struct validate asnt_validate =
1170 "name = UPPER('%s')",
1175 set_uppercase_modtime,
1178 static char *usnt_fields[] = {
1180 "newname", "description", "address", "mask", "low", "high", "prefix",
1181 "ace_type", "ace_name",
1184 static struct valobj usnt_valobj[] = {
1185 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1186 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1187 {V_LEN, 2, SUBNET_TABLE, "description"},
1192 {V_LEN, 7, SUBNET_TABLE, "prefix"},
1193 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1194 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
1197 static struct validate usnt_validate =
1210 static char *dsnt_fields[] = {
1214 static struct validate dsnt_validate = {
1226 static char *gclu_fields[] = {
1228 "name", "description", "location", "modtime", "modby", "modwith",
1231 static char *aclu_fields[] = {
1232 "name", "description", "location",
1235 static struct valobj aclu_valobj[] = {
1236 {V_CHAR, 0, CLUSTERS_TABLE, "name"},
1237 {V_LEN, 1, CLUSTERS_TABLE, "description"},
1238 {V_LEN, 2, CLUSTERS_TABLE, "location"},
1241 static struct validate aclu_validate =
1254 static char *uclu_fields[] = {
1256 "newname", "description", "location",
1259 static struct valobj uclu_valobj[] = {
1260 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1261 {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE},
1262 {V_LEN, 2, CLUSTERS_TABLE, "description"},
1263 {V_LEN, 3, CLUSTERS_TABLE, "location"},
1266 static struct validate uclu_validate = {
1278 static char *dclu_fields[] = {
1282 static struct validate dclu_validate = {
1294 static char *gmcm_fields[] = {
1295 "machine", "cluster",
1296 "machine", "cluster",
1299 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
1300 { /* DELETE_MACHINE_FROM_CLUSTER */
1301 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1302 {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1305 static struct validate amtc_validate = /* for amtc and dmfc */
1310 "mach_id = %d and clu_id = %d",
1315 set_mach_modtime_by_id,
1318 static char *gcld_fields[] = {
1319 "cluster", "serv_label",
1320 "cluster", "serv_label", "serv_cluster",
1323 static char *acld_fields[] = {
1324 "cluster", "serv_label", "serv_cluster",
1327 static struct valobj acld_valobj[] =
1329 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1330 {V_CHAR, 1, SVC_TABLE, "serv_label"},
1331 {V_CHAR, 2, SVC_TABLE, "serv_cluster"}
1334 static struct validate acld_validate =
1339 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1344 set_cluster_modtime_by_id,
1347 static struct validate dcld_validate =
1352 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1357 set_cluster_modtime_by_id,
1360 static char *glin2_fields[] = {
1362 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1363 "ace_type", "ace_name", "description", "modtime", "modby", "modwith",
1366 static char *glin3_fields[] = {
1368 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1369 "nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby",
1373 static char *glin_fields[] = {
1375 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1376 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1377 "description", "modtime", "modby", "modwith",
1380 static struct validate glin_validate = {
1387 access_vis_list_by_name,
1392 static char *alis2_fields[] = {
1393 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1394 "ace_type", "ace_name", "description",
1397 static struct valobj alis2_valobj[] = {
1398 {V_CHAR, 0, LIST_TABLE, "name"},
1405 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1406 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1407 {V_LEN, 9, LIST_TABLE, "description"},
1410 static struct validate alis2_validate = {
1422 static char *alis3_fields[] = {
1423 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1424 "nfsgroup", "ace_type", "ace_name", "description",
1427 static struct valobj alis3_valobj[] = {
1428 {V_CHAR, 0, LIST_TABLE, "name"},
1436 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1437 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1438 {V_LEN, 10, LIST_TABLE, "description"},
1441 static struct validate alis3_validate = {
1453 static char *alis_fields[] = {
1454 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1455 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1459 static struct valobj alis_valobj[] = {
1460 {V_CHAR, 0, LIST_TABLE, "name"},
1468 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1469 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1470 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1471 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1472 {V_LEN, 12, LIST_TABLE, "description"},
1475 static struct validate alis_validate = {
1487 static char *ulis2_fields[] = {
1489 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1490 "ace_type", "ace_name", "description",
1493 static struct valobj ulis2_valobj[] = {
1494 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1495 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1502 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1503 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1504 {V_LEN, 10, LIST_TABLE, "description"},
1507 static struct validate ulis2_validate = {
1519 static char *ulis3_fields[] = {
1521 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1522 "nfsgroup", "ace_type", "ace_name", "description",
1525 static struct valobj ulis3_valobj[] = {
1526 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1527 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1535 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1536 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1537 {V_LEN, 11, LIST_TABLE, "description"},
1540 static struct validate ulis3_validate = {
1552 static char *ulis_fields[] = {
1554 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1555 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1559 static struct valobj ulis_valobj[] = {
1560 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1561 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1569 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1570 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1571 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1572 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
1573 {V_LEN, 13, LIST_TABLE, "description"},
1576 static struct validate ulis_validate = {
1588 static char *dlis_fields[] = {
1592 static struct validate dlis_validate = {
1604 static char *amtl_fields[] = {
1605 "list_name", "member_type", "member_name",
1608 static char *atml_fields[] = {
1609 "list_name", "member_type", "member_name", "tag",
1612 static struct valobj amtl_valobj[] = {
1613 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1614 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
1615 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
1616 {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1619 static struct validate amtl_validate =
1632 static struct validate atml_validate =
1645 static struct validate tmol_validate =
1658 static struct validate dmfl_validate =
1668 delete_member_from_list,
1671 static char *gaus_fields[] = {
1672 "ace_type", "ace_name",
1673 "use_type", "use_name",
1676 static struct valobj gaus_valobj[] = {
1677 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1678 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1681 static struct validate gaus_validate = {
1693 static char *ghbo_fields[] = {
1694 "ace_type", "ace_name",
1698 static struct valobj ghbo_valobj[] = {
1699 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1700 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1703 static struct validate ghbo_validate = {
1715 static char *qgli_fields[] = {
1716 "active", "publicflg", "hidden", "maillist", "grouplist",
1720 static struct valobj qgli_valobj[] = {
1721 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1722 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1723 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1724 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1725 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1728 static struct validate qgli_validate = {
1737 qualified_get_lists,
1740 static char *gmol_fields[] = {
1742 "member_type", "member_name",
1745 static char *gtml_fields[] = {
1747 "member_type", "member_name", "tag",
1750 static struct validate gmol_validate = {
1757 access_visible_list,
1759 get_members_of_list,
1762 static char *glom_fields[] = {
1763 "member_type", "member_name",
1764 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
1767 static struct valobj glom_valobj[] = {
1768 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
1769 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1772 static struct validate glom_validate = {
1781 get_lists_of_member,
1784 static char *cmol_fields[] = {
1789 static struct validate cmol_validate = {
1796 access_visible_list,
1798 count_members_of_list,
1801 static char *gsin_fields[] = {
1803 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
1804 "type", "enable", "inprogress", "harderror", "errmsg",
1805 "ace_type", "ace_name", "modtime", "modby", "modwith",
1808 static struct validate gsin_validate =
1821 static char *qgsv_fields[] = {
1822 "enable", "inprogress", "harderror",
1826 static struct valobj qgsv_valobj[] = {
1827 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1828 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1829 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1832 static struct validate qgsv_validate = {
1841 qualified_get_server,
1844 static char *asin_fields[] = {
1845 "service", "update_int", "target_file", "script", "type", "enable",
1846 "ace_type", "ace_name",
1849 static struct valobj asin_valobj[] = {
1850 {V_CHAR, 0, SERVERS_TABLE, "name"},
1852 {V_LEN, 2, SERVERS_TABLE, "target_file"},
1853 {V_LEN, 3, SERVERS_TABLE, "script"},
1854 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
1856 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
1857 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
1860 static struct validate asin_validate = /* for asin, usin */
1865 "name = UPPER('%s')",
1870 set_uppercase_modtime,
1873 static struct validate rsve_validate = {
1877 "name = UPPER('%s')",
1882 set_uppercase_modtime,
1885 static char *ssif_fields[] = {
1886 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
1889 static struct valobj ssif_valobj[] = {
1890 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
1895 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
1898 static struct validate ssif_validate = {
1902 "name = UPPER('%s')",
1910 static char *dsin_fields[] = {
1914 static struct validate dsin_validate = {
1918 "name = UPPER('%s')",
1926 static char *gshi_fields[] = {
1927 "service", "machine",
1928 "service", "machine", "enable", "override", "success", "inprogress",
1929 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
1930 "value3", "modtime", "modby", "modwith",
1933 static struct validate gshi_validate = {
1945 static char *qgsh_fields[] = {
1946 "service", "enable", "override", "success", "inprogress", "hosterror",
1947 "service", "machine",
1950 static struct valobj qgsh_valobj[] = {
1951 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1952 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1953 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1954 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1955 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
1958 static struct validate qgsh_validate = {
1967 qualified_get_serverhost,
1970 static char *ashi_fields[] = {
1971 "service", "machine", "enable", "value1", "value2", "value3",
1974 static struct valobj ashi_valobj[] = {
1975 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
1976 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1980 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
1983 static struct validate ashi_validate = /* ashi & ushi */
1988 "service = UPPER('%s') AND mach_id = %d",
1993 set_serverhost_modtime,
1996 static struct validate rshe_validate =
2001 "service = UPPER('%s') AND mach_id = %d",
2006 set_serverhost_modtime,
2009 static struct validate ssho_validate =
2014 "service = UPPER('%s') AND mach_id = %d",
2022 static char *sshi_fields[] = {
2023 "service", "machine", "override", "success", "inprogress",
2024 "hosterror", "errmsg", "ltt", "lts",
2027 static struct valobj sshi_valobj[] = {
2028 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2029 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2034 {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"},
2039 static struct validate sshi_validate =
2052 static char *dshi_fields[] = {
2053 "service", "machine",
2056 static struct validate dshi_validate =
2061 "service = UPPER('%s') AND mach_id = %d",
2069 static char *gslo_fields[] = {
2071 "server", "machine",
2074 static char *gfsl_fields[] = {
2076 "label", "type", "machine", "name", "mount", "access", "comments",
2077 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2080 static struct validate gfsl_validate = {
2092 static char *gfsm_fields[] = {
2094 "label", "type", "machine", "name", "mount", "access", "comments",
2095 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2098 static struct validate gfsm_validate = {
2110 static char *gfsn_fields[] = {
2111 "machine", "partition",
2112 "label", "type", "machine", "name", "mount", "access", "comments",
2113 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2116 static struct validate gfsn_validate = {
2128 static char *gfsp_fields[] = {
2130 "label", "type", "machine", "name", "mount", "access", "comments",
2131 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2134 static char *gfsg_fields[] = {
2136 "label", "type", "machine", "name", "mount", "access", "comments",
2137 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2140 static struct validate gfsg_validate = {
2152 static char *afil_fields[] = {
2153 "label", "type", "machine", "name", "mount", "access", "comments",
2154 "owner", "owners", "create", "lockertype",
2157 static struct valobj afil_valobj[] = {
2158 {V_CHAR, 0, FILESYS_TABLE, "label"},
2159 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
2160 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2161 {V_CHAR, 3, FILESYS_TABLE, "name"},
2162 {V_LEN, 4, FILESYS_TABLE, "mount"},
2163 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
2164 {V_LEN, 6, FILESYS_TABLE, "comments"},
2165 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
2166 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
2168 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
2171 static struct validate afil_validate = {
2180 set_filesys_modtime,
2183 static char *ufil_fields[] = {
2184 "label", "newlabel", "type", "machine", "name", "mount", "access",
2185 "comments", "owner", "owners", "create", "lockertype",
2188 static struct valobj ufil_valobj[] = {
2189 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2190 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
2191 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
2192 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2193 {V_CHAR, 4, FILESYS_TABLE, "name"},
2194 {V_LEN, 5, FILESYS_TABLE, "mount"},
2195 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
2196 {V_LEN, 7, FILESYS_TABLE, "comments"},
2197 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
2198 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
2200 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
2203 static struct validate ufil_validate = {
2212 set_filesys_modtime,
2215 static char *dfil_fields[] = {
2219 static struct validate dfil_validate = {
2231 static char *gfgm_fields[] = {
2232 "fsgroup", "filesys", "sortkey"
2235 static struct validate gfgm_validate = {
2247 static struct valobj aftg_valobj[] = {
2248 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2249 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2252 static struct validate aftg_validate = {
2256 "group_id = %d and filsys_id = %d",
2264 static char *ganf_fields[] = {
2265 "machine", "dir", "device", "status", "allocated", "size",
2266 "modtime", "modby", "modwith",
2269 static char *gnfp_fields[] = {
2271 "machine", "dir", "device", "status", "allocated", "size",
2272 "modtime", "modby", "modwith",
2275 static struct validate gnfp_validate = {
2287 static struct valobj anfp_valobj[] = {
2288 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2289 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2290 {V_LEN, 2, NFSPHYS_TABLE, "device"},
2296 static struct validate anfp_validate = {
2300 "mach_id = %d and dir = '%s'",
2305 set_nfsphys_modtime,
2308 static struct validate unfp_validate = {
2312 "mach_id = %d and dir = '%s'",
2317 set_nfsphys_modtime,
2320 static char *ajnf_fields[] = {
2321 "machine", "dir", "adjustment",
2324 static struct valobj ajnf_valobj[] = {
2325 {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE},
2326 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2330 static struct validate ajnf_validate = {
2334 "mach_id = %d and dir = '%s'",
2339 set_nfsphys_modtime,
2342 static char *dnfp_fields[] = {
2346 static struct validate dnfp_validate = {
2350 "mach_id = %d and dir = '%s'",
2355 set_nfsphys_modtime,
2358 static char *gqot_fields[] = {
2359 "filesys", "type", "name",
2360 "filesys", "type", "name", "quota", "dir", "machine",
2361 "modtime", "modby", "modwith",
2364 static struct valobj gqot_valobj[] = {
2365 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2366 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2369 static struct validate gqot_validate = {
2381 static char *gqbf_fields[] = {
2383 "filesys", "type", "name", "quota", "dir", "machine",
2384 "modtime", "modby", "modwith",
2387 static struct validate gqbf_validate = {
2399 static char *aqot_fields[] = {
2400 "filesys", "type", "name", "quota",
2403 static struct valobj aqot_valobj[] = {
2404 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2405 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2406 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2410 static struct validate aqot_validate = {
2414 "filsys_id = %d and type = '%s' and entity_id = %d",
2422 static struct validate uqot_validate = {
2426 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2434 static struct validate dqot_validate = {
2438 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2446 static char *gnfq_fields[] = {
2448 "filesys", "login", "quota", "dir", "machine",
2449 "modtime", "modby", "modwith",
2452 static struct validate gnfq_validate = {
2464 static char *gnqp_fields[] = {
2466 "filesys", "login", "quota", "dir", "machine",
2467 "modtime", "modby", "modwith",
2470 static char *anfq_fields[] = {
2471 "filesys", "login", "quota",
2474 static struct valobj anfq_valobj[] = {
2475 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2476 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
2480 static struct validate anfq_validate = {
2484 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2492 static struct validate unfq_validate = {
2496 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2504 static struct validate dnfq_validate = {
2508 "filsys_id = %d AND entity_id = %d",
2516 static char *gzcl2_fields[] = {
2518 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2519 "iws_type", "iws_name", "iui_type", "iui_name",
2520 "modtime", "modby", "modwith",
2523 static char *gzcl_fields[] = {
2525 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2526 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2527 "owner_id", "modtime", "modby", "modwith",
2530 static struct validate gzcl_validate = {
2542 static char *azcl2_fields[] = {
2543 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2544 "iws_type", "iws_name", "iui_type", "iui_name",
2547 static struct valobj azcl2_valobj[] = {
2548 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2549 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2550 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2551 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2552 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2553 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2554 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2555 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2556 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2559 static struct validate azcl2_validate = {
2571 static char *azcl_fields[] = {
2572 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2573 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2577 static struct valobj azcl_valobj[] = {
2578 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2579 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2580 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2581 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2582 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2583 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2584 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2585 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2586 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2587 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2588 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2591 static struct validate azcl_validate = {
2603 static char *uzcl2_fields[] = {
2604 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2605 "iws_type", "iws_name", "iui_type", "iui_name",
2608 static struct valobj uzcl2_valobj[] = {
2609 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2610 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2611 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2612 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2613 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2614 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2615 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2616 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2617 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2618 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2621 static struct validate uzcl2_validate = {
2633 static char *uzcl_fields[] = {
2634 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2635 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id",
2638 static struct valobj uzcl_valobj[] = {
2639 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2640 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2641 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2642 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2643 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2644 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2645 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2646 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2647 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2648 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2649 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
2650 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
2653 static struct validate uzcl_validate = {
2665 static struct validate dzcl_validate = {
2677 static char *gsha_fields[] = {
2679 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
2682 static struct validate gsha_validate =
2695 static char *asha_fields[] = {
2696 "machine", "ace_type", "ace_name",
2699 static struct valobj asha_valobj[] = {
2700 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2701 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
2702 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2705 static struct validate asha_validate =
2718 static char *gacl_fields[] = {
2719 "machine", "target",
2720 "machine", "target", "kind", "list",
2723 static char *aacl_fields[] = {
2724 "machine", "target", "kind", "list",
2727 static char *dacl_fields[] = {
2728 "machine", "target",
2731 static struct valobj aacl_valobj[] = {
2732 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2733 {V_CHAR, 1, ACL_TABLE, "target"},
2734 {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE},
2735 {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST},
2738 static struct validate gacl_validate =
2751 static struct validate aacl_validate =
2756 "mach_id = %d AND target = '%s'",
2764 static char *gsvc_fields[] = {
2765 "service", "protocol",
2766 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
2769 static char *asvc_fields[] = {
2770 "service", "protocol", "port", "description",
2773 static char *dsvc_fields[] = {
2774 "service", "protocol",
2777 static struct valobj asvc_valobj[] = {
2778 {V_CHAR, 0, SERVICES_TABLE, "name"},
2779 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
2781 {V_CHAR, 3, SERVICES_TABLE, "description"},
2784 static struct validate asvc_validate = {
2788 "name = '%s' AND protocol = '%s'",
2793 set_service_modtime,
2796 static struct validate dsvc_validate = {
2800 "name = '%s' AND protocol = '%s'",
2808 static char *gprn_fields[] = {
2810 "name", "type", "hwtype", "duplexname", "hostname",
2811 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2812 "banner", "location", "contact", "modtime", "modby", "modwith"
2815 static char *gpbd_fields[] = {
2817 "name", "type", "hwtype", "duplexname", "hostname",
2818 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2819 "banner", "location", "contact", "modtime", "modby", "modwith"
2822 static char *gpbe_fields[] = {
2824 "name", "type", "hwtype", "duplexname", "hostname",
2825 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2826 "banner", "location", "contact", "modtime", "modby", "modwith"
2829 static char *gpbh_fields[] = {
2831 "name", "type", "hwtype", "duplexname", "hostname",
2832 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2833 "banner", "location", "contact", "modtime", "modby", "modwith"
2836 static char *gpbr_fields[] = {
2838 "name", "type", "hwtype", "duplexname", "hostname",
2839 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2840 "banner", "location", "contact", "modtime", "modby", "modwith"
2843 static char *gpbl_fields[] = {
2845 "name", "type", "hwtype", "duplexname", "hostname",
2846 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2847 "banner", "location", "contact", "modtime", "modby", "modwith"
2850 static char *gpbc_fields[] = {
2852 "name", "type", "hwtype", "duplexname", "hostname",
2853 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2854 "banner", "location", "contact", "modtime", "modby", "modwith"
2857 static char *aprn_fields[] = {
2858 "printer", "type", "hwtype", "duplexname", "hostname",
2859 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2860 "banner", "location", "contact",
2863 static struct valobj aprn_valobj[] = {
2864 {V_CHAR, 0, PRINTERS_TABLE, "name"},
2865 {V_TYPE, 1, 0, "printertype", 0, MR_TYPE},
2866 {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE},
2867 {V_CHAR, 3, PRINTERS_TABLE, "duplexname"},
2868 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2869 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2870 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2871 {V_CHAR, 7, PRINTERS_TABLE, "rp"},
2872 {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2875 {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST},
2876 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
2878 {V_CHAR, 14, PRINTERS_TABLE, "location"},
2879 {V_CHAR, 15, PRINTERS_TABLE, "contact"},
2882 static struct validate aprn_validate = {
2894 static char *uprn_fields[] = {
2896 "printer", "type", "hwtype", "duplexname", "hostname",
2897 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2898 "banner", "location", "contact",
2901 static struct valobj uprn_valobj[] = {
2902 {V_CHAR, 0, PRINTERS_TABLE, "name"},
2903 {V_CHAR, 1, PRINTERS_TABLE, "name"},
2904 {V_TYPE, 2, 0, "printertype", 0, MR_TYPE},
2905 {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE},
2906 {V_CHAR, 4, PRINTERS_TABLE, "duplexname"},
2907 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2908 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2909 {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2910 {V_CHAR, 8, PRINTERS_TABLE, "rp"},
2911 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2914 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
2915 {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST},
2917 {V_CHAR, 15, PRINTERS_TABLE, "location"},
2918 {V_CHAR, 16, PRINTERS_TABLE, "contact"},
2921 static struct validate uprn_validate = {
2933 static struct validate dprn_validate = {
2945 static char *gpsv_fields[] = {
2947 "host", "kind", "printer_types", "owner_type", "owner_name",
2948 "lpc_acl", "modtime", "modby", "modwith"
2951 static struct valobj gpsv_valobj[] = {
2952 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2955 static struct validate gpsv_validate = {
2967 static char *apsv_fields[] = {
2968 "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl"
2971 static struct valobj apsv_valobj[] = {
2972 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2973 {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE},
2974 {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING},
2975 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
2976 {V_TYPEDATA, 4, 0, 0, 0, MR_ACE},
2977 {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST},
2980 static struct validate apsv_validate = {
2992 static char *dpsv_fields[] = {
2996 static struct validate dpsv_validate = {
3008 static char *gali_fields[] = {
3009 "name", "type", "trans",
3010 "name", "type", "trans",
3013 static char *aali_fields[] = {
3014 "name", "type", "trans",
3017 static struct valobj aali_valobj[] = {
3018 {V_CHAR, 0, ALIAS_TABLE, "name"},
3019 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
3020 {V_CHAR, 2, ALIAS_TABLE, "trans"},
3023 static struct validate aali_validate = {
3027 "name = '%s' and type = '%s' and trans = '%s'",
3035 static struct validate dali_validate = /* DELETE_ALIAS */
3040 "name = '%s' and type = '%s' and trans = '%s'",
3048 static char *gval_fields[] = {
3052 static struct valobj gval_valobj[] = {
3053 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
3056 static struct validate gval_validate = {
3068 static char *aval_fields[] = {
3072 static struct valobj aval_valobj[] = {
3073 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
3077 static struct validate aval_validate = /* for aval, uval, and dval */
3090 static char *dval_fields[] = {
3094 static char *gats_fields[] = {
3095 "table_name", "appends", "updates", "deletes",
3096 "modtime", "modby", "modwith",
3099 static char *_sdl_fields[] = {
3103 static struct validate _sdl_validate =
3116 static char *gusl_fields[] = {
3117 "login", "domain_sid",
3118 "login", "sid", "created",
3121 static struct validate gusl_validate =
3134 static char *glsn_fields[] = {
3135 "name", "domain_sid",
3136 "name", "sid", "created",
3139 static struct validate glsn_validate =
3152 static char *ausl_fields[] = {
3156 static struct validate ausl_validate =
3161 "users_id = %d AND sid = '%s'",
3169 static char *alsn_fields[] = {
3173 static struct validate alsn_validate =
3178 "list_id = %d AND sid = '%s'",
3186 static char *gdds_fields[] = {
3190 static char *gcon_fields[] = {
3192 "name", "description", "location", "contact",
3193 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3196 static struct validate gcon_validate = {
3208 static char *acon_fields[] = {
3209 "name", "description", "location", "contact",
3210 "ace_type", "ace_name", "memace_type", "memace_name",
3213 static struct valobj acon_valobj[] = {
3214 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3215 {V_LEN, 1, CONTAINERS_TABLE, "description"},
3216 {V_CHAR, 2, CONTAINERS_TABLE, "location"},
3217 {V_CHAR, 3, CONTAINERS_TABLE, "contact"},
3218 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
3219 {V_TYPEDATA, 5, 0, 0, 0, MR_ACE},
3220 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3221 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3224 static struct validate acon_validate =
3237 static char *ucon_fields[] = {
3239 "newname", "description", "location", "contact",
3240 "ace_type", "ace_name", "memace_type", "memace_name",
3243 static struct valobj ucon_valobj[] = {
3244 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3245 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3246 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3247 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3248 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3249 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3250 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3251 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3252 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3255 static struct validate ucon_validate =
3268 static char *dcon_fields[] = {
3272 static struct validate dcon_validate =
3285 static char *amcn_fields[] = {
3286 "machine", "container",
3289 static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */
3290 { /* DELETE_MACHINE_FROM_CONTAINER */
3291 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3292 {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3295 static struct validate amcn_validate = /* for amtn and dmfn */
3305 set_mach_modtime_by_id,
3308 static struct validate dmcn_validate = /* for amtn and dmfn */
3313 "mach_id = %d and cnt_id = %d",
3318 set_mach_modtime_by_id,
3321 static char *gmnm_fields[] = {
3323 "machine", "container",
3326 static char *gmoc_fields[] = {
3333 static struct validate gmoc_validate =
3343 get_machines_of_container,
3346 static char *gsoc_fields[] = {
3352 static struct validate gsoc_validate =
3362 get_subcontainers_of_container,
3365 static char *gtlc_fields[] = {
3370 /* Generalized Query Definitions */
3372 /* Multiple versions of the same query MUST be listed in ascending
3376 /* Note: For any query which uses prefetch_value, the vcnt should be
3377 * one less than the number of %-format specifiers in the tlist.
3380 struct query Queries[] = {
3382 /* Q_GALO - GET_ALL_LOGINS, v2 */
3389 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3399 /* Q_GALO - GET_ALL_LOGINS, v3 */
3406 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3416 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */
3417 "get_all_active_logins",
3423 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3433 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */
3434 "get_all_active_logins",
3440 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3450 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */
3451 "get_user_account_by_login",
3457 "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",
3460 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3467 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */
3468 "get_user_account_by_login",
3474 "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 FROM users u, strings str",
3477 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3484 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */
3485 "get_user_account_by_uid",
3491 "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",
3494 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3501 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */
3502 "get_user_account_by_uid",
3508 "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 FROM users u, strings str",
3511 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3518 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */
3519 "get_user_account_by_name",
3525 "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",
3528 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
3535 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */
3536 "get_user_account_by_name",
3542 "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 FROM users u, strings str",
3545 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
3552 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */
3553 "get_user_account_by_class",
3559 "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",
3562 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
3569 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */
3570 "get_user_account_by_class",
3576 "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 FROM users u, strings str",
3579 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
3586 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */
3587 "get_user_account_by_id",
3593 "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",
3596 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3603 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */
3604 "get_user_account_by_id",
3610 "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 FROM users u, strings str",
3613 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3620 /* Q_GUBL - GET_USER_BY_LOGIN, v2 */
3621 "get_user_by_login",
3627 "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",
3630 "u.login LIKE '%s' AND u.users_id != 0",
3637 /* Q_GUBL - GET_USER_BY_LOGIN, v3 */
3638 "get_user_by_login",
3644 "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 FROM users u",
3647 "u.login LIKE '%s' AND u.users_id != 0",
3654 /* Q_GUBU - GET_USER_BY_UID, v2 */
3661 "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",
3664 "u.unix_uid = %s AND u.users_id != 0",
3671 /* Q_GUBU - GET_USER_BY_UID, v3 */
3678 "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 FROM users u",
3681 "u.unix_uid = %s AND u.users_id != 0",
3688 /* Q_GUBN - GET_USER_BY_NAME, v2 */
3695 "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",
3698 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
3705 /* Q_GUBN - GET_USER_BY_NAME, v3 */
3712 "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 FROM users u",
3715 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
3722 /* Q_GUBC - GET_USER_BY_CLASS, v2 */
3723 "get_user_by_class",
3729 "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",
3732 "u.type = UPPER('%s') AND u.users_id != 0",
3739 /* Q_GUBC - GET_USER_BY_CLASS, v3 */
3740 "get_user_by_class",
3746 "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 FROM users u",
3749 "u.type = UPPER('%s') AND u.users_id != 0",
3756 /* Q_GUBM - GET_USER_BY_MITID, v2 */
3757 "get_user_by_mitid",
3763 "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",
3766 "u.clearid LIKE '%s' AND u.users_id != 0",
3773 /* Q_GUBM - GET_USER_BY_MITID, v3 */
3774 "get_user_by_mitid",
3780 "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 FROM users u",
3783 "u.clearid LIKE '%s' AND u.users_id != 0",
3790 /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */
3797 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
3798 * but using up one argv element.
3800 "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)",
3810 /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */
3817 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
3818 * but using up one argv element.
3820 "INTO users (login, unix_uid, shell, winconsoleshell, 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)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)",
3830 /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */
3837 "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)",
3847 /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */
3854 "INTO users (login, unix_uid, shell, winconsoleshell, 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)",
3864 /* Q_RUSR - REGISTER_USER */
3881 /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */
3882 "update_user_account",
3888 /* See comment in auac about signature. */
3889 "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",
3899 /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */
3900 "update_user_account",
3906 /* See comment in auac about signature. */
3907 "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",
3917 /* Q_UUSR - UPDATE_USER, v2 */
3924 "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'",
3934 /* Q_UUSR - UPDATE_USER, v3 */
3941 "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'",
3951 /* Q_UUSH - UPDATE_USER_SHELL */
3952 "update_user_shell",
3958 "users SET shell = '%s'",
3968 /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
3969 "update_user_windows_shell",
3975 "users SET winconsoleshell = '%s'",
3985 /* Q_UUST - UPDATE_USER_STATUS */
3986 "update_user_status",
3992 "users SET status = %s",
4002 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
4003 "update_user_security_status",
4009 "users SET secure = %s",
4019 /* Q_DUSR - DELETE_USER */
4036 /* Q_AURV - ADD_USER_RESERVATION */
4037 "add_user_reservation",
4053 /* Q_GURV - GET_USER_RESERVATIONS */
4054 "get_user_reservations",
4070 /* Q_GUBR - GET_USER_BY_RESERVATION */
4071 "get_user_by_reservation",
4087 /* Q_DURV - DELETE_USER_RESERVATION */
4088 "delete_user_reservation",
4104 /* Q_GKUM - GET_KERBEROS_USER_MAP */
4105 "get_kerberos_user_map",
4111 "u.login, str.string FROM krbmap km, users u, strings str",
4114 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
4116 "u.login, str.string",
4121 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
4122 "add_kerberos_user_map",
4128 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
4138 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
4139 "delete_kerberos_user_map",
4148 "users_id = %d AND string_id = %d",
4155 /* Q_GFBL - GET_FINGER_BY_LOGIN */
4156 "get_finger_by_login",
4162 "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",
4172 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
4173 "update_finger_by_login",
4179 "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))",
4189 /* Q_GPOB - GET_POBOX */
4196 "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
4206 /* Q_GAPO - GET_ALL_POBOXES */
4213 "login, potype, pop_id || ':' || box_id FROM users",
4223 /* Q_GPOP - GET_POBOXES_POP */
4230 "login, potype, users_id FROM users",
4240 /* Q_GPOF - GET_POBOXES_SMTP */
4247 "login, potype, users_id FROM users",
4257 /* Q_SPOB - SET_POBOX */
4274 /* Q_SPOP - SET_POBOX_POP */
4291 /* Q_DPOB - DELETE_POBOX */
4298 "users SET potype = 'NONE'",
4308 /* Q_GHST - GET_HOST, v2 */
4315 "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",
4318 "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",
4325 /* Q_GHST - GET_HOST, v6 */
4332 "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",
4335 "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",
4342 /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */
4343 "get_host_by_hwaddr",
4349 "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",
4352 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4359 /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */
4360 "get_host_by_hwaddr",
4366 "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",
4369 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4376 /* Q_GHHA - GET_HOST_HWADDR */
4383 "m.hwaddr FROM machine m",
4386 "m.name LIKE UPPER('%s')",
4393 /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */
4400 "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)",
4410 /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */
4417 "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)",
4427 /* Q_AHST - ADD_HOST, v9 */ /* uses prefetch_value() for mach_id */
4434 "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)",
4444 /* Q_UHST - UPDATE_HOST, v2 */
4451 "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",
4461 /* Q_UHST - UPDATE_HOST, v6 */
4468 "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",
4478 /* Q_UHST - UPDATE_HOST, v9 */
4485 "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",
4495 /* Q_UHHA - UPDATE_HOST_HWADDR */
4496 "update_host_hwaddr",
4502 "machine SET hwaddr = NVL('%s', CHR(0))",
4512 /* Q_DHST - DELETE_HOST */
4529 /* Q_GMAC - GET_MACHINE */
4536 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
4539 "name LIKE UPPER('%s') AND mach_id != 0",
4546 /* Q_GHAL - GET_HOSTALIAS */
4553 "a.name, m.name FROM hostalias a, machine m",
4556 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
4563 /* Q_AHAL - ADD_HOSTALIAS */
4570 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)",
4580 /* Q_DHAL - DELETE_HOSTALIAS */
4590 "name = UPPER('%s') AND mach_id = %d",
4597 /* Q_GSNT - GET_SUBNET */
4604 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
4607 "name LIKE UPPER('%s')",
4614 /* Q_ASNT - ADD_SUBNET */
4621 "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)",
4631 /* Q_USNT - UPDATE_SUBNET */
4638 "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",
4648 /* Q_DSNT - DELETE_SUBNET */
4665 /* Q_GCLU - GET_CLUSTER */
4672 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
4675 "name LIKE '%s' AND clu_id != 0",
4682 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
4689 "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)",
4699 /* Q_UCLU - UPDATE_CLUSTER */
4706 "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))",
4716 /* Q_DCLU - DELETE_CLUSTER */
4733 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
4734 "get_machine_to_cluster_map",
4740 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
4743 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
4750 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
4751 "add_machine_to_cluster",
4757 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
4767 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
4768 "delete_machine_from_cluster",
4777 "mach_id = %d AND clu_id = %d",
4784 /* Q_GCLD - GET_CLUSTER_DATA */
4791 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
4794 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
4796 "c.name, svc.serv_label",
4801 /* Q_ACLD - ADD_CLUSTER_DATA */
4808 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')",
4818 /* Q_DCLD - DELETE_CLUSTER_DATA */
4819 "delete_cluster_data",
4828 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
4835 /* Q_GLIN - GET_LIST_INFO, v2 */
4842 "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",
4852 /* Q_GLIN - GET_LIST_INFO, v3 */
4859 "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",
4869 /* Q_GLIN - GET_LIST_INFO, v4 */
4876 "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",
4886 /* Q_EXLN - EXPAND_LIST_NAMES */
4887 "expand_list_names",
4896 "name LIKE '%s' AND list_id != 0",
4903 /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */
4910 "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)",
4920 /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */
4927 "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)",
4937 /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */
4944 "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)",
4954 /* Q_ULIS - UPDATE_LIST, v2 */
4961 "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))",
4971 /* Q_ULIS - UPDATE_LIST, v3 */
4978 "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))",
4988 /* Q_ULIS, UPDATE_LIST, v4 */
4995 "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))",
5005 /* Q_DLIS - DELETE_LIST */
5022 /* Q_AMTL - ADD_MEMBER_TO_LIST */
5023 "add_member_to_list",
5039 /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */
5040 "add_tagged_member_to_list",
5056 /* Q_TMOL - TAG_MEMBER_OF_LIST */
5057 "tag_member_of_list",
5073 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
5074 "delete_member_from_list",
5090 /* Q_GAUS - GET_ACE_USE */
5107 /* Q_GHBO - GET_HOST_BY_OWNER */
5108 "get_host_by_owner",
5124 /* Q_QGLI - QUALIFIED_GET_LISTS */
5125 "qualified_get_lists",
5141 /* Q_GMOL - GET_MEMBERS_OF_LIST */
5142 "get_members_of_list",
5158 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
5159 "get_end_members_of_list",
5175 /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */
5176 "get_tagged_members_of_list",
5192 /* Q_GLOM - GET_LISTS_OF_MEMBER */
5193 "get_lists_of_member",
5209 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
5210 "count_members_of_list",
5226 /* Q_GSIN - GET_SERVER_INFO */
5233 "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",
5236 "name LIKE UPPER('%s')",
5243 /* Q_QGSV - QUALIFIED_GET_SERVER */
5244 "qualified_get_server",
5260 /* Q_ASIN - ADD_SERVER_INFO */
5267 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)",
5277 /* Q_USIN - UPDATE_SERVER_INFO */
5278 "update_server_info",
5284 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
5287 "name = UPPER('%s')",
5294 /* Q_RSVE - RESET_SERVER_ERROR */
5295 "reset_server_error",
5301 "servers SET harderror = 0, dfcheck = dfgen",
5304 "name = UPPER('%s')",
5311 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
5312 "set_server_internal_flags",
5318 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))",
5321 "name = UPPER('%s')",
5328 /* Q_DSIN - DELETE_SERVER_INFO */
5329 "delete_server_info",
5338 "name = UPPER('%s')",
5345 /* Q_GSHI - GET_SERVER_HOST_INFO */
5346 "get_server_host_info",
5352 "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",
5355 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
5357 "sh.service, m.name",
5362 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
5363 "qualified_get_server_host",
5379 /* Q_ASHI - ADD_SERVER_HOST_INFO */
5380 "add_server_host_info",
5386 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))",
5396 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
5397 "update_server_host_info",
5403 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))",
5406 "service = UPPER('%s') AND mach_id = %d",
5413 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
5414 "reset_server_host_error",
5420 "serverhosts SET hosterror = 0",
5423 "service = UPPER('%s') AND mach_id = %d",
5430 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
5431 "set_server_host_override",
5437 "serverhosts SET override = 1",
5440 "service = UPPER('%s') AND mach_id = %d",
5447 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
5448 "set_server_host_internal",
5454 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s",
5457 "service = UPPER('%s') AND mach_id = %d",
5464 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
5465 "delete_server_host_info",
5474 "service = UPPER('%s') AND mach_id = %d",
5481 /* Q_GSLO - GET_SERVER_LOCATIONS */
5482 "get_server_locations",
5488 "sh.service, m.name FROM serverhosts sh, machine m",
5491 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
5493 "sh.service, m.name",
5498 /* Q_GFSL - GET_FILESYS_BY_LABEL */
5499 "get_filesys_by_label",
5505 "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",
5508 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5515 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
5516 "get_filesys_by_machine",
5522 "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",
5525 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5532 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
5533 "get_filesys_by_nfsphys",
5539 "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",
5542 "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'",
5549 /* Q_GFSG - GET_FILESYS_BY_GROUP */
5550 "get_filesys_by_group",
5556 "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",
5559 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5566 /* Q_GFSP - GET_FILESYS_BY_PATH */
5567 "get_filesys_by_path",
5573 "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",
5576 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
5583 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
5590 "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)",
5600 /* Q_UFIL - UPDATE_FILESYS */
5607 "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'",
5617 /* Q_DFIL - DELETE_FILESYS */
5634 /* Q_GFGM - GET_FSGROUP_MEMBERS */
5635 "get_fsgroup_members",
5641 "fs.label, fg.key FROM fsgroup fg, filesys fs",
5644 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
5651 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
5652 "add_filesys_to_fsgroup",
5658 "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')",
5668 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
5669 "remove_filesys_from_fsgroup",
5678 "group_id = %d AND filsys_id = %d",
5685 /* Q_GANF - GET_ALL_NFSPHYS */
5692 "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",
5695 "m.mach_id = np.mach_id",
5702 /* Q_GNFP - GET_NFSPHYS */
5709 "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",
5712 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
5719 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
5726 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)",
5736 /* Q_UNFP - UPDATE_NFSPHYS */
5743 "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s",
5746 "mach_id = %d AND dir = '%s'",
5753 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
5754 "adjust_nfsphys_allocation",
5760 "nfsphys SET allocated = allocated + %s",
5763 "mach_id = %d AND dir = '%s'",
5770 /* Q_DNFP - DELETE_NFSPHYS */
5780 "mach_id = %d AND dir = '%s'",
5787 /* Q_GQOT - GET_QUOTA */
5794 "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",
5797 "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",
5804 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
5805 "get_quota_by_filesys",
5811 "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",
5814 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
5821 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
5828 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
5838 /* Q_UQOT - UPDATE_QUOTA */
5845 "quota SET quota = %s",
5855 /* Q_DQOT - DELETE_QUOTA */
5872 /* Q_GNFQ - GET_NFS_QUOTAS */
5879 "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",
5882 "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'",
5884 "fs.label, u.login",
5889 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
5890 "get_nfs_quotas_by_partition",
5896 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
5899 "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",
5906 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
5913 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
5923 /* Q_UNFQ - UPDATE_NFS_QUOTA */
5930 "quota SET quota = %s",
5940 /* Q_DNFQ - DELETE_NFS_QUOTA */
5957 /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */
5964 "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",
5974 /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */
5981 "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",
5991 /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */
5998 "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)",
6008 /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */
6015 "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)",
6025 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */
6026 "update_zephyr_class",
6032 "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",
6042 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */
6043 "update_zephyr_class",
6049 "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",
6059 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
6060 "delete_zephyr_class",
6076 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
6077 "get_server_host_access",
6083 "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",
6086 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
6093 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
6094 "add_server_host_access",
6100 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)",
6110 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
6111 "update_server_host_access",
6117 "hostaccess SET acl_type = '%s', acl_id = %d",
6127 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
6128 "delete_server_host_access",
6144 /* Q_GACL - GET_ACL */
6151 "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l",
6154 "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id",
6156 "m.name, ac.target, ac.kind",
6161 /* Q_AACL - ADD_ACL */
6168 "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)",
6178 /* Q_DACL - DELETE_ACL */
6188 "mach_id = %d AND target = '%s'",
6195 /* Q_GSVC - GET_SERVICE */
6202 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
6205 "name LIKE '%s' AND protocol LIKE '%s'",
6212 /* Q_ASVC - ADD_SERVICE */
6219 "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))",
6229 /* Q_DSVC - DELETE_SERVICE */
6239 "name = '%s' AND protocol = '%s'",
6246 /* Q_GPRN - GET_PRINTER */
6253 "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",
6256 "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",
6263 /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */
6264 "get_printer_by_duplexname",
6270 "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",
6273 "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",
6280 /* Q_GPBE - GET_PRINTER_BY_ETHERNET */
6281 "get_printer_by_ethernet",
6287 "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",
6290 "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",
6297 /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */
6298 "get_printer_by_hostname",
6304 "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",
6307 "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",
6314 /* Q_GPBR - GET_PRINTER_BY_RM */
6315 "get_printer_by_rm",
6321 "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",
6324 "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",
6331 /* Q_GPBL - GET_PRINTER_BY_LOCATION */
6332 "get_printer_by_location",
6338 "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",
6341 "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",
6348 /* Q_GPBC - GET_PRINTER_BY_CONTACT */
6349 "get_printer_by_contact",
6355 "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",
6358 "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",
6365 /* Q_APRN - ADD_PRINTER */
6372 "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)))",
6382 /* Q_UPRN - UPDATE_PRINTER */
6389 "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))",
6399 /* Q_DPRN - DELETE_PRINTER */
6416 /* Q_GPSV - GET_PRINT_SERVER */
6423 "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",
6426 "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",
6433 /* Q_APSV - ADD_PRINT_SERVER */
6440 "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)",
6450 /* Q_UPSV - UPDATE_PRINT_SERVER */
6451 "update_print_server",
6457 "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d",
6467 /* Q_DPSV - DELETE_PRINT_SERVER */
6468 "delete_print_server",
6484 /* Q_GALI - GET_ALIAS */
6491 "name, type, trans FROM alias",
6494 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
6496 "type, name, trans",
6501 /* Q_AALI - ADD_ALIAS */
6508 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
6518 /* Q_DALI - DELETE_ALIAS */
6528 "name = '%s' AND type = '%s' AND trans = '%s'",
6535 /* Q_GVAL - GET_VALUE */
6542 "value FROM numvalues",
6552 /* Q_AVAL - ADD_VALUE */
6559 "INTO numvalues (name, value) VALUES ('%s', %s)",
6569 /* Q_UVAL - UPDATE_VALUE */
6576 "numvalues SET value = %s",
6586 /* Q_DVAL - DELETE_VALUE */
6603 /* Q_GATS - GET_ALL_TABLE_STATS */
6604 "get_all_table_stats",
6610 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
6620 /* Q__SDL - _SET_DEBUG_LEVEL */
6637 /* Q_GUSL - GET_USER_SIDS_BY_LOGIN, v4 */
6638 "get_user_sids_by_login",
6644 "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM users u, usersids us",
6647 "us.users_id = %d AND u.users_id = us.users_id AND SUBSTR(us.sid, 1, LENGTH(us.sid)-8) = '%s'",
6654 /* Q_AUSL - ADD_USER_SID_BY_LOGIN, v4 */
6655 "add_user_sid_by_login",
6661 "INTO usersids (users_id, sid) VALUES (%d, '%s')",
6671 /* Q_GLSN - GET_LIST_SIDS_BY_NAME, v4 */
6672 "get_list_sids_by_name",
6678 "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM list l, listsids ls",
6681 "ls.list_id = %d AND l.list_id = ls.list_id AND SUBSTR(ls.sid, 1, LENGTH(ls.sid)-8) = '%s'",
6688 /* Q_ALSN - ADD_LIST_SID_BY_NAME, v4 */
6689 "add_list_sid_by_name",
6695 "INTO listsids (list_id, sid) VALUES (%d, '%s')",
6705 /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */
6706 "get_distinct_domain_sids",
6712 "DISTINCT SUBSTR(sid, 1, LENGTH(sid)-8) FROM usersids",
6722 /* Q_GCON - GET_CONTAINER, v7 */
6729 "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",
6732 "name = '%s' AND cnt_id != 0",
6739 /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */
6746 "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)",
6756 /* Q_UCON - UPDATE_CONTAINER, v7 */
6773 /* Q_DCON - DELETE_CONTAINER, v7 */
6790 /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */
6791 "add_machine_to_container",
6797 "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)",
6807 /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */
6808 "delete_machine_from_container",
6817 "mach_id = %d AND cnt_id = %d",
6824 /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */
6825 "get_machine_to_container_map",
6831 "m.name, c.name FROM machine m, containers c, mcntmap mcn",
6834 "m.name = UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id",
6841 /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */
6842 "get_machines_of_container",
6858 /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */
6859 "get_subcontainers_of_container",
6875 /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v8 */
6876 "get_toplevel_containers",
6882 "name FROM containers",
6885 "name NOT LIKE '%%/%%'",
6893 int QueryCount = (sizeof(Queries) / sizeof(struct query));