3 * This file defines the query dispatch table
5 * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
11 #include "mr_server.h"
17 * These are commonly used validation objects, defined here so that they
21 static struct valobj VOuser0[] = {
22 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
25 static struct valobj VOmach0[] = {
26 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
29 static struct valobj VOclu0[] = {
30 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
33 static struct valobj VOsnet0[] = {
34 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
37 static struct valobj VOlist0[] = {
38 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
41 static struct valobj VOfilesys0[] = {
42 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
45 static struct valobj VOcon0[] = {
46 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
49 static struct valobj VOnum0[] = {
54 * Commonly used validation records defined here so that they may
58 static struct validate VDmach = { VOmach0, 1 };
60 static struct validate VDfix_modby = {
74 static char *galo2_fields[] = {
75 "login", "unix_uid", "shell", "last", "first", "middle",
78 static char *galo_fields[] = {
79 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
82 static char *gual2_fields[] = {
84 "login", "unix_uid", "shell", "last", "first", "middle", "status",
85 "clearid", "class", "comments", "signature", "secure",
86 "modtime", "modby", "modwith",
89 static char *gual_fields[] = {
91 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
92 "status", "clearid", "class", "comments", "signature", "secure",
93 "modtime", "modby", "modwith",
96 static char *gubl2_fields[] = {
98 "login", "unix_uid", "shell", "last", "first", "middle", "status",
99 "clearid", "class", "modtime", "modby", "modwith",
102 static char *gubl_fields[] = {
104 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
105 "status", "clearid", "class", "modtime", "modby", "modwith",
108 static struct validate gubl_validate =
121 static char *guau2_fields[] = {
123 "login", "unix_uid", "shell", "last", "first", "middle", "status",
124 "clearid", "class", "comments", "signature", "secure",
125 "modtime", "modby", "modwith",
128 static char *guau_fields[] = {
130 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
131 "status", "clearid", "class", "comments", "signature", "secure",
132 "modtime", "modby", "modwith",
135 static char *guan2_fields[] = {
137 "login", "unix_uid", "shell", "last", "first", "middle", "status",
138 "clearid", "class", "comments", "signature", "secure",
139 "modtime", "modby", "modwith",
142 static char *guan_fields[] = {
144 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
145 "status", "clearid", "class", "comments", "signature", "secure",
146 "modtime", "modby", "modwith",
149 static struct validate guan_validate =
162 static char *guac2_fields[] = {
164 "login", "unix_uid", "shell", "last", "first", "middle", "status",
165 "clearid", "class", "comments", "signature", "secure",
166 "modtime", "modby", "modwith",
169 static char *guac_fields[] = {
171 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
172 "status", "clearid", "class", "comments", "signature", "secure",
173 "modtime", "modby", "modwith",
176 static char *guam2_fields[] = {
178 "login", "unix_uid", "shell", "last", "first", "middle", "status",
179 "clearid", "class", "comments", "signature", "secure",
180 "modtime", "modby", "modwith",
183 static char *guam_fields[] = {
185 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
186 "status", "clearid", "class", "comments", "signature", "secure",
187 "modtime", "modby", "modwith",
190 static char *gubu2_fields[] = {
192 "login", "unix_uid", "shell", "last", "first", "middle", "status",
193 "clearid", "class", "modtime", "modby", "modwith",
196 static char *gubu_fields[] = {
198 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
199 "status", "clearid", "class", "modtime", "modby", "modwith",
202 static struct validate gubu_validate =
215 static char *gubn2_fields[] = {
217 "login", "unix_uid", "shell", "last", "first", "middle", "status",
218 "clearid", "class", "modtime", "modby", "modwith",
221 static char *gubn_fields[] = {
223 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
224 "status", "clearid", "class", "modtime", "modby", "modwith",
227 static struct validate gubn_validate =
240 static char *gubc2_fields[] = {
242 "login", "unix_uid", "shell", "last", "first", "middle", "status",
243 "clearid", "class", "modtime", "modby", "modwith",
246 static char *gubc_fields[] = {
248 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
249 "status", "clearid", "class", "modtime", "modby", "modwith",
252 static char *gubm2_fields[] = {
254 "login", "unix_uid", "shell", "last", "first", "middle", "status",
255 "clearid", "class", "modtime", "modby", "modwith",
258 static char *gubm_fields[] = {
260 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
261 "middle", "status", "clearid", "class", "modtime", "modby", "modwith",
264 static char *auac2_fields[] = {
265 "login", "unix_uid", "shell", "last", "first", "middle", "status",
266 "clearid", "class", "comments", "signature", "secure",
269 static char *auac_fields[] = {
270 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
271 "middle", "status", "clearid", "class", "comments", "signature", "secure",
274 static struct valobj auac2_valobj[] = {
275 {V_CHAR, 0, USERS_TABLE, "login"},
277 {V_CHAR, 2, USERS_TABLE, "shell"},
278 {V_CHAR, 3, USERS_TABLE, "last"},
279 {V_CHAR, 4, USERS_TABLE, "first"},
280 {V_CHAR, 5, USERS_TABLE, "middle"},
282 {V_CHAR, 7, USERS_TABLE, "clearid"},
283 {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS},
284 {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
288 static struct valobj auac_valobj[] = {
289 {V_CHAR, 0, USERS_TABLE, "login"},
291 {V_CHAR, 2, USERS_TABLE, "shell"},
292 {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
293 {V_CHAR, 4, USERS_TABLE, "last"},
294 {V_CHAR, 5, USERS_TABLE, "first"},
295 {V_CHAR, 6, USERS_TABLE, "middle"},
297 {V_CHAR, 8, USERS_TABLE, "clearid"},
298 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
299 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
303 static struct validate auac2_validate = {
315 static struct validate auac_validate = {
327 static struct validate ausr2_validate = {
339 static struct validate ausr_validate = {
351 static char *rusr_fields[] = {
352 "unix_uid", "login", "pobox_type"
355 static struct valobj rusr_valobj[] = {
357 {V_CHAR, 1, USERS_TABLE, "login"},
360 static struct validate rusr_validate = {
372 static char *uuac2_fields[] = {
374 "newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
375 "clearid", "class", "comments", "signature", "secure",
378 static char *uuac_fields[] = {
380 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
381 "middle", "status", "clearid", "class", "comments", "signature", "secure",
384 static struct valobj uuac2_valobj[] = {
385 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
386 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
388 {V_CHAR, 3, USERS_TABLE, "shell"},
389 {V_CHAR, 4, USERS_TABLE, "first"},
390 {V_CHAR, 5, USERS_TABLE, "last"},
391 {V_CHAR, 6, USERS_TABLE, "middle"},
393 {V_CHAR, 8, USERS_TABLE, "clearid"},
394 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
395 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
399 static struct valobj uuac_valobj[] = {
400 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
401 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
403 {V_CHAR, 3, USERS_TABLE, "shell"},
404 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
405 {V_CHAR, 5, USERS_TABLE, "first"},
406 {V_CHAR, 6, USERS_TABLE, "last"},
407 {V_CHAR, 7, USERS_TABLE, "middle"},
409 {V_CHAR, 9, USERS_TABLE, "clearid"},
410 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
411 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
415 static struct validate uuac2_validate = {
427 static struct validate uuac_validate = {
439 static struct validate uusr2_validate = {
451 static struct validate uusr_validate = {
463 static char *uush_fields[] = {
468 static struct valobj uush_valobj[] = {
469 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
470 {V_CHAR, 1, USERS_TABLE, "shell"},
473 static struct validate uush_validate = {
485 static char *uuws_fields[] = {
490 static struct valobj uuws_valobj[] = {
491 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
492 {V_CHAR, 1, USERS_TABLE, "winconsoleshell"},
495 static struct validate uuws_validate = {
507 static char *uust_fields[] = {
512 static char *uuss_fields[] = {
517 static struct valobj uust_valobj[] = {
518 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
523 static struct validate uust_validate = {
535 static char *dusr_fields[] = {
539 static struct validate dusr_validate = {
551 static char *aurv_fields[] = {
552 "login", "reservation",
555 static struct validate aurv_validate = {
567 static char *gurv_fields[] = {
572 static struct validate gurv_validate = {
581 get_user_reservations,
584 static char *gubr_fields[] = {
589 static struct validate gubr_validate = {
598 get_user_by_reservation,
601 static char *gkum_fields[] = { "login", "kerberos",
602 "login", "kerberos" };
604 static char *akum_fields[] = { "login", "kerberos" };
606 static struct valobj akum_valobj[] =
608 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
609 {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
612 static struct validate akum_validate =
617 "users_id = %d or string_id = %d",
625 static struct validate dkum_validate =
630 "users_id = %d and string_id = %d",
638 static char *gfbl_fields[] = {
640 "login", "fullname", "nickname", "home_addr",
641 "home_phone", "office_addr", "office_phone", "department",
642 "affiliation", "modtime", "modby", "modwith",
645 static struct validate gfbl_validate = {
657 static char *ufbl_fields[] = {
659 "fullname", "nickname", "home_addr",
660 "home_phone", "office_addr", "office_phone", "department",
664 static struct valobj ufbl_valobj[] = {
665 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
666 {V_LEN, 1, USERS_TABLE, "fullname"},
667 {V_LEN, 2, USERS_TABLE, "nickname"},
668 {V_LEN, 3, USERS_TABLE, "home_addr"},
669 {V_LEN, 4, USERS_TABLE, "home_phone"},
670 {V_LEN, 5, USERS_TABLE, "office_addr"},
671 {V_LEN, 6, USERS_TABLE, "office_phone"},
672 {V_LEN, 7, USERS_TABLE, "department"},
673 {V_LEN, 8, USERS_TABLE, "affiliation"},
676 static struct validate ufbl_validate = {
688 static char *gpob_fields[] = {
690 "login", "type", "box", "address", "modtime", "modby", "modwith",
693 static struct validate gpob_validate = {
697 "potype != 'NONE' and users_id = %d",
705 static char *gpox_fields[] = {
706 "login", "type", "box",
709 static struct validate gpox_validate = {
721 static char *spob_fields[] = {
722 "login", "type", "box",
725 static struct valobj spob_valobj[] = {
726 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
727 {V_TYPE, 1, 0, "pobox", 0, MR_TYPE},
730 static struct validate spob_validate = /* SET_POBOX */
743 static struct validate spop_validate = /* SET_POBOX_POP */
756 static struct validate dpob_validate = /* DELETE_POBOX */
769 static char *gmac_fields[] = {
771 "name", "type", "modtime", "modby", "modwith",
774 static char *ghst2_fields[] = {
775 "name", "address", "location", "network",
776 "name", "vendor", "model", "os", "location", "contact", "use",
777 "status", "status_change", "network", "address", "ace_type",
778 "ace_name", "admin_comment", "ops_comment", "created", "creator",
779 "inuse", "modtime", "modby", "modwith",
782 static char *ghbh2_fields[] = {
784 "name", "vendor", "model", "os", "location", "contact", "use",
785 "status", "status_change", "network", "address", "ace_type",
786 "ace_name", "admin_comment", "ops_comment", "created", "creator",
787 "inuse", "modtime", "modby", "modwith",
790 static char *ghst6_fields[] = {
791 "name", "address", "location", "network",
792 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
793 "use", "status", "status_change", "network", "address", "ace_type",
794 "ace_name", "admin_comment", "ops_comment", "created", "creator",
795 "inuse", "modtime", "modby", "modwith",
798 static char *ghbh6_fields[] = {
800 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
801 "use", "status", "status_change", "network", "address", "ace_type",
802 "ace_name", "admin_comment", "ops_comment", "created", "creator",
803 "inuse", "modtime", "modby", "modwith",
806 static char *ghst_fields[] = {
807 "name", "address", "location", "network",
808 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
809 "account_number", "use", "status", "status_change", "network", "address",
810 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
811 "inuse", "modtime", "modby", "modwith",
814 static char *ghbh_fields[] = {
816 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
817 "account_number", "use", "status", "status_change", "network", "address",
818 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
819 "inuse", "modtime", "modby", "modwith",
822 static struct validate ghst_validate = {
834 static char *ghha_fields[] = {
839 static char *ahst2_fields[] = {
840 "name", "vendor", "model", "os", "location", "contact", "use",
841 "status", "subnet", "address", "ace_type", "ace_name",
842 "admin_comment", "ops_comment",
845 static struct valobj ahst2_valobj[] = {
846 {V_CHAR, 0, MACHINE_TABLE, "name"},
847 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
848 {V_CHAR, 2, MACHINE_TABLE, "model"},
849 {V_CHAR, 3, MACHINE_TABLE, "os"},
850 {V_CHAR, 4, MACHINE_TABLE, "location"},
851 {V_CHAR, 5, MACHINE_TABLE, "contact"},
854 {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
855 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
856 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
857 {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
858 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
861 static struct validate ahst2_validate = {
865 "name = UPPER('%s')",
870 set_uppercase_modtime,
873 static char *ahst6_fields[] = {
874 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
875 "use", "status", "subnet", "address", "ace_type", "ace_name",
876 "admin_comment", "ops_comment",
879 static struct valobj ahst6_valobj[] = {
880 {V_CHAR, 0, MACHINE_TABLE, "name"},
881 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
882 {V_CHAR, 2, MACHINE_TABLE, "model"},
883 {V_CHAR, 3, MACHINE_TABLE, "os"},
884 {V_CHAR, 4, MACHINE_TABLE, "location"},
885 {V_CHAR, 5, MACHINE_TABLE, "contact"},
886 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
889 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
890 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
891 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
892 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
893 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
896 static struct validate ahst6_validate = {
900 "name = UPPER('%s')",
905 set_uppercase_modtime,
908 static char *ahst_fields[] = {
909 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
910 "account_number", "use", "status", "subnet", "address", "ace_type",
911 "ace_name", "admin_comment", "ops_comment",
914 static struct valobj ahst_valobj[] = {
915 {V_CHAR, 0, MACHINE_TABLE, "name"},
916 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
917 {V_CHAR, 2, MACHINE_TABLE, "model"},
918 {V_CHAR, 3, MACHINE_TABLE, "os"},
919 {V_CHAR, 4, MACHINE_TABLE, "location"},
920 {V_CHAR, 5, MACHINE_TABLE, "contact"},
921 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
922 {V_CHAR, 7, MACHINE_TABLE, "account_number"},
925 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
926 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
927 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
928 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
929 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
932 static struct validate ahst_validate = {
936 "name = UPPER('%s')",
941 set_uppercase_modtime,
944 static char *uhst2_fields[] = {
946 "newname", "vendor", "model", "os", "location", "contact", "use",
947 "status", "subnet", "address", "ace_type", "ace_name",
948 "admin_comment", "ops_comment",
951 static struct valobj uhst2_valobj[] = {
952 {V_CHAR, 0, MACHINE_TABLE, "name"},
953 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
954 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
955 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
956 {V_CHAR, 3, MACHINE_TABLE, "model"},
957 {V_CHAR, 4, MACHINE_TABLE, "os"},
958 {V_CHAR, 5, MACHINE_TABLE, "location"},
959 {V_CHAR, 6, MACHINE_TABLE, "contact"},
962 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
963 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
964 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
965 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
966 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
969 static struct validate uhst2_validate = {
981 static char *uhst6_fields[] = {
983 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
984 "use", "status", "subnet", "address", "ace_type", "ace_name",
985 "admin_comment", "ops_comment",
988 static struct valobj uhst6_valobj[] = {
989 {V_CHAR, 0, MACHINE_TABLE, "name"},
990 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
991 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
992 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
993 {V_CHAR, 3, MACHINE_TABLE, "model"},
994 {V_CHAR, 4, MACHINE_TABLE, "os"},
995 {V_CHAR, 5, MACHINE_TABLE, "location"},
996 {V_CHAR, 6, MACHINE_TABLE, "contact"},
997 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1000 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1001 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1002 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
1003 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1004 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1007 static struct validate uhst6_validate = {
1019 static char *uhst_fields[] = {
1021 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1022 "account_number", "use", "status", "subnet", "address", "ace_type",
1023 "ace_name", "admin_comment", "ops_comment",
1026 static struct valobj uhst_valobj[] = {
1027 {V_CHAR, 0, MACHINE_TABLE, "name"},
1028 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1029 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1030 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1031 {V_CHAR, 3, MACHINE_TABLE, "model"},
1032 {V_CHAR, 4, MACHINE_TABLE, "os"},
1033 {V_CHAR, 5, MACHINE_TABLE, "location"},
1034 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1035 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1036 {V_CHAR, 8, MACHINE_TABLE, "account_number"},
1039 {V_ID, 11, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1040 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
1041 {V_TYPEDATA, 14, 0, 0, 0, MR_ACE},
1042 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1043 {V_ID, 16, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1046 static struct validate uhst_validate = {
1058 static char *uhha_fields[] = {
1063 static struct valobj uhha_valobj[] = {
1064 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1065 {V_CHAR, 1, MACHINE_TABLE, "hwaddr"},
1068 static struct validate uhha_validate = {
1080 static char *dhst_fields[] = {
1084 static struct validate dhst_validate = {
1096 static char *ghal_fields[] = {
1097 "alias", "canonical_hostname",
1098 "alias", "canonical_hostname"
1101 static struct validate ghal_validate = {
1113 static struct valobj ahal_valobj[] = {
1114 {V_CHAR, 0, HOSTALIAS_TABLE, "name"},
1115 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1118 static struct validate ahal_validate = {
1122 "name = UPPER('%s')",
1130 static struct valobj dhal_valobj[] = {
1131 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1134 static struct validate dhal_validate = {
1138 "name = UPPER('%s') AND mach_id = %d",
1146 static char *gsnt2_fields[] = {
1148 "name", "description", "address", "mask", "low", "high", "prefix",
1149 "ace_type", "ace_name", "modtime", "modby", "modwith"
1152 static char *gsnt_fields[] = {
1154 "name", "description", "status", "address", "mask", "low", "high", "prefix",
1155 "ace_type", "ace_name", "modtime", "modby", "modwith"
1158 static struct validate gsnt_validate = {
1170 static char *asnt2_fields[] = {
1171 "name", "description", "address", "mask", "low", "high", "prefix",
1172 "ace_type", "ace_name",
1175 static struct valobj asnt2_valobj[] = {
1176 {V_CHAR, 0, SUBNET_TABLE, "name"},
1177 {V_LEN, 1, SUBNET_TABLE, "description"},
1182 {V_LEN, 6, SUBNET_TABLE, "prefix"},
1183 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1184 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
1187 static struct validate asnt2_validate =
1192 "name = UPPER('%s')",
1197 set_uppercase_modtime,
1200 static char *asnt_fields[] = {
1201 "name", "description", "status", "address", "mask", "low", "high", "prefix",
1202 "ace_type", "ace_name",
1205 static struct valobj asnt_valobj[] = {
1206 {V_CHAR, 0, SUBNET_TABLE, "name"},
1207 {V_LEN, 1, SUBNET_TABLE, "description"},
1213 {V_LEN, 7, SUBNET_TABLE, "prefix"},
1214 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1215 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
1218 static struct validate asnt_validate =
1223 "name = UPPER('%s')",
1228 set_uppercase_modtime,
1231 static char *usnt2_fields[] = {
1233 "newname", "description", "address", "mask", "low", "high", "prefix",
1234 "ace_type", "ace_name",
1237 static struct valobj usnt2_valobj[] = {
1238 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1239 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1240 {V_LEN, 2, SUBNET_TABLE, "description"},
1245 {V_LEN, 7, SUBNET_TABLE, "prefix"},
1246 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1247 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
1250 static struct validate usnt2_validate =
1263 static char *usnt_fields[] = {
1265 "newname", "description", "status", "address", "mask", "low", "high",
1266 "prefix", "ace_type", "ace_name",
1269 static struct valobj usnt_valobj[] = {
1270 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1271 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1272 {V_LEN, 2, SUBNET_TABLE, "description"},
1278 {V_LEN, 8, SUBNET_TABLE, "prefix"},
1279 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1280 {V_TYPEDATA, 10, 0, 0, 0, MR_ACE},
1283 static struct validate usnt_validate =
1296 static char *dsnt_fields[] = {
1300 static struct validate dsnt_validate = {
1312 static char *gclu_fields[] = {
1314 "name", "description", "location", "modtime", "modby", "modwith",
1317 static char *aclu_fields[] = {
1318 "name", "description", "location",
1321 static struct valobj aclu_valobj[] = {
1322 {V_CHAR, 0, CLUSTERS_TABLE, "name"},
1323 {V_LEN, 1, CLUSTERS_TABLE, "description"},
1324 {V_LEN, 2, CLUSTERS_TABLE, "location"},
1327 static struct validate aclu_validate =
1340 static char *uclu_fields[] = {
1342 "newname", "description", "location",
1345 static struct valobj uclu_valobj[] = {
1346 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1347 {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE},
1348 {V_LEN, 2, CLUSTERS_TABLE, "description"},
1349 {V_LEN, 3, CLUSTERS_TABLE, "location"},
1352 static struct validate uclu_validate = {
1364 static char *dclu_fields[] = {
1368 static struct validate dclu_validate = {
1380 static char *gmcm_fields[] = {
1381 "machine", "cluster",
1382 "machine", "cluster",
1385 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
1386 { /* DELETE_MACHINE_FROM_CLUSTER */
1387 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1388 {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1391 static struct validate amtc_validate = /* for amtc and dmfc */
1396 "mach_id = %d and clu_id = %d",
1401 set_mach_modtime_by_id,
1404 static char *gcld_fields[] = {
1405 "cluster", "serv_label",
1406 "cluster", "serv_label", "serv_cluster",
1409 static char *acld_fields[] = {
1410 "cluster", "serv_label", "serv_cluster",
1413 static struct valobj acld_valobj[] =
1415 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1416 {V_CHAR, 1, SVC_TABLE, "serv_label"},
1417 {V_CHAR, 2, SVC_TABLE, "serv_cluster"}
1420 static struct validate acld_validate =
1425 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1430 set_cluster_modtime_by_id,
1433 static struct validate dcld_validate =
1438 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1443 set_cluster_modtime_by_id,
1446 static char *glin2_fields[] = {
1448 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1449 "ace_type", "ace_name", "description", "modtime", "modby", "modwith",
1452 static char *glin3_fields[] = {
1454 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1455 "nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby",
1459 static char *glin_fields[] = {
1461 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1462 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1463 "description", "modtime", "modby", "modwith",
1466 static struct validate glin_validate = {
1473 access_vis_list_by_name,
1478 static char *alis2_fields[] = {
1479 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1480 "ace_type", "ace_name", "description",
1483 static struct valobj alis2_valobj[] = {
1484 {V_CHAR, 0, LIST_TABLE, "name"},
1491 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1492 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1493 {V_LEN, 9, LIST_TABLE, "description"},
1496 static struct validate alis2_validate = {
1508 static char *alis3_fields[] = {
1509 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1510 "nfsgroup", "ace_type", "ace_name", "description",
1513 static struct valobj alis3_valobj[] = {
1514 {V_CHAR, 0, LIST_TABLE, "name"},
1522 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1523 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1524 {V_LEN, 10, LIST_TABLE, "description"},
1527 static struct validate alis3_validate = {
1539 static char *alis_fields[] = {
1540 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1541 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1545 static struct valobj alis_valobj[] = {
1546 {V_CHAR, 0, LIST_TABLE, "name"},
1554 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1555 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1556 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1557 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1558 {V_LEN, 12, LIST_TABLE, "description"},
1561 static struct validate alis_validate = {
1573 static char *ulis2_fields[] = {
1575 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1576 "ace_type", "ace_name", "description",
1579 static struct valobj ulis2_valobj[] = {
1580 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1581 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1588 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1589 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1590 {V_LEN, 10, LIST_TABLE, "description"},
1593 static struct validate ulis2_validate = {
1605 static char *ulis3_fields[] = {
1607 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1608 "nfsgroup", "ace_type", "ace_name", "description",
1611 static struct valobj ulis3_valobj[] = {
1612 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1613 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1621 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1622 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1623 {V_LEN, 11, LIST_TABLE, "description"},
1626 static struct validate ulis3_validate = {
1638 static char *ulis_fields[] = {
1640 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1641 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1645 static struct valobj ulis_valobj[] = {
1646 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1647 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1655 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1656 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1657 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1658 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
1659 {V_LEN, 13, LIST_TABLE, "description"},
1662 static struct validate ulis_validate = {
1674 static char *dlis_fields[] = {
1678 static struct validate dlis_validate = {
1690 static char *amtl_fields[] = {
1691 "list_name", "member_type", "member_name",
1694 static char *atml_fields[] = {
1695 "list_name", "member_type", "member_name", "tag",
1698 static struct valobj amtl_valobj[] = {
1699 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1700 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
1701 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
1702 {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1705 static struct validate amtl_validate =
1718 static struct validate atml_validate =
1731 static struct validate tmol_validate =
1744 static struct validate dmfl_validate =
1754 delete_member_from_list,
1757 static char *gaus_fields[] = {
1758 "ace_type", "ace_name",
1759 "use_type", "use_name",
1762 static struct valobj gaus_valobj[] = {
1763 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1764 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1767 static struct validate gaus_validate = {
1779 static char *ghbo_fields[] = {
1780 "ace_type", "ace_name",
1784 static struct valobj ghbo_valobj[] = {
1785 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1786 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1789 static struct validate ghbo_validate = {
1801 static char *qgli_fields[] = {
1802 "active", "publicflg", "hidden", "maillist", "grouplist",
1806 static struct valobj qgli_valobj[] = {
1807 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1808 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1809 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1810 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1811 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1814 static struct validate qgli_validate = {
1823 qualified_get_lists,
1826 static char *gmol_fields[] = {
1828 "member_type", "member_name",
1831 static char *gtml_fields[] = {
1833 "member_type", "member_name", "tag",
1836 static struct validate gmol_validate = {
1843 access_visible_list,
1845 get_members_of_list,
1848 static char *glom_fields[] = {
1849 "member_type", "member_name",
1850 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
1853 static struct valobj glom_valobj[] = {
1854 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
1855 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1858 static struct validate glom_validate = {
1867 get_lists_of_member,
1870 static char *cmol_fields[] = {
1875 static struct validate cmol_validate = {
1882 access_visible_list,
1884 count_members_of_list,
1887 static char *gsin_fields[] = {
1889 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
1890 "type", "enable", "inprogress", "harderror", "errmsg",
1891 "ace_type", "ace_name", "modtime", "modby", "modwith",
1894 static struct validate gsin_validate =
1907 static char *qgsv_fields[] = {
1908 "enable", "inprogress", "harderror",
1912 static struct valobj qgsv_valobj[] = {
1913 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1914 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1915 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1918 static struct validate qgsv_validate = {
1927 qualified_get_server,
1930 static char *asin_fields[] = {
1931 "service", "update_int", "target_file", "script", "type", "enable",
1932 "ace_type", "ace_name",
1935 static struct valobj asin_valobj[] = {
1936 {V_CHAR, 0, SERVERS_TABLE, "name"},
1938 {V_LEN, 2, SERVERS_TABLE, "target_file"},
1939 {V_LEN, 3, SERVERS_TABLE, "script"},
1940 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
1942 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
1943 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
1946 static struct validate asin_validate = /* for asin, usin */
1951 "name = UPPER('%s')",
1956 set_uppercase_modtime,
1959 static struct validate rsve_validate = {
1963 "name = UPPER('%s')",
1968 set_uppercase_modtime,
1971 static char *ssif_fields[] = {
1972 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
1975 static struct valobj ssif_valobj[] = {
1976 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
1981 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
1984 static struct validate ssif_validate = {
1988 "name = UPPER('%s')",
1996 static char *dsin_fields[] = {
2000 static struct validate dsin_validate = {
2004 "name = UPPER('%s')",
2012 static char *gshi_fields[] = {
2013 "service", "machine",
2014 "service", "machine", "enable", "override", "success", "inprogress",
2015 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
2016 "value3", "modtime", "modby", "modwith",
2019 static struct validate gshi_validate = {
2031 static char *qgsh_fields[] = {
2032 "service", "enable", "override", "success", "inprogress", "hosterror",
2033 "service", "machine",
2036 static struct valobj qgsh_valobj[] = {
2037 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2038 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2039 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2040 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2041 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
2044 static struct validate qgsh_validate = {
2053 qualified_get_serverhost,
2056 static char *ashi_fields[] = {
2057 "service", "machine", "enable", "value1", "value2", "value3",
2060 static struct valobj ashi_valobj[] = {
2061 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2062 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2066 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
2069 static struct validate ashi_validate = /* ashi & ushi */
2074 "service = UPPER('%s') AND mach_id = %d",
2079 set_serverhost_modtime,
2082 static struct validate rshe_validate =
2087 "service = UPPER('%s') AND mach_id = %d",
2092 set_serverhost_modtime,
2095 static struct validate ssho_validate =
2100 "service = UPPER('%s') AND mach_id = %d",
2108 static char *sshi_fields[] = {
2109 "service", "machine", "override", "success", "inprogress",
2110 "hosterror", "errmsg", "ltt", "lts",
2113 static struct valobj sshi_valobj[] = {
2114 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2115 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2120 {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"},
2125 static struct validate sshi_validate =
2138 static char *dshi_fields[] = {
2139 "service", "machine",
2142 static struct validate dshi_validate =
2147 "service = UPPER('%s') AND mach_id = %d",
2155 static char *gslo_fields[] = {
2157 "server", "machine",
2160 static char *gfsl_fields[] = {
2162 "label", "type", "machine", "name", "mount", "access", "comments",
2163 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2166 static struct validate gfsl_validate = {
2178 static char *gfsm_fields[] = {
2180 "label", "type", "machine", "name", "mount", "access", "comments",
2181 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2184 static struct validate gfsm_validate = {
2196 static char *gfsn_fields[] = {
2197 "machine", "partition",
2198 "label", "type", "machine", "name", "mount", "access", "comments",
2199 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2202 static struct validate gfsn_validate = {
2214 static char *gfsp_fields[] = {
2216 "label", "type", "machine", "name", "mount", "access", "comments",
2217 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2220 static char *gfsg_fields[] = {
2222 "label", "type", "machine", "name", "mount", "access", "comments",
2223 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2226 static struct validate gfsg_validate = {
2238 static char *afil_fields[] = {
2239 "label", "type", "machine", "name", "mount", "access", "comments",
2240 "owner", "owners", "create", "lockertype",
2243 static struct valobj afil_valobj[] = {
2244 {V_CHAR, 0, FILESYS_TABLE, "label"},
2245 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
2246 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2247 {V_CHAR, 3, FILESYS_TABLE, "name"},
2248 {V_LEN, 4, FILESYS_TABLE, "mount"},
2249 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
2250 {V_LEN, 6, FILESYS_TABLE, "comments"},
2251 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
2252 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
2254 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
2257 static struct validate afil_validate = {
2266 set_filesys_modtime,
2269 static char *ufil_fields[] = {
2270 "label", "newlabel", "type", "machine", "name", "mount", "access",
2271 "comments", "owner", "owners", "create", "lockertype",
2274 static struct valobj ufil_valobj[] = {
2275 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2276 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
2277 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
2278 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2279 {V_CHAR, 4, FILESYS_TABLE, "name"},
2280 {V_LEN, 5, FILESYS_TABLE, "mount"},
2281 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
2282 {V_LEN, 7, FILESYS_TABLE, "comments"},
2283 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
2284 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
2286 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
2289 static struct validate ufil_validate = {
2298 set_filesys_modtime,
2301 static char *dfil_fields[] = {
2305 static struct validate dfil_validate = {
2317 static char *gfgm_fields[] = {
2318 "fsgroup", "filesys", "sortkey"
2321 static struct validate gfgm_validate = {
2333 static struct valobj aftg_valobj[] = {
2334 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2335 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2338 static struct validate aftg_validate = {
2342 "group_id = %d and filsys_id = %d",
2350 static char *ganf_fields[] = {
2351 "machine", "dir", "device", "status", "allocated", "size",
2352 "modtime", "modby", "modwith",
2355 static char *gnfp_fields[] = {
2357 "machine", "dir", "device", "status", "allocated", "size",
2358 "modtime", "modby", "modwith",
2361 static struct validate gnfp_validate = {
2373 static struct valobj anfp_valobj[] = {
2374 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2375 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2376 {V_LEN, 2, NFSPHYS_TABLE, "device"},
2382 static struct validate anfp_validate = {
2386 "mach_id = %d and dir = '%s'",
2391 set_nfsphys_modtime,
2394 static struct validate unfp_validate = {
2398 "mach_id = %d and dir = '%s'",
2403 set_nfsphys_modtime,
2406 static char *ajnf_fields[] = {
2407 "machine", "dir", "adjustment",
2410 static struct valobj ajnf_valobj[] = {
2411 {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE},
2412 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2416 static struct validate ajnf_validate = {
2420 "mach_id = %d and dir = '%s'",
2425 set_nfsphys_modtime,
2428 static char *dnfp_fields[] = {
2432 static struct validate dnfp_validate = {
2436 "mach_id = %d and dir = '%s'",
2441 set_nfsphys_modtime,
2444 static char *gqot_fields[] = {
2445 "filesys", "type", "name",
2446 "filesys", "type", "name", "quota", "dir", "machine",
2447 "modtime", "modby", "modwith",
2450 static struct valobj gqot_valobj[] = {
2451 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2452 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2455 static struct validate gqot_validate = {
2467 static char *gqbf_fields[] = {
2469 "filesys", "type", "name", "quota", "dir", "machine",
2470 "modtime", "modby", "modwith",
2473 static struct validate gqbf_validate = {
2485 static char *aqot_fields[] = {
2486 "filesys", "type", "name", "quota",
2489 static struct valobj aqot_valobj[] = {
2490 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2491 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2492 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2496 static struct validate aqot_validate = {
2500 "filsys_id = %d and type = '%s' and entity_id = %d",
2508 static struct validate uqot_validate = {
2512 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2520 static struct validate dqot_validate = {
2524 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2532 static char *gnfq_fields[] = {
2534 "filesys", "login", "quota", "dir", "machine",
2535 "modtime", "modby", "modwith",
2538 static struct validate gnfq_validate = {
2550 static char *gnqp_fields[] = {
2552 "filesys", "login", "quota", "dir", "machine",
2553 "modtime", "modby", "modwith",
2556 static char *anfq_fields[] = {
2557 "filesys", "login", "quota",
2560 static struct valobj anfq_valobj[] = {
2561 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2562 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
2566 static struct validate anfq_validate = {
2570 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2578 static struct validate unfq_validate = {
2582 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2590 static struct validate dnfq_validate = {
2594 "filsys_id = %d AND entity_id = %d",
2602 static char *gzcl2_fields[] = {
2604 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2605 "iws_type", "iws_name", "iui_type", "iui_name",
2606 "modtime", "modby", "modwith",
2609 static char *gzcl_fields[] = {
2611 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2612 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2613 "owner_id", "modtime", "modby", "modwith",
2616 static struct validate gzcl_validate = {
2628 static char *azcl2_fields[] = {
2629 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2630 "iws_type", "iws_name", "iui_type", "iui_name",
2633 static struct valobj azcl2_valobj[] = {
2634 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2635 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2636 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2637 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2638 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2639 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2640 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2641 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2642 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2645 static struct validate azcl2_validate = {
2657 static char *azcl_fields[] = {
2658 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2659 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2663 static struct valobj azcl_valobj[] = {
2664 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2665 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2666 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2667 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2668 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2669 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2670 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2671 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2672 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2673 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2674 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2677 static struct validate azcl_validate = {
2689 static char *uzcl2_fields[] = {
2690 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2691 "iws_type", "iws_name", "iui_type", "iui_name",
2694 static struct valobj uzcl2_valobj[] = {
2695 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2696 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2697 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2698 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2699 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2700 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2701 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2702 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2703 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2704 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2707 static struct validate uzcl2_validate = {
2719 static char *uzcl_fields[] = {
2720 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2721 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id",
2724 static struct valobj uzcl_valobj[] = {
2725 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2726 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2727 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2728 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2729 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2730 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2731 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2732 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2733 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2734 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2735 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
2736 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
2739 static struct validate uzcl_validate = {
2751 static struct validate dzcl_validate = {
2763 static char *gsha_fields[] = {
2765 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
2768 static struct validate gsha_validate =
2781 static char *asha_fields[] = {
2782 "machine", "ace_type", "ace_name",
2785 static struct valobj asha_valobj[] = {
2786 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2787 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
2788 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2791 static struct validate asha_validate =
2804 static char *gacl_fields[] = {
2805 "machine", "target",
2806 "machine", "target", "kind", "list",
2809 static char *aacl_fields[] = {
2810 "machine", "target", "kind", "list",
2813 static char *dacl_fields[] = {
2814 "machine", "target",
2817 static struct valobj aacl_valobj[] = {
2818 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2819 {V_CHAR, 1, ACL_TABLE, "target"},
2820 {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE},
2821 {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST},
2824 static struct validate gacl_validate =
2837 static struct validate aacl_validate =
2842 "mach_id = %d AND target = '%s'",
2850 static char *gsvc_fields[] = {
2851 "service", "protocol",
2852 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
2855 static char *asvc_fields[] = {
2856 "service", "protocol", "port", "description",
2859 static char *dsvc_fields[] = {
2860 "service", "protocol",
2863 static struct valobj asvc_valobj[] = {
2864 {V_CHAR, 0, SERVICES_TABLE, "name"},
2865 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
2867 {V_CHAR, 3, SERVICES_TABLE, "description"},
2870 static struct validate asvc_validate = {
2874 "name = '%s' AND protocol = '%s'",
2879 set_service_modtime,
2882 static struct validate dsvc_validate = {
2886 "name = '%s' AND protocol = '%s'",
2894 static char *gprn_fields[] = {
2896 "name", "type", "hwtype", "duplexname", "hostname",
2897 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2898 "banner", "location", "contact", "modtime", "modby", "modwith"
2901 static char *gpbd_fields[] = {
2903 "name", "type", "hwtype", "duplexname", "hostname",
2904 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2905 "banner", "location", "contact", "modtime", "modby", "modwith"
2908 static char *gpbe_fields[] = {
2910 "name", "type", "hwtype", "duplexname", "hostname",
2911 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2912 "banner", "location", "contact", "modtime", "modby", "modwith"
2915 static char *gpbh_fields[] = {
2917 "name", "type", "hwtype", "duplexname", "hostname",
2918 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2919 "banner", "location", "contact", "modtime", "modby", "modwith"
2922 static char *gpbr_fields[] = {
2924 "name", "type", "hwtype", "duplexname", "hostname",
2925 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2926 "banner", "location", "contact", "modtime", "modby", "modwith"
2929 static char *gpbl_fields[] = {
2931 "name", "type", "hwtype", "duplexname", "hostname",
2932 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2933 "banner", "location", "contact", "modtime", "modby", "modwith"
2936 static char *gpbc_fields[] = {
2938 "name", "type", "hwtype", "duplexname", "hostname",
2939 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2940 "banner", "location", "contact", "modtime", "modby", "modwith"
2943 static char *aprn_fields[] = {
2944 "printer", "type", "hwtype", "duplexname", "hostname",
2945 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2946 "banner", "location", "contact",
2949 static struct valobj aprn_valobj[] = {
2950 {V_CHAR, 0, PRINTERS_TABLE, "name"},
2951 {V_TYPE, 1, 0, "printertype", 0, MR_TYPE},
2952 {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE},
2953 {V_CHAR, 3, PRINTERS_TABLE, "duplexname"},
2954 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2955 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2956 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2957 {V_CHAR, 7, PRINTERS_TABLE, "rp"},
2958 {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2961 {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST},
2962 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
2964 {V_CHAR, 14, PRINTERS_TABLE, "location"},
2965 {V_CHAR, 15, PRINTERS_TABLE, "contact"},
2968 static struct validate aprn_validate = {
2980 static char *uprn_fields[] = {
2982 "printer", "type", "hwtype", "duplexname", "hostname",
2983 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
2984 "banner", "location", "contact",
2987 static struct valobj uprn_valobj[] = {
2988 {V_CHAR, 0, PRINTERS_TABLE, "name"},
2989 {V_CHAR, 1, PRINTERS_TABLE, "name"},
2990 {V_TYPE, 2, 0, "printertype", 0, MR_TYPE},
2991 {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE},
2992 {V_CHAR, 4, PRINTERS_TABLE, "duplexname"},
2993 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2994 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2995 {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2996 {V_CHAR, 8, PRINTERS_TABLE, "rp"},
2997 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3000 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3001 {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST},
3003 {V_CHAR, 15, PRINTERS_TABLE, "location"},
3004 {V_CHAR, 16, PRINTERS_TABLE, "contact"},
3007 static struct validate uprn_validate = {
3019 static struct validate dprn_validate = {
3031 static char *gpsv_fields[] = {
3033 "host", "kind", "printer_types", "owner_type", "owner_name",
3034 "lpc_acl", "modtime", "modby", "modwith"
3037 static struct valobj gpsv_valobj[] = {
3038 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3041 static struct validate gpsv_validate = {
3053 static char *apsv_fields[] = {
3054 "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl"
3057 static struct valobj apsv_valobj[] = {
3058 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3059 {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE},
3060 {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING},
3061 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
3062 {V_TYPEDATA, 4, 0, 0, 0, MR_ACE},
3063 {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST},
3066 static struct validate apsv_validate = {
3078 static char *dpsv_fields[] = {
3082 static struct validate dpsv_validate = {
3094 static char *gali_fields[] = {
3095 "name", "type", "trans",
3096 "name", "type", "trans",
3099 static char *aali_fields[] = {
3100 "name", "type", "trans",
3103 static struct valobj aali_valobj[] = {
3104 {V_CHAR, 0, ALIAS_TABLE, "name"},
3105 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
3106 {V_CHAR, 2, ALIAS_TABLE, "trans"},
3109 static struct validate aali_validate = {
3113 "name = '%s' and type = '%s' and trans = '%s'",
3121 static struct validate dali_validate = /* DELETE_ALIAS */
3126 "name = '%s' and type = '%s' and trans = '%s'",
3134 static char *gval_fields[] = {
3138 static struct valobj gval_valobj[] = {
3139 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
3142 static struct validate gval_validate = {
3154 static char *aval_fields[] = {
3158 static struct valobj aval_valobj[] = {
3159 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
3163 static struct validate aval_validate = /* for aval, uval, and dval */
3176 static char *dval_fields[] = {
3180 static char *gats_fields[] = {
3181 "table_name", "appends", "updates", "deletes",
3182 "modtime", "modby", "modwith",
3185 static char *_sdl_fields[] = {
3189 static struct validate _sdl_validate =
3202 static char *gusl_fields[] = {
3203 "login", "domain_sid",
3204 "login", "sid", "created",
3207 static struct validate gusl_validate =
3220 static char *glsn_fields[] = {
3221 "name", "domain_sid",
3222 "name", "sid", "created",
3225 static struct validate glsn_validate =
3238 static char *ausl_fields[] = {
3242 static struct validate ausl_validate =
3247 "users_id = %d AND sid = '%s'",
3255 static char *alsn_fields[] = {
3259 static struct validate alsn_validate =
3264 "list_id = %d AND sid = '%s'",
3272 static char *gdds_fields[] = {
3276 static char *gcon_fields[] = {
3278 "name", "description", "location", "contact",
3279 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3282 static struct validate gcon_validate = {
3294 static char *acon_fields[] = {
3295 "name", "description", "location", "contact",
3296 "ace_type", "ace_name", "memace_type", "memace_name",
3299 static struct valobj acon_valobj[] = {
3300 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3301 {V_LEN, 1, CONTAINERS_TABLE, "description"},
3302 {V_CHAR, 2, CONTAINERS_TABLE, "location"},
3303 {V_CHAR, 3, CONTAINERS_TABLE, "contact"},
3304 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
3305 {V_TYPEDATA, 5, 0, 0, 0, MR_ACE},
3306 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3307 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3310 static struct validate acon_validate =
3323 static char *ucon_fields[] = {
3325 "newname", "description", "location", "contact",
3326 "ace_type", "ace_name", "memace_type", "memace_name",
3329 static struct valobj ucon_valobj[] = {
3330 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3331 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3332 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3333 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3334 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3335 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3336 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3337 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3338 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3341 static struct validate ucon_validate =
3354 static char *dcon_fields[] = {
3358 static struct validate dcon_validate =
3371 static char *amcn_fields[] = {
3372 "machine", "container",
3375 static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */
3376 { /* DELETE_MACHINE_FROM_CONTAINER */
3377 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3378 {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3381 static struct validate amcn_validate = /* for amtn and dmfn */
3391 set_mach_modtime_by_id,
3394 static struct validate dmcn_validate = /* for amtn and dmfn */
3399 "mach_id = %d and cnt_id = %d",
3404 set_mach_modtime_by_id,
3407 static char *gmnm_fields[] = {
3409 "machine", "container",
3412 static char *gmoc_fields[] = {
3419 static struct validate gmoc_validate =
3429 get_machines_of_container,
3432 static char *gsoc_fields[] = {
3438 static struct validate gsoc_validate =
3448 get_subcontainers_of_container,
3451 static char *gtlc_fields[] = {
3456 /* Generalized Query Definitions */
3458 /* Multiple versions of the same query MUST be listed in ascending
3462 /* Note: For any query which uses prefetch_value, the vcnt should be
3463 * one less than the number of %-format specifiers in the tlist.
3466 struct query Queries[] = {
3468 /* Q_GALO - GET_ALL_LOGINS, v2 */
3475 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3485 /* Q_GALO - GET_ALL_LOGINS, v3 */
3492 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3502 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */
3503 "get_all_active_logins",
3509 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3519 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */
3520 "get_all_active_logins",
3526 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3536 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */
3537 "get_user_account_by_login",
3543 "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",
3546 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3553 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */
3554 "get_user_account_by_login",
3560 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
3563 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3570 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */
3571 "get_user_account_by_uid",
3577 "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",
3580 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3587 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */
3588 "get_user_account_by_uid",
3594 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
3597 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3604 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */
3605 "get_user_account_by_name",
3611 "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",
3614 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
3621 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */
3622 "get_user_account_by_name",
3628 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
3631 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
3638 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */
3639 "get_user_account_by_class",
3645 "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",
3648 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
3655 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */
3656 "get_user_account_by_class",
3662 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
3665 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
3672 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */
3673 "get_user_account_by_id",
3679 "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",
3682 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3689 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */
3690 "get_user_account_by_id",
3696 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
3699 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3706 /* Q_GUBL - GET_USER_BY_LOGIN, v2 */
3707 "get_user_by_login",
3713 "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",
3716 "u.login LIKE '%s' AND u.users_id != 0",
3723 /* Q_GUBL - GET_USER_BY_LOGIN, v3 */
3724 "get_user_by_login",
3730 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
3733 "u.login LIKE '%s' AND u.users_id != 0",
3740 /* Q_GUBU - GET_USER_BY_UID, v2 */
3747 "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",
3750 "u.unix_uid = %s AND u.users_id != 0",
3757 /* Q_GUBU - GET_USER_BY_UID, v3 */
3764 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
3767 "u.unix_uid = %s AND u.users_id != 0",
3774 /* Q_GUBN - GET_USER_BY_NAME, v2 */
3781 "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",
3784 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
3791 /* Q_GUBN - GET_USER_BY_NAME, v3 */
3798 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
3801 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
3808 /* Q_GUBC - GET_USER_BY_CLASS, v2 */
3809 "get_user_by_class",
3815 "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",
3818 "u.type = UPPER('%s') AND u.users_id != 0",
3825 /* Q_GUBC - GET_USER_BY_CLASS, v3 */
3826 "get_user_by_class",
3832 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
3835 "u.type = UPPER('%s') AND u.users_id != 0",
3842 /* Q_GUBM - GET_USER_BY_MITID, v2 */
3843 "get_user_by_mitid",
3849 "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",
3852 "u.clearid LIKE '%s' AND u.users_id != 0",
3859 /* Q_GUBM - GET_USER_BY_MITID, v3 */
3860 "get_user_by_mitid",
3866 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u",
3869 "u.clearid LIKE '%s' AND u.users_id != 0",
3876 /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */
3883 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
3884 * but using up one argv element.
3886 "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)",
3896 /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */
3903 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
3904 * but using up one argv element.
3906 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)",
3916 /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */
3923 "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)",
3933 /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */
3940 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s)",
3950 /* Q_RUSR - REGISTER_USER */
3967 /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */
3968 "update_user_account",
3974 /* See comment in auac about signature. */
3975 "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",
3985 /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */
3986 "update_user_account",
3992 /* See comment in auac about signature. */
3993 "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",
4003 /* Q_UUSR - UPDATE_USER, v2 */
4010 "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'",
4020 /* Q_UUSR - UPDATE_USER, v3 */
4027 "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'",
4037 /* Q_UUSH - UPDATE_USER_SHELL */
4038 "update_user_shell",
4044 "users SET shell = '%s'",
4054 /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
4055 "update_user_windows_shell",
4061 "users SET winconsoleshell = '%s'",
4071 /* Q_UUST - UPDATE_USER_STATUS */
4072 "update_user_status",
4078 "users SET status = %s",
4088 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
4089 "update_user_security_status",
4095 "users SET secure = %s",
4105 /* Q_DUSR - DELETE_USER */
4122 /* Q_AURV - ADD_USER_RESERVATION */
4123 "add_user_reservation",
4139 /* Q_GURV - GET_USER_RESERVATIONS */
4140 "get_user_reservations",
4156 /* Q_GUBR - GET_USER_BY_RESERVATION */
4157 "get_user_by_reservation",
4173 /* Q_DURV - DELETE_USER_RESERVATION */
4174 "delete_user_reservation",
4190 /* Q_GKUM - GET_KERBEROS_USER_MAP */
4191 "get_kerberos_user_map",
4197 "u.login, str.string FROM krbmap km, users u, strings str",
4200 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
4202 "u.login, str.string",
4207 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
4208 "add_kerberos_user_map",
4214 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
4224 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
4225 "delete_kerberos_user_map",
4234 "users_id = %d AND string_id = %d",
4241 /* Q_GFBL - GET_FINGER_BY_LOGIN */
4242 "get_finger_by_login",
4248 "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",
4258 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
4259 "update_finger_by_login",
4265 "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))",
4275 /* Q_GPOB - GET_POBOX */
4282 "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
4292 /* Q_GAPO - GET_ALL_POBOXES */
4299 "login, potype, pop_id || ':' || box_id FROM users",
4309 /* Q_GPOP - GET_POBOXES_POP */
4316 "login, potype, users_id FROM users",
4326 /* Q_GPOF - GET_POBOXES_SMTP */
4333 "login, potype, users_id FROM users",
4343 /* Q_SPOB - SET_POBOX */
4360 /* Q_SPOP - SET_POBOX_POP */
4377 /* Q_DPOB - DELETE_POBOX */
4384 "users SET potype = 'NONE'",
4394 /* Q_GHST - GET_HOST, v2 */
4401 "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",
4404 "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",
4411 /* Q_GHST - GET_HOST, v6 */
4418 "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",
4421 "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",
4428 /* Q_GHST - GET_HOST, v8 */
4435 "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",
4438 "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",
4445 /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */
4446 "get_host_by_hwaddr",
4452 "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",
4455 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4462 /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */
4463 "get_host_by_hwaddr",
4469 "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",
4472 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4479 /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */
4480 "get_host_by_hwaddr",
4486 "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",
4489 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
4496 /* Q_GHHA - GET_HOST_HWADDR */
4503 "m.hwaddr FROM machine m",
4506 "m.name LIKE UPPER('%s')",
4513 /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */
4520 "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)",
4530 /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */
4537 "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)",
4547 /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */
4554 "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)",
4564 /* Q_UHST - UPDATE_HOST, v2 */
4571 "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",
4581 /* Q_UHST - UPDATE_HOST, v6 */
4588 "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",
4598 /* Q_UHST - UPDATE_HOST, v8 */
4605 "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",
4615 /* Q_UHHA - UPDATE_HOST_HWADDR */
4616 "update_host_hwaddr",
4622 "machine SET hwaddr = NVL('%s', CHR(0))",
4632 /* Q_DHST - DELETE_HOST */
4649 /* Q_GMAC - GET_MACHINE */
4656 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
4659 "name LIKE UPPER('%s') AND mach_id != 0",
4666 /* Q_GHAL - GET_HOSTALIAS */
4673 "a.name, m.name FROM hostalias a, machine m",
4676 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
4683 /* Q_AHAL - ADD_HOSTALIAS */
4690 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)",
4700 /* Q_DHAL - DELETE_HOSTALIAS */
4710 "name = UPPER('%s') AND mach_id = %d",
4717 /* Q_GSNT - GET_SUBNET, v2 */
4724 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
4727 "name LIKE UPPER('%s')",
4734 /* Q_GSNT - GET_SUBNET, v8 */
4741 "name, description, status, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
4744 "name LIKE UPPER('%s')",
4751 /* Q_ASNT - ADD_SUBNET, v2 */
4758 "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)",
4768 /* Q_ASNT - ADD_SUBNET, v8 */
4775 "INTO subnet (name, description, status, saddr, mask, low, high, prefix, owner_type, owner_id, snet_id) VALUES (UPPER('%s'), NVL('%s', CHR(0)), %s, %d, %s, %s, %s, NVL('%s', CHR(0)), '%s', %d, %s)",
4785 /* Q_USNT - UPDATE_SUBNET, v2 */
4792 "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",
4802 /* Q_USNT - UPDATE_SUBNET, v8 */
4809 "subnet SET name = UPPER('%s'), description = NVL('%s', CHR(0)), status = %s, saddr = %s, mask = %s, low = %s, high = %s, prefix = NVL('%s', CHR(0)), owner_type = '%s', owner_id = %d",
4819 /* Q_DSNT - DELETE_SUBNET */
4836 /* Q_GCLU - GET_CLUSTER */
4843 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
4846 "name LIKE '%s' AND clu_id != 0",
4853 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
4860 "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)",
4870 /* Q_UCLU - UPDATE_CLUSTER */
4877 "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))",
4887 /* Q_DCLU - DELETE_CLUSTER */
4904 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
4905 "get_machine_to_cluster_map",
4911 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
4914 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
4921 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
4922 "add_machine_to_cluster",
4928 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
4938 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
4939 "delete_machine_from_cluster",
4948 "mach_id = %d AND clu_id = %d",
4955 /* Q_GCLD - GET_CLUSTER_DATA */
4962 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
4965 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
4967 "c.name, svc.serv_label",
4972 /* Q_ACLD - ADD_CLUSTER_DATA */
4979 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')",
4989 /* Q_DCLD - DELETE_CLUSTER_DATA */
4990 "delete_cluster_data",
4999 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
5006 /* Q_GLIN - GET_LIST_INFO, v2 */
5013 "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",
5023 /* Q_GLIN - GET_LIST_INFO, v3 */
5030 "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",
5040 /* Q_GLIN - GET_LIST_INFO, v4 */
5047 "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",
5057 /* Q_EXLN - EXPAND_LIST_NAMES */
5058 "expand_list_names",
5067 "name LIKE '%s' AND list_id != 0",
5074 /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */
5081 "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)",
5091 /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */
5098 "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)",
5108 /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */
5115 "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)",
5125 /* Q_ULIS - UPDATE_LIST, v2 */
5132 "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))",
5142 /* Q_ULIS - UPDATE_LIST, v3 */
5149 "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))",
5159 /* Q_ULIS, UPDATE_LIST, v4 */
5166 "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))",
5176 /* Q_DLIS - DELETE_LIST */
5193 /* Q_AMTL - ADD_MEMBER_TO_LIST */
5194 "add_member_to_list",
5210 /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */
5211 "add_tagged_member_to_list",
5227 /* Q_TMOL - TAG_MEMBER_OF_LIST */
5228 "tag_member_of_list",
5244 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
5245 "delete_member_from_list",
5261 /* Q_GAUS - GET_ACE_USE */
5278 /* Q_GHBO - GET_HOST_BY_OWNER */
5279 "get_host_by_owner",
5295 /* Q_QGLI - QUALIFIED_GET_LISTS */
5296 "qualified_get_lists",
5312 /* Q_GMOL - GET_MEMBERS_OF_LIST */
5313 "get_members_of_list",
5329 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
5330 "get_end_members_of_list",
5346 /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */
5347 "get_tagged_members_of_list",
5363 /* Q_GLOM - GET_LISTS_OF_MEMBER */
5364 "get_lists_of_member",
5380 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
5381 "count_members_of_list",
5397 /* Q_GSIN - GET_SERVER_INFO */
5404 "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",
5407 "name LIKE UPPER('%s')",
5414 /* Q_QGSV - QUALIFIED_GET_SERVER */
5415 "qualified_get_server",
5431 /* Q_ASIN - ADD_SERVER_INFO */
5438 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)",
5448 /* Q_USIN - UPDATE_SERVER_INFO */
5449 "update_server_info",
5455 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
5458 "name = UPPER('%s')",
5465 /* Q_RSVE - RESET_SERVER_ERROR */
5466 "reset_server_error",
5472 "servers SET harderror = 0, dfcheck = dfgen",
5475 "name = UPPER('%s')",
5482 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
5483 "set_server_internal_flags",
5489 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))",
5492 "name = UPPER('%s')",
5499 /* Q_DSIN - DELETE_SERVER_INFO */
5500 "delete_server_info",
5509 "name = UPPER('%s')",
5516 /* Q_GSHI - GET_SERVER_HOST_INFO */
5517 "get_server_host_info",
5523 "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",
5526 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
5528 "sh.service, m.name",
5533 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
5534 "qualified_get_server_host",
5550 /* Q_ASHI - ADD_SERVER_HOST_INFO */
5551 "add_server_host_info",
5557 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))",
5567 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
5568 "update_server_host_info",
5574 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))",
5577 "service = UPPER('%s') AND mach_id = %d",
5584 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
5585 "reset_server_host_error",
5591 "serverhosts SET hosterror = 0",
5594 "service = UPPER('%s') AND mach_id = %d",
5601 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
5602 "set_server_host_override",
5608 "serverhosts SET override = 1",
5611 "service = UPPER('%s') AND mach_id = %d",
5618 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
5619 "set_server_host_internal",
5625 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s",
5628 "service = UPPER('%s') AND mach_id = %d",
5635 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
5636 "delete_server_host_info",
5645 "service = UPPER('%s') AND mach_id = %d",
5652 /* Q_GSLO - GET_SERVER_LOCATIONS */
5653 "get_server_locations",
5659 "sh.service, m.name FROM serverhosts sh, machine m",
5662 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
5664 "sh.service, m.name",
5669 /* Q_GFSL - GET_FILESYS_BY_LABEL */
5670 "get_filesys_by_label",
5676 "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",
5679 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5686 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
5687 "get_filesys_by_machine",
5693 "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",
5696 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5703 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
5704 "get_filesys_by_nfsphys",
5710 "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",
5713 "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'",
5720 /* Q_GFSG - GET_FILESYS_BY_GROUP */
5721 "get_filesys_by_group",
5727 "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",
5730 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
5737 /* Q_GFSP - GET_FILESYS_BY_PATH */
5738 "get_filesys_by_path",
5744 "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",
5747 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
5754 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
5761 "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)",
5771 /* Q_UFIL - UPDATE_FILESYS */
5778 "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'",
5788 /* Q_DFIL - DELETE_FILESYS */
5805 /* Q_GFGM - GET_FSGROUP_MEMBERS */
5806 "get_fsgroup_members",
5812 "fs.label, fg.key FROM fsgroup fg, filesys fs",
5815 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
5822 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
5823 "add_filesys_to_fsgroup",
5829 "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')",
5839 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
5840 "remove_filesys_from_fsgroup",
5849 "group_id = %d AND filsys_id = %d",
5856 /* Q_GANF - GET_ALL_NFSPHYS */
5863 "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",
5866 "m.mach_id = np.mach_id",
5873 /* Q_GNFP - GET_NFSPHYS */
5880 "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",
5883 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
5890 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
5897 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)",
5907 /* Q_UNFP - UPDATE_NFSPHYS */
5914 "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s",
5917 "mach_id = %d AND dir = '%s'",
5924 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
5925 "adjust_nfsphys_allocation",
5931 "nfsphys SET allocated = allocated + %s",
5934 "mach_id = %d AND dir = '%s'",
5941 /* Q_DNFP - DELETE_NFSPHYS */
5951 "mach_id = %d AND dir = '%s'",
5958 /* Q_GQOT - GET_QUOTA */
5965 "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",
5968 "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",
5975 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
5976 "get_quota_by_filesys",
5982 "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",
5985 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
5992 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
5999 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
6009 /* Q_UQOT - UPDATE_QUOTA */
6016 "quota SET quota = %s",
6026 /* Q_DQOT - DELETE_QUOTA */
6043 /* Q_GNFQ - GET_NFS_QUOTAS */
6050 "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",
6053 "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'",
6055 "fs.label, u.login",
6060 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
6061 "get_nfs_quotas_by_partition",
6067 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
6070 "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",
6077 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
6084 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
6094 /* Q_UNFQ - UPDATE_NFS_QUOTA */
6101 "quota SET quota = %s",
6111 /* Q_DNFQ - DELETE_NFS_QUOTA */
6128 /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */
6135 "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",
6145 /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */
6152 "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",
6162 /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */
6169 "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)",
6179 /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */
6186 "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)",
6196 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */
6197 "update_zephyr_class",
6203 "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",
6213 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */
6214 "update_zephyr_class",
6220 "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",
6230 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
6231 "delete_zephyr_class",
6247 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
6248 "get_server_host_access",
6254 "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",
6257 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
6264 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
6265 "add_server_host_access",
6271 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)",
6281 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
6282 "update_server_host_access",
6288 "hostaccess SET acl_type = '%s', acl_id = %d",
6298 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
6299 "delete_server_host_access",
6315 /* Q_GACL - GET_ACL */
6322 "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l",
6325 "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id",
6327 "m.name, ac.target, ac.kind",
6332 /* Q_AACL - ADD_ACL */
6339 "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)",
6349 /* Q_DACL - DELETE_ACL */
6359 "mach_id = %d AND target = '%s'",
6366 /* Q_GSVC - GET_SERVICE */
6373 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
6376 "name LIKE '%s' AND protocol LIKE '%s'",
6383 /* Q_ASVC - ADD_SERVICE */
6390 "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))",
6400 /* Q_DSVC - DELETE_SERVICE */
6410 "name = '%s' AND protocol = '%s'",
6417 /* Q_GPRN - GET_PRINTER */
6424 "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",
6427 "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",
6434 /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */
6435 "get_printer_by_duplexname",
6441 "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",
6444 "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",
6451 /* Q_GPBE - GET_PRINTER_BY_ETHERNET */
6452 "get_printer_by_ethernet",
6458 "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",
6461 "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",
6468 /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */
6469 "get_printer_by_hostname",
6475 "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",
6478 "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",
6485 /* Q_GPBR - GET_PRINTER_BY_RM */
6486 "get_printer_by_rm",
6492 "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",
6495 "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",
6502 /* Q_GPBL - GET_PRINTER_BY_LOCATION */
6503 "get_printer_by_location",
6509 "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",
6512 "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",
6519 /* Q_GPBC - GET_PRINTER_BY_CONTACT */
6520 "get_printer_by_contact",
6526 "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",
6529 "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",
6536 /* Q_APRN - ADD_PRINTER */
6543 "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)))",
6553 /* Q_UPRN - UPDATE_PRINTER */
6560 "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))",
6570 /* Q_DPRN - DELETE_PRINTER */
6587 /* Q_GPSV - GET_PRINT_SERVER */
6594 "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",
6597 "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",
6604 /* Q_APSV - ADD_PRINT_SERVER */
6611 "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)",
6621 /* Q_UPSV - UPDATE_PRINT_SERVER */
6622 "update_print_server",
6628 "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d",
6638 /* Q_DPSV - DELETE_PRINT_SERVER */
6639 "delete_print_server",
6655 /* Q_GALI - GET_ALIAS */
6662 "name, type, trans FROM alias",
6665 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
6667 "type, name, trans",
6672 /* Q_AALI - ADD_ALIAS */
6679 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
6689 /* Q_DALI - DELETE_ALIAS */
6699 "name = '%s' AND type = '%s' AND trans = '%s'",
6706 /* Q_GVAL - GET_VALUE */
6713 "value FROM numvalues",
6723 /* Q_AVAL - ADD_VALUE */
6730 "INTO numvalues (name, value) VALUES ('%s', %s)",
6740 /* Q_UVAL - UPDATE_VALUE */
6747 "numvalues SET value = %s",
6757 /* Q_DVAL - DELETE_VALUE */
6774 /* Q_GATS - GET_ALL_TABLE_STATS */
6775 "get_all_table_stats",
6781 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
6791 /* Q__SDL - _SET_DEBUG_LEVEL */
6808 /* Q_GUSL - GET_USER_SIDS_BY_LOGIN, v4 */
6809 "get_user_sids_by_login",
6815 "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM users u, usersids us",
6818 "us.users_id = %d AND u.users_id = us.users_id AND SUBSTR(us.sid, 1, LENGTH(us.sid)-8) = '%s'",
6825 /* Q_AUSL - ADD_USER_SID_BY_LOGIN, v4 */
6826 "add_user_sid_by_login",
6832 "INTO usersids (users_id, sid) VALUES (%d, '%s')",
6842 /* Q_GLSN - GET_LIST_SIDS_BY_NAME, v4 */
6843 "get_list_sids_by_name",
6849 "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM list l, listsids ls",
6852 "ls.list_id = %d AND l.list_id = ls.list_id AND SUBSTR(ls.sid, 1, LENGTH(ls.sid)-8) = '%s'",
6859 /* Q_ALSN - ADD_LIST_SID_BY_NAME, v4 */
6860 "add_list_sid_by_name",
6866 "INTO listsids (list_id, sid) VALUES (%d, '%s')",
6876 /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */
6877 "get_distinct_domain_sids",
6883 "DISTINCT SUBSTR(sid, 1, LENGTH(sid)-8) FROM usersids",
6893 /* Q_GCON - GET_CONTAINER, v7 */
6900 "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",
6903 "name = '%s' AND cnt_id != 0",
6910 /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */
6917 "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)",
6927 /* Q_UCON - UPDATE_CONTAINER, v7 */
6944 /* Q_DCON - DELETE_CONTAINER, v7 */
6961 /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */
6962 "add_machine_to_container",
6968 "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)",
6978 /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */
6979 "delete_machine_from_container",
6988 "mach_id = %d AND cnt_id = %d",
6995 /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */
6996 "get_machine_to_container_map",
7002 "m.name, c.name FROM machine m, containers c, mcntmap mcn",
7005 "m.name = UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id",
7012 /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */
7013 "get_machines_of_container",
7029 /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */
7030 "get_subcontainers_of_container",
7046 /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v8 */
7047 "get_toplevel_containers",
7053 "name FROM containers",
7056 "name NOT LIKE '%%/%%'",
7064 int QueryCount = (sizeof(Queries) / sizeof(struct query));