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 *glin4_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 char *glin_fields[] = {
1538 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1539 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1540 "memace_type", "memace_name", "description", "modtime", "modby", "modwith",
1543 static struct validate glin_validate = {
1550 access_vis_list_by_name,
1555 static char *alis2_fields[] = {
1556 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1557 "ace_type", "ace_name", "description",
1560 static struct valobj alis2_valobj[] = {
1561 {V_CHAR, 0, LIST_TABLE, "name"},
1568 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1569 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1570 {V_LEN, 9, LIST_TABLE, "description"},
1573 static struct validate alis2_validate = {
1585 static char *alis3_fields[] = {
1586 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1587 "nfsgroup", "ace_type", "ace_name", "description",
1590 static struct valobj alis3_valobj[] = {
1591 {V_CHAR, 0, LIST_TABLE, "name"},
1599 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1600 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1601 {V_LEN, 10, LIST_TABLE, "description"},
1604 static struct validate alis3_validate = {
1616 static char *alis4_fields[] = {
1617 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1618 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1622 static struct valobj alis4_valobj[] = {
1623 {V_CHAR, 0, LIST_TABLE, "name"},
1631 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1632 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1633 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1634 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1635 {V_LEN, 12, LIST_TABLE, "description"},
1638 static struct validate alis4_validate = {
1650 static char *alis_fields[] = {
1651 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1652 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1653 "memace_type", "memace_name", "description",
1656 static struct valobj alis_valobj[] = {
1657 {V_CHAR, 0, LIST_TABLE, "name"},
1666 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1667 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1668 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1669 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1670 {V_TYPEDATA, 13, 0, 0, "list_id", MR_ACE},
1671 {V_LEN, 14, LIST_TABLE, "description"},
1674 static struct validate alis_validate = {
1686 static char *ulis2_fields[] = {
1688 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1689 "ace_type", "ace_name", "description",
1692 static struct valobj ulis2_valobj[] = {
1693 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1694 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1701 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1702 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1703 {V_LEN, 10, LIST_TABLE, "description"},
1706 static struct validate ulis2_validate = {
1718 static char *ulis3_fields[] = {
1720 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1721 "nfsgroup", "ace_type", "ace_name", "description",
1724 static struct valobj ulis3_valobj[] = {
1725 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1726 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1734 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1735 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1736 {V_LEN, 11, LIST_TABLE, "description"},
1739 static struct validate ulis3_validate = {
1751 static char *ulis4_fields[] = {
1753 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1754 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1758 static struct valobj ulis4_valobj[] = {
1759 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1760 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1768 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1769 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1770 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1771 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
1772 {V_LEN, 13, LIST_TABLE, "description"},
1775 static struct validate ulis4_validate = {
1787 static char *ulis_fields[] = {
1789 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1790 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1791 "memace_type", "memace_name", "description",
1794 static struct valobj ulis_valobj[] = {
1795 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1796 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1805 {V_ID, 10, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1806 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1807 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
1808 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
1809 {V_TYPEDATA, 14, 0, 0, "list_id", MR_ACE},
1810 {V_LEN, 15, LIST_TABLE, "description"},
1813 static struct validate ulis_validate = {
1825 static char *dlis_fields[] = {
1829 static struct validate dlis_validate = {
1841 static char *amtl_fields[] = {
1842 "list_name", "member_type", "member_name",
1845 static char *atml_fields[] = {
1846 "list_name", "member_type", "member_name", "tag",
1849 static struct valobj amtl_valobj[] = {
1850 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1851 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
1852 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
1853 {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1856 static struct validate amtl_validate =
1869 static struct validate atml_validate =
1882 static struct validate tmol_validate =
1895 static struct validate dmfl_validate =
1905 delete_member_from_list,
1908 static char *gaus_fields[] = {
1909 "ace_type", "ace_name",
1910 "use_type", "use_name",
1913 static struct valobj gaus_valobj[] = {
1914 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1915 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1918 static struct validate gaus_validate = {
1930 static char *ghbo_fields[] = {
1931 "ace_type", "ace_name",
1935 static struct valobj ghbo_valobj[] = {
1936 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1937 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1940 static struct validate ghbo_validate = {
1952 static char *qgli_fields[] = {
1953 "active", "publicflg", "hidden", "maillist", "grouplist",
1957 static struct valobj qgli_valobj[] = {
1958 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1959 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1960 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1961 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1962 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1965 static struct validate qgli_validate = {
1974 qualified_get_lists,
1977 static char *gmol_fields[] = {
1979 "member_type", "member_name",
1982 static char *gtml_fields[] = {
1984 "member_type", "member_name", "tag",
1987 static struct validate gmol_validate = {
1994 access_visible_list,
1996 get_members_of_list,
1999 static char *glom_fields[] = {
2000 "member_type", "member_name",
2001 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
2004 static struct valobj glom_valobj[] = {
2005 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
2006 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2009 static struct validate glom_validate = {
2018 get_lists_of_member,
2021 static char *cmol_fields[] = {
2026 static struct validate cmol_validate = {
2033 access_visible_list,
2035 count_members_of_list,
2038 static char *gsin_fields[] = {
2040 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
2041 "type", "enable", "inprogress", "harderror", "errmsg",
2042 "ace_type", "ace_name", "modtime", "modby", "modwith",
2045 static struct validate gsin_validate =
2058 static char *qgsv_fields[] = {
2059 "enable", "inprogress", "harderror",
2063 static struct valobj qgsv_valobj[] = {
2064 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
2065 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2066 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2069 static struct validate qgsv_validate = {
2078 qualified_get_server,
2081 static char *asin_fields[] = {
2082 "service", "update_int", "target_file", "script", "type", "enable",
2083 "ace_type", "ace_name",
2086 static struct valobj asin_valobj[] = {
2087 {V_CHAR, 0, SERVERS_TABLE, "name"},
2089 {V_LEN, 2, SERVERS_TABLE, "target_file"},
2090 {V_LEN, 3, SERVERS_TABLE, "script"},
2091 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
2093 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
2094 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
2097 static struct validate asin_validate = /* for asin, usin */
2102 "name = UPPER('%s')",
2107 set_uppercase_modtime,
2110 static struct validate rsve_validate = {
2114 "name = UPPER('%s')",
2119 set_uppercase_modtime,
2122 static char *ssif_fields[] = {
2123 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
2126 static struct valobj ssif_valobj[] = {
2127 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2132 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
2135 static struct validate ssif_validate = {
2139 "name = UPPER('%s')",
2147 static char *dsin_fields[] = {
2151 static struct validate dsin_validate = {
2155 "name = UPPER('%s')",
2163 static char *gshi_fields[] = {
2164 "service", "machine",
2165 "service", "machine", "enable", "override", "success", "inprogress",
2166 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
2167 "value3", "modtime", "modby", "modwith",
2170 static struct validate gshi_validate = {
2182 static char *qgsh_fields[] = {
2183 "service", "enable", "override", "success", "inprogress", "hosterror",
2184 "service", "machine",
2187 static struct valobj qgsh_valobj[] = {
2188 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2189 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2190 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2191 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2192 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
2195 static struct validate qgsh_validate = {
2204 qualified_get_serverhost,
2207 static char *ashi_fields[] = {
2208 "service", "machine", "enable", "value1", "value2", "value3",
2211 static struct valobj ashi_valobj[] = {
2212 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2213 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2217 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
2220 static struct validate ashi_validate = /* ashi & ushi */
2225 "service = UPPER('%s') AND mach_id = %d",
2230 set_serverhost_modtime,
2233 static struct validate rshe_validate =
2238 "service = UPPER('%s') AND mach_id = %d",
2243 set_serverhost_modtime,
2246 static struct validate ssho_validate =
2251 "service = UPPER('%s') AND mach_id = %d",
2259 static char *sshi_fields[] = {
2260 "service", "machine", "override", "success", "inprogress",
2261 "hosterror", "errmsg", "ltt", "lts",
2264 static struct valobj sshi_valobj[] = {
2265 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2266 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2271 {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"},
2276 static struct validate sshi_validate =
2289 static char *dshi_fields[] = {
2290 "service", "machine",
2293 static struct validate dshi_validate =
2298 "service = UPPER('%s') AND mach_id = %d",
2306 static char *gslo_fields[] = {
2308 "server", "machine",
2311 static char *gfsl_fields[] = {
2313 "label", "type", "machine", "name", "mount", "access", "comments",
2314 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2317 static struct validate gfsl_validate = {
2329 static char *gfsm_fields[] = {
2331 "label", "type", "machine", "name", "mount", "access", "comments",
2332 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2335 static struct validate gfsm_validate = {
2347 static char *gfsn_fields[] = {
2348 "machine", "partition",
2349 "label", "type", "machine", "name", "mount", "access", "comments",
2350 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2353 static struct validate gfsn_validate = {
2365 static char *gfsp_fields[] = {
2367 "label", "type", "machine", "name", "mount", "access", "comments",
2368 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2371 static char *gfsg_fields[] = {
2373 "label", "type", "machine", "name", "mount", "access", "comments",
2374 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2377 static struct validate gfsg_validate = {
2389 static char *afil_fields[] = {
2390 "label", "type", "machine", "name", "mount", "access", "comments",
2391 "owner", "owners", "create", "lockertype",
2394 static struct valobj afil_valobj[] = {
2395 {V_CHAR, 0, FILESYS_TABLE, "label"},
2396 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
2397 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2398 {V_CHAR, 3, FILESYS_TABLE, "name"},
2399 {V_LEN, 4, FILESYS_TABLE, "mount"},
2400 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
2401 {V_LEN, 6, FILESYS_TABLE, "comments"},
2402 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
2403 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
2405 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
2408 static struct validate afil_validate = {
2417 set_filesys_modtime,
2420 static char *ufil_fields[] = {
2421 "label", "newlabel", "type", "machine", "name", "mount", "access",
2422 "comments", "owner", "owners", "create", "lockertype",
2425 static struct valobj ufil_valobj[] = {
2426 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2427 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
2428 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
2429 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2430 {V_CHAR, 4, FILESYS_TABLE, "name"},
2431 {V_LEN, 5, FILESYS_TABLE, "mount"},
2432 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
2433 {V_LEN, 7, FILESYS_TABLE, "comments"},
2434 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
2435 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
2437 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
2440 static struct validate ufil_validate = {
2449 set_filesys_modtime,
2452 static char *dfil_fields[] = {
2456 static struct validate dfil_validate = {
2468 static char *gfgm_fields[] = {
2469 "fsgroup", "filesys", "sortkey"
2472 static struct validate gfgm_validate = {
2484 static struct valobj aftg_valobj[] = {
2485 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2486 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2489 static struct validate aftg_validate = {
2493 "group_id = %d and filsys_id = %d",
2501 static char *ganf_fields[] = {
2502 "machine", "dir", "device", "status", "allocated", "size",
2503 "modtime", "modby", "modwith",
2506 static char *gnfp_fields[] = {
2508 "machine", "dir", "device", "status", "allocated", "size",
2509 "modtime", "modby", "modwith",
2512 static struct validate gnfp_validate = {
2524 static struct valobj anfp_valobj[] = {
2525 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2526 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2527 {V_LEN, 2, NFSPHYS_TABLE, "device"},
2533 static struct validate anfp_validate = {
2537 "mach_id = %d and dir = '%s'",
2542 set_nfsphys_modtime,
2545 static struct validate unfp_validate = {
2549 "mach_id = %d and dir = '%s'",
2554 set_nfsphys_modtime,
2557 static char *ajnf_fields[] = {
2558 "machine", "dir", "adjustment",
2561 static struct valobj ajnf_valobj[] = {
2562 {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE},
2563 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2567 static struct validate ajnf_validate = {
2571 "mach_id = %d and dir = '%s'",
2576 set_nfsphys_modtime,
2579 static char *dnfp_fields[] = {
2583 static struct validate dnfp_validate = {
2587 "mach_id = %d and dir = '%s'",
2592 set_nfsphys_modtime,
2595 static char *gqot_fields[] = {
2596 "filesys", "type", "name",
2597 "filesys", "type", "name", "quota", "dir", "machine",
2598 "modtime", "modby", "modwith",
2601 static struct valobj gqot_valobj[] = {
2602 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2603 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2606 static struct validate gqot_validate = {
2618 static char *gqbf_fields[] = {
2620 "filesys", "type", "name", "quota", "dir", "machine",
2621 "modtime", "modby", "modwith",
2624 static struct validate gqbf_validate = {
2636 static char *aqot_fields[] = {
2637 "filesys", "type", "name", "quota",
2640 static struct valobj aqot_valobj[] = {
2641 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2642 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2643 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2647 static struct validate aqot_validate = {
2651 "filsys_id = %d and type = '%s' and entity_id = %d",
2659 static struct validate uqot_validate = {
2663 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2671 static struct validate dqot_validate = {
2675 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2683 static char *gnfq_fields[] = {
2685 "filesys", "login", "quota", "dir", "machine",
2686 "modtime", "modby", "modwith",
2689 static struct validate gnfq_validate = {
2701 static char *gnqp_fields[] = {
2703 "filesys", "login", "quota", "dir", "machine",
2704 "modtime", "modby", "modwith",
2707 static char *anfq_fields[] = {
2708 "filesys", "login", "quota",
2711 static struct valobj anfq_valobj[] = {
2712 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2713 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
2717 static struct validate anfq_validate = {
2721 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2729 static struct validate unfq_validate = {
2733 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2741 static struct validate dnfq_validate = {
2745 "filsys_id = %d AND entity_id = %d",
2753 static char *gzcl2_fields[] = {
2755 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2756 "iws_type", "iws_name", "iui_type", "iui_name",
2757 "modtime", "modby", "modwith",
2760 static char *gzcl_fields[] = {
2762 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2763 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2764 "owner_id", "modtime", "modby", "modwith",
2767 static struct validate gzcl_validate = {
2779 static char *azcl2_fields[] = {
2780 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2781 "iws_type", "iws_name", "iui_type", "iui_name",
2784 static struct valobj azcl2_valobj[] = {
2785 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2786 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2787 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2788 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2789 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2790 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2791 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2792 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2793 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2796 static struct validate azcl2_validate = {
2808 static char *azcl_fields[] = {
2809 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2810 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2814 static struct valobj azcl_valobj[] = {
2815 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2816 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2817 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2818 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2819 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2820 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2821 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2822 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2823 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2824 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2825 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2828 static struct validate azcl_validate = {
2840 static char *uzcl2_fields[] = {
2841 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2842 "iws_type", "iws_name", "iui_type", "iui_name",
2845 static struct valobj uzcl2_valobj[] = {
2846 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2847 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2848 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2849 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2850 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2851 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2852 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2853 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2854 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2855 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2858 static struct validate uzcl2_validate = {
2870 static char *uzcl_fields[] = {
2871 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2872 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id",
2875 static struct valobj uzcl_valobj[] = {
2876 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2877 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2878 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2879 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2880 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2881 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2882 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2883 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2884 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2885 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2886 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
2887 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
2890 static struct validate uzcl_validate = {
2902 static struct validate dzcl_validate = {
2914 static char *gsha_fields[] = {
2916 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
2919 static struct validate gsha_validate =
2932 static char *asha_fields[] = {
2933 "machine", "ace_type", "ace_name",
2936 static struct valobj asha_valobj[] = {
2937 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2938 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
2939 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2942 static struct validate asha_validate =
2955 static char *gacl_fields[] = {
2956 "machine", "target",
2957 "machine", "target", "kind", "list",
2960 static char *aacl_fields[] = {
2961 "machine", "target", "kind", "list",
2964 static char *dacl_fields[] = {
2965 "machine", "target",
2968 static struct valobj aacl_valobj[] = {
2969 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2970 {V_CHAR, 1, ACL_TABLE, "target"},
2971 {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE},
2972 {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST},
2975 static struct validate gacl_validate =
2988 static struct validate aacl_validate =
2993 "mach_id = %d AND target = '%s'",
3001 static char *gsvc_fields[] = {
3002 "service", "protocol",
3003 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
3006 static char *asvc_fields[] = {
3007 "service", "protocol", "port", "description",
3010 static char *dsvc_fields[] = {
3011 "service", "protocol",
3014 static struct valobj asvc_valobj[] = {
3015 {V_CHAR, 0, SERVICES_TABLE, "name"},
3016 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
3018 {V_CHAR, 3, SERVICES_TABLE, "description"},
3021 static struct validate asvc_validate = {
3025 "name = '%s' AND protocol = '%s'",
3030 set_service_modtime,
3033 static struct validate dsvc_validate = {
3037 "name = '%s' AND protocol = '%s'",
3045 static char *gprn_fields[] = {
3047 "name", "type", "hwtype", "duplexname", "hostname",
3048 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3049 "banner", "location", "contact", "modtime", "modby", "modwith"
3052 static char *gpbd_fields[] = {
3054 "name", "type", "hwtype", "duplexname", "hostname",
3055 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3056 "banner", "location", "contact", "modtime", "modby", "modwith"
3059 static char *gpbe_fields[] = {
3061 "name", "type", "hwtype", "duplexname", "hostname",
3062 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3063 "banner", "location", "contact", "modtime", "modby", "modwith"
3066 static char *gpbh_fields[] = {
3068 "name", "type", "hwtype", "duplexname", "hostname",
3069 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3070 "banner", "location", "contact", "modtime", "modby", "modwith"
3073 static char *gpbr_fields[] = {
3075 "name", "type", "hwtype", "duplexname", "hostname",
3076 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3077 "banner", "location", "contact", "modtime", "modby", "modwith"
3080 static char *gpbl_fields[] = {
3082 "name", "type", "hwtype", "duplexname", "hostname",
3083 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3084 "banner", "location", "contact", "modtime", "modby", "modwith"
3087 static char *gpbc_fields[] = {
3089 "name", "type", "hwtype", "duplexname", "hostname",
3090 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3091 "banner", "location", "contact", "modtime", "modby", "modwith"
3094 static char *aprn_fields[] = {
3095 "printer", "type", "hwtype", "duplexname", "hostname",
3096 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3097 "banner", "location", "contact",
3100 static struct valobj aprn_valobj[] = {
3101 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3102 {V_TYPE, 1, 0, "printertype", 0, MR_TYPE},
3103 {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE},
3104 {V_CHAR, 3, PRINTERS_TABLE, "duplexname"},
3105 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3106 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3107 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3108 {V_CHAR, 7, PRINTERS_TABLE, "rp"},
3109 {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3112 {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST},
3113 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3115 {V_CHAR, 14, PRINTERS_TABLE, "location"},
3116 {V_CHAR, 15, PRINTERS_TABLE, "contact"},
3119 static struct validate aprn_validate = {
3131 static char *uprn_fields[] = {
3133 "printer", "type", "hwtype", "duplexname", "hostname",
3134 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3135 "banner", "location", "contact",
3138 static struct valobj uprn_valobj[] = {
3139 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3140 {V_CHAR, 1, PRINTERS_TABLE, "name"},
3141 {V_TYPE, 2, 0, "printertype", 0, MR_TYPE},
3142 {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE},
3143 {V_CHAR, 4, PRINTERS_TABLE, "duplexname"},
3144 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3145 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3146 {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3147 {V_CHAR, 8, PRINTERS_TABLE, "rp"},
3148 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3151 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3152 {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST},
3154 {V_CHAR, 15, PRINTERS_TABLE, "location"},
3155 {V_CHAR, 16, PRINTERS_TABLE, "contact"},
3158 static struct validate uprn_validate = {
3170 static struct validate dprn_validate = {
3182 static char *gpsv_fields[] = {
3184 "host", "kind", "printer_types", "owner_type", "owner_name",
3185 "lpc_acl", "modtime", "modby", "modwith"
3188 static struct valobj gpsv_valobj[] = {
3189 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3192 static struct validate gpsv_validate = {
3204 static char *apsv_fields[] = {
3205 "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl"
3208 static struct valobj apsv_valobj[] = {
3209 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3210 {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE},
3211 {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING},
3212 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
3213 {V_TYPEDATA, 4, 0, 0, 0, MR_ACE},
3214 {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST},
3217 static struct validate apsv_validate = {
3229 static char *dpsv_fields[] = {
3233 static struct validate dpsv_validate = {
3245 static char *gali_fields[] = {
3246 "name", "type", "trans",
3247 "name", "type", "trans",
3250 static char *aali_fields[] = {
3251 "name", "type", "trans",
3254 static struct valobj aali_valobj[] = {
3255 {V_CHAR, 0, ALIAS_TABLE, "name"},
3256 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
3257 {V_CHAR, 2, ALIAS_TABLE, "trans"},
3260 static struct validate aali_validate = {
3264 "name = '%s' and type = '%s' and trans = '%s'",
3272 static struct validate dali_validate = /* DELETE_ALIAS */
3277 "name = '%s' and type = '%s' and trans = '%s'",
3285 static char *gval_fields[] = {
3289 static struct valobj gval_valobj[] = {
3290 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
3293 static struct validate gval_validate = {
3305 static char *aval_fields[] = {
3309 static struct valobj aval_valobj[] = {
3310 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
3314 static struct validate aval_validate = /* for aval, uval, and dval */
3327 static char *dval_fields[] = {
3331 static char *gats_fields[] = {
3332 "table_name", "appends", "updates", "deletes",
3333 "modtime", "modby", "modwith",
3336 static char *_sdl_fields[] = {
3340 static struct validate _sdl_validate =
3353 static char *gusl_fields[] = {
3354 "login", "domain_sid",
3355 "login", "sid", "created",
3358 static struct validate gusl_validate =
3371 static char *glsn_fields[] = {
3372 "name", "domain_sid",
3373 "name", "sid", "created",
3376 static struct validate glsn_validate =
3389 static char *ausl_fields[] = {
3393 static struct validate ausl_validate =
3398 "users_id = %d AND sid = '%s'",
3406 static char *alsn_fields[] = {
3410 static struct validate alsn_validate =
3415 "list_id = %d AND sid = '%s'",
3423 static char *gdds_fields[] = {
3427 static char *gcon7_fields[] = {
3429 "name", "description", "location", "contact",
3430 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3433 static struct validate gcon_validate = {
3445 static char *gcon_fields[] = {
3447 "name", "publicflg", "description", "location", "contact",
3448 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3451 static char *acon7_fields[] = {
3452 "name", "description", "location", "contact",
3453 "ace_type", "ace_name", "memace_type", "memace_name",
3456 static struct valobj acon7_valobj[] = {
3457 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3458 {V_LEN, 1, CONTAINERS_TABLE, "description"},
3459 {V_CHAR, 2, CONTAINERS_TABLE, "location"},
3460 {V_CHAR, 3, CONTAINERS_TABLE, "contact"},
3461 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
3462 {V_TYPEDATA, 5, 0, 0, 0, MR_ACE},
3463 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3464 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3467 static struct validate acon7_validate =
3480 static char *acon_fields[] = {
3481 "name", "publicflg", "description", "location", "contact",
3482 "ace_type", "ace_name", "memace_type", "memace_name",
3485 static struct valobj acon_valobj[] = {
3486 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3488 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3489 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3490 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3491 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3492 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3493 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3494 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3497 static struct validate acon_validate =
3510 static char *ucon7_fields[] = {
3512 "newname", "description", "location", "contact",
3513 "ace_type", "ace_name", "memace_type", "memace_name",
3516 static struct valobj ucon7_valobj[] = {
3517 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3518 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3519 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3520 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3521 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3522 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3523 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3524 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3525 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3528 static struct validate ucon7_validate =
3541 static char *ucon_fields[] = {
3543 "newname", "publicflg", "description", "location", "contact",
3544 "ace_type", "ace_name", "memace_type", "memace_name",
3547 static struct valobj ucon_valobj[] = {
3548 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3549 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3551 {V_LEN, 3, CONTAINERS_TABLE, "description"},
3552 {V_CHAR, 4, CONTAINERS_TABLE, "location"},
3553 {V_CHAR, 5, CONTAINERS_TABLE, "contact"},
3554 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3555 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3556 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
3557 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
3560 static struct validate ucon_validate =
3573 static char *dcon_fields[] = {
3577 static struct validate dcon_validate =
3590 static char *amcn_fields[] = {
3591 "machine", "container",
3594 static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */
3595 { /* DELETE_MACHINE_FROM_CONTAINER */
3596 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3597 {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3600 static struct validate amcn_validate = /* for amtn and dmfn */
3610 set_mach_modtime_by_id,
3613 static struct validate dmcn_validate = /* for amtn and dmfn */
3618 "mach_id = %d and cnt_id = %d",
3623 set_mach_modtime_by_id,
3626 static char *gmnm_fields[] = {
3628 "machine", "container",
3631 static char *gmoc_fields[] = {
3638 static struct validate gmoc_validate =
3648 get_machines_of_container,
3651 static char *gsoc_fields[] = {
3657 static struct validate gsoc_validate =
3667 get_subcontainers_of_container,
3670 static char *gtlc_fields[] = {
3674 static char *scli_fields[] = {
3679 static struct valobj scli_valobj[] = {
3680 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3681 {V_ID, 1, LIST_TABLE, "name", "list_id", MR_LIST},
3684 static struct validate scli_validate = {
3696 static char *gcli_fields[] = {
3698 "containername", "listname",
3701 /* Generalized Query Definitions */
3703 /* Multiple versions of the same query MUST be listed in ascending
3707 /* Note: For any query which uses prefetch_value, the vcnt should be
3708 * one less than the number of %-format specifiers in the tlist.
3711 struct query Queries[] = {
3713 /* Q_GALO - GET_ALL_LOGINS, v2 */
3720 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3730 /* Q_GALO - GET_ALL_LOGINS, v3 */
3737 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3747 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */
3748 "get_all_active_logins",
3754 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3764 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */
3765 "get_all_active_logins",
3771 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3781 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */
3782 "get_user_account_by_login",
3788 "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",
3791 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3798 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */
3799 "get_user_account_by_login",
3805 "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",
3808 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3815 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */
3816 "get_user_account_by_uid",
3822 "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",
3825 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3832 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */
3833 "get_user_account_by_uid",
3839 "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",
3842 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3849 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */
3850 "get_user_account_by_name",
3856 "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",
3859 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
3866 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */
3867 "get_user_account_by_name",
3873 "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",
3876 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
3883 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */
3884 "get_user_account_by_class",
3890 "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",
3893 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
3900 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */
3901 "get_user_account_by_class",
3907 "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",
3910 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
3917 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */
3918 "get_user_account_by_id",
3924 "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",
3927 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3934 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */
3935 "get_user_account_by_id",
3941 "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",
3944 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3951 /* Q_GUBL - GET_USER_BY_LOGIN, v2 */
3952 "get_user_by_login",
3958 "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",
3961 "u.login LIKE '%s' AND u.users_id != 0",
3968 /* Q_GUBL - GET_USER_BY_LOGIN, v3 */
3969 "get_user_by_login",
3975 "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",
3978 "u.login LIKE '%s' AND u.users_id != 0",
3985 /* Q_GUBU - GET_USER_BY_UID, v2 */
3992 "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",
3995 "u.unix_uid = %s AND u.users_id != 0",
4002 /* Q_GUBU - GET_USER_BY_UID, v3 */
4009 "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",
4012 "u.unix_uid = %s AND u.users_id != 0",
4019 /* Q_GUBN - GET_USER_BY_NAME, v2 */
4026 "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",
4029 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
4036 /* Q_GUBN - GET_USER_BY_NAME, v3 */
4043 "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",
4046 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
4053 /* Q_GUBC - GET_USER_BY_CLASS, v2 */
4054 "get_user_by_class",
4060 "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",
4063 "u.type = UPPER('%s') AND u.users_id != 0",
4070 /* Q_GUBC - GET_USER_BY_CLASS, v3 */
4071 "get_user_by_class",
4077 "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",
4080 "u.type = UPPER('%s') AND u.users_id != 0",
4087 /* Q_GUBM - GET_USER_BY_MITID, v2 */
4088 "get_user_by_mitid",
4094 "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",
4097 "u.clearid LIKE '%s' AND u.users_id != 0",
4104 /* Q_GUBM - GET_USER_BY_MITID, v3 */
4105 "get_user_by_mitid",
4111 "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",
4114 "u.clearid LIKE '%s' AND u.users_id != 0",
4121 /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */
4128 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4129 * but using up one argv element.
4131 "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)",
4141 /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */
4148 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4149 * but using up one argv element.
4151 "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)",
4161 /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */
4168 "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)",
4178 /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */
4185 "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)",
4195 /* Q_RUSR - REGISTER_USER */
4212 /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */
4213 "update_user_account",
4219 /* See comment in auac about signature. */
4220 "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",
4230 /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */
4231 "update_user_account",
4237 /* See comment in auac about signature. */
4238 "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",
4248 /* Q_UUSR - UPDATE_USER, v2 */
4255 "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'",
4265 /* Q_UUSR - UPDATE_USER, v3 */
4272 "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'",
4282 /* Q_UUSH - UPDATE_USER_SHELL */
4283 "update_user_shell",
4289 "users SET shell = '%s'",
4299 /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
4300 "update_user_windows_shell",
4306 "users SET winconsoleshell = '%s'",
4316 /* Q_UUST - UPDATE_USER_STATUS */
4317 "update_user_status",
4323 "users SET status = %s",
4333 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
4334 "update_user_security_status",
4340 "users SET secure = %s",
4350 /* Q_DUSR - DELETE_USER */
4367 /* Q_AURV - ADD_USER_RESERVATION */
4368 "add_user_reservation",
4384 /* Q_GURV - GET_USER_RESERVATIONS */
4385 "get_user_reservations",
4401 /* Q_GUBR - GET_USER_BY_RESERVATION */
4402 "get_user_by_reservation",
4418 /* Q_DURV - DELETE_USER_RESERVATION */
4419 "delete_user_reservation",
4435 /* Q_GKUM - GET_KERBEROS_USER_MAP */
4436 "get_kerberos_user_map",
4442 "u.login, str.string FROM krbmap km, users u, strings str",
4445 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
4447 "u.login, str.string",
4452 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
4453 "add_kerberos_user_map",
4459 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
4469 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
4470 "delete_kerberos_user_map",
4479 "users_id = %d AND string_id = %d",
4486 /* Q_GFBL - GET_FINGER_BY_LOGIN */
4487 "get_finger_by_login",
4493 "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",
4503 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
4504 "update_finger_by_login",
4510 "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))",
4520 /* Q_GPOB - GET_POBOX */
4527 "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
4537 /* Q_GAPO - GET_ALL_POBOXES */
4544 "login, potype, pop_id || ':' || box_id FROM users",
4554 /* Q_GPOP - GET_POBOXES_POP */
4561 "login, potype, users_id FROM users",
4571 /* Q_GPOF - GET_POBOXES_SMTP */
4578 "login, potype, users_id FROM users",
4588 /* Q_SPOB - SET_POBOX */
4605 /* Q_SPOP - SET_POBOX_POP */
4622 /* Q_DPOB - DELETE_POBOX */
4629 "users SET potype = 'NONE'",
4639 /* Q_GHST - GET_HOST, v2 */
4646 "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",
4649 "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",
4656 /* Q_GHST - GET_HOST, v6 */
4663 "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",
4666 "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",
4673 /* Q_GHST - GET_HOST, v8 */
4680 "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",
4683 "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",
4690 /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */
4691 "get_host_by_hwaddr",
4697 "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",
4700 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4707 /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */
4708 "get_host_by_hwaddr",
4714 "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",
4717 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4724 /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */
4725 "get_host_by_hwaddr",
4731 "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",
4734 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4741 /* Q_GHBA - GET_HOST_BY_ACCOUNT_NUMBER, v8 */
4742 "get_host_by_account_number",
4748 "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",
4751 "m.account_number LIKE '%s' AND m.mach_id != 0 and s.snet_id = m.snet_id",
4758 /* Q_GHHA - GET_HOST_HWADDR */
4765 "m.hwaddr FROM machine m",
4768 "m.name LIKE UPPER('%s')",
4775 /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */
4782 "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)",
4792 /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */
4799 "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)",
4809 /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */
4816 "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)",
4826 /* Q_UHST - UPDATE_HOST, v2 */
4833 "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",
4843 /* Q_UHST - UPDATE_HOST, v6 */
4850 "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",
4860 /* Q_UHST - UPDATE_HOST, v8 */
4867 "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",
4877 /* Q_UHHA - UPDATE_HOST_HWADDR */
4878 "update_host_hwaddr",
4884 "machine SET hwaddr = NVL('%s', CHR(0))",
4894 /* Q_DHST - DELETE_HOST */
4911 /* Q_GMAC - GET_MACHINE */
4918 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
4921 "name LIKE UPPER('%s') AND mach_id != 0",
4928 /* Q_GHAL - GET_HOSTALIAS */
4935 "a.name, m.name FROM hostalias a, machine m",
4938 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
4945 /* Q_AHAL - ADD_HOSTALIAS */
4952 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)",
4962 /* Q_DHAL - DELETE_HOSTALIAS */
4972 "name = UPPER('%s') AND mach_id = %d",
4979 /* Q_GSNT - GET_SUBNET, v2 */
4986 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
4989 "name LIKE UPPER('%s')",
4996 /* Q_GSNT - GET_SUBNET, v8 */
5003 "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",
5006 "name LIKE UPPER('%s')",
5013 /* Q_ASNT - ADD_SUBNET, v2 */
5020 "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)",
5030 /* Q_ASNT - ADD_SUBNET, v8 */
5037 "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)",
5047 /* Q_USNT - UPDATE_SUBNET, v2 */
5054 "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",
5064 /* Q_USNT - UPDATE_SUBNET, v8 */
5071 "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",
5081 /* Q_DSNT - DELETE_SUBNET */
5098 /* Q_GCLU - GET_CLUSTER */
5105 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
5108 "name LIKE '%s' AND clu_id != 0",
5115 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
5122 "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)",
5132 /* Q_UCLU - UPDATE_CLUSTER */
5139 "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))",
5149 /* Q_DCLU - DELETE_CLUSTER */
5166 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
5167 "get_machine_to_cluster_map",
5173 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
5176 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
5183 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
5184 "add_machine_to_cluster",
5190 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
5200 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
5201 "delete_machine_from_cluster",
5210 "mach_id = %d AND clu_id = %d",
5217 /* Q_GCLD - GET_CLUSTER_DATA */
5224 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
5227 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
5229 "c.name, svc.serv_label",
5234 /* Q_ACLD - ADD_CLUSTER_DATA */
5241 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')",
5251 /* Q_DCLD - DELETE_CLUSTER_DATA */
5252 "delete_cluster_data",
5261 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
5268 /* Q_GLIN - GET_LIST_INFO, v2 */
5275 "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",
5285 /* Q_GLIN - GET_LIST_INFO, v3 */
5292 "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",
5302 /* Q_GLIN - GET_LIST_INFO, v4 */
5309 "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",
5319 /* Q_GLIN - GET_LIST_INFO, v10 */
5326 "l.name, l.active, l.publicflg, l.hidden, l.maillist, l.grouplist, l.gid, l.nfsgroup, l.mailman, m.name, l.acl_type, l.acl_id, l.memacl_type, l.memacl_id, l.description, TO_CHAR(l.modtime, 'DD-mon-YYYY HH24:MI:SS'), l.modby, l.modwith FROM list l, machine m",
5329 "l.name LIKE '%s' AND m.mach_id = l.mailman_id",
5336 /* Q_EXLN - EXPAND_LIST_NAMES */
5337 "expand_list_names",
5346 "name LIKE '%s' AND list_id != 0",
5353 /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */
5360 "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)",
5370 /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */
5377 "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)",
5387 /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */
5394 "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)",
5404 /* Q_ALIS - ADD_LIST, v10 */ /* uses prefetch_value() for list_id */
5411 "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, mailman, mailman_id, acl_type, acl_id, memacl_type, memacl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, %s, %d, '%s', %d, '%s', %d, NVL('%s', CHR(0)), %s)",
5421 /* Q_ULIS - UPDATE_LIST, v2 */
5428 "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))",
5438 /* Q_ULIS - UPDATE_LIST, v3 */
5445 "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))",
5455 /* Q_ULIS, UPDATE_LIST, v4 */
5462 "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))",
5472 /* Q_ULIS, UPDATE_LIST, v10 */
5479 "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, mailman = %s, mailman_id = %d, acl_type = '%s', acl_id = %d, memacl_type = '%s', memacl_id = %d, description = NVL('%s', CHR(0))",
5489 /* Q_DLIS - DELETE_LIST */
5506 /* Q_AMTL - ADD_MEMBER_TO_LIST */
5507 "add_member_to_list",
5523 /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */
5524 "add_tagged_member_to_list",
5540 /* Q_TMOL - TAG_MEMBER_OF_LIST */
5541 "tag_member_of_list",
5557 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
5558 "delete_member_from_list",
5574 /* Q_GAUS - GET_ACE_USE */
5591 /* Q_GHBO - GET_HOST_BY_OWNER */
5592 "get_host_by_owner",
5608 /* Q_QGLI - QUALIFIED_GET_LISTS */
5609 "qualified_get_lists",
5625 /* Q_GMOL - GET_MEMBERS_OF_LIST */
5626 "get_members_of_list",
5642 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
5643 "get_end_members_of_list",
5659 /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */
5660 "get_tagged_members_of_list",
5676 /* Q_GLOM - GET_LISTS_OF_MEMBER */
5677 "get_lists_of_member",
5693 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
5694 "count_members_of_list",
5710 /* Q_GSIN - GET_SERVER_INFO */
5717 "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",
5720 "name LIKE UPPER('%s')",
5727 /* Q_QGSV - QUALIFIED_GET_SERVER */
5728 "qualified_get_server",
5744 /* Q_ASIN - ADD_SERVER_INFO */
5751 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)",
5761 /* Q_USIN - UPDATE_SERVER_INFO */
5762 "update_server_info",
5768 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
5771 "name = UPPER('%s')",
5778 /* Q_RSVE - RESET_SERVER_ERROR */
5779 "reset_server_error",
5785 "servers SET harderror = 0, dfcheck = dfgen",
5788 "name = UPPER('%s')",
5795 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
5796 "set_server_internal_flags",
5802 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))",
5805 "name = UPPER('%s')",
5812 /* Q_DSIN - DELETE_SERVER_INFO */
5813 "delete_server_info",
5822 "name = UPPER('%s')",
5829 /* Q_GSHI - GET_SERVER_HOST_INFO */
5830 "get_server_host_info",
5836 "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",
5839 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
5841 "sh.service, m.name",
5846 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
5847 "qualified_get_server_host",
5863 /* Q_ASHI - ADD_SERVER_HOST_INFO */
5864 "add_server_host_info",
5870 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))",
5880 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
5881 "update_server_host_info",
5887 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))",
5890 "service = UPPER('%s') AND mach_id = %d",
5897 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
5898 "reset_server_host_error",
5904 "serverhosts SET hosterror = 0",
5907 "service = UPPER('%s') AND mach_id = %d",
5914 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
5915 "set_server_host_override",
5921 "serverhosts SET override = 1",
5924 "service = UPPER('%s') AND mach_id = %d",
5931 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
5932 "set_server_host_internal",
5938 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s",
5941 "service = UPPER('%s') AND mach_id = %d",
5948 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
5949 "delete_server_host_info",
5958 "service = UPPER('%s') AND mach_id = %d",
5965 /* Q_GSLO - GET_SERVER_LOCATIONS */
5966 "get_server_locations",
5972 "sh.service, m.name FROM serverhosts sh, machine m",
5975 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
5977 "sh.service, m.name",
5982 /* Q_GFSL - GET_FILESYS_BY_LABEL */
5983 "get_filesys_by_label",
5989 "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",
5992 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5999 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
6000 "get_filesys_by_machine",
6006 "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",
6009 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6016 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
6017 "get_filesys_by_nfsphys",
6023 "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",
6026 "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'",
6033 /* Q_GFSG - GET_FILESYS_BY_GROUP */
6034 "get_filesys_by_group",
6040 "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",
6043 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6050 /* Q_GFSP - GET_FILESYS_BY_PATH */
6051 "get_filesys_by_path",
6057 "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",
6060 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
6067 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
6074 "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)",
6084 /* Q_UFIL - UPDATE_FILESYS */
6091 "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'",
6101 /* Q_DFIL - DELETE_FILESYS */
6118 /* Q_GFGM - GET_FSGROUP_MEMBERS */
6119 "get_fsgroup_members",
6125 "fs.label, fg.key FROM fsgroup fg, filesys fs",
6128 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
6135 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
6136 "add_filesys_to_fsgroup",
6142 "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')",
6152 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
6153 "remove_filesys_from_fsgroup",
6162 "group_id = %d AND filsys_id = %d",
6169 /* Q_GANF - GET_ALL_NFSPHYS */
6176 "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",
6179 "m.mach_id = np.mach_id",
6186 /* Q_GNFP - GET_NFSPHYS */
6193 "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",
6196 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
6203 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
6210 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)",
6220 /* Q_UNFP - UPDATE_NFSPHYS */
6227 "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s",
6230 "mach_id = %d AND dir = '%s'",
6237 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
6238 "adjust_nfsphys_allocation",
6244 "nfsphys SET allocated = allocated + %s",
6247 "mach_id = %d AND dir = '%s'",
6254 /* Q_DNFP - DELETE_NFSPHYS */
6264 "mach_id = %d AND dir = '%s'",
6271 /* Q_GQOT - GET_QUOTA */
6278 "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",
6281 "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",
6288 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
6289 "get_quota_by_filesys",
6295 "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",
6298 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
6305 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
6312 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
6322 /* Q_UQOT - UPDATE_QUOTA */
6329 "quota SET quota = %s",
6339 /* Q_DQOT - DELETE_QUOTA */
6356 /* Q_GNFQ - GET_NFS_QUOTAS */
6363 "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",
6366 "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'",
6368 "fs.label, u.login",
6373 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
6374 "get_nfs_quotas_by_partition",
6380 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
6383 "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",
6390 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
6397 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
6407 /* Q_UNFQ - UPDATE_NFS_QUOTA */
6414 "quota SET quota = %s",
6424 /* Q_DNFQ - DELETE_NFS_QUOTA */
6441 /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */
6448 "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",
6458 /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */
6465 "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",
6475 /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */
6482 "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)",
6492 /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */
6499 "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)",
6509 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */
6510 "update_zephyr_class",
6516 "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",
6526 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */
6527 "update_zephyr_class",
6533 "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",
6543 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
6544 "delete_zephyr_class",
6560 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
6561 "get_server_host_access",
6567 "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",
6570 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
6577 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
6578 "add_server_host_access",
6584 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)",
6594 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
6595 "update_server_host_access",
6601 "hostaccess SET acl_type = '%s', acl_id = %d",
6611 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
6612 "delete_server_host_access",
6628 /* Q_GACL - GET_ACL */
6635 "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l",
6638 "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id",
6640 "m.name, ac.target, ac.kind",
6645 /* Q_AACL - ADD_ACL */
6652 "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)",
6662 /* Q_DACL - DELETE_ACL */
6672 "mach_id = %d AND target = '%s'",
6679 /* Q_GSVC - GET_SERVICE */
6686 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
6689 "name LIKE '%s' AND protocol LIKE '%s'",
6696 /* Q_ASVC - ADD_SERVICE */
6703 "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))",
6713 /* Q_DSVC - DELETE_SERVICE */
6723 "name = '%s' AND protocol = '%s'",
6730 /* Q_GPRN - GET_PRINTER */
6737 "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",
6740 "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",
6747 /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */
6748 "get_printer_by_duplexname",
6754 "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",
6757 "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",
6764 /* Q_GPBE - GET_PRINTER_BY_ETHERNET */
6765 "get_printer_by_ethernet",
6771 "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",
6774 "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",
6781 /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */
6782 "get_printer_by_hostname",
6788 "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",
6791 "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",
6798 /* Q_GPBR - GET_PRINTER_BY_RM */
6799 "get_printer_by_rm",
6805 "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",
6808 "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",
6815 /* Q_GPBL - GET_PRINTER_BY_LOCATION */
6816 "get_printer_by_location",
6822 "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",
6825 "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",
6832 /* Q_GPBC - GET_PRINTER_BY_CONTACT */
6833 "get_printer_by_contact",
6839 "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",
6842 "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",
6849 /* Q_APRN - ADD_PRINTER */
6856 "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)))",
6866 /* Q_UPRN - UPDATE_PRINTER */
6873 "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))",
6883 /* Q_DPRN - DELETE_PRINTER */
6900 /* Q_GPSV - GET_PRINT_SERVER */
6907 "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",
6910 "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",
6917 /* Q_APSV - ADD_PRINT_SERVER */
6924 "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)",
6934 /* Q_UPSV - UPDATE_PRINT_SERVER */
6935 "update_print_server",
6941 "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d",
6951 /* Q_DPSV - DELETE_PRINT_SERVER */
6952 "delete_print_server",
6968 /* Q_GALI - GET_ALIAS */
6975 "name, type, trans FROM alias",
6978 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
6980 "type, name, trans",
6985 /* Q_AALI - ADD_ALIAS */
6992 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
7002 /* Q_DALI - DELETE_ALIAS */
7012 "name = '%s' AND type = '%s' AND trans = '%s'",
7019 /* Q_GVAL - GET_VALUE */
7026 "value FROM numvalues",
7036 /* Q_AVAL - ADD_VALUE */
7043 "INTO numvalues (name, value) VALUES ('%s', %s)",
7053 /* Q_UVAL - UPDATE_VALUE */
7060 "numvalues SET value = %s",
7070 /* Q_DVAL - DELETE_VALUE */
7087 /* Q_GATS - GET_ALL_TABLE_STATS */
7088 "get_all_table_stats",
7094 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
7104 /* Q__SDL - _SET_DEBUG_LEVEL */
7121 /* Q_GUSL - GET_USER_SIDS_BY_LOGIN, v4 */
7122 "get_user_sids_by_login",
7128 "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM users u, usersids us",
7131 "us.users_id = %d AND u.users_id = us.users_id AND SUBSTR(us.sid, 1, LENGTH(us.sid)-8) = '%s'",
7138 /* Q_AUSL - ADD_USER_SID_BY_LOGIN, v4 */
7139 "add_user_sid_by_login",
7145 "INTO usersids (users_id, sid) VALUES (%d, '%s')",
7155 /* Q_GLSN - GET_LIST_SIDS_BY_NAME, v4 */
7156 "get_list_sids_by_name",
7162 "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM list l, listsids ls",
7165 "ls.list_id = %d AND l.list_id = ls.list_id AND SUBSTR(ls.sid, 1, LENGTH(ls.sid)-8) = '%s'",
7172 /* Q_ALSN - ADD_LIST_SID_BY_NAME, v4 */
7173 "add_list_sid_by_name",
7179 "INTO listsids (list_id, sid) VALUES (%d, '%s')",
7189 /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */
7190 "get_distinct_domain_sids",
7196 "DISTINCT SUBSTR(sid, 1, LENGTH(sid)-8) FROM usersids",
7206 /* Q_GCON - GET_CONTAINER, v7 */
7213 "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",
7216 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7223 /* Q_GCON - GET_CONTAINER, v9 */
7230 "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",
7233 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7240 /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */
7247 "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)",
7257 /* Q_ACON - ADD_CONTAINER, v9 */ /* uses prefetch_value() for cnt_id */
7264 "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)",
7274 /* Q_UCON - UPDATE_CONTAINER, v7 */
7291 /* Q_UCON - UPDATE_CONTAINER, v9 */
7308 /* Q_DCON - DELETE_CONTAINER, v7 */
7325 /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */
7326 "add_machine_to_container",
7332 "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)",
7342 /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */
7343 "delete_machine_from_container",
7352 "mach_id = %d AND cnt_id = %d",
7359 /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */
7360 "get_machine_to_container_map",
7366 "m.name, c.name FROM machine m, containers c, mcntmap mcn",
7369 "m.name LIKE UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id",
7376 /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */
7377 "get_machines_of_container",
7393 /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */
7394 "get_subcontainers_of_container",
7410 /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v7 */
7411 "get_toplevel_containers",
7417 "name FROM containers",
7420 "name NOT LIKE '%%/%%'",
7427 /* Q_SCLI - SET_CONTAINER_LIST, v9 */
7428 "set_container_list",
7444 /* Q_GCLI - GET_CONTAINER_LIST, v9 */
7445 "get_container_list",
7451 "c.name, l.name FROM containers c, list l",
7454 "LOWER(c.name) = LOWER('%s') AND c.list_id = l.list_id AND c.list_id != 0",
7462 int QueryCount = (sizeof(Queries) / sizeof(struct query));