3 * This file defines the query dispatch table
5 * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
10 #include <mit-copyright.h>
11 #include "mr_server.h"
17 * These are commonly used validation objects, defined here so that they
21 static struct valobj VOuser0[] = {
22 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
25 static struct valobj VOmach0[] = {
26 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
29 static struct valobj VOclu0[] = {
30 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
33 static struct valobj VOsnet0[] = {
34 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
37 static struct valobj VOlist0[] = {
38 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
41 static struct valobj VOfilesys0[] = {
42 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
45 static struct valobj VOcon0[] = {
46 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
49 static struct valobj VOnum0[] = {
54 * Commonly used validation records defined here so that they may
58 static struct validate VDmach = { VOmach0, 1 };
60 static struct validate VDfix_modby = {
74 static char *galo2_fields[] = {
75 "login", "unix_uid", "shell", "last", "first", "middle",
78 static char *galo_fields[] = {
79 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
82 static char *gual2_fields[] = {
84 "login", "unix_uid", "shell", "last", "first", "middle", "status",
85 "clearid", "class", "comments", "signature", "secure",
86 "modtime", "modby", "modwith",
89 static char *gual3_fields[] = {
91 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
92 "status", "clearid", "class", "comments", "signature", "secure", "modtime",
93 "modby", "modwith", "created", "creator",
96 static char *gual_fields[] = {
98 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
99 "status", "clearid", "class", "comments", "signature", "secure",
100 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
104 static char *gubl2_fields[] = {
106 "login", "unix_uid", "shell", "last", "first", "middle", "status",
107 "clearid", "class", "modtime", "modby", "modwith",
110 static char *gubl_fields[] = {
112 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
113 "status", "clearid", "class", "modtime", "modby", "modwith", "created",
117 static struct validate gubl2_validate =
130 static struct validate gubl_validate =
143 static char *guau2_fields[] = {
145 "login", "unix_uid", "shell", "last", "first", "middle", "status",
146 "clearid", "class", "comments", "signature", "secure",
147 "modtime", "modby", "modwith",
150 static char *guau3_fields[] = {
152 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
153 "status", "clearid", "class", "comments", "signature", "secure",
154 "modtime", "modby", "modwith", "created", "creator",
157 static char *guau_fields[] = {
159 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
160 "status", "clearid", "class", "comments", "signature", "secure",
161 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
165 static char *guan2_fields[] = {
167 "login", "unix_uid", "shell", "last", "first", "middle", "status",
168 "clearid", "class", "comments", "signature", "secure",
169 "modtime", "modby", "modwith",
172 static char *guan3_fields[] = {
174 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
175 "status", "clearid", "class", "comments", "signature", "secure",
176 "modtime", "modby", "modwith", "created", "creator",
179 static char *guan_fields[] = {
181 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
182 "status", "clearid", "class", "comments", "signature", "secure",
183 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
187 static struct validate guan2_validate =
200 static struct validate guan_validate =
213 static char *guac2_fields[] = {
215 "login", "unix_uid", "shell", "last", "first", "middle", "status",
216 "clearid", "class", "comments", "signature", "secure",
217 "modtime", "modby", "modwith",
220 static char *guac3_fields[] = {
222 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
223 "status", "clearid", "class", "comments", "signature", "secure",
224 "modtime", "modby", "modwith", "created", "creator",
227 static char *guac_fields[] = {
229 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
230 "status", "clearid", "class", "comments", "signature", "secure",
231 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
235 static char *guam2_fields[] = {
237 "login", "unix_uid", "shell", "last", "first", "middle", "status",
238 "clearid", "class", "comments", "signature", "secure",
239 "modtime", "modby", "modwith",
242 static char *guam3_fields[] = {
244 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
245 "status", "clearid", "class", "comments", "signature", "secure",
246 "modtime", "modby", "modwith", "created", "creator",
249 static char *guam_fields[] = {
251 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
252 "status", "clearid", "class", "comments", "signature", "secure",
253 "winhomedir", "winprofiledir", "modtime", "modby", "modwith", "created",
257 static char *gubu2_fields[] = {
259 "login", "unix_uid", "shell", "last", "first", "middle", "status",
260 "clearid", "class", "modtime", "modby", "modwith",
263 static char *gubu_fields[] = {
265 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
266 "status", "clearid", "class", "modtime", "modby", "modwith", "created",
270 static struct validate gubu2_validate =
283 static struct validate gubu_validate =
296 static char *gubn2_fields[] = {
298 "login", "unix_uid", "shell", "last", "first", "middle", "status",
299 "clearid", "class", "modtime", "modby", "modwith",
302 static char *gubn_fields[] = {
304 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
305 "status", "clearid", "class", "modtime", "modby", "modwith", "created",
309 static struct validate gubn2_validate =
322 static struct validate gubn_validate =
335 static char *gubc2_fields[] = {
337 "login", "unix_uid", "shell", "last", "first", "middle", "status",
338 "clearid", "class", "modtime", "modby", "modwith",
341 static char *gubc_fields[] = {
343 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
344 "status", "clearid", "class", "modtime", "modby", "modwith",
345 "created", "creator",
348 static char *gubm2_fields[] = {
350 "login", "unix_uid", "shell", "last", "first", "middle", "status",
351 "clearid", "class", "modtime", "modby", "modwith",
354 static char *gubm_fields[] = {
356 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
357 "middle", "status", "clearid", "class", "modtime", "modby", "modwith",
358 "created", "creator",
361 static char *auac2_fields[] = {
362 "login", "unix_uid", "shell", "last", "first", "middle", "status",
363 "clearid", "class", "comments", "signature", "secure",
366 static char *auac3_fields[] = {
367 "login", "unix_uid", "shell", "winconsoleshell", "last", "first",
368 "middle", "status", "clearid", "class", "comments", "signature", "secure",
371 static char *auac_fields[] = {
372 "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle",
373 "status", "clearid", "class", "comments", "signature", "secure",
374 "winhomedir", "winprofiledir",
377 static struct valobj auac2_valobj[] = {
378 {V_CHAR, 0, USERS_TABLE, "login"},
380 {V_CHAR, 2, USERS_TABLE, "shell"},
381 {V_CHAR, 3, USERS_TABLE, "last"},
382 {V_CHAR, 4, USERS_TABLE, "first"},
383 {V_CHAR, 5, USERS_TABLE, "middle"},
385 {V_CHAR, 7, USERS_TABLE, "clearid"},
386 {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS},
387 {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
391 static struct valobj auac3_valobj[] = {
392 {V_CHAR, 0, USERS_TABLE, "login"},
394 {V_CHAR, 2, USERS_TABLE, "shell"},
395 {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
396 {V_CHAR, 4, USERS_TABLE, "last"},
397 {V_CHAR, 5, USERS_TABLE, "first"},
398 {V_CHAR, 6, USERS_TABLE, "middle"},
400 {V_CHAR, 8, USERS_TABLE, "clearid"},
401 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
402 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
406 static struct valobj auac_valobj[] = {
407 {V_CHAR, 0, USERS_TABLE, "login"},
409 {V_CHAR, 2, USERS_TABLE, "shell"},
410 {V_CHAR, 3, USERS_TABLE, "winconsoleshell"},
411 {V_CHAR, 4, USERS_TABLE, "last"},
412 {V_CHAR, 5, USERS_TABLE, "first"},
413 {V_CHAR, 6, USERS_TABLE, "middle"},
415 {V_CHAR, 8, USERS_TABLE, "clearid"},
416 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
417 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
419 {V_LEN, 13, USERS_TABLE, "winhomedir"},
420 {V_LEN, 14, USERS_TABLE, "winprofiledir"},
423 static struct validate auac2_validate = {
435 static struct validate auac3_validate = {
447 static struct validate auac_validate = {
459 static struct validate ausr2_validate = {
471 static struct validate ausr3_validate = {
483 static struct validate ausr_validate = {
495 static char *rusr_fields[] = {
496 "unix_uid", "login", "pobox_type"
499 static struct valobj rusr_valobj[] = {
501 {V_CHAR, 1, USERS_TABLE, "login"},
504 static struct validate rusr_validate = {
516 static char *uuac2_fields[] = {
518 "newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
519 "clearid", "class", "comments", "signature", "secure",
522 static char *uuac3_fields[] = {
524 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
525 "middle", "status", "clearid", "class", "comments", "signature", "secure",
528 static char *uuac_fields[] = {
530 "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first",
531 "middle", "status", "clearid", "class", "comments", "signature", "secure",
532 "winhomedir", "winprofiledir",
535 static struct valobj uuac2_valobj[] = {
536 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
537 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
539 {V_CHAR, 3, USERS_TABLE, "shell"},
540 {V_CHAR, 4, USERS_TABLE, "first"},
541 {V_CHAR, 5, USERS_TABLE, "last"},
542 {V_CHAR, 6, USERS_TABLE, "middle"},
544 {V_CHAR, 8, USERS_TABLE, "clearid"},
545 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
546 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
550 static struct valobj uuac3_valobj[] = {
551 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
552 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
554 {V_CHAR, 3, USERS_TABLE, "shell"},
555 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
556 {V_CHAR, 5, USERS_TABLE, "first"},
557 {V_CHAR, 6, USERS_TABLE, "last"},
558 {V_CHAR, 7, USERS_TABLE, "middle"},
560 {V_CHAR, 9, USERS_TABLE, "clearid"},
561 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
562 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
566 static struct valobj uuac_valobj[] = {
567 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
568 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
570 {V_CHAR, 3, USERS_TABLE, "shell"},
571 {V_CHAR, 4, USERS_TABLE, "winconsoleshell"},
572 {V_CHAR, 5, USERS_TABLE, "first"},
573 {V_CHAR, 6, USERS_TABLE, "last"},
574 {V_CHAR, 7, USERS_TABLE, "middle"},
576 {V_CHAR, 9, USERS_TABLE, "clearid"},
577 {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS},
578 {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
580 {V_LEN, 14, USERS_TABLE, "winhomedir"},
581 {V_LEN, 15, USERS_TABLE, "winprofiledir"},
584 static struct validate uuac2_validate = {
596 static struct validate uuac3_validate = {
608 static struct validate uuac_validate = {
620 static struct validate uusr2_validate = {
632 static struct validate uusr3_validate = {
644 static struct validate uusr_validate = {
656 static char *uush_fields[] = {
661 static struct valobj uush_valobj[] = {
662 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
663 {V_CHAR, 1, USERS_TABLE, "shell"},
666 static struct validate uush_validate = {
678 static char *uuws_fields[] = {
683 static struct valobj uuws_valobj[] = {
684 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
685 {V_CHAR, 1, USERS_TABLE, "winconsoleshell"},
688 static struct validate uuws_validate = {
700 static char *uust_fields[] = {
705 static char *uuss_fields[] = {
710 static struct valobj uust_valobj[] = {
711 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
716 static struct validate uust_validate = {
728 static char *dusr_fields[] = {
732 static struct validate dusr_validate = {
744 static char *aurv_fields[] = {
745 "login", "reservation",
748 static struct validate aurv_validate = {
760 static char *gurv_fields[] = {
765 static struct validate gurv_validate = {
774 get_user_reservations,
777 static char *gubr_fields[] = {
782 static struct validate gubr_validate = {
791 get_user_by_reservation,
794 static char *gkum_fields[] = { "login", "kerberos",
795 "login", "kerberos" };
797 static char *akum_fields[] = { "login", "kerberos" };
799 static struct valobj akum_valobj[] =
801 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
802 {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
805 static struct validate akum_validate =
810 "users_id = %d or string_id = %d",
818 static struct validate dkum_validate =
823 "users_id = %d and string_id = %d",
831 static char *gfbl_fields[] = {
833 "login", "fullname", "nickname", "home_addr",
834 "home_phone", "office_addr", "office_phone", "department",
835 "affiliation", "modtime", "modby", "modwith",
838 static struct validate gfbl_validate = {
850 static char *ufbl_fields[] = {
852 "fullname", "nickname", "home_addr",
853 "home_phone", "office_addr", "office_phone", "department",
857 static struct valobj ufbl_valobj[] = {
858 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
859 {V_LEN, 1, USERS_TABLE, "fullname"},
860 {V_LEN, 2, USERS_TABLE, "nickname"},
861 {V_LEN, 3, USERS_TABLE, "home_addr"},
862 {V_LEN, 4, USERS_TABLE, "home_phone"},
863 {V_LEN, 5, USERS_TABLE, "office_addr"},
864 {V_LEN, 6, USERS_TABLE, "office_phone"},
865 {V_LEN, 7, USERS_TABLE, "department"},
866 {V_LEN, 8, USERS_TABLE, "affiliation"},
869 static struct validate ufbl_validate = {
881 static char *gpob_fields[] = {
883 "login", "type", "box", "address", "modtime", "modby", "modwith",
886 static struct validate gpob_validate = {
890 "potype != 'NONE' and users_id = %d",
898 static char *gpox_fields[] = {
899 "login", "type", "box",
902 static struct validate gpox_validate = {
914 static char *spob_fields[] = {
915 "login", "type", "box",
918 static struct valobj spob_valobj[] = {
919 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
920 {V_TYPE, 1, 0, "pobox", 0, MR_TYPE},
923 static struct validate spob_validate = /* SET_POBOX */
936 static struct validate spop_validate = /* SET_POBOX_POP */
949 static struct validate dpob_validate = /* DELETE_POBOX */
962 static char *gmac_fields[] = {
964 "name", "type", "modtime", "modby", "modwith",
967 static char *ghst2_fields[] = {
968 "name", "address", "location", "network",
969 "name", "vendor", "model", "os", "location", "contact", "use",
970 "status", "status_change", "network", "address", "ace_type",
971 "ace_name", "admin_comment", "ops_comment", "created", "creator",
972 "inuse", "modtime", "modby", "modwith",
975 static char *ghbh2_fields[] = {
977 "name", "vendor", "model", "os", "location", "contact", "use",
978 "status", "status_change", "network", "address", "ace_type",
979 "ace_name", "admin_comment", "ops_comment", "created", "creator",
980 "inuse", "modtime", "modby", "modwith",
983 static char *ghst6_fields[] = {
984 "name", "address", "location", "network",
985 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
986 "use", "status", "status_change", "network", "address", "ace_type",
987 "ace_name", "admin_comment", "ops_comment", "created", "creator",
988 "inuse", "modtime", "modby", "modwith",
991 static char *ghbh6_fields[] = {
993 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
994 "use", "status", "status_change", "network", "address", "ace_type",
995 "ace_name", "admin_comment", "ops_comment", "created", "creator",
996 "inuse", "modtime", "modby", "modwith",
999 static char *ghst_fields[] = {
1000 "name", "address", "location", "network",
1001 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1002 "account_number", "use", "status", "status_change", "network", "address",
1003 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1004 "inuse", "modtime", "modby", "modwith",
1007 static char *ghbh_fields[] = {
1009 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1010 "account_number", "use", "status", "status_change", "network", "address",
1011 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1012 "inuse", "modtime", "modby", "modwith",
1015 static char *ghba_fields[] = {
1017 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1018 "account_number", "use", "status", "status_change", "network", "address",
1019 "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator",
1020 "inuse", "modtime", "modby", "modwith",
1023 static struct validate ghst_validate = {
1035 static char *ghha_fields[] = {
1040 static char *ahst2_fields[] = {
1041 "name", "vendor", "model", "os", "location", "contact", "use",
1042 "status", "subnet", "address", "ace_type", "ace_name",
1043 "admin_comment", "ops_comment",
1046 static struct valobj ahst2_valobj[] = {
1047 {V_CHAR, 0, MACHINE_TABLE, "name"},
1048 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1049 {V_CHAR, 2, MACHINE_TABLE, "model"},
1050 {V_CHAR, 3, MACHINE_TABLE, "os"},
1051 {V_CHAR, 4, MACHINE_TABLE, "location"},
1052 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1055 {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1056 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1057 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
1058 {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1059 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1062 static struct validate ahst2_validate = {
1066 "name = UPPER('%s')",
1071 set_uppercase_modtime,
1074 static char *ahst6_fields[] = {
1075 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1076 "use", "status", "subnet", "address", "ace_type", "ace_name",
1077 "admin_comment", "ops_comment",
1080 static struct valobj ahst6_valobj[] = {
1081 {V_CHAR, 0, MACHINE_TABLE, "name"},
1082 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1083 {V_CHAR, 2, MACHINE_TABLE, "model"},
1084 {V_CHAR, 3, MACHINE_TABLE, "os"},
1085 {V_CHAR, 4, MACHINE_TABLE, "location"},
1086 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1087 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
1090 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1091 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1092 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1093 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1094 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1097 static struct validate ahst6_validate = {
1101 "name = UPPER('%s')",
1106 set_uppercase_modtime,
1109 static char *ahst_fields[] = {
1110 "name", "vendor", "model", "os", "location", "contact", "billing_contact",
1111 "account_number", "use", "status", "subnet", "address", "ace_type",
1112 "ace_name", "admin_comment", "ops_comment",
1115 static struct valobj ahst_valobj[] = {
1116 {V_CHAR, 0, MACHINE_TABLE, "name"},
1117 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
1118 {V_CHAR, 2, MACHINE_TABLE, "model"},
1119 {V_CHAR, 3, MACHINE_TABLE, "os"},
1120 {V_CHAR, 4, MACHINE_TABLE, "location"},
1121 {V_CHAR, 5, MACHINE_TABLE, "contact"},
1122 {V_CHAR, 6, MACHINE_TABLE, "billing_contact"},
1123 {V_CHAR, 7, MACHINE_TABLE, "account_number"},
1126 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1127 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1128 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
1129 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1130 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1133 static struct validate ahst_validate = {
1137 "name = UPPER('%s')",
1142 set_uppercase_modtime,
1145 static char *uhst2_fields[] = {
1147 "newname", "vendor", "model", "os", "location", "contact", "use",
1148 "status", "subnet", "address", "ace_type", "ace_name",
1149 "admin_comment", "ops_comment",
1152 static struct valobj uhst2_valobj[] = {
1153 {V_CHAR, 0, MACHINE_TABLE, "name"},
1154 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1155 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1156 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1157 {V_CHAR, 3, MACHINE_TABLE, "model"},
1158 {V_CHAR, 4, MACHINE_TABLE, "os"},
1159 {V_CHAR, 5, MACHINE_TABLE, "location"},
1160 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1163 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1164 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1165 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1166 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1167 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1170 static struct validate uhst2_validate = {
1182 static char *uhst6_fields[] = {
1184 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1185 "use", "status", "subnet", "address", "ace_type", "ace_name",
1186 "admin_comment", "ops_comment",
1189 static struct valobj uhst6_valobj[] = {
1190 {V_CHAR, 0, MACHINE_TABLE, "name"},
1191 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1192 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1193 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1194 {V_CHAR, 3, MACHINE_TABLE, "model"},
1195 {V_CHAR, 4, MACHINE_TABLE, "os"},
1196 {V_CHAR, 5, MACHINE_TABLE, "location"},
1197 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1198 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1201 {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1202 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1203 {V_TYPEDATA, 13, 0, 0, 0, MR_ACE},
1204 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1205 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1208 static struct validate uhst6_validate = {
1220 static char *uhst_fields[] = {
1222 "newname", "vendor", "model", "os", "location", "contact", "billing_contact",
1223 "account_number", "use", "status", "subnet", "address", "ace_type",
1224 "ace_name", "admin_comment", "ops_comment",
1227 static struct valobj uhst_valobj[] = {
1228 {V_CHAR, 0, MACHINE_TABLE, "name"},
1229 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1230 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
1231 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
1232 {V_CHAR, 3, MACHINE_TABLE, "model"},
1233 {V_CHAR, 4, MACHINE_TABLE, "os"},
1234 {V_CHAR, 5, MACHINE_TABLE, "location"},
1235 {V_CHAR, 6, MACHINE_TABLE, "contact"},
1236 {V_CHAR, 7, MACHINE_TABLE, "billing_contact"},
1237 {V_CHAR, 8, MACHINE_TABLE, "account_number"},
1240 {V_ID, 11, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
1241 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
1242 {V_TYPEDATA, 14, 0, 0, 0, MR_ACE},
1243 {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1244 {V_ID, 16, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1247 static struct validate uhst_validate = {
1259 static char *uhha_fields[] = {
1264 static struct valobj uhha_valobj[] = {
1265 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1266 {V_CHAR, 1, MACHINE_TABLE, "hwaddr"},
1269 static struct validate uhha_validate = {
1281 static char *dhst_fields[] = {
1285 static struct validate dhst_validate = {
1297 static char *ghal_fields[] = {
1298 "alias", "canonical_hostname",
1299 "alias", "canonical_hostname"
1302 static struct validate ghal_validate = {
1314 static struct valobj ahal_valobj[] = {
1315 {V_CHAR, 0, HOSTALIAS_TABLE, "name"},
1316 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1319 static struct validate ahal_validate = {
1323 "name = UPPER('%s')",
1331 static struct valobj dhal_valobj[] = {
1332 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1335 static struct validate dhal_validate = {
1339 "name = UPPER('%s') AND mach_id = %d",
1347 static char *gsnt2_fields[] = {
1349 "name", "description", "address", "mask", "low", "high", "prefix",
1350 "ace_type", "ace_name", "modtime", "modby", "modwith"
1353 static char *gsnt_fields[] = {
1355 "name", "description", "status", "contact", "account_number", "address",
1356 "mask", "low", "high", "prefix", "ace_type", "ace_name", "modtime",
1360 static struct validate gsnt_validate = {
1372 static char *asnt2_fields[] = {
1373 "name", "description", "address", "mask", "low", "high", "prefix",
1374 "ace_type", "ace_name",
1377 static struct valobj asnt2_valobj[] = {
1378 {V_CHAR, 0, SUBNET_TABLE, "name"},
1379 {V_LEN, 1, SUBNET_TABLE, "description"},
1384 {V_LEN, 6, SUBNET_TABLE, "prefix"},
1385 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1386 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
1389 static struct validate asnt2_validate =
1394 "name = UPPER('%s')",
1399 set_uppercase_modtime,
1402 static char *asnt_fields[] = {
1403 "name", "description", "status", "contact", "account_number", "address",
1404 "mask", "low", "high", "prefix", "ace_type", "ace_name",
1407 static struct valobj asnt_valobj[] = {
1408 {V_CHAR, 0, SUBNET_TABLE, "name"},
1409 {V_LEN, 1, SUBNET_TABLE, "description"},
1411 {V_CHAR, 3, SUBNET_TABLE, "contact"},
1412 {V_CHAR, 4, SUBNET_TABLE, "account_number"},
1417 {V_LEN, 9, SUBNET_TABLE, "prefix"},
1418 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1419 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
1422 static struct validate asnt_validate =
1427 "name = UPPER('%s')",
1432 set_uppercase_modtime,
1435 static char *usnt2_fields[] = {
1437 "newname", "description", "address", "mask", "low", "high", "prefix",
1438 "ace_type", "ace_name",
1441 static struct valobj usnt2_valobj[] = {
1442 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1443 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1444 {V_LEN, 2, SUBNET_TABLE, "description"},
1449 {V_LEN, 7, SUBNET_TABLE, "prefix"},
1450 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1451 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
1454 static struct validate usnt2_validate =
1467 static char *usnt_fields[] = {
1469 "newname", "description", "status", "contact", "account_number", "address",
1470 "mask", "low", "high", "prefix", "ace_type", "ace_name",
1473 static struct valobj usnt_valobj[] = {
1474 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
1475 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
1476 {V_LEN, 2, SUBNET_TABLE, "description"},
1478 {V_CHAR, 4, SUBNET_TABLE, "contact"},
1479 {V_CHAR, 5, SUBNET_TABLE, "account_number"},
1484 {V_LEN, 10, SUBNET_TABLE, "prefix"},
1485 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1486 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
1489 static struct validate usnt_validate =
1502 static char *dsnt_fields[] = {
1506 static struct validate dsnt_validate = {
1518 static char *gclu_fields[] = {
1520 "name", "description", "location", "modtime", "modby", "modwith",
1523 static char *aclu_fields[] = {
1524 "name", "description", "location",
1527 static struct valobj aclu_valobj[] = {
1528 {V_CHAR, 0, CLUSTERS_TABLE, "name"},
1529 {V_LEN, 1, CLUSTERS_TABLE, "description"},
1530 {V_LEN, 2, CLUSTERS_TABLE, "location"},
1533 static struct validate aclu_validate =
1546 static char *uclu_fields[] = {
1548 "newname", "description", "location",
1551 static struct valobj uclu_valobj[] = {
1552 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1553 {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE},
1554 {V_LEN, 2, CLUSTERS_TABLE, "description"},
1555 {V_LEN, 3, CLUSTERS_TABLE, "location"},
1558 static struct validate uclu_validate = {
1570 static char *dclu_fields[] = {
1574 static struct validate dclu_validate = {
1586 static char *gmcm_fields[] = {
1587 "machine", "cluster",
1588 "machine", "cluster",
1591 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
1592 { /* DELETE_MACHINE_FROM_CLUSTER */
1593 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1594 {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1597 static struct validate amtc_validate = /* for amtc and dmfc */
1602 "mach_id = %d and clu_id = %d",
1607 set_mach_modtime_by_id,
1610 static char *gcld_fields[] = {
1611 "cluster", "serv_label",
1612 "cluster", "serv_label", "serv_cluster",
1615 static char *acld_fields[] = {
1616 "cluster", "serv_label", "serv_cluster",
1619 static struct valobj acld_valobj[] =
1621 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
1622 {V_CHAR, 1, SVC_TABLE, "serv_label"},
1623 {V_CHAR, 2, SVC_TABLE, "serv_cluster"}
1626 static struct validate acld_validate =
1631 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1636 set_cluster_modtime_by_id,
1639 static struct validate dcld_validate =
1644 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1649 set_cluster_modtime_by_id,
1652 static char *glin2_fields[] = {
1654 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1655 "ace_type", "ace_name", "description", "modtime", "modby", "modwith",
1658 static char *glin3_fields[] = {
1660 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1661 "nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby",
1665 static char *glin4_fields[] = {
1667 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1668 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1669 "description", "modtime", "modby", "modwith",
1672 static char *glin_fields[] = {
1674 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1675 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1676 "memace_type", "memace_name", "description", "modtime", "modby", "modwith",
1679 static struct validate glin_validate = {
1686 access_vis_list_by_name,
1691 static char *alis2_fields[] = {
1692 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1693 "ace_type", "ace_name", "description",
1696 static struct valobj alis2_valobj[] = {
1697 {V_CHAR, 0, LIST_TABLE, "name"},
1704 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1705 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1706 {V_LEN, 9, LIST_TABLE, "description"},
1709 static struct validate alis2_validate = {
1721 static char *alis3_fields[] = {
1722 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1723 "nfsgroup", "ace_type", "ace_name", "description",
1726 static struct valobj alis3_valobj[] = {
1727 {V_CHAR, 0, LIST_TABLE, "name"},
1735 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1736 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1737 {V_LEN, 10, LIST_TABLE, "description"},
1740 static struct validate alis3_validate = {
1752 static char *alis4_fields[] = {
1753 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1754 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1758 static struct valobj alis4_valobj[] = {
1759 {V_CHAR, 0, LIST_TABLE, "name"},
1767 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1768 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1769 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1770 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1771 {V_LEN, 12, LIST_TABLE, "description"},
1774 static struct validate alis4_validate = {
1786 static char *alis_fields[] = {
1787 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1788 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1789 "memace_type", "memace_name", "description",
1792 static struct valobj alis_valobj[] = {
1793 {V_CHAR, 0, LIST_TABLE, "name"},
1802 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1803 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
1804 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
1805 {V_TYPE, 12, 0, "ace_type", 0, MR_ACE},
1806 {V_TYPEDATA, 13, 0, 0, "list_id", MR_ACE},
1807 {V_LEN, 14, LIST_TABLE, "description"},
1810 static struct validate alis_validate = {
1822 static char *ulis2_fields[] = {
1824 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1825 "ace_type", "ace_name", "description",
1828 static struct valobj ulis2_valobj[] = {
1829 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1830 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1837 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1838 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1839 {V_LEN, 10, LIST_TABLE, "description"},
1842 static struct validate ulis2_validate = {
1854 static char *ulis3_fields[] = {
1856 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1857 "nfsgroup", "ace_type", "ace_name", "description",
1860 static struct valobj ulis3_valobj[] = {
1861 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1862 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1870 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1871 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1872 {V_LEN, 11, LIST_TABLE, "description"},
1875 static struct validate ulis3_validate = {
1887 static char *ulis4_fields[] = {
1889 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1890 "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name",
1894 static struct valobj ulis4_valobj[] = {
1895 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1896 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1904 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
1905 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
1906 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1907 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
1908 {V_LEN, 13, LIST_TABLE, "description"},
1911 static struct validate ulis4_validate = {
1923 static char *ulis_fields[] = {
1925 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1926 "nfsgroup", "mailman", "mailman_server", "ace_type", "ace_name",
1927 "memace_type", "memace_name", "description",
1930 static struct valobj ulis_valobj[] = {
1931 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1932 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1941 {V_ID, 10, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1942 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
1943 {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE},
1944 {V_TYPE, 13, 0, "ace_type", 0, MR_ACE},
1945 {V_TYPEDATA, 14, 0, 0, "list_id", MR_ACE},
1946 {V_LEN, 15, LIST_TABLE, "description"},
1949 static struct validate ulis_validate = {
1961 static char *dlis_fields[] = {
1965 static struct validate dlis_validate = {
1977 static char *amtl_fields[] = {
1978 "list_name", "member_type", "member_name",
1981 static char *atml_fields[] = {
1982 "list_name", "member_type", "member_name", "tag",
1985 static struct valobj amtl_valobj[] = {
1986 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1987 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
1988 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
1989 {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
1992 static struct validate amtl_validate =
2005 static struct validate atml_validate =
2018 static struct validate tmol_validate =
2031 static struct validate dmfl_validate =
2041 delete_member_from_list,
2044 static char *gaus_fields[] = {
2045 "ace_type", "ace_name",
2046 "use_type", "use_name",
2049 static struct valobj gaus_valobj[] = {
2050 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
2051 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2054 static struct validate gaus_validate = {
2066 static char *ghbo_fields[] = {
2067 "ace_type", "ace_name",
2071 static struct valobj ghbo_valobj[] = {
2072 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
2073 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2076 static struct validate ghbo_validate = {
2088 static char *qgli_fields[] = {
2089 "active", "publicflg", "hidden", "maillist", "grouplist",
2093 static struct valobj qgli_valobj[] = {
2094 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
2095 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2096 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2097 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2098 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2101 static struct validate qgli_validate = {
2110 qualified_get_lists,
2113 static char *gmol_fields[] = {
2115 "member_type", "member_name",
2118 static char *gtml_fields[] = {
2120 "member_type", "member_name", "tag",
2123 static struct validate gmol_validate = {
2130 access_visible_list,
2132 get_members_of_list,
2135 static char *glom_fields[] = {
2136 "member_type", "member_name",
2137 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
2140 static struct valobj glom_valobj[] = {
2141 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
2142 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
2145 static struct validate glom_validate = {
2154 get_lists_of_member,
2157 static char *cmol_fields[] = {
2162 static struct validate cmol_validate = {
2169 access_visible_list,
2171 count_members_of_list,
2174 static char *gsin_fields[] = {
2176 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
2177 "type", "enable", "inprogress", "harderror", "errmsg",
2178 "ace_type", "ace_name", "modtime", "modby", "modwith",
2181 static struct validate gsin_validate =
2194 static char *qgsv_fields[] = {
2195 "enable", "inprogress", "harderror",
2199 static struct valobj qgsv_valobj[] = {
2200 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
2201 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2202 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2205 static struct validate qgsv_validate = {
2214 qualified_get_server,
2217 static char *asin_fields[] = {
2218 "service", "update_int", "target_file", "script", "type", "enable",
2219 "ace_type", "ace_name",
2222 static struct valobj asin_valobj[] = {
2223 {V_CHAR, 0, SERVERS_TABLE, "name"},
2225 {V_LEN, 2, SERVERS_TABLE, "target_file"},
2226 {V_LEN, 3, SERVERS_TABLE, "script"},
2227 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
2229 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
2230 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
2233 static struct validate asin_validate = /* for asin, usin */
2238 "name = UPPER('%s')",
2243 set_uppercase_modtime,
2246 static struct validate rsve_validate = {
2250 "name = UPPER('%s')",
2255 set_uppercase_modtime,
2258 static char *ssif_fields[] = {
2259 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
2262 static struct valobj ssif_valobj[] = {
2263 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2268 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
2271 static struct validate ssif_validate = {
2275 "name = UPPER('%s')",
2283 static char *dsin_fields[] = {
2287 static struct validate dsin_validate = {
2291 "name = UPPER('%s')",
2299 static char *gshi_fields[] = {
2300 "service", "machine",
2301 "service", "machine", "enable", "override", "success", "inprogress",
2302 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
2303 "value3", "modtime", "modby", "modwith",
2306 static struct validate gshi_validate = {
2318 static char *qgsh_fields[] = {
2319 "service", "enable", "override", "success", "inprogress", "hosterror",
2320 "service", "machine",
2323 static struct valobj qgsh_valobj[] = {
2324 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
2325 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
2326 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
2327 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
2328 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
2331 static struct validate qgsh_validate = {
2340 qualified_get_serverhost,
2343 static char *ashi_fields[] = {
2344 "service", "machine", "enable", "value1", "value2", "value3",
2347 static struct valobj ashi_valobj[] = {
2348 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2349 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2353 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
2356 static struct validate ashi_validate = /* ashi & ushi */
2361 "service = UPPER('%s') AND mach_id = %d",
2366 set_serverhost_modtime,
2369 static struct validate rshe_validate =
2374 "service = UPPER('%s') AND mach_id = %d",
2379 set_serverhost_modtime,
2382 static struct validate ssho_validate =
2387 "service = UPPER('%s') AND mach_id = %d",
2395 static char *sshi_fields[] = {
2396 "service", "machine", "override", "success", "inprogress",
2397 "hosterror", "errmsg", "ltt", "lts",
2400 static struct valobj sshi_valobj[] = {
2401 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
2402 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2407 {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"},
2412 static struct validate sshi_validate =
2425 static char *dshi_fields[] = {
2426 "service", "machine",
2429 static struct validate dshi_validate =
2434 "service = UPPER('%s') AND mach_id = %d",
2442 static char *gslo_fields[] = {
2444 "server", "machine",
2447 static char *gfsl_fields[] = {
2449 "label", "type", "machine", "name", "mount", "access", "comments",
2450 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2453 static struct validate gfsl_validate = {
2465 static char *gfsm_fields[] = {
2467 "label", "type", "machine", "name", "mount", "access", "comments",
2468 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2471 static struct validate gfsm_validate = {
2483 static char *gfsn_fields[] = {
2484 "machine", "partition",
2485 "label", "type", "machine", "name", "mount", "access", "comments",
2486 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2489 static struct validate gfsn_validate = {
2501 static char *gfsp_fields[] = {
2503 "label", "type", "machine", "name", "mount", "access", "comments",
2504 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2507 static char *gfsg_fields[] = {
2509 "label", "type", "machine", "name", "mount", "access", "comments",
2510 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
2513 static struct validate gfsg_validate = {
2525 static char *afil_fields[] = {
2526 "label", "type", "machine", "name", "mount", "access", "comments",
2527 "owner", "owners", "create", "lockertype",
2530 static struct valobj afil_valobj[] = {
2531 {V_CHAR, 0, FILESYS_TABLE, "label"},
2532 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
2533 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2534 {V_CHAR, 3, FILESYS_TABLE, "name"},
2535 {V_LEN, 4, FILESYS_TABLE, "mount"},
2536 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
2537 {V_LEN, 6, FILESYS_TABLE, "comments"},
2538 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
2539 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
2541 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
2544 static struct validate afil_validate = {
2553 set_filesys_modtime,
2556 static char *ufil_fields[] = {
2557 "label", "newlabel", "type", "machine", "name", "mount", "access",
2558 "comments", "owner", "owners", "create", "lockertype",
2561 static struct valobj ufil_valobj[] = {
2562 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2563 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
2564 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
2565 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2566 {V_CHAR, 4, FILESYS_TABLE, "name"},
2567 {V_LEN, 5, FILESYS_TABLE, "mount"},
2568 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
2569 {V_LEN, 7, FILESYS_TABLE, "comments"},
2570 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
2571 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
2573 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
2576 static struct validate ufil_validate = {
2585 set_filesys_modtime,
2588 static char *dfil_fields[] = {
2592 static struct validate dfil_validate = {
2604 static char *gfgm_fields[] = {
2605 "fsgroup", "filesys", "sortkey"
2608 static struct validate gfgm_validate = {
2620 static struct valobj aftg_valobj[] = {
2621 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2622 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2625 static struct validate aftg_validate = {
2629 "group_id = %d and filsys_id = %d",
2637 static char *ganf_fields[] = {
2638 "machine", "dir", "device", "status", "allocated", "size",
2639 "modtime", "modby", "modwith",
2642 static char *gnfp_fields[] = {
2644 "machine", "dir", "device", "status", "allocated", "size",
2645 "modtime", "modby", "modwith",
2648 static struct validate gnfp_validate = {
2660 static struct valobj anfp_valobj[] = {
2661 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2662 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2663 {V_LEN, 2, NFSPHYS_TABLE, "device"},
2669 static struct validate anfp_validate = {
2673 "mach_id = %d and dir = '%s'",
2678 set_nfsphys_modtime,
2681 static struct validate unfp_validate = {
2685 "mach_id = %d and dir = '%s'",
2690 set_nfsphys_modtime,
2693 static char *ajnf_fields[] = {
2694 "machine", "dir", "adjustment",
2697 static struct valobj ajnf_valobj[] = {
2698 {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE},
2699 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
2703 static struct validate ajnf_validate = {
2707 "mach_id = %d and dir = '%s'",
2712 set_nfsphys_modtime,
2715 static char *dnfp_fields[] = {
2719 static struct validate dnfp_validate = {
2723 "mach_id = %d and dir = '%s'",
2728 set_nfsphys_modtime,
2731 static char *gqot_fields[] = {
2732 "filesys", "type", "name",
2733 "filesys", "type", "name", "quota", "dir", "machine",
2734 "modtime", "modby", "modwith",
2737 static struct valobj gqot_valobj[] = {
2738 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2739 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2742 static struct validate gqot_validate = {
2754 static char *gqbf_fields[] = {
2756 "filesys", "type", "name", "quota", "dir", "machine",
2757 "modtime", "modby", "modwith",
2760 static struct validate gqbf_validate = {
2772 static char *aqot_fields[] = {
2773 "filesys", "type", "name", "quota",
2776 static struct valobj aqot_valobj[] = {
2777 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2778 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
2779 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2783 static struct validate aqot_validate = {
2787 "filsys_id = %d and type = '%s' and entity_id = %d",
2795 static struct validate uqot_validate = {
2799 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2807 static struct validate dqot_validate = {
2811 "filsys_id = %d AND type = '%s' AND entity_id = %d",
2819 static char *gnfq_fields[] = {
2821 "filesys", "login", "quota", "dir", "machine",
2822 "modtime", "modby", "modwith",
2825 static struct validate gnfq_validate = {
2837 static char *gnqp_fields[] = {
2839 "filesys", "login", "quota", "dir", "machine",
2840 "modtime", "modby", "modwith",
2843 static char *anfq_fields[] = {
2844 "filesys", "login", "quota",
2847 static struct valobj anfq_valobj[] = {
2848 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
2849 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
2853 static struct validate anfq_validate = {
2857 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2865 static struct validate unfq_validate = {
2869 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2877 static struct validate dnfq_validate = {
2881 "filsys_id = %d AND entity_id = %d",
2889 static char *gzcl2_fields[] = {
2891 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2892 "iws_type", "iws_name", "iui_type", "iui_name",
2893 "modtime", "modby", "modwith",
2896 static char *gzcl_fields[] = {
2898 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2899 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2900 "owner_id", "modtime", "modby", "modwith",
2903 static struct validate gzcl_validate = {
2915 static char *azcl2_fields[] = {
2916 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2917 "iws_type", "iws_name", "iui_type", "iui_name",
2920 static struct valobj azcl2_valobj[] = {
2921 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2922 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2923 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2924 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2925 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2926 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2927 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2928 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2929 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2932 static struct validate azcl2_validate = {
2944 static char *azcl_fields[] = {
2945 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2946 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type",
2950 static struct valobj azcl_valobj[] = {
2951 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2952 {V_TYPE, 1, 0, "zace_type", 0, MR_ACE},
2953 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2954 {V_TYPE, 3, 0, "zace_type", 0, MR_ACE},
2955 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2956 {V_TYPE, 5, 0, "zace_type", 0, MR_ACE},
2957 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2958 {V_TYPE, 7, 0, "zace_type", 0, MR_ACE},
2959 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2960 {V_TYPE, 9, 0, "ace_type", 0, MR_ACE},
2961 {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE},
2964 static struct validate azcl_validate = {
2976 static char *uzcl2_fields[] = {
2977 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2978 "iws_type", "iws_name", "iui_type", "iui_name",
2981 static struct valobj uzcl2_valobj[] = {
2982 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
2983 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2984 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
2985 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2986 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
2987 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2988 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
2989 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2990 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
2991 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2994 static struct validate uzcl2_validate = {
3006 static char *uzcl_fields[] = {
3007 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
3008 "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id",
3011 static struct valobj uzcl_valobj[] = {
3012 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
3013 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
3014 {V_TYPE, 2, 0, "zace_type", 0, MR_ACE},
3015 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
3016 {V_TYPE, 4, 0, "zace_type", 0, MR_ACE},
3017 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
3018 {V_TYPE, 6, 0, "zace_type", 0, MR_ACE},
3019 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
3020 {V_TYPE, 8, 0, "zace_type", 0, MR_ACE},
3021 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
3022 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
3023 {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE},
3026 static struct validate uzcl_validate = {
3038 static struct validate dzcl_validate = {
3050 static char *gsha_fields[] = {
3052 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
3055 static struct validate gsha_validate =
3068 static char *asha_fields[] = {
3069 "machine", "ace_type", "ace_name",
3072 static struct valobj asha_valobj[] = {
3073 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3074 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
3075 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
3078 static struct validate asha_validate =
3091 static char *gacl_fields[] = {
3092 "machine", "target",
3093 "machine", "target", "kind", "list",
3096 static char *aacl_fields[] = {
3097 "machine", "target", "kind", "list",
3100 static char *dacl_fields[] = {
3101 "machine", "target",
3104 static struct valobj aacl_valobj[] = {
3105 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3106 {V_CHAR, 1, ACL_TABLE, "target"},
3107 {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE},
3108 {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST},
3111 static struct validate gacl_validate =
3124 static struct validate aacl_validate =
3129 "mach_id = %d AND target = '%s'",
3137 static char *gsvc_fields[] = {
3138 "service", "protocol",
3139 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
3142 static char *asvc_fields[] = {
3143 "service", "protocol", "port", "description",
3146 static char *dsvc_fields[] = {
3147 "service", "protocol",
3150 static struct valobj asvc_valobj[] = {
3151 {V_CHAR, 0, SERVICES_TABLE, "name"},
3152 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
3154 {V_CHAR, 3, SERVICES_TABLE, "description"},
3157 static struct validate asvc_validate = {
3161 "name = '%s' AND protocol = '%s'",
3166 set_service_modtime,
3169 static struct validate dsvc_validate = {
3173 "name = '%s' AND protocol = '%s'",
3181 static char *gprn_fields[] = {
3183 "name", "type", "hwtype", "duplexname", "hostname",
3184 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3185 "banner", "location", "contact", "modtime", "modby", "modwith"
3188 static char *gpbd_fields[] = {
3190 "name", "type", "hwtype", "duplexname", "hostname",
3191 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3192 "banner", "location", "contact", "modtime", "modby", "modwith"
3195 static char *gpbe_fields[] = {
3197 "name", "type", "hwtype", "duplexname", "hostname",
3198 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3199 "banner", "location", "contact", "modtime", "modby", "modwith"
3202 static char *gpbh_fields[] = {
3204 "name", "type", "hwtype", "duplexname", "hostname",
3205 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3206 "banner", "location", "contact", "modtime", "modby", "modwith"
3209 static char *gpbr_fields[] = {
3211 "name", "type", "hwtype", "duplexname", "hostname",
3212 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3213 "banner", "location", "contact", "modtime", "modby", "modwith"
3216 static char *gpbl_fields[] = {
3218 "name", "type", "hwtype", "duplexname", "hostname",
3219 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3220 "banner", "location", "contact", "modtime", "modby", "modwith"
3223 static char *gpbc_fields[] = {
3225 "name", "type", "hwtype", "duplexname", "hostname",
3226 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3227 "banner", "location", "contact", "modtime", "modby", "modwith"
3230 static char *aprn_fields[] = {
3231 "printer", "type", "hwtype", "duplexname", "hostname",
3232 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3233 "banner", "location", "contact",
3236 static struct valobj aprn_valobj[] = {
3237 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3238 {V_TYPE, 1, 0, "printertype", 0, MR_TYPE},
3239 {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE},
3240 {V_CHAR, 3, PRINTERS_TABLE, "duplexname"},
3241 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3242 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3243 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3244 {V_CHAR, 7, PRINTERS_TABLE, "rp"},
3245 {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3248 {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST},
3249 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3251 {V_CHAR, 14, PRINTERS_TABLE, "location"},
3252 {V_CHAR, 15, PRINTERS_TABLE, "contact"},
3255 static struct validate aprn_validate = {
3267 static char *uprn_fields[] = {
3269 "printer", "type", "hwtype", "duplexname", "hostname",
3270 "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl",
3271 "banner", "location", "contact",
3274 static struct valobj uprn_valobj[] = {
3275 {V_CHAR, 0, PRINTERS_TABLE, "name"},
3276 {V_CHAR, 1, PRINTERS_TABLE, "name"},
3277 {V_TYPE, 2, 0, "printertype", 0, MR_TYPE},
3278 {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE},
3279 {V_CHAR, 4, PRINTERS_TABLE, "duplexname"},
3280 {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3281 {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3282 {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3283 {V_CHAR, 8, PRINTERS_TABLE, "rp"},
3284 {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3287 {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST},
3288 {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST},
3290 {V_CHAR, 15, PRINTERS_TABLE, "location"},
3291 {V_CHAR, 16, PRINTERS_TABLE, "contact"},
3294 static struct validate uprn_validate = {
3306 static struct validate dprn_validate = {
3318 static char *gpsv_fields[] = {
3320 "host", "kind", "printer_types", "owner_type", "owner_name",
3321 "lpc_acl", "modtime", "modby", "modwith"
3324 static struct valobj gpsv_valobj[] = {
3325 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3328 static struct validate gpsv_validate = {
3340 static char *apsv_fields[] = {
3341 "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl"
3344 static struct valobj apsv_valobj[] = {
3345 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3346 {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE},
3347 {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING},
3348 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
3349 {V_TYPEDATA, 4, 0, 0, 0, MR_ACE},
3350 {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST},
3353 static struct validate apsv_validate = {
3365 static char *dpsv_fields[] = {
3369 static struct validate dpsv_validate = {
3381 static char *gali_fields[] = {
3382 "name", "type", "trans",
3383 "name", "type", "trans",
3386 static char *aali_fields[] = {
3387 "name", "type", "trans",
3390 static struct valobj aali_valobj[] = {
3391 {V_CHAR, 0, ALIAS_TABLE, "name"},
3392 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
3393 {V_CHAR, 2, ALIAS_TABLE, "trans"},
3396 static struct validate aali_validate = {
3400 "name = '%s' and type = '%s' and trans = '%s'",
3408 static struct validate dali_validate = /* DELETE_ALIAS */
3413 "name = '%s' and type = '%s' and trans = '%s'",
3421 static char *gval_fields[] = {
3425 static struct valobj gval_valobj[] = {
3426 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
3429 static struct validate gval_validate = {
3441 static char *aval_fields[] = {
3445 static struct valobj aval_valobj[] = {
3446 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
3450 static struct validate aval_validate = /* for aval, uval, and dval */
3463 static char *dval_fields[] = {
3467 static char *gats_fields[] = {
3468 "table_name", "appends", "updates", "deletes",
3469 "modtime", "modby", "modwith",
3472 static char *_sdl_fields[] = {
3476 static struct validate _sdl_validate =
3489 static char *gusl_fields[] = {
3490 "login", "domain_sid",
3491 "login", "sid", "created",
3494 static struct validate gusl_validate =
3507 static char *glsn_fields[] = {
3508 "name", "domain_sid",
3509 "name", "sid", "created",
3512 static struct validate glsn_validate =
3525 static char *ausl_fields[] = {
3529 static struct validate ausl_validate =
3534 "users_id = %d AND sid = '%s'",
3542 static char *alsn_fields[] = {
3546 static struct validate alsn_validate =
3551 "list_id = %d AND sid = '%s'",
3559 static char *gdds_fields[] = {
3563 static char *gcon7_fields[] = {
3565 "name", "description", "location", "contact",
3566 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3569 static struct validate gcon_validate = {
3581 static char *gcon_fields[] = {
3583 "name", "publicflg", "description", "location", "contact",
3584 "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith",
3587 static char *acon7_fields[] = {
3588 "name", "description", "location", "contact",
3589 "ace_type", "ace_name", "memace_type", "memace_name",
3592 static struct valobj acon7_valobj[] = {
3593 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3594 {V_LEN, 1, CONTAINERS_TABLE, "description"},
3595 {V_CHAR, 2, CONTAINERS_TABLE, "location"},
3596 {V_CHAR, 3, CONTAINERS_TABLE, "contact"},
3597 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
3598 {V_TYPEDATA, 5, 0, 0, 0, MR_ACE},
3599 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3600 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3603 static struct validate acon7_validate =
3616 static char *acon_fields[] = {
3617 "name", "publicflg", "description", "location", "contact",
3618 "ace_type", "ace_name", "memace_type", "memace_name",
3621 static struct valobj acon_valobj[] = {
3622 {V_CHAR, 0, CONTAINERS_TABLE, "name"},
3624 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3625 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3626 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3627 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3628 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3629 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3630 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3633 static struct validate acon_validate =
3646 static char *ucon7_fields[] = {
3648 "newname", "description", "location", "contact",
3649 "ace_type", "ace_name", "memace_type", "memace_name",
3652 static struct valobj ucon7_valobj[] = {
3653 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3654 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3655 {V_LEN, 2, CONTAINERS_TABLE, "description"},
3656 {V_CHAR, 3, CONTAINERS_TABLE, "location"},
3657 {V_CHAR, 4, CONTAINERS_TABLE, "contact"},
3658 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
3659 {V_TYPEDATA, 6, 0, 0, 0, MR_ACE},
3660 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
3661 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
3664 static struct validate ucon7_validate =
3677 static char *ucon_fields[] = {
3679 "newname", "publicflg", "description", "location", "contact",
3680 "ace_type", "ace_name", "memace_type", "memace_name",
3683 static struct valobj ucon_valobj[] = {
3684 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3685 {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE},
3687 {V_LEN, 3, CONTAINERS_TABLE, "description"},
3688 {V_CHAR, 4, CONTAINERS_TABLE, "location"},
3689 {V_CHAR, 5, CONTAINERS_TABLE, "contact"},
3690 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
3691 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
3692 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
3693 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
3696 static struct validate ucon_validate =
3709 static char *dcon_fields[] = {
3713 static struct validate dcon_validate =
3726 static char *amcn_fields[] = {
3727 "machine", "container",
3730 static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */
3731 { /* DELETE_MACHINE_FROM_CONTAINER */
3732 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
3733 {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3736 static struct validate amcn_validate = /* for amtn and dmfn */
3746 set_mach_modtime_by_id,
3749 static struct validate dmcn_validate = /* for amtn and dmfn */
3754 "mach_id = %d and cnt_id = %d",
3759 set_mach_modtime_by_id,
3762 static char *gmnm_fields[] = {
3764 "machine", "container",
3767 static char *gmoc_fields[] = {
3774 static struct validate gmoc_validate =
3784 get_machines_of_container,
3787 static char *gsoc_fields[] = {
3793 static struct validate gsoc_validate =
3803 get_subcontainers_of_container,
3806 static char *gtlc_fields[] = {
3810 static char *scli_fields[] = {
3815 static struct valobj scli_valobj[] = {
3816 {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER},
3817 {V_ID, 1, LIST_TABLE, "name", "list_id", MR_LIST},
3820 static struct validate scli_validate = {
3832 static char *gcli_fields[] = {
3834 "containername", "listname",
3837 /* Generalized Query Definitions */
3839 /* Multiple versions of the same query MUST be listed in ascending
3843 /* Note: For any query which uses prefetch_value, the vcnt should be
3844 * one less than the number of %-format specifiers in the tlist.
3847 struct query Queries[] = {
3849 /* Q_GALO - GET_ALL_LOGINS, v2 */
3856 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3866 /* Q_GALO - GET_ALL_LOGINS, v3 */
3873 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3883 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */
3884 "get_all_active_logins",
3890 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
3900 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */
3901 "get_all_active_logins",
3907 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u",
3917 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */
3918 "get_user_account_by_login",
3924 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
3927 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3934 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */
3935 "get_user_account_by_login",
3941 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
3944 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3951 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v11 */
3952 "get_user_account_by_login",
3958 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
3961 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
3968 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */
3969 "get_user_account_by_uid",
3975 "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",
3978 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
3985 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */
3986 "get_user_account_by_uid",
3992 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
3995 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4002 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v11 */
4003 "get_user_account_by_uid",
4009 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
4012 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
4019 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */
4020 "get_user_account_by_name",
4026 "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",
4029 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4036 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */
4037 "get_user_account_by_name",
4043 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
4046 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4053 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v11 */
4054 "get_user_account_by_name",
4060 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
4063 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
4070 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */
4071 "get_user_account_by_class",
4077 "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",
4080 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4087 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */
4088 "get_user_account_by_class",
4094 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
4097 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4104 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v11 */
4105 "get_user_account_by_class",
4111 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
4114 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
4121 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */
4122 "get_user_account_by_id",
4128 "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",
4131 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4138 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */
4139 "get_user_account_by_id",
4145 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
4148 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4155 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v11 */
4156 "get_user_account_by_id",
4162 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, u.winhomedir, u.winprofiledir, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str",
4165 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
4172 /* Q_GUBL - GET_USER_BY_LOGIN, v2 */
4173 "get_user_by_login",
4179 "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",
4182 "u.login LIKE '%s' AND u.users_id != 0",
4189 /* Q_GUBL - GET_USER_BY_LOGIN, v3 */
4190 "get_user_by_login",
4196 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u",
4199 "u.login LIKE '%s' AND u.users_id != 0",
4206 /* Q_GUBU - GET_USER_BY_UID, v2 */
4213 "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",
4216 "u.unix_uid = %s AND u.users_id != 0",
4223 /* Q_GUBU - GET_USER_BY_UID, v3 */
4230 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u",
4233 "u.unix_uid = %s AND u.users_id != 0",
4240 /* Q_GUBN - GET_USER_BY_NAME, v2 */
4247 "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",
4250 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
4257 /* Q_GUBN - GET_USER_BY_NAME, v3 */
4264 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u",
4267 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
4274 /* Q_GUBC - GET_USER_BY_CLASS, v2 */
4275 "get_user_by_class",
4281 "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",
4284 "u.type = UPPER('%s') AND u.users_id != 0",
4291 /* Q_GUBC - GET_USER_BY_CLASS, v3 */
4292 "get_user_by_class",
4298 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS') FROM users u",
4301 "u.type = UPPER('%s') AND u.users_id != 0",
4308 /* Q_GUBM - GET_USER_BY_MITID, v2 */
4309 "get_user_by_mitid",
4315 "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",
4318 "u.clearid LIKE '%s' AND u.users_id != 0",
4325 /* Q_GUBM - GET_USER_BY_MITID, v3 */
4326 "get_user_by_mitid",
4332 "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u",
4335 "u.clearid LIKE '%s' AND u.users_id != 0",
4342 /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */
4349 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4350 * but using up one argv element.
4352 "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)",
4362 /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */
4369 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4370 * but using up one argv element.
4372 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s, SYSDATE, %s)",
4382 /* Q_AUAC - ADD_USER_ACCOUNT, v11 */ /* uses prefetch_value() for users_id */
4389 /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)",
4390 * but using up one argv element.
4392 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, winhomedir, winprofiledir, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, SYSDATE, %s)",
4402 /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */
4409 "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)",
4419 /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */
4426 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s, SYSDATE, %s)",
4436 /* Q_AUSR - ADD_USER, v11 */ /* uses prefetch_value() for users_id */
4443 "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, winhomedir, winprofiledir, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, SYSDATE, %s)",
4453 /* Q_RUSR - REGISTER_USER */
4470 /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */
4471 "update_user_account",
4477 /* See comment in auac about signature. */
4478 "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",
4488 /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */
4489 "update_user_account",
4495 /* See comment in auac about signature. */
4496 "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",
4506 /* Q_UUAC - UPDATE_USER_ACCOUNT, v11 */
4507 "update_user_account",
4513 /* See comment in auac about signature. */
4514 "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d, signature = NVL(CHR(0), '%s'), secure = %s, winhomedir = NVL('%s', CHR(0)), winprofiledir = NVL('%s', CHR(0))",
4524 /* Q_UUSR - UPDATE_USER, v2 */
4531 "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'",
4541 /* Q_UUSR - UPDATE_USER, v3 */
4548 "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'",
4558 /* Q_UUSR - UPDATE_USER, v11 */
4565 "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', winhomedir = NVL('%s', CHR(0)), winprofiledir = NVL('%s', CHR(0)) ",
4575 /* Q_UUSH - UPDATE_USER_SHELL */
4576 "update_user_shell",
4582 "users SET shell = '%s'",
4592 /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */
4593 "update_user_windows_shell",
4599 "users SET winconsoleshell = '%s'",
4609 /* Q_UUST - UPDATE_USER_STATUS */
4610 "update_user_status",
4616 "users SET status = %s",
4626 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
4627 "update_user_security_status",
4633 "users SET secure = %s",
4643 /* Q_DUSR - DELETE_USER */
4660 /* Q_AURV - ADD_USER_RESERVATION */
4661 "add_user_reservation",
4677 /* Q_GURV - GET_USER_RESERVATIONS */
4678 "get_user_reservations",
4694 /* Q_GUBR - GET_USER_BY_RESERVATION */
4695 "get_user_by_reservation",
4711 /* Q_DURV - DELETE_USER_RESERVATION */
4712 "delete_user_reservation",
4728 /* Q_GKUM - GET_KERBEROS_USER_MAP */
4729 "get_kerberos_user_map",
4735 "u.login, str.string FROM krbmap km, users u, strings str",
4738 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
4740 "u.login, str.string",
4745 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
4746 "add_kerberos_user_map",
4752 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
4762 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
4763 "delete_kerberos_user_map",
4772 "users_id = %d AND string_id = %d",
4779 /* Q_GFBL - GET_FINGER_BY_LOGIN */
4780 "get_finger_by_login",
4786 "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",
4796 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
4797 "update_finger_by_login",
4803 "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))",
4813 /* Q_GPOB - GET_POBOX */
4820 "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
4830 /* Q_GAPO - GET_ALL_POBOXES */
4837 "login, potype, pop_id || ':' || box_id FROM users",
4847 /* Q_GPOP - GET_POBOXES_POP */
4854 "login, potype, users_id FROM users",
4864 /* Q_GPOF - GET_POBOXES_SMTP */
4871 "login, potype, users_id FROM users",
4881 /* Q_SPOB - SET_POBOX */
4898 /* Q_SPOP - SET_POBOX_POP */
4915 /* Q_DPOB - DELETE_POBOX */
4922 "users SET potype = 'NONE'",
4932 /* Q_GHST - GET_HOST, v2 */
4939 "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",
4942 "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",
4949 /* Q_GHST - GET_HOST, v6 */
4956 "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",
4959 "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",
4966 /* Q_GHST - GET_HOST, v8 */
4973 "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",
4976 "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",
4983 /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */
4984 "get_host_by_hwaddr",
4990 "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",
4993 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5000 /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */
5001 "get_host_by_hwaddr",
5007 "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",
5010 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5017 /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */
5018 "get_host_by_hwaddr",
5024 "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",
5027 "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id",
5034 /* Q_GHBA - GET_HOST_BY_ACCOUNT_NUMBER, v8 */
5035 "get_host_by_account_number",
5041 "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",
5044 "m.account_number LIKE '%s' AND m.mach_id != 0 and s.snet_id = m.snet_id",
5051 /* Q_GHHA - GET_HOST_HWADDR */
5058 "m.hwaddr FROM machine m",
5061 "m.name LIKE UPPER('%s')",
5068 /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */
5075 "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)",
5085 /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */
5092 "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)",
5102 /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */
5109 "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)",
5119 /* Q_UHST - UPDATE_HOST, v2 */
5126 "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",
5136 /* Q_UHST - UPDATE_HOST, v6 */
5143 "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",
5153 /* Q_UHST - UPDATE_HOST, v8 */
5160 "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",
5170 /* Q_UHHA - UPDATE_HOST_HWADDR */
5171 "update_host_hwaddr",
5177 "machine SET hwaddr = NVL('%s', CHR(0))",
5187 /* Q_DHST - DELETE_HOST */
5204 /* Q_GMAC - GET_MACHINE */
5211 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
5214 "name LIKE UPPER('%s') AND mach_id != 0",
5221 /* Q_GHAL - GET_HOSTALIAS */
5228 "a.name, m.name FROM hostalias a, machine m",
5231 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
5238 /* Q_AHAL - ADD_HOSTALIAS */
5245 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)",
5255 /* Q_DHAL - DELETE_HOSTALIAS */
5265 "name = UPPER('%s') AND mach_id = %d",
5272 /* Q_GSNT - GET_SUBNET, v2 */
5279 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
5282 "name LIKE UPPER('%s')",
5289 /* Q_GSNT - GET_SUBNET, v8 */
5296 "name, description, status, contact, account_number, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
5299 "name LIKE UPPER('%s')",
5306 /* Q_ASNT - ADD_SUBNET, v2 */
5313 "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)",
5323 /* Q_ASNT - ADD_SUBNET, v8 */
5330 "INTO subnet (name, description, status, contact, account_number, saddr, mask, low, high, prefix, owner_type, owner_id, snet_id) VALUES (UPPER('%s'), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, %s, %s, NVL('%s', CHR(0)), '%s', %d, %s)",
5340 /* Q_USNT - UPDATE_SUBNET, v2 */
5347 "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",
5357 /* Q_USNT - UPDATE_SUBNET, v8 */
5364 "subnet SET name = UPPER('%s'), description = NVL('%s', CHR(0)), status = %s, contact = NVL('%s', CHR(0)), account_number = NVL('%s', CHR(0)), saddr = %s, mask = %s, low = %s, high = %s, prefix = NVL('%s', CHR(0)), owner_type = '%s', owner_id = %d",
5374 /* Q_DSNT - DELETE_SUBNET */
5391 /* Q_GCLU - GET_CLUSTER */
5398 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
5401 "name LIKE '%s' AND clu_id != 0",
5408 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
5415 "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)",
5425 /* Q_UCLU - UPDATE_CLUSTER */
5432 "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))",
5442 /* Q_DCLU - DELETE_CLUSTER */
5459 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
5460 "get_machine_to_cluster_map",
5466 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
5469 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
5476 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
5477 "add_machine_to_cluster",
5483 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
5493 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
5494 "delete_machine_from_cluster",
5503 "mach_id = %d AND clu_id = %d",
5510 /* Q_GCLD - GET_CLUSTER_DATA */
5517 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
5520 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
5522 "c.name, svc.serv_label",
5527 /* Q_ACLD - ADD_CLUSTER_DATA */
5534 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')",
5544 /* Q_DCLD - DELETE_CLUSTER_DATA */
5545 "delete_cluster_data",
5554 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
5561 /* Q_GLIN - GET_LIST_INFO, v2 */
5568 "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",
5578 /* Q_GLIN - GET_LIST_INFO, v3 */
5585 "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",
5595 /* Q_GLIN - GET_LIST_INFO, v4 */
5602 "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",
5612 /* Q_GLIN - GET_LIST_INFO, v10 */
5619 "l.name, l.active, l.publicflg, l.hidden, l.maillist, l.grouplist, l.gid, l.nfsgroup, l.mailman, m.name, l.acl_type, l.acl_id, l.memacl_type, l.memacl_id, l.description, TO_CHAR(l.modtime, 'DD-mon-YYYY HH24:MI:SS'), l.modby, l.modwith FROM list l, machine m",
5622 "l.name LIKE '%s' AND m.mach_id = l.mailman_id",
5629 /* Q_EXLN - EXPAND_LIST_NAMES */
5630 "expand_list_names",
5639 "name LIKE '%s' AND list_id != 0",
5646 /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */
5653 "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)",
5663 /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */
5670 "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)",
5680 /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */
5687 "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)",
5697 /* Q_ALIS - ADD_LIST, v10 */ /* uses prefetch_value() for list_id */
5704 "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, mailman, mailman_id, acl_type, acl_id, memacl_type, memacl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, %s, %d, '%s', %d, '%s', %d, NVL('%s', CHR(0)), %s)",
5714 /* Q_ULIS - UPDATE_LIST, v2 */
5721 "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))",
5731 /* Q_ULIS - UPDATE_LIST, v3 */
5738 "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))",
5748 /* Q_ULIS, UPDATE_LIST, v4 */
5755 "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))",
5765 /* Q_ULIS, UPDATE_LIST, v10 */
5772 "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, mailman = %s, mailman_id = %d, acl_type = '%s', acl_id = %d, memacl_type = '%s', memacl_id = %d, description = NVL('%s', CHR(0))",
5782 /* Q_DLIS - DELETE_LIST */
5799 /* Q_AMTL - ADD_MEMBER_TO_LIST */
5800 "add_member_to_list",
5816 /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */
5817 "add_tagged_member_to_list",
5833 /* Q_TMOL - TAG_MEMBER_OF_LIST */
5834 "tag_member_of_list",
5850 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
5851 "delete_member_from_list",
5867 /* Q_GAUS - GET_ACE_USE */
5884 /* Q_GHBO - GET_HOST_BY_OWNER */
5885 "get_host_by_owner",
5901 /* Q_QGLI - QUALIFIED_GET_LISTS */
5902 "qualified_get_lists",
5918 /* Q_GMOL - GET_MEMBERS_OF_LIST */
5919 "get_members_of_list",
5935 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
5936 "get_end_members_of_list",
5952 /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */
5953 "get_tagged_members_of_list",
5969 /* Q_GLOM - GET_LISTS_OF_MEMBER */
5970 "get_lists_of_member",
5986 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
5987 "count_members_of_list",
6003 /* Q_GSIN - GET_SERVER_INFO */
6010 "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",
6013 "name LIKE UPPER('%s')",
6020 /* Q_QGSV - QUALIFIED_GET_SERVER */
6021 "qualified_get_server",
6037 /* Q_ASIN - ADD_SERVER_INFO */
6044 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)",
6054 /* Q_USIN - UPDATE_SERVER_INFO */
6055 "update_server_info",
6061 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
6064 "name = UPPER('%s')",
6071 /* Q_RSVE - RESET_SERVER_ERROR */
6072 "reset_server_error",
6078 "servers SET harderror = 0, dfcheck = dfgen",
6081 "name = UPPER('%s')",
6088 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
6089 "set_server_internal_flags",
6095 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))",
6098 "name = UPPER('%s')",
6105 /* Q_DSIN - DELETE_SERVER_INFO */
6106 "delete_server_info",
6115 "name = UPPER('%s')",
6122 /* Q_GSHI - GET_SERVER_HOST_INFO */
6123 "get_server_host_info",
6129 "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",
6132 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
6134 "sh.service, m.name",
6139 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
6140 "qualified_get_server_host",
6156 /* Q_ASHI - ADD_SERVER_HOST_INFO */
6157 "add_server_host_info",
6163 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))",
6173 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
6174 "update_server_host_info",
6180 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))",
6183 "service = UPPER('%s') AND mach_id = %d",
6190 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
6191 "reset_server_host_error",
6197 "serverhosts SET hosterror = 0",
6200 "service = UPPER('%s') AND mach_id = %d",
6207 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
6208 "set_server_host_override",
6214 "serverhosts SET override = 1",
6217 "service = UPPER('%s') AND mach_id = %d",
6224 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
6225 "set_server_host_internal",
6231 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s",
6234 "service = UPPER('%s') AND mach_id = %d",
6241 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
6242 "delete_server_host_info",
6251 "service = UPPER('%s') AND mach_id = %d",
6258 /* Q_GSLO - GET_SERVER_LOCATIONS */
6259 "get_server_locations",
6265 "sh.service, m.name FROM serverhosts sh, machine m",
6268 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
6270 "sh.service, m.name",
6275 /* Q_GFSL - GET_FILESYS_BY_LABEL */
6276 "get_filesys_by_label",
6282 "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",
6285 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6292 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
6293 "get_filesys_by_machine",
6299 "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",
6302 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6309 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
6310 "get_filesys_by_nfsphys",
6316 "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",
6319 "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'",
6326 /* Q_GFSG - GET_FILESYS_BY_GROUP */
6327 "get_filesys_by_group",
6333 "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",
6336 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
6343 /* Q_GFSP - GET_FILESYS_BY_PATH */
6344 "get_filesys_by_path",
6350 "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",
6353 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
6360 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
6367 "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)",
6377 /* Q_UFIL - UPDATE_FILESYS */
6384 "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'",
6394 /* Q_DFIL - DELETE_FILESYS */
6411 /* Q_GFGM - GET_FSGROUP_MEMBERS */
6412 "get_fsgroup_members",
6418 "fs.label, fg.key FROM fsgroup fg, filesys fs",
6421 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
6428 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
6429 "add_filesys_to_fsgroup",
6435 "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')",
6445 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
6446 "remove_filesys_from_fsgroup",
6455 "group_id = %d AND filsys_id = %d",
6462 /* Q_GANF - GET_ALL_NFSPHYS */
6469 "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",
6472 "m.mach_id = np.mach_id",
6479 /* Q_GNFP - GET_NFSPHYS */
6486 "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",
6489 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
6496 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
6503 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)",
6513 /* Q_UNFP - UPDATE_NFSPHYS */
6520 "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s",
6523 "mach_id = %d AND dir = '%s'",
6530 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
6531 "adjust_nfsphys_allocation",
6537 "nfsphys SET allocated = allocated + %s",
6540 "mach_id = %d AND dir = '%s'",
6547 /* Q_DNFP - DELETE_NFSPHYS */
6557 "mach_id = %d AND dir = '%s'",
6564 /* Q_GQOT - GET_QUOTA */
6571 "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",
6574 "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",
6581 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
6582 "get_quota_by_filesys",
6588 "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",
6591 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
6598 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
6605 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
6615 /* Q_UQOT - UPDATE_QUOTA */
6622 "quota SET quota = %s",
6632 /* Q_DQOT - DELETE_QUOTA */
6649 /* Q_GNFQ - GET_NFS_QUOTAS */
6656 "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",
6659 "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'",
6661 "fs.label, u.login",
6666 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
6667 "get_nfs_quotas_by_partition",
6673 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
6676 "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",
6683 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
6690 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
6700 /* Q_UNFQ - UPDATE_NFS_QUOTA */
6707 "quota SET quota = %s",
6717 /* Q_DNFQ - DELETE_NFS_QUOTA */
6734 /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */
6741 "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",
6751 /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */
6758 "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",
6768 /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */
6775 "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)",
6785 /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */
6792 "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)",
6802 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */
6803 "update_zephyr_class",
6809 "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",
6819 /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */
6820 "update_zephyr_class",
6826 "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",
6836 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
6837 "delete_zephyr_class",
6853 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
6854 "get_server_host_access",
6860 "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",
6863 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
6870 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
6871 "add_server_host_access",
6877 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)",
6887 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
6888 "update_server_host_access",
6894 "hostaccess SET acl_type = '%s', acl_id = %d",
6904 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
6905 "delete_server_host_access",
6921 /* Q_GACL - GET_ACL */
6928 "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l",
6931 "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id",
6933 "m.name, ac.target, ac.kind",
6938 /* Q_AACL - ADD_ACL */
6945 "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)",
6955 /* Q_DACL - DELETE_ACL */
6965 "mach_id = %d AND target = '%s'",
6972 /* Q_GSVC - GET_SERVICE */
6979 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
6982 "name LIKE '%s' AND protocol LIKE '%s'",
6989 /* Q_ASVC - ADD_SERVICE */
6996 "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))",
7006 /* Q_DSVC - DELETE_SERVICE */
7016 "name = '%s' AND protocol = '%s'",
7023 /* Q_GPRN - GET_PRINTER */
7030 "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",
7033 "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",
7040 /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */
7041 "get_printer_by_duplexname",
7047 "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",
7050 "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",
7057 /* Q_GPBE - GET_PRINTER_BY_ETHERNET */
7058 "get_printer_by_ethernet",
7064 "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",
7067 "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",
7074 /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */
7075 "get_printer_by_hostname",
7081 "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",
7084 "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",
7091 /* Q_GPBR - GET_PRINTER_BY_RM */
7092 "get_printer_by_rm",
7098 "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",
7101 "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",
7108 /* Q_GPBL - GET_PRINTER_BY_LOCATION */
7109 "get_printer_by_location",
7115 "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",
7118 "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",
7125 /* Q_GPBC - GET_PRINTER_BY_CONTACT */
7126 "get_printer_by_contact",
7132 "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",
7135 "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",
7142 /* Q_APRN - ADD_PRINTER */
7149 "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)))",
7159 /* Q_UPRN - UPDATE_PRINTER */
7166 "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))",
7176 /* Q_DPRN - DELETE_PRINTER */
7193 /* Q_GPSV - GET_PRINT_SERVER */
7200 "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",
7203 "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",
7210 /* Q_APSV - ADD_PRINT_SERVER */
7217 "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)",
7227 /* Q_UPSV - UPDATE_PRINT_SERVER */
7228 "update_print_server",
7234 "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d",
7244 /* Q_DPSV - DELETE_PRINT_SERVER */
7245 "delete_print_server",
7261 /* Q_GALI - GET_ALIAS */
7268 "name, type, trans FROM alias",
7271 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
7273 "type, name, trans",
7278 /* Q_AALI - ADD_ALIAS */
7285 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
7295 /* Q_DALI - DELETE_ALIAS */
7305 "name = '%s' AND type = '%s' AND trans = '%s'",
7312 /* Q_GVAL - GET_VALUE */
7319 "value FROM numvalues",
7329 /* Q_AVAL - ADD_VALUE */
7336 "INTO numvalues (name, value) VALUES ('%s', %s)",
7346 /* Q_UVAL - UPDATE_VALUE */
7353 "numvalues SET value = %s",
7363 /* Q_DVAL - DELETE_VALUE */
7380 /* Q_GATS - GET_ALL_TABLE_STATS */
7381 "get_all_table_stats",
7387 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
7397 /* Q__SDL - _SET_DEBUG_LEVEL */
7414 /* Q_GUSL - GET_USER_SIDS_BY_LOGIN, v4 */
7415 "get_user_sids_by_login",
7421 "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM users u, usersids us",
7424 "us.users_id = %d AND u.users_id = us.users_id AND SUBSTR(us.sid, 1, LENGTH(us.sid)-8) = '%s'",
7431 /* Q_AUSL - ADD_USER_SID_BY_LOGIN, v4 */
7432 "add_user_sid_by_login",
7438 "INTO usersids (users_id, sid) VALUES (%d, '%s')",
7448 /* Q_GLSN - GET_LIST_SIDS_BY_NAME, v4 */
7449 "get_list_sids_by_name",
7455 "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM list l, listsids ls",
7458 "ls.list_id = %d AND l.list_id = ls.list_id AND SUBSTR(ls.sid, 1, LENGTH(ls.sid)-8) = '%s'",
7465 /* Q_ALSN - ADD_LIST_SID_BY_NAME, v4 */
7466 "add_list_sid_by_name",
7472 "INTO listsids (list_id, sid) VALUES (%d, '%s')",
7482 /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */
7483 "get_distinct_domain_sids",
7489 "DISTINCT SUBSTR(sid, 1, LENGTH(sid)-8) FROM usersids",
7499 /* Q_GCON - GET_CONTAINER, v7 */
7506 "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",
7509 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7516 /* Q_GCON - GET_CONTAINER, v9 */
7523 "name, publicflg, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM containers",
7526 "LOWER(name) LIKE LOWER('%s') AND cnt_id != 0",
7533 /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */
7540 "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)",
7550 /* Q_ACON - ADD_CONTAINER, v9 */ /* uses prefetch_value() for cnt_id */
7557 "INTO containers (name, publicflg, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, cnt_id) VALUES ('%s', %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), '%s', %d, '%s', %d, %s)",
7567 /* Q_UCON - UPDATE_CONTAINER, v7 */
7584 /* Q_UCON - UPDATE_CONTAINER, v9 */
7601 /* Q_DCON - DELETE_CONTAINER, v7 */
7618 /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */
7619 "add_machine_to_container",
7625 "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)",
7635 /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */
7636 "delete_machine_from_container",
7645 "mach_id = %d AND cnt_id = %d",
7652 /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */
7653 "get_machine_to_container_map",
7659 "m.name, c.name FROM machine m, containers c, mcntmap mcn",
7662 "m.name LIKE UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id",
7669 /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */
7670 "get_machines_of_container",
7686 /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */
7687 "get_subcontainers_of_container",
7703 /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v7 */
7704 "get_toplevel_containers",
7710 "name FROM containers",
7713 "name NOT LIKE '%%/%%'",
7720 /* Q_SCLI - SET_CONTAINER_LIST, v9 */
7721 "set_container_list",
7737 /* Q_GCLI - GET_CONTAINER_LIST, v9 */
7738 "get_container_list",
7744 "c.name, l.name FROM containers c, list l",
7747 "LOWER(c.name) = LOWER('%s') AND c.list_id = l.list_id AND c.list_id != 0",
7755 int QueryCount = (sizeof(Queries) / sizeof(struct query));