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", "created", "creator",
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", "created",
109 static struct validate gubl2_validate =
122 static struct validate gubl_validate =
135 static char *guau2_fields[] = {
137 "login", "unix_uid", "shell", "last", "first", "middle", "status",
138 "clearid", "class", "comments", "signature", "secure",
139 "modtime", "modby", "modwith",
142 static char *guau_fields[] = {
144 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
145 "status", "clearid", "class", "comments", "signature", "secure",
146 "modtime", "modby", "modwith", "created", "creator",
149 static char *guan2_fields[] = {
151 "login", "unix_uid", "shell", "last", "first", "middle", "status",
152 "clearid", "class", "comments", "signature", "secure",
153 "modtime", "modby", "modwith",
156 static char *guan_fields[] = {
158 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
159 "status", "clearid", "class", "comments", "signature", "secure",
160 "modtime", "modby", "modwith", "created", "creator",
163 static struct validate guan2_validate =
176 static struct validate guan_validate =
189 static char *guac2_fields[] = {
191 "login", "unix_uid", "shell", "last", "first", "middle", "status",
192 "clearid", "class", "comments", "signature", "secure",
193 "modtime", "modby", "modwith",
196 static char *guac_fields[] = {
198 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
199 "status", "clearid", "class", "comments", "signature", "secure",
200 "modtime", "modby", "modwith", "created", "creator",
203 static char *guam2_fields[] = {
205 "login", "unix_uid", "shell", "last", "first", "middle", "status",
206 "clearid", "class", "comments", "signature", "secure",
207 "modtime", "modby", "modwith",
210 static char *guam_fields[] = {
212 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
213 "status", "clearid", "class", "comments", "signature", "secure",
214 "modtime", "modby", "modwith", "created", "creator",
217 static char *gubu2_fields[] = {
219 "login", "unix_uid", "shell", "last", "first", "middle", "status",
220 "clearid", "class", "modtime", "modby", "modwith",
223 static char *gubu_fields[] = {
225 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
226 "status", "clearid", "class", "modtime", "modby", "modwith", "created",
230 static struct validate gubu2_validate =
243 static struct validate gubu_validate =
256 static char *gubn2_fields[] = {
258 "login", "unix_uid", "shell", "last", "first", "middle", "status",
259 "clearid", "class", "modtime", "modby", "modwith",
262 static char *gubn_fields[] = {
264 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
265 "status", "clearid", "class", "modtime", "modby", "modwith", "created",
269 static struct validate gubn2_validate =
282 static struct validate gubn_validate =
295 static char *gubc2_fields[] = {
297 "login", "unix_uid", "shell", "last", "first", "middle", "status",
298 "clearid", "class", "modtime", "modby", "modwith",
301 static char *gubc_fields[] = {
303 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
304 "status", "clearid", "class", "modtime", "modby", "modwith",
305 "created", "creator",
308 static char *gubm2_fields[] = {
310 "login", "unix_uid", "shell", "last", "first", "middle", "status",
311 "clearid", "class", "modtime", "modby", "modwith",
314 static char *gubm_fields[] = {
316 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
317 "middle", "status", "clearid", "class", "modtime", "modby", "modwith",
318 "created", "creator",
321 static char *auac2_fields[] = {
322 "login", "unix_uid", "shell", "last", "first", "middle", "status",
323 "clearid", "class", "comments", "signature", "secure",
326 static char *auac_fields[] = {
327 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
328 "middle", "status", "clearid", "class", "comments", "signature", "secure",
331 static struct valobj auac2_valobj[] = {
332 {V_CHAR, 0, USERS_TABLE, "login"},
334 {V_CHAR, 2, USERS_TABLE, "shell"},
335 {V_CHAR, 3, USERS_TABLE, "last"},
336 {V_CHAR, 4, USERS_TABLE, "first"},
337 {V_CHAR, 5, USERS_TABLE, "middle"},
339 {V_CHAR, 7, USERS_TABLE, "clearid"},
340 {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS},
341 {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
345 static struct valobj auac_valobj[] = {
346 {V_CHAR, 0, USERS_TABLE, "login"},
348 {V_CHAR, 2, USERS_TABLE, "shell"},
349 {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
350 {V_CHAR, 4, USERS_TABLE, "last"},
351 {V_CHAR, 5, USERS_TABLE, "first"},
352 {V_CHAR, 6, USERS_TABLE, "middle"},
354 {V_CHAR, 8, USERS_TABLE, "clearid"},
355 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
356 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
360 static struct validate auac2_validate = {
372 static struct validate auac_validate = {
384 static struct validate ausr2_validate = {
396 static struct validate ausr_validate = {
408 static char *rusr_fields[] = {
409 "unix_uid", "login", "pobox_type"
412 static struct valobj rusr_valobj[] = {
414 {V_CHAR, 1, USERS_TABLE, "login"},
417 static struct validate rusr_validate = {
429 static char *uuac2_fields[] = {
431 "newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
432 "clearid", "class", "comments", "signature", "secure",
435 static char *uuac_fields[] = {
437 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
438 "middle", "status", "clearid", "class", "comments", "signature", "secure",
441 static struct valobj uuac2_valobj[] = {
442 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
443 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
445 {V_CHAR, 3, USERS_TABLE, "shell"},
446 {V_CHAR, 4, USERS_TABLE, "first"},
447 {V_CHAR, 5, USERS_TABLE, "last"},
448 {V_CHAR, 6, USERS_TABLE, "middle"},
450 {V_CHAR, 8, USERS_TABLE, "clearid"},
451 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
452 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
456 static struct valobj uuac_valobj[] = {
457 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
458 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
460 {V_CHAR, 3, USERS_TABLE, "shell"},
461 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
462 {V_CHAR, 5, USERS_TABLE, "first"},
463 {V_CHAR, 6, USERS_TABLE, "last"},
464 {V_CHAR, 7, USERS_TABLE, "middle"},
466 {V_CHAR, 9, USERS_TABLE, "clearid"},
467 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
468 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
472 static struct validate uuac2_validate = {
484 static struct validate uuac_validate = {
496 static struct validate uusr2_validate = {
508 static struct validate uusr_validate = {
520 static char *uush_fields[] = {
525 static struct valobj uush_valobj[] = {
526 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
527 {V_CHAR, 1, USERS_TABLE, "shell"},
530 static struct validate uush_validate = {
542 static char *uuws_fields[] = {
547 static struct valobj uuws_valobj[] = {
548 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
549 {V_CHAR, 1, USERS_TABLE, "winconsoleshell"},
552 static struct validate uuws_validate = {
564 static char *uust_fields[] = {
569 static char *uuss_fields[] = {
574 static struct valobj uust_valobj[] = {
575 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
580 static struct validate uust_validate = {
592 static char *dusr_fields[] = {
596 static struct validate dusr_validate = {
608 static char *aurv_fields[] = {
609 "login", "reservation",
612 static struct validate aurv_validate = {
624 static char *gurv_fields[] = {
629 static struct validate gurv_validate = {
638 get_user_reservations,
641 static char *gubr_fields[] = {
646 static struct validate gubr_validate = {
655 get_user_by_reservation,
658 static char *gkum_fields[] = { "login", "kerberos",
659 "login", "kerberos" };
661 static char *akum_fields[] = { "login", "kerberos" };
663 static struct valobj akum_valobj[] =
665 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
666 {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
669 static struct validate akum_validate =
674 "users_id = %d or string_id = %d",
682 static struct validate dkum_validate =
687 "users_id = %d and string_id = %d",
695 static char *gfbl_fields[] = {
697 "login", "fullname", "nickname", "home_addr",
698 "home_phone", "office_addr", "office_phone", "department",
699 "affiliation", "modtime", "modby", "modwith",
702 static struct validate gfbl_validate = {
714 static char *ufbl_fields[] = {
716 "fullname", "nickname", "home_addr",
717 "home_phone", "office_addr", "office_phone", "department",
721 static struct valobj ufbl_valobj[] = {
722 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
723 {V_LEN, 1, USERS_TABLE, "fullname"},
724 {V_LEN, 2, USERS_TABLE, "nickname"},
725 {V_LEN, 3, USERS_TABLE, "home_addr"},
726 {V_LEN, 4, USERS_TABLE, "home_phone"},
727 {V_LEN, 5, USERS_TABLE, "office_addr"},
728 {V_LEN, 6, USERS_TABLE, "office_phone"},
729 {V_LEN, 7, USERS_TABLE, "department"},
730 {V_LEN, 8, USERS_TABLE, "affiliation"},
733 static struct validate ufbl_validate = {
745 static char *gpob_fields[] = {
747 "login", "type", "box", "address", "modtime", "modby", "modwith",
750 static struct validate gpob_validate = {
754 "potype != 'NONE' and users_id = %d",
762 static char *gpox_fields[] = {
763 "login", "type", "box",
766 static struct validate gpox_validate = {
778 static char *spob_fields[] = {
779 "login", "type", "box",
782 static struct valobj spob_valobj[] = {
783 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
784 {V_TYPE, 1, 0, "pobox", 0, MR_TYPE},
787 static struct validate spob_validate = /* SET_POBOX */
800 static struct validate spop_validate = /* SET_POBOX_POP */
813 static struct validate dpob_validate = /* DELETE_POBOX */
826 static char *gmac_fields[] = {
828 "name", "type", "modtime", "modby", "modwith",
831 static char *ghst2_fields[] = {
832 "name", "address", "location", "network",
833 "name", "vendor", "model", "os", "location", "contact", "use",
834 "status", "status_change", "network", "address", "ace_type",
835 "ace_name", "admin_comment", "ops_comment", "created", "creator",
836 "inuse", "modtime", "modby", "modwith",
839 static char *ghbh2_fields[] = {
841 "name", "vendor", "model", "os", "location", "contact", "use",
842 "status", "status_change", "network", "address", "ace_type",
843 "ace_name", "admin_comment", "ops_comment", "created", "creator",
844 "inuse", "modtime", "modby", "modwith",
847 static char *ghst6_fields[] = {
848 "name", "address", "location", "network",
849 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
850 "use", "status", "status_change", "network", "address", "ace_type",
851 "ace_name", "admin_comment", "ops_comment", "created", "creator",
852 "inuse", "modtime", "modby", "modwith",
855 static char *ghbh6_fields[] = {
857 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
858 "use", "status", "status_change", "network", "address", "ace_type",
859 "ace_name", "admin_comment", "ops_comment", "created", "creator",
860 "inuse", "modtime", "modby", "modwith",
863 static char *ghst_fields[] = {
864 "name", "address", "location", "network",
865 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
866 "account_number", "use", "status", "status_change", "network", "address",
867 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
868 "inuse", "modtime", "modby", "modwith",
871 static char *ghbh_fields[] = {
873 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
874 "account_number", "use", "status", "status_change", "network", "address",
875 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
876 "inuse", "modtime", "modby", "modwith",
879 static char *ghba_fields[] = {
881 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
882 "account_number", "use", "status", "status_change", "network", "address",
883 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
884 "inuse", "modtime", "modby", "modwith",
887 static struct validate ghst_validate = {
899 static char *ghha_fields[] = {
904 static char *ahst2_fields[] = {
905 "name", "vendor", "model", "os", "location", "contact", "use",
906 "status", "subnet", "address", "ace_type", "ace_name",
907 "admin_comment", "ops_comment",
910 static struct valobj ahst2_valobj[] = {
911 {V_CHAR, 0, MACHINE_TABLE, "name"},
912 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
913 {V_CHAR, 2, MACHINE_TABLE, "model"},
914 {V_CHAR, 3, MACHINE_TABLE, "os"},
915 {V_CHAR, 4, MACHINE_TABLE, "location"},
916 {V_CHAR, 5, MACHINE_TABLE, "contact"},
919 {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
920 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
921 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
922 {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
923 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
926 static struct validate ahst2_validate = {
930 "name = UPPER('%s')",
935 set_uppercase_modtime,
938 static char *ahst6_fields[] = {
939 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
940 "use", "status", "subnet", "address", "ace_type", "ace_name",
941 "admin_comment", "ops_comment",
944 static struct valobj ahst6_valobj[] = {
945 {V_CHAR, 0, MACHINE_TABLE, "name"},
946 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
947 {V_CHAR, 2, MACHINE_TABLE, "model"},
948 {V_CHAR, 3, MACHINE_TABLE, "os"},
949 {V_CHAR, 4, MACHINE_TABLE, "location"},
950 {V_CHAR, 5, MACHINE_TABLE, "contact"},
951 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
954 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
955 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
956 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
957 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
958 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
961 static struct validate ahst6_validate = {
965 "name = UPPER('%s')",
970 set_uppercase_modtime,
973 static char *ahst_fields[] = {
974 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
975 "account_number", "use", "status", "subnet", "address", "ace_type",
976 "ace_name", "admin_comment", "ops_comment",
979 static struct valobj ahst_valobj[] = {
980 {V_CHAR, 0, MACHINE_TABLE, "name"},
981 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
982 {V_CHAR, 2, MACHINE_TABLE, "model"},
983 {V_CHAR, 3, MACHINE_TABLE, "os"},
984 {V_CHAR, 4, MACHINE_TABLE, "location"},
985 {V_CHAR, 5, MACHINE_TABLE, "contact"},
986 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
987 {V_CHAR, 7, MACHINE_TABLE, "account_number"},
990 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
991 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
992 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
993 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
994 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
997 static struct validate ahst_validate = {
1001 "name = UPPER('%s')",
1006 set_uppercase_modtime,
1009 static char *uhst2_fields[] = {
1011 "newname", "vendor", "model", "os", "location", "contact", "use",
1012 "status", "subnet", "address", "ace_type", "ace_name",
1013 "admin_comment", "ops_comment",
1016 static struct valobj uhst2_valobj[] = {
1017 {V_CHAR, 0, MACHINE_TABLE, "name"},
1018 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1019 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1020 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1021 {V_CHAR, 3, MACHINE_TABLE, "model"},
1022 {V_CHAR, 4, MACHINE_TABLE, "os"},
1023 {V_CHAR, 5, MACHINE_TABLE, "location"},
1024 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1027 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1028 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1029 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1030 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1031 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1034 static struct validate uhst2_validate = {
1046 static char *uhst6_fields[] = {
1048 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1049 "use", "status", "subnet", "address", "ace_type", "ace_name",
1050 "admin_comment", "ops_comment",
1053 static struct valobj uhst6_valobj[] = {
1054 {V_CHAR, 0, MACHINE_TABLE, "name"},
1055 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1056 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1057 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1058 {V_CHAR, 3, MACHINE_TABLE, "model"},
1059 {V_CHAR, 4, MACHINE_TABLE, "os"},
1060 {V_CHAR, 5, MACHINE_TABLE, "location"},
1061 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1062 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1065 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1066 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1067 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
1068 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1069 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1072 static struct validate uhst6_validate = {
1084 static char *uhst_fields[] = {
1086 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1087 "account_number", "use", "status", "subnet", "address", "ace_type",
1088 "ace_name", "admin_comment", "ops_comment",
1091 static struct valobj uhst_valobj[] = {
1092 {V_CHAR, 0, MACHINE_TABLE, "name"},
1093 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1094 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1095 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1096 {V_CHAR, 3, MACHINE_TABLE, "model"},
1097 {V_CHAR, 4, MACHINE_TABLE, "os"},
1098 {V_CHAR, 5, MACHINE_TABLE, "location"},
1099 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1100 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1101 {V_CHAR, 8, MACHINE_TABLE, "account_number"},
1104 {V_ID, 11, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1105 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
1106 {V_TYPEDATA, 14, 0, 0, 0, MR_ACE},
1107 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1108 {V_ID, 16, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1111 static struct validate uhst_validate = {
1123 static char *uhha_fields[] = {
1128 static struct valobj uhha_valobj[] = {
1129 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1130 {V_CHAR, 1, MACHINE_TABLE, "hwaddr"},
1133 static struct validate uhha_validate = {
1145 static char *dhst_fields[] = {
1149 static struct validate dhst_validate = {
1161 static char *ghal_fields[] = {
1162 "alias", "canonical_hostname",
1163 "alias", "canonical_hostname"
1166 static struct validate ghal_validate = {
1178 static struct valobj ahal_valobj[] = {
1179 {V_CHAR, 0, HOSTALIAS_TABLE, "name"},
1180 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1183 static struct validate ahal_validate = {
1187 "name = UPPER('%s')",
1195 static struct valobj dhal_valobj[] = {
1196 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1199 static struct validate dhal_validate = {
1203 "name = UPPER('%s') AND mach_id = %d",
1211 static char *gsnt2_fields[] = {
1213 "name", "description", "address", "mask", "low", "high", "prefix",
1214 "ace_type", "ace_name", "modtime", "modby", "modwith"
1217 static char *gsnt_fields[] = {
1219 "name", "description", "status", "contact", "account_number", "address",
1220 "mask", "low", "high", "prefix", "ace_type", "ace_name", "modtime",
1224 static struct validate gsnt_validate = {
1236 static char *asnt2_fields[] = {
1237 "name", "description", "address", "mask", "low", "high", "prefix",
1238 "ace_type", "ace_name",
1241 static struct valobj asnt2_valobj[] = {
1242 {V_CHAR, 0, SUBNET_TABLE, "name"},
1243 {V_LEN, 1, SUBNET_TABLE, "description"},
1248 {V_LEN, 6, SUBNET_TABLE, "prefix"},
1249 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1250 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
1253 static struct validate asnt2_validate =
1258 "name = UPPER('%s')",
1263 set_uppercase_modtime,
1266 static char *asnt_fields[] = {
1267 "name", "description", "status", "contact", "account_number", "address",
1268 "mask", "low", "high", "prefix", "ace_type", "ace_name",
1271 static struct valobj asnt_valobj[] = {
1272 {V_CHAR, 0, SUBNET_TABLE, "name"},
1273 {V_LEN, 1, SUBNET_TABLE, "description"},
1275 {V_CHAR, 3, SUBNET_TABLE, "contact"},
1276 {V_CHAR, 4, SUBNET_TABLE, "account_number"},
1281 {V_LEN, 9, SUBNET_TABLE, "prefix"},
1282 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1283 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
1286 static struct validate asnt_validate =
1291 "name = UPPER('%s')",
1296 set_uppercase_modtime,
1299 static char *usnt2_fields[] = {
1301 "newname", "description", "address", "mask", "low", "high", "prefix",
1302 "ace_type", "ace_name",
1305 static struct valobj usnt2_valobj[] = {
1306 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1307 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1308 {V_LEN, 2, SUBNET_TABLE, "description"},
1313 {V_LEN, 7, SUBNET_TABLE, "prefix"},
1314 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1315 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
1318 static struct validate usnt2_validate =
1331 static char *usnt_fields[] = {
1333 "newname", "description", "status", "contact", "account_number", "address",
1334 "mask", "low", "high", "prefix", "ace_type", "ace_name",
1337 static struct valobj usnt_valobj[] = {
1338 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1339 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1340 {V_LEN, 2, SUBNET_TABLE, "description"},
1342 {V_CHAR, 4, SUBNET_TABLE, "contact"},
1343 {V_CHAR, 5, SUBNET_TABLE, "account_number"},
1348 {V_LEN, 10, SUBNET_TABLE, "prefix"},
1349 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1350 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1353 static struct validate usnt_validate =
1366 static char *dsnt_fields[] = {
1370 static struct validate dsnt_validate = {
1382 static char *gclu_fields[] = {
1384 "name", "description", "location", "modtime", "modby", "modwith",
1387 static char *aclu_fields[] = {
1388 "name", "description", "location",
1391 static struct valobj aclu_valobj[] = {
1392 {V_CHAR, 0, CLUSTERS_TABLE, "name"},
1393 {V_LEN, 1, CLUSTERS_TABLE, "description"},
1394 {V_LEN, 2, CLUSTERS_TABLE, "location"},
1397 static struct validate aclu_validate =
1410 static char *uclu_fields[] = {
1412 "newname", "description", "location",
1415 static struct valobj uclu_valobj[] = {
1416 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1417 {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE},
1418 {V_LEN, 2, CLUSTERS_TABLE, "description"},
1419 {V_LEN, 3, CLUSTERS_TABLE, "location"},
1422 static struct validate uclu_validate = {
1434 static char *dclu_fields[] = {
1438 static struct validate dclu_validate = {
1450 static char *gmcm_fields[] = {
1451 "machine", "cluster",
1452 "machine", "cluster",
1455 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
1456 { /* DELETE_MACHINE_FROM_CLUSTER */
1457 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1458 {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1461 static struct validate amtc_validate = /* for amtc and dmfc */
1466 "mach_id = %d and clu_id = %d",
1471 set_mach_modtime_by_id,
1474 static char *gcld_fields[] = {
1475 "cluster", "serv_label",
1476 "cluster", "serv_label", "serv_cluster",
1479 static char *acld_fields[] = {
1480 "cluster", "serv_label", "serv_cluster",
1483 static struct valobj acld_valobj[] =
1485 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1486 {V_CHAR, 1, SVC_TABLE, "serv_label"},
1487 {V_CHAR, 2, SVC_TABLE, "serv_cluster"}
1490 static struct validate acld_validate =
1495 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1500 set_cluster_modtime_by_id,
1503 static struct validate dcld_validate =
1508 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1513 set_cluster_modtime_by_id,
1516 static char *glin2_fields[] = {
1518 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1519 "ace_type", "ace_name", "description", "modtime", "modby", "modwith",
1522 static char *glin3_fields[] = {
1524 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1525 "nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby",
1529 static char *glin_fields[] = {
1531 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1532 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1533 "description", "modtime", "modby", "modwith",
1536 static struct validate glin_validate = {
1543 access_vis_list_by_name,
1548 static char *alis2_fields[] = {
1549 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1550 "ace_type", "ace_name", "description",
1553 static struct valobj alis2_valobj[] = {
1554 {V_CHAR, 0, LIST_TABLE, "name"},
1561 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1562 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1563 {V_LEN, 9, LIST_TABLE, "description"},
1566 static struct validate alis2_validate = {
1578 static char *alis3_fields[] = {
1579 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1580 "nfsgroup", "ace_type", "ace_name", "description",
1583 static struct valobj alis3_valobj[] = {
1584 {V_CHAR, 0, LIST_TABLE, "name"},
1592 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1593 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1594 {V_LEN, 10, LIST_TABLE, "description"},
1597 static struct validate alis3_validate = {
1609 static char *alis_fields[] = {
1610 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1611 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1615 static struct valobj alis_valobj[] = {
1616 {V_CHAR, 0, LIST_TABLE, "name"},
1624 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1625 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1626 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1627 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1628 {V_LEN, 12, LIST_TABLE, "description"},
1631 static struct validate alis_validate = {
1643 static char *ulis2_fields[] = {
1645 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1646 "ace_type", "ace_name", "description",
1649 static struct valobj ulis2_valobj[] = {
1650 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1651 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1658 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1659 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1660 {V_LEN, 10, LIST_TABLE, "description"},
1663 static struct validate ulis2_validate = {
1675 static char *ulis3_fields[] = {
1677 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1678 "nfsgroup", "ace_type", "ace_name", "description",
1681 static struct valobj ulis3_valobj[] = {
1682 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1683 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1691 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1692 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1693 {V_LEN, 11, LIST_TABLE, "description"},
1696 static struct validate ulis3_validate = {
1708 static char *ulis_fields[] = {
1710 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1711 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1715 static struct valobj ulis_valobj[] = {
1716 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1717 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1725 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1726 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1727 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1728 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
1729 {V_LEN, 13, LIST_TABLE, "description"},
1732 static struct validate ulis_validate = {
1744 static char *dlis_fields[] = {
1748 static struct validate dlis_validate = {
1760 static char *amtl_fields[] = {
1761 "list_name", "member_type", "member_name",
1764 static char *atml_fields[] = {
1765 "list_name", "member_type", "member_name", "tag",
1768 static struct valobj amtl_valobj[] = {
1769 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1770 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
1771 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
1772 {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1775 static struct validate amtl_validate =
1788 static struct validate atml_validate =
1801 static struct validate tmol_validate =
1814 static struct validate dmfl_validate =
1824 delete_member_from_list,
1827 static char *gaus_fields[] = {
1828 "ace_type", "ace_name",
1829 "use_type", "use_name",
1832 static struct valobj gaus_valobj[] = {
1833 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1834 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1837 static struct validate gaus_validate = {
1849 static char *ghbo_fields[] = {
1850 "ace_type", "ace_name",
1854 static struct valobj ghbo_valobj[] = {
1855 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1856 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1859 static struct validate ghbo_validate = {
1871 static char *qgli_fields[] = {
1872 "active", "publicflg", "hidden", "maillist", "grouplist",
1876 static struct valobj qgli_valobj[] = {
1877 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1878 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1879 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1880 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1881 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1884 static struct validate qgli_validate = {
1893 qualified_get_lists,
1896 static char *gmol_fields[] = {
1898 "member_type", "member_name",
1901 static char *gtml_fields[] = {
1903 "member_type", "member_name", "tag",
1906 static struct validate gmol_validate = {
1913 access_visible_list,
1915 get_members_of_list,
1918 static char *glom_fields[] = {
1919 "member_type", "member_name",
1920 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
1923 static struct valobj glom_valobj[] = {
1924 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
1925 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1928 static struct validate glom_validate = {
1937 get_lists_of_member,
1940 static char *cmol_fields[] = {
1945 static struct validate cmol_validate = {
1952 access_visible_list,
1954 count_members_of_list,
1957 static char *gsin_fields[] = {
1959 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
1960 "type", "enable", "inprogress", "harderror", "errmsg",
1961 "ace_type", "ace_name", "modtime", "modby", "modwith",
1964 static struct validate gsin_validate =
1977 static char *qgsv_fields[] = {
1978 "enable", "inprogress", "harderror",
1982 static struct valobj qgsv_valobj[] = {
1983 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1984 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1985 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1988 static struct validate qgsv_validate = {
1997 qualified_get_server,
2000 static char *asin_fields[] = {
2001 "service", "update_int", "target_file", "script", "type", "enable",
2002 "ace_type", "ace_name",
2005 static struct valobj asin_valobj[] = {
2006 {V_CHAR, 0, SERVERS_TABLE, "name"},
2008 {V_LEN, 2, SERVERS_TABLE, "target_file"},
2009 {V_LEN, 3, SERVERS_TABLE, "script"},
2010 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
2012 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
2013 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
2016 static struct validate asin_validate = /* for asin, usin */
2021 "name = UPPER('%s')",
2026 set_uppercase_modtime,
2029 static struct validate rsve_validate = {
2033 "name = UPPER('%s')",
2038 set_uppercase_modtime,
2041 static char *ssif_fields[] = {
2042 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
2045 static struct valobj ssif_valobj[] = {
2046 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2051 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
2054 static struct validate ssif_validate = {
2058 "name = UPPER('%s')",
2066 static char *dsin_fields[] = {
2070 static struct validate dsin_validate = {
2074 "name = UPPER('%s')",
2082 static char *gshi_fields[] = {
2083 "service", "machine",
2084 "service", "machine", "enable", "override", "success", "inprogress",
2085 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
2086 "value3", "modtime", "modby", "modwith",
2089 static struct validate gshi_validate = {
2101 static char *qgsh_fields[] = {
2102 "service", "enable", "override", "success", "inprogress", "hosterror",
2103 "service", "machine",
2106 static struct valobj qgsh_valobj[] = {
2107 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2108 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2109 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2110 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2111 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
2114 static struct validate qgsh_validate = {
2123 qualified_get_serverhost,
2126 static char *ashi_fields[] = {
2127 "service", "machine", "enable", "value1", "value2", "value3",
2130 static struct valobj ashi_valobj[] = {
2131 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2132 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2136 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
2139 static struct validate ashi_validate = /* ashi & ushi */
2144 "service = UPPER('%s') AND mach_id = %d",
2149 set_serverhost_modtime,
2152 static struct validate rshe_validate =
2157 "service = UPPER('%s') AND mach_id = %d",
2162 set_serverhost_modtime,
2165 static struct validate ssho_validate =
2170 "service = UPPER('%s') AND mach_id = %d",
2178 static char *sshi_fields[] = {
2179 "service", "machine", "override", "success", "inprogress",
2180 "hosterror", "errmsg", "ltt", "lts",
2183 static struct valobj sshi_valobj[] = {
2184 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2185 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2190 {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"},
2195 static struct validate sshi_validate =
2208 static char *dshi_fields[] = {
2209 "service", "machine",
2212 static struct validate dshi_validate =
2217 "service = UPPER('%s') AND mach_id = %d",
2225 static char *gslo_fields[] = {
2227 "server", "machine",
2230 static char *gfsl_fields[] = {
2232 "label", "type", "machine", "name", "mount", "access", "comments",
2233 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2236 static struct validate gfsl_validate = {
2248 static char *gfsm_fields[] = {
2250 "label", "type", "machine", "name", "mount", "access", "comments",
2251 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2254 static struct validate gfsm_validate = {
2266 static char *gfsn_fields[] = {
2267 "machine", "partition",
2268 "label", "type", "machine", "name", "mount", "access", "comments",
2269 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2272 static struct validate gfsn_validate = {
2284 static char *gfsp_fields[] = {
2286 "label", "type", "machine", "name", "mount", "access", "comments",
2287 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2290 static char *gfsg_fields[] = {
2292 "label", "type", "machine", "name", "mount", "access", "comments",
2293 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2296 static struct validate gfsg_validate = {
2308 static char *afil_fields[] = {
2309 "label", "type", "machine", "name", "mount", "access", "comments",
2310 "owner", "owners", "create", "lockertype",
2313 static struct valobj afil_valobj[] = {
2314 {V_CHAR, 0, FILESYS_TABLE, "label"},
2315 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
2316 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2317 {V_CHAR, 3, FILESYS_TABLE, "name"},
2318 {V_LEN, 4, FILESYS_TABLE, "mount"},
2319 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
2320 {V_LEN, 6, FILESYS_TABLE, "comments"},
2321 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
2322 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
2324 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
2327 static struct validate afil_validate = {
2336 set_filesys_modtime,
2339 static char *ufil_fields[] = {
2340 "label", "newlabel", "type", "machine", "name", "mount", "access",
2341 "comments", "owner", "owners", "create", "lockertype",
2344 static struct valobj ufil_valobj[] = {
2345 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2346 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
2347 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
2348 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2349 {V_CHAR, 4, FILESYS_TABLE, "name"},
2350 {V_LEN, 5, FILESYS_TABLE, "mount"},
2351 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
2352 {V_LEN, 7, FILESYS_TABLE, "comments"},
2353 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
2354 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
2356 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
2359 static struct validate ufil_validate = {
2368 set_filesys_modtime,
2371 static char *dfil_fields[] = {
2375 static struct validate dfil_validate = {
2387 static char *gfgm_fields[] = {
2388 "fsgroup", "filesys", "sortkey"
2391 static struct validate gfgm_validate = {
2403 static struct valobj aftg_valobj[] = {
2404 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2405 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2408 static struct validate aftg_validate = {
2412 "group_id = %d and filsys_id = %d",
2420 static char *ganf_fields[] = {
2421 "machine", "dir", "device", "status", "allocated", "size",
2422 "modtime", "modby", "modwith",
2425 static char *gnfp_fields[] = {
2427 "machine", "dir", "device", "status", "allocated", "size",
2428 "modtime", "modby", "modwith",
2431 static struct validate gnfp_validate = {
2443 static struct valobj anfp_valobj[] = {
2444 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2445 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2446 {V_LEN, 2, NFSPHYS_TABLE, "device"},
2452 static struct validate anfp_validate = {
2456 "mach_id = %d and dir = '%s'",
2461 set_nfsphys_modtime,
2464 static struct validate unfp_validate = {
2468 "mach_id = %d and dir = '%s'",
2473 set_nfsphys_modtime,
2476 static char *ajnf_fields[] = {
2477 "machine", "dir", "adjustment",
2480 static struct valobj ajnf_valobj[] = {
2481 {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE},
2482 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2486 static struct validate ajnf_validate = {
2490 "mach_id = %d and dir = '%s'",
2495 set_nfsphys_modtime,
2498 static char *dnfp_fields[] = {
2502 static struct validate dnfp_validate = {
2506 "mach_id = %d and dir = '%s'",
2511 set_nfsphys_modtime,
2514 static char *gqot_fields[] = {
2515 "filesys", "type", "name",
2516 "filesys", "type", "name", "quota", "dir", "machine",
2517 "modtime", "modby", "modwith",
2520 static struct valobj gqot_valobj[] = {
2521 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2522 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2525 static struct validate gqot_validate = {
2537 static char *gqbf_fields[] = {
2539 "filesys", "type", "name", "quota", "dir", "machine",
2540 "modtime", "modby", "modwith",
2543 static struct validate gqbf_validate = {
2555 static char *aqot_fields[] = {
2556 "filesys", "type", "name", "quota",
2559 static struct valobj aqot_valobj[] = {
2560 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2561 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2562 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2566 static struct validate aqot_validate = {
2570 "filsys_id = %d and type = '%s' and entity_id = %d",
2578 static struct validate uqot_validate = {
2582 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2590 static struct validate dqot_validate = {
2594 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2602 static char *gnfq_fields[] = {
2604 "filesys", "login", "quota", "dir", "machine",
2605 "modtime", "modby", "modwith",
2608 static struct validate gnfq_validate = {
2620 static char *gnqp_fields[] = {
2622 "filesys", "login", "quota", "dir", "machine",
2623 "modtime", "modby", "modwith",
2626 static char *anfq_fields[] = {
2627 "filesys", "login", "quota",
2630 static struct valobj anfq_valobj[] = {
2631 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2632 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
2636 static struct validate anfq_validate = {
2640 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2648 static struct validate unfq_validate = {
2652 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2660 static struct validate dnfq_validate = {
2664 "filsys_id = %d AND entity_id = %d",
2672 static char *gzcl2_fields[] = {
2674 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2675 "iws_type", "iws_name", "iui_type", "iui_name",
2676 "modtime", "modby", "modwith",
2679 static char *gzcl_fields[] = {
2681 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2682 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2683 "owner_id", "modtime", "modby", "modwith",
2686 static struct validate gzcl_validate = {
2698 static char *azcl2_fields[] = {
2699 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2700 "iws_type", "iws_name", "iui_type", "iui_name",
2703 static struct valobj azcl2_valobj[] = {
2704 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2705 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2706 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2707 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2708 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2709 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2710 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2711 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2712 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2715 static struct validate azcl2_validate = {
2727 static char *azcl_fields[] = {
2728 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2729 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2733 static struct valobj azcl_valobj[] = {
2734 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2735 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2736 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2737 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2738 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2739 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2740 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2741 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2742 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2743 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2744 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2747 static struct validate azcl_validate = {
2759 static char *uzcl2_fields[] = {
2760 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2761 "iws_type", "iws_name", "iui_type", "iui_name",
2764 static struct valobj uzcl2_valobj[] = {
2765 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2766 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2767 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2768 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2769 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2770 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2771 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2772 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2773 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2774 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2777 static struct validate uzcl2_validate = {
2789 static char *uzcl_fields[] = {
2790 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2791 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id",
2794 static struct valobj uzcl_valobj[] = {
2795 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2796 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2797 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2798 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2799 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2800 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2801 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2802 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2803 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2804 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2805 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
2806 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
2809 static struct validate uzcl_validate = {
2821 static struct validate dzcl_validate = {
2833 static char *gsha_fields[] = {
2835 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
2838 static struct validate gsha_validate =
2851 static char *asha_fields[] = {
2852 "machine", "ace_type", "ace_name",
2855 static struct valobj asha_valobj[] = {
2856 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2857 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
2858 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2861 static struct validate asha_validate =
2874 static char *gacl_fields[] = {
2875 "machine", "target",
2876 "machine", "target", "kind", "list",
2879 static char *aacl_fields[] = {
2880 "machine", "target", "kind", "list",
2883 static char *dacl_fields[] = {
2884 "machine", "target",
2887 static struct valobj aacl_valobj[] = {
2888 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2889 {V_CHAR, 1, ACL_TABLE, "target"},
2890 {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE},
2891 {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST},
2894 static struct validate gacl_validate =
2907 static struct validate aacl_validate =
2912 "mach_id = %d AND target = '%s'",
2920 static char *gsvc_fields[] = {
2921 "service", "protocol",
2922 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
2925 static char *asvc_fields[] = {
2926 "service", "protocol", "port", "description",
2929 static char *dsvc_fields[] = {
2930 "service", "protocol",
2933 static struct valobj asvc_valobj[] = {
2934 {V_CHAR, 0, SERVICES_TABLE, "name"},
2935 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
2937 {V_CHAR, 3, SERVICES_TABLE, "description"},
2940 static struct validate asvc_validate = {
2944 "name = '%s' AND protocol = '%s'",
2949 set_service_modtime,
2952 static struct validate dsvc_validate = {
2956 "name = '%s' AND protocol = '%s'",
2964 static char *gprn_fields[] = {
2966 "name", "type", "hwtype", "duplexname", "hostname",
2967 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2968 "banner", "location", "contact", "modtime", "modby", "modwith"
2971 static char *gpbd_fields[] = {
2973 "name", "type", "hwtype", "duplexname", "hostname",
2974 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2975 "banner", "location", "contact", "modtime", "modby", "modwith"
2978 static char *gpbe_fields[] = {
2980 "name", "type", "hwtype", "duplexname", "hostname",
2981 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2982 "banner", "location", "contact", "modtime", "modby", "modwith"
2985 static char *gpbh_fields[] = {
2987 "name", "type", "hwtype", "duplexname", "hostname",
2988 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2989 "banner", "location", "contact", "modtime", "modby", "modwith"
2992 static char *gpbr_fields[] = {
2994 "name", "type", "hwtype", "duplexname", "hostname",
2995 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2996 "banner", "location", "contact", "modtime", "modby", "modwith"
2999 static char *gpbl_fields[] = {
3001 "name", "type", "hwtype", "duplexname", "hostname",
3002 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3003 "banner", "location", "contact", "modtime", "modby", "modwith"
3006 static char *gpbc_fields[] = {
3008 "name", "type", "hwtype", "duplexname", "hostname",
3009 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3010 "banner", "location", "contact", "modtime", "modby", "modwith"
3013 static char *aprn_fields[] = {
3014 "printer", "type", "hwtype", "duplexname", "hostname",
3015 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3016 "banner", "location", "contact",
3019 static struct valobj aprn_valobj[] = {
3020 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3021 {V_TYPE, 1, 0, "printertype", 0, MR_TYPE},
3022 {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE},
3023 {V_CHAR, 3, PRINTERS_TABLE, "duplexname"},
3024 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3025 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3026 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3027 {V_CHAR, 7, PRINTERS_TABLE, "rp"},
3028 {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3031 {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST},
3032 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3034 {V_CHAR, 14, PRINTERS_TABLE, "location"},
3035 {V_CHAR, 15, PRINTERS_TABLE, "contact"},
3038 static struct validate aprn_validate = {
3050 static char *uprn_fields[] = {
3052 "printer", "type", "hwtype", "duplexname", "hostname",
3053 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3054 "banner", "location", "contact",
3057 static struct valobj uprn_valobj[] = {
3058 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3059 {V_CHAR, 1, PRINTERS_TABLE, "name"},
3060 {V_TYPE, 2, 0, "printertype", 0, MR_TYPE},
3061 {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE},
3062 {V_CHAR, 4, PRINTERS_TABLE, "duplexname"},
3063 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3064 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3065 {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3066 {V_CHAR, 8, PRINTERS_TABLE, "rp"},
3067 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3070 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3071 {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST},
3073 {V_CHAR, 15, PRINTERS_TABLE, "location"},
3074 {V_CHAR, 16, PRINTERS_TABLE, "contact"},
3077 static struct validate uprn_validate = {
3089 static struct validate dprn_validate = {
3101 static char *gpsv_fields[] = {
3103 "host", "kind", "printer_types", "owner_type", "owner_name",
3104 "lpc_acl", "modtime", "modby", "modwith"
3107 static struct valobj gpsv_valobj[] = {
3108 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3111 static struct validate gpsv_validate = {
3123 static char *apsv_fields[] = {
3124 "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl"
3127 static struct valobj apsv_valobj[] = {
3128 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3129 {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE},
3130 {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING},
3131 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
3132 {V_TYPEDATA, 4, 0, 0, 0, MR_ACE},
3133 {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST},
3136 static struct validate apsv_validate = {
3148 static char *dpsv_fields[] = {
3152 static struct validate dpsv_validate = {
3164 static char *gali_fields[] = {
3165 "name", "type", "trans",
3166 "name", "type", "trans",
3169 static char *aali_fields[] = {
3170 "name", "type", "trans",
3173 static struct valobj aali_valobj[] = {
3174 {V_CHAR, 0, ALIAS_TABLE, "name"},
3175 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
3176 {V_CHAR, 2, ALIAS_TABLE, "trans"},
3179 static struct validate aali_validate = {
3183 "name = '%s' and type = '%s' and trans = '%s'",
3191 static struct validate dali_validate = /* DELETE_ALIAS */
3196 "name = '%s' and type = '%s' and trans = '%s'",
3204 static char *gval_fields[] = {
3208 static struct valobj gval_valobj[] = {
3209 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
3212 static struct validate gval_validate = {
3224 static char *aval_fields[] = {
3228 static struct valobj aval_valobj[] = {
3229 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
3233 static struct validate aval_validate = /* for aval, uval, and dval */
3246 static char *dval_fields[] = {
3250 static char *gats_fields[] = {
3251 "table_name", "appends", "updates", "deletes",
3252 "modtime", "modby", "modwith",
3255 static char *_sdl_fields[] = {
3259 static struct validate _sdl_validate =
3272 static char *gusl_fields[] = {
3273 "login", "domain_sid",
3274 "login", "sid", "created",
3277 static struct validate gusl_validate =
3290 static char *glsn_fields[] = {
3291 "name", "domain_sid",
3292 "name", "sid", "created",
3295 static struct validate glsn_validate =
3308 static char *ausl_fields[] = {
3312 static struct validate ausl_validate =
3317 "users_id = %d AND sid = '%s'",
3325 static char *alsn_fields[] = {
3329 static struct validate alsn_validate =
3334 "list_id = %d AND sid = '%s'",
3342 static char *gdds_fields[] = {
3346 static char *gcon7_fields[] = {
3348 "name", "description", "location", "contact",
3349 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3352 static struct validate gcon_validate = {
3364 static char *gcon_fields[] = {
3366 "name", "publicflg", "description", "location", "contact",
3367 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3370 static char *acon7_fields[] = {
3371 "name", "description", "location", "contact",
3372 "ace_type", "ace_name", "memace_type", "memace_name",
3375 static struct valobj acon7_valobj[] = {
3376 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3377 {V_LEN, 1, CONTAINERS_TABLE, "description"},
3378 {V_CHAR, 2, CONTAINERS_TABLE, "location"},
3379 {V_CHAR, 3, CONTAINERS_TABLE, "contact"},
3380 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
3381 {V_TYPEDATA, 5, 0, 0, 0, MR_ACE},
3382 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3383 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3386 static struct validate acon7_validate =
3399 static char *acon_fields[] = {
3400 "name", "publicflg", "description", "location", "contact",
3401 "ace_type", "ace_name", "memace_type", "memace_name",
3404 static struct valobj acon_valobj[] = {
3405 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3407 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3408 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3409 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3410 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3411 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3412 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3413 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3416 static struct validate acon_validate =
3429 static char *ucon7_fields[] = {
3431 "newname", "description", "location", "contact",
3432 "ace_type", "ace_name", "memace_type", "memace_name",
3435 static struct valobj ucon7_valobj[] = {
3436 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3437 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3438 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3439 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3440 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3441 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3442 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3443 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3444 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3447 static struct validate ucon7_validate =
3460 static char *ucon_fields[] = {
3462 "newname", "publicflg", "description", "location", "contact",
3463 "ace_type", "ace_name", "memace_type", "memace_name",
3466 static struct valobj ucon_valobj[] = {
3467 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3468 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3470 {V_LEN, 3, CONTAINERS_TABLE, "description"},
3471 {V_CHAR, 4, CONTAINERS_TABLE, "location"},
3472 {V_CHAR, 5, CONTAINERS_TABLE, "contact"},
3473 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3474 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3475 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
3476 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
3479 static struct validate ucon_validate =
3492 static char *dcon_fields[] = {
3496 static struct validate dcon_validate =
3509 static char *amcn_fields[] = {
3510 "machine", "container",
3513 static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */
3514 { /* DELETE_MACHINE_FROM_CONTAINER */
3515 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3516 {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3519 static struct validate amcn_validate = /* for amtn and dmfn */
3529 set_mach_modtime_by_id,
3532 static struct validate dmcn_validate = /* for amtn and dmfn */
3537 "mach_id = %d and cnt_id = %d",
3542 set_mach_modtime_by_id,
3545 static char *gmnm_fields[] = {
3547 "machine", "container",
3550 static char *gmoc_fields[] = {
3557 static struct validate gmoc_validate =
3567 get_machines_of_container,
3570 static char *gsoc_fields[] = {
3576 static struct validate gsoc_validate =
3586 get_subcontainers_of_container,
3589 static char *gtlc_fields[] = {
3593 static char *scli_fields[] = {
3598 static struct valobj scli_valobj[] = {
3599 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3600 {V_ID, 1, LIST_TABLE, "name", "list_id", MR_LIST},
3603 static struct validate scli_validate = {
3615 static char *gcli_fields[] = {
3617 "containername", "listname",
3620 /* Generalized Query Definitions */
3622 /* Multiple versions of the same query MUST be listed in ascending
3626 /* Note: For any query which uses prefetch_value, the vcnt should be
3627 * one less than the number of %-format specifiers in the tlist.
3630 struct query Queries[] = {
3632 /* Q_GALO - GET_ALL_LOGINS, v2 */
3639 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3649 /* Q_GALO - GET_ALL_LOGINS, v3 */
3656 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3666 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */
3667 "get_all_active_logins",
3673 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3683 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */
3684 "get_all_active_logins",
3690 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3700 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */
3701 "get_user_account_by_login",
3707 "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",
3710 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3717 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */
3718 "get_user_account_by_login",
3724 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
3727 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3734 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */
3735 "get_user_account_by_uid",
3741 "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",
3744 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3751 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */
3752 "get_user_account_by_uid",
3758 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
3761 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3768 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */
3769 "get_user_account_by_name",
3775 "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",
3778 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
3785 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */
3786 "get_user_account_by_name",
3792 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
3795 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
3802 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */
3803 "get_user_account_by_class",
3809 "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",
3812 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
3819 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */
3820 "get_user_account_by_class",
3826 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
3829 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
3836 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */
3837 "get_user_account_by_id",
3843 "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",
3846 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3853 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */
3854 "get_user_account_by_id",
3860 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
3863 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3870 /* Q_GUBL - GET_USER_BY_LOGIN, v2 */
3871 "get_user_by_login",
3877 "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",
3880 "u.login LIKE '%s' AND u.users_id != 0",
3887 /* Q_GUBL - GET_USER_BY_LOGIN, v3 */
3888 "get_user_by_login",
3894 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u",
3897 "u.login LIKE '%s' AND u.users_id != 0",
3904 /* Q_GUBU - GET_USER_BY_UID, v2 */
3911 "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",
3914 "u.unix_uid = %s AND u.users_id != 0",
3921 /* Q_GUBU - GET_USER_BY_UID, v3 */
3928 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u",
3931 "u.unix_uid = %s AND u.users_id != 0",
3938 /* Q_GUBN - GET_USER_BY_NAME, v2 */
3945 "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",
3948 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
3955 /* Q_GUBN - GET_USER_BY_NAME, v3 */
3962 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u",
3965 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
3972 /* Q_GUBC - GET_USER_BY_CLASS, v2 */
3973 "get_user_by_class",
3979 "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",
3982 "u.type = UPPER('%s') AND u.users_id != 0",
3989 /* Q_GUBC - GET_USER_BY_CLASS, v3 */
3990 "get_user_by_class",
3996 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS') FROM users u",
3999 "u.type = UPPER('%s') AND u.users_id != 0",
4006 /* Q_GUBM - GET_USER_BY_MITID, v2 */
4007 "get_user_by_mitid",
4013 "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",
4016 "u.clearid LIKE '%s' AND u.users_id != 0",
4023 /* Q_GUBM - GET_USER_BY_MITID, v3 */
4024 "get_user_by_mitid",
4030 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u",
4033 "u.clearid LIKE '%s' AND u.users_id != 0",
4040 /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */
4047 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4048 * but using up one argv element.
4050 "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)",
4060 /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */
4067 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4068 * but using up one argv element.
4070 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s, SYSDATE, %s)",
4080 /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */
4087 "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)",
4097 /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */
4104 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s, SYSDATE, %s)",
4114 /* Q_RUSR - REGISTER_USER */
4131 /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */
4132 "update_user_account",
4138 /* See comment in auac about signature. */
4139 "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",
4149 /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */
4150 "update_user_account",
4156 /* See comment in auac about signature. */
4157 "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",
4167 /* Q_UUSR - UPDATE_USER, v2 */
4174 "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'",
4184 /* Q_UUSR - UPDATE_USER, v3 */
4191 "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'",
4201 /* Q_UUSH - UPDATE_USER_SHELL */
4202 "update_user_shell",
4208 "users SET shell = '%s'",
4218 /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
4219 "update_user_windows_shell",
4225 "users SET winconsoleshell = '%s'",
4235 /* Q_UUST - UPDATE_USER_STATUS */
4236 "update_user_status",
4242 "users SET status = %s",
4252 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
4253 "update_user_security_status",
4259 "users SET secure = %s",
4269 /* Q_DUSR - DELETE_USER */
4286 /* Q_AURV - ADD_USER_RESERVATION */
4287 "add_user_reservation",
4303 /* Q_GURV - GET_USER_RESERVATIONS */
4304 "get_user_reservations",
4320 /* Q_GUBR - GET_USER_BY_RESERVATION */
4321 "get_user_by_reservation",
4337 /* Q_DURV - DELETE_USER_RESERVATION */
4338 "delete_user_reservation",
4354 /* Q_GKUM - GET_KERBEROS_USER_MAP */
4355 "get_kerberos_user_map",
4361 "u.login, str.string FROM krbmap km, users u, strings str",
4364 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
4366 "u.login, str.string",
4371 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
4372 "add_kerberos_user_map",
4378 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
4388 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
4389 "delete_kerberos_user_map",
4398 "users_id = %d AND string_id = %d",
4405 /* Q_GFBL - GET_FINGER_BY_LOGIN */
4406 "get_finger_by_login",
4412 "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",
4422 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
4423 "update_finger_by_login",
4429 "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))",
4439 /* Q_GPOB - GET_POBOX */
4446 "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
4456 /* Q_GAPO - GET_ALL_POBOXES */
4463 "login, potype, pop_id || ':' || box_id FROM users",
4473 /* Q_GPOP - GET_POBOXES_POP */
4480 "login, potype, users_id FROM users",
4490 /* Q_GPOF - GET_POBOXES_SMTP */
4497 "login, potype, users_id FROM users",
4507 /* Q_SPOB - SET_POBOX */
4524 /* Q_SPOP - SET_POBOX_POP */
4541 /* Q_DPOB - DELETE_POBOX */
4548 "users SET potype = 'NONE'",
4558 /* Q_GHST - GET_HOST, v2 */
4565 "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",
4568 "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",
4575 /* Q_GHST - GET_HOST, v6 */
4582 "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",
4585 "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",
4592 /* Q_GHST - GET_HOST, v8 */
4599 "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s",
4602 "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",
4609 /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */
4610 "get_host_by_hwaddr",
4616 "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",
4619 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4626 /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */
4627 "get_host_by_hwaddr",
4633 "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",
4636 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4643 /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */
4644 "get_host_by_hwaddr",
4650 "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s",
4653 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4660 /* Q_GHBA - GET_HOST_BY_ACCOUNT_NUMBER, v8 */
4661 "get_host_by_account_number",
4667 "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s",
4670 "m.account_number LIKE '%s' AND m.mach_id != 0 and s.snet_id = m.snet_id",
4677 /* Q_GHHA - GET_HOST_HWADDR */
4684 "m.hwaddr FROM machine m",
4687 "m.name LIKE UPPER('%s')",
4694 /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */
4701 "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)",
4711 /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */
4718 "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)",
4728 /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */
4735 "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)",
4745 /* Q_UHST - UPDATE_HOST, v2 */
4752 "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",
4762 /* Q_UHST - UPDATE_HOST, v6 */
4769 "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",
4779 /* Q_UHST - UPDATE_HOST, v8 */
4786 "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",
4796 /* Q_UHHA - UPDATE_HOST_HWADDR */
4797 "update_host_hwaddr",
4803 "machine SET hwaddr = NVL('%s', CHR(0))",
4813 /* Q_DHST - DELETE_HOST */
4830 /* Q_GMAC - GET_MACHINE */
4837 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
4840 "name LIKE UPPER('%s') AND mach_id != 0",
4847 /* Q_GHAL - GET_HOSTALIAS */
4854 "a.name, m.name FROM hostalias a, machine m",
4857 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
4864 /* Q_AHAL - ADD_HOSTALIAS */
4871 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)",
4881 /* Q_DHAL - DELETE_HOSTALIAS */
4891 "name = UPPER('%s') AND mach_id = %d",
4898 /* Q_GSNT - GET_SUBNET, v2 */
4905 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
4908 "name LIKE UPPER('%s')",
4915 /* Q_GSNT - GET_SUBNET, v8 */
4922 "name, description, status, contact, account_number, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
4925 "name LIKE UPPER('%s')",
4932 /* Q_ASNT - ADD_SUBNET, v2 */
4939 "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)",
4949 /* Q_ASNT - ADD_SUBNET, v8 */
4956 "INTO subnet (name, description, status, contact, account_number, saddr, mask, low, high, prefix, owner_type, owner_id, snet_id) VALUES (UPPER('%s'), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, %s, %s, NVL('%s', CHR(0)), '%s', %d, %s)",
4966 /* Q_USNT - UPDATE_SUBNET, v2 */
4973 "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",
4983 /* Q_USNT - UPDATE_SUBNET, v8 */
4990 "subnet SET name = UPPER('%s'), description = NVL('%s', CHR(0)), status = %s, contact = NVL('%s', CHR(0)), account_number = NVL('%s', CHR(0)), saddr = %s, mask = %s, low = %s, high = %s, prefix = NVL('%s', CHR(0)), owner_type = '%s', owner_id = %d",
5000 /* Q_DSNT - DELETE_SUBNET */
5017 /* Q_GCLU - GET_CLUSTER */
5024 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
5027 "name LIKE '%s' AND clu_id != 0",
5034 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
5041 "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)",
5051 /* Q_UCLU - UPDATE_CLUSTER */
5058 "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))",
5068 /* Q_DCLU - DELETE_CLUSTER */
5085 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
5086 "get_machine_to_cluster_map",
5092 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
5095 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
5102 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
5103 "add_machine_to_cluster",
5109 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
5119 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
5120 "delete_machine_from_cluster",
5129 "mach_id = %d AND clu_id = %d",
5136 /* Q_GCLD - GET_CLUSTER_DATA */
5143 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
5146 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
5148 "c.name, svc.serv_label",
5153 /* Q_ACLD - ADD_CLUSTER_DATA */
5160 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')",
5170 /* Q_DCLD - DELETE_CLUSTER_DATA */
5171 "delete_cluster_data",
5180 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
5187 /* Q_GLIN - GET_LIST_INFO, v2 */
5194 "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",
5204 /* Q_GLIN - GET_LIST_INFO, v3 */
5211 "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",
5221 /* Q_GLIN - GET_LIST_INFO, v4 */
5228 "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",
5238 /* Q_EXLN - EXPAND_LIST_NAMES */
5239 "expand_list_names",
5248 "name LIKE '%s' AND list_id != 0",
5255 /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */
5262 "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)",
5272 /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */
5279 "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)",
5289 /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */
5296 "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)",
5306 /* Q_ULIS - UPDATE_LIST, v2 */
5313 "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))",
5323 /* Q_ULIS - UPDATE_LIST, v3 */
5330 "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))",
5340 /* Q_ULIS, UPDATE_LIST, v4 */
5347 "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))",
5357 /* Q_DLIS - DELETE_LIST */
5374 /* Q_AMTL - ADD_MEMBER_TO_LIST */
5375 "add_member_to_list",
5391 /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */
5392 "add_tagged_member_to_list",
5408 /* Q_TMOL - TAG_MEMBER_OF_LIST */
5409 "tag_member_of_list",
5425 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
5426 "delete_member_from_list",
5442 /* Q_GAUS - GET_ACE_USE */
5459 /* Q_GHBO - GET_HOST_BY_OWNER */
5460 "get_host_by_owner",
5476 /* Q_QGLI - QUALIFIED_GET_LISTS */
5477 "qualified_get_lists",
5493 /* Q_GMOL - GET_MEMBERS_OF_LIST */
5494 "get_members_of_list",
5510 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
5511 "get_end_members_of_list",
5527 /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */
5528 "get_tagged_members_of_list",
5544 /* Q_GLOM - GET_LISTS_OF_MEMBER */
5545 "get_lists_of_member",
5561 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
5562 "count_members_of_list",
5578 /* Q_GSIN - GET_SERVER_INFO */
5585 "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",
5588 "name LIKE UPPER('%s')",
5595 /* Q_QGSV - QUALIFIED_GET_SERVER */
5596 "qualified_get_server",
5612 /* Q_ASIN - ADD_SERVER_INFO */
5619 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)",
5629 /* Q_USIN - UPDATE_SERVER_INFO */
5630 "update_server_info",
5636 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
5639 "name = UPPER('%s')",
5646 /* Q_RSVE - RESET_SERVER_ERROR */
5647 "reset_server_error",
5653 "servers SET harderror = 0, dfcheck = dfgen",
5656 "name = UPPER('%s')",
5663 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
5664 "set_server_internal_flags",
5670 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))",
5673 "name = UPPER('%s')",
5680 /* Q_DSIN - DELETE_SERVER_INFO */
5681 "delete_server_info",
5690 "name = UPPER('%s')",
5697 /* Q_GSHI - GET_SERVER_HOST_INFO */
5698 "get_server_host_info",
5704 "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",
5707 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
5709 "sh.service, m.name",
5714 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
5715 "qualified_get_server_host",
5731 /* Q_ASHI - ADD_SERVER_HOST_INFO */
5732 "add_server_host_info",
5738 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))",
5748 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
5749 "update_server_host_info",
5755 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))",
5758 "service = UPPER('%s') AND mach_id = %d",
5765 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
5766 "reset_server_host_error",
5772 "serverhosts SET hosterror = 0",
5775 "service = UPPER('%s') AND mach_id = %d",
5782 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
5783 "set_server_host_override",
5789 "serverhosts SET override = 1",
5792 "service = UPPER('%s') AND mach_id = %d",
5799 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
5800 "set_server_host_internal",
5806 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s",
5809 "service = UPPER('%s') AND mach_id = %d",
5816 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
5817 "delete_server_host_info",
5826 "service = UPPER('%s') AND mach_id = %d",
5833 /* Q_GSLO - GET_SERVER_LOCATIONS */
5834 "get_server_locations",
5840 "sh.service, m.name FROM serverhosts sh, machine m",
5843 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
5845 "sh.service, m.name",
5850 /* Q_GFSL - GET_FILESYS_BY_LABEL */
5851 "get_filesys_by_label",
5857 "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",
5860 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5867 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
5868 "get_filesys_by_machine",
5874 "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",
5877 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5884 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
5885 "get_filesys_by_nfsphys",
5891 "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",
5894 "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'",
5901 /* Q_GFSG - GET_FILESYS_BY_GROUP */
5902 "get_filesys_by_group",
5908 "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",
5911 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5918 /* Q_GFSP - GET_FILESYS_BY_PATH */
5919 "get_filesys_by_path",
5925 "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",
5928 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
5935 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
5942 "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)",
5952 /* Q_UFIL - UPDATE_FILESYS */
5959 "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'",
5969 /* Q_DFIL - DELETE_FILESYS */
5986 /* Q_GFGM - GET_FSGROUP_MEMBERS */
5987 "get_fsgroup_members",
5993 "fs.label, fg.key FROM fsgroup fg, filesys fs",
5996 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
6003 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
6004 "add_filesys_to_fsgroup",
6010 "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')",
6020 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
6021 "remove_filesys_from_fsgroup",
6030 "group_id = %d AND filsys_id = %d",
6037 /* Q_GANF - GET_ALL_NFSPHYS */
6044 "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",
6047 "m.mach_id = np.mach_id",
6054 /* Q_GNFP - GET_NFSPHYS */
6061 "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",
6064 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
6071 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
6078 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)",
6088 /* Q_UNFP - UPDATE_NFSPHYS */
6095 "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s",
6098 "mach_id = %d AND dir = '%s'",
6105 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
6106 "adjust_nfsphys_allocation",
6112 "nfsphys SET allocated = allocated + %s",
6115 "mach_id = %d AND dir = '%s'",
6122 /* Q_DNFP - DELETE_NFSPHYS */
6132 "mach_id = %d AND dir = '%s'",
6139 /* Q_GQOT - GET_QUOTA */
6146 "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",
6149 "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",
6156 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
6157 "get_quota_by_filesys",
6163 "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",
6166 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
6173 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
6180 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
6190 /* Q_UQOT - UPDATE_QUOTA */
6197 "quota SET quota = %s",
6207 /* Q_DQOT - DELETE_QUOTA */
6224 /* Q_GNFQ - GET_NFS_QUOTAS */
6231 "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",
6234 "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'",
6236 "fs.label, u.login",
6241 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
6242 "get_nfs_quotas_by_partition",
6248 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
6251 "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",
6258 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
6265 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
6275 /* Q_UNFQ - UPDATE_NFS_QUOTA */
6282 "quota SET quota = %s",
6292 /* Q_DNFQ - DELETE_NFS_QUOTA */
6309 /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */
6316 "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",
6326 /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */
6333 "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",
6343 /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */
6350 "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)",
6360 /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */
6367 "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)",
6377 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */
6378 "update_zephyr_class",
6384 "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",
6394 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */
6395 "update_zephyr_class",
6401 "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",
6411 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
6412 "delete_zephyr_class",
6428 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
6429 "get_server_host_access",
6435 "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",
6438 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
6445 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
6446 "add_server_host_access",
6452 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)",
6462 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
6463 "update_server_host_access",
6469 "hostaccess SET acl_type = '%s', acl_id = %d",
6479 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
6480 "delete_server_host_access",
6496 /* Q_GACL - GET_ACL */
6503 "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l",
6506 "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id",
6508 "m.name, ac.target, ac.kind",
6513 /* Q_AACL - ADD_ACL */
6520 "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)",
6530 /* Q_DACL - DELETE_ACL */
6540 "mach_id = %d AND target = '%s'",
6547 /* Q_GSVC - GET_SERVICE */
6554 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
6557 "name LIKE '%s' AND protocol LIKE '%s'",
6564 /* Q_ASVC - ADD_SERVICE */
6571 "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))",
6581 /* Q_DSVC - DELETE_SERVICE */
6591 "name = '%s' AND protocol = '%s'",
6598 /* Q_GPRN - GET_PRINTER */
6605 "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",
6608 "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",
6615 /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */
6616 "get_printer_by_duplexname",
6622 "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",
6625 "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",
6632 /* Q_GPBE - GET_PRINTER_BY_ETHERNET */
6633 "get_printer_by_ethernet",
6639 "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",
6642 "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",
6649 /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */
6650 "get_printer_by_hostname",
6656 "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",
6659 "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",
6666 /* Q_GPBR - GET_PRINTER_BY_RM */
6667 "get_printer_by_rm",
6673 "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",
6676 "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",
6683 /* Q_GPBL - GET_PRINTER_BY_LOCATION */
6684 "get_printer_by_location",
6690 "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",
6693 "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",
6700 /* Q_GPBC - GET_PRINTER_BY_CONTACT */
6701 "get_printer_by_contact",
6707 "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",
6710 "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",
6717 /* Q_APRN - ADD_PRINTER */
6724 "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)))",
6734 /* Q_UPRN - UPDATE_PRINTER */
6741 "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))",
6751 /* Q_DPRN - DELETE_PRINTER */
6768 /* Q_GPSV - GET_PRINT_SERVER */
6775 "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",
6778 "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",
6785 /* Q_APSV - ADD_PRINT_SERVER */
6792 "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)",
6802 /* Q_UPSV - UPDATE_PRINT_SERVER */
6803 "update_print_server",
6809 "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d",
6819 /* Q_DPSV - DELETE_PRINT_SERVER */
6820 "delete_print_server",
6836 /* Q_GALI - GET_ALIAS */
6843 "name, type, trans FROM alias",
6846 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
6848 "type, name, trans",
6853 /* Q_AALI - ADD_ALIAS */
6860 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
6870 /* Q_DALI - DELETE_ALIAS */
6880 "name = '%s' AND type = '%s' AND trans = '%s'",
6887 /* Q_GVAL - GET_VALUE */
6894 "value FROM numvalues",
6904 /* Q_AVAL - ADD_VALUE */
6911 "INTO numvalues (name, value) VALUES ('%s', %s)",
6921 /* Q_UVAL - UPDATE_VALUE */
6928 "numvalues SET value = %s",
6938 /* Q_DVAL - DELETE_VALUE */
6955 /* Q_GATS - GET_ALL_TABLE_STATS */
6956 "get_all_table_stats",
6962 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
6972 /* Q__SDL - _SET_DEBUG_LEVEL */
6989 /* Q_GUSL - GET_USER_SIDS_BY_LOGIN, v4 */
6990 "get_user_sids_by_login",
6996 "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM users u, usersids us",
6999 "us.users_id = %d AND u.users_id = us.users_id AND SUBSTR(us.sid, 1, LENGTH(us.sid)-8) = '%s'",
7006 /* Q_AUSL - ADD_USER_SID_BY_LOGIN, v4 */
7007 "add_user_sid_by_login",
7013 "INTO usersids (users_id, sid) VALUES (%d, '%s')",
7023 /* Q_GLSN - GET_LIST_SIDS_BY_NAME, v4 */
7024 "get_list_sids_by_name",
7030 "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM list l, listsids ls",
7033 "ls.list_id = %d AND l.list_id = ls.list_id AND SUBSTR(ls.sid, 1, LENGTH(ls.sid)-8) = '%s'",
7040 /* Q_ALSN - ADD_LIST_SID_BY_NAME, v4 */
7041 "add_list_sid_by_name",
7047 "INTO listsids (list_id, sid) VALUES (%d, '%s')",
7057 /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */
7058 "get_distinct_domain_sids",
7064 "DISTINCT SUBSTR(sid, 1, LENGTH(sid)-8) FROM usersids",
7074 /* Q_GCON - GET_CONTAINER, v7 */
7081 "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",
7084 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7091 /* Q_GCON - GET_CONTAINER, v9 */
7098 "name, publicflg, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM containers",
7101 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7108 /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */
7115 "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)",
7125 /* Q_ACON - ADD_CONTAINER, v9 */ /* uses prefetch_value() for cnt_id */
7132 "INTO containers (name, publicflg, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, cnt_id) VALUES ('%s', %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), '%s', %d, '%s', %d, %s)",
7142 /* Q_UCON - UPDATE_CONTAINER, v7 */
7159 /* Q_UCON - UPDATE_CONTAINER, v9 */
7176 /* Q_DCON - DELETE_CONTAINER, v7 */
7193 /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */
7194 "add_machine_to_container",
7200 "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)",
7210 /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */
7211 "delete_machine_from_container",
7220 "mach_id = %d AND cnt_id = %d",
7227 /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */
7228 "get_machine_to_container_map",
7234 "m.name, c.name FROM machine m, containers c, mcntmap mcn",
7237 "m.name LIKE UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id",
7244 /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */
7245 "get_machines_of_container",
7261 /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */
7262 "get_subcontainers_of_container",
7278 /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v7 */
7279 "get_toplevel_containers",
7285 "name FROM containers",
7288 "name NOT LIKE '%%/%%'",
7295 /* Q_SCLI - SET_CONTAINER_LIST, v9 */
7296 "set_container_list",
7312 /* Q_GCLI - GET_CONTAINER_LIST, v9 */
7313 "get_container_list",
7319 "c.name, l.name FROM containers c, list l",
7322 "LOWER(c.name) = LOWER('%s') AND c.list_id = l.list_id AND c.list_id != 0",
7330 int QueryCount = (sizeof(Queries) / sizeof(struct query));