3 * This file defines the query dispatch table for version 2 of the protocol
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 VOnum0[] = {
50 * Commonly used validation records defined here so that they may
54 static struct validate VDmach = { VOmach0, 1 };
56 static struct validate VDfix_modby = {
70 static char *galo_fields[] = {
71 "login", "unix_uid", "shell", "last", "first", "middle",
74 static char *gual_fields[] = {
76 "login", "unix_uid", "shell", "last", "first", "middle", "status",
77 "clearid", "class", "comments", "signature", "secure",
78 "modtime", "modby", "modwith",
81 static char *gubl_fields[] = {
83 "login", "unix_uid", "shell", "last", "first", "middle", "status",
84 "clearid", "class", "modtime", "modby", "modwith",
87 static struct validate gubl_validate =
100 static char *guau_fields[] = {
102 "login", "unix_uid", "shell", "last", "first", "middle", "status",
103 "clearid", "class", "comments", "signature", "secure",
104 "modtime", "modby", "modwith",
107 static char *guan_fields[] = {
109 "login", "unix_uid", "shell", "last", "first", "middle", "status",
110 "clearid", "class", "comments", "signature", "secure",
111 "modtime", "modby", "modwith",
114 static struct validate guan_validate =
127 static char *guac_fields[] = {
129 "login", "unix_uid", "shell", "last", "first", "middle", "status",
130 "clearid", "class", "comments", "signature", "secure",
131 "modtime", "modby", "modwith",
134 static char *guam_fields[] = {
136 "login", "unix_uid", "shell", "last", "first", "middle", "status",
137 "clearid", "class", "comments", "signature", "secure",
138 "modtime", "modby", "modwith",
141 static char *gubu_fields[] = {
143 "login", "unix_uid", "shell", "last", "first", "middle", "status",
144 "clearid", "class", "modtime", "modby", "modwith",
147 static struct validate gubu_validate =
160 static char *gubn_fields[] = {
162 "login", "unix_uid", "shell", "last", "first", "middle", "status",
163 "clearid", "class", "modtime", "modby", "modwith",
166 static struct validate gubn_validate =
179 static char *gubc_fields[] = {
181 "login", "unix_uid", "shell", "last", "first", "middle", "status",
182 "clearid", "class", "modtime", "modby", "modwith",
185 static char *gubm_fields[] = {
187 "login", "unix_uid", "shell", "last", "first", "middle", "status",
188 "clearid", "class", "modtime", "modby", "modwith",
191 static char *auac_fields[] = {
192 "login", "unix_uid", "shell", "last", "first", "middle", "status",
193 "clearid", "class", "comments", "signature", "secure",
196 static struct valobj auac_valobj[] = {
197 {V_CHAR, 0, USERS_TABLE, "login"},
199 {V_CHAR, 2, USERS_TABLE, "shell"},
200 {V_CHAR, 3, USERS_TABLE, "last"},
201 {V_CHAR, 4, USERS_TABLE, "first"},
202 {V_CHAR, 5, USERS_TABLE, "middle"},
204 {V_CHAR, 7, USERS_TABLE, "clearid"},
205 {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS},
206 {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
210 static struct validate auac_validate = {
222 static struct validate ausr_validate = {
234 static char *rusr_fields[] = {
235 "unix_uid", "login", "fs_type"
238 static struct valobj rusr_valobj[] = {
240 {V_CHAR, 1, USERS_TABLE, "login"},
244 static struct validate rusr_validate = {
256 static char *uuac_fields[] = {
258 "newlogin", "unix_uid", "shell", "last", "first", "middle", "status",
259 "clearid", "class", "comments", "signature", "secure",
262 static struct valobj uuac_valobj[] = {
263 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
264 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
266 {V_CHAR, 3, USERS_TABLE, "shell"},
267 {V_CHAR, 4, USERS_TABLE, "first"},
268 {V_CHAR, 5, USERS_TABLE, "last"},
269 {V_CHAR, 6, USERS_TABLE, "middle"},
271 {V_CHAR, 8, USERS_TABLE, "clearid"},
272 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
273 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
277 static struct validate uuac_validate = {
289 static struct validate uusr_validate = {
301 static char *uush_fields[] = {
306 static struct valobj uush_valobj[] = {
307 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
308 {V_CHAR, 1, USERS_TABLE, "shell"},
311 static struct validate uush_validate = {
323 static char *uust_fields[] = {
328 static char *uuss_fields[] = {
333 static struct valobj uust_valobj[] = {
334 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
339 static struct validate uust_validate = {
351 static char *dusr_fields[] = {
355 static struct validate dusr_validate = {
367 static char *gkum_fields[] = { "login", "kerberos",
368 "login", "kerberos" };
370 static char *akum_fields[] = { "login", "kerberos" };
372 static struct valobj akum_valobj[] =
374 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
375 {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
378 static struct validate akum_validate =
383 "users_id = %d or string_id = %d",
391 static struct validate dkum_validate =
396 "users_id = %d and string_id = %d",
404 static char *gfbl_fields[] = {
406 "login", "fullname", "nickname", "home_addr",
407 "home_phone", "office_addr", "office_phone", "department",
408 "affiliation", "modtime", "modby", "modwith",
411 static struct validate gfbl_validate = {
423 static char *ufbl_fields[] = {
425 "fullname", "nickname", "home_addr",
426 "home_phone", "office_addr", "office_phone", "department",
430 static struct valobj ufbl_valobj[] = {
431 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
432 {V_LEN, 1, USERS_TABLE, "fullname"},
433 {V_LEN, 2, USERS_TABLE, "nickname"},
434 {V_LEN, 3, USERS_TABLE, "home_addr"},
435 {V_LEN, 4, USERS_TABLE, "home_phone"},
436 {V_LEN, 5, USERS_TABLE, "office_addr"},
437 {V_LEN, 6, USERS_TABLE, "office_phone"},
438 {V_LEN, 7, USERS_TABLE, "department"},
439 {V_LEN, 8, USERS_TABLE, "affiliation"},
442 static struct validate ufbl_validate = {
454 static char *gpob_fields[] = {
456 "login", "type", "box", "modtime", "modby", "modwith",
459 static struct validate gpob_validate = {
463 "potype != 'NONE' and users_id = %d",
471 static char *gpox_fields[] = {
472 "login", "type", "box",
475 static struct validate gpox_validate = {
487 static char *spob_fields[] = {
488 "login", "type", "box",
491 static struct valobj spob_valobj[] = {
492 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
493 {V_TYPE, 1, 0, "pobox", 0, MR_TYPE},
496 static struct validate spob_validate = /* SET_POBOX */
509 static struct validate spop_validate = /* SET_POBOX_POP */
522 static struct validate dpob_validate = /* DELETE_POBOX */
535 static char *gmac_fields[] = {
537 "name", "type", "modtime", "modby", "modwith",
540 static char *ghst_fields[] = {
541 "name", "address", "location", "network",
542 "name", "vendor", "model", "os", "location", "contact", "use",
543 "status", "status_change", "network", "address", "ace_type",
544 "ace_name", "admin_comment", "ops_comment", "created", "creator",
545 "inuse", "modtime", "modby", "modwith",
548 static struct validate ghst_validate = {
560 static char *ahst_fields[] = {
561 "name", "vendor", "model", "os", "location", "contact", "use",
562 "status", "subnet", "address", "ace_type", "ace_name",
563 "admin_comment", "ops_comment",
566 static struct valobj ahst_valobj[] = {
567 {V_CHAR, 0, MACHINE_TABLE, "name"},
568 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
569 {V_CHAR, 2, MACHINE_TABLE, "model"},
570 {V_CHAR, 3, MACHINE_TABLE, "os"},
571 {V_CHAR, 4, MACHINE_TABLE, "location"},
572 {V_CHAR, 5, MACHINE_TABLE, "contact"},
575 {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
576 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
577 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
578 {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
579 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
582 static struct validate ahst_validate = {
586 "name = UPPER('%s')",
591 set_uppercase_modtime,
594 static char *uhst_fields[] = {
596 "newname", "vendor", "model", "os", "location", "contact", "use",
597 "status", "subnet", "address", "ace_type", "ace_name",
598 "admin_comment", "ops_comment",
601 static struct valobj uhst_valobj[] = {
602 {V_CHAR, 0, MACHINE_TABLE, "name"},
603 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
604 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
605 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
606 {V_CHAR, 3, MACHINE_TABLE, "model"},
607 {V_CHAR, 4, MACHINE_TABLE, "os"},
608 {V_CHAR, 5, MACHINE_TABLE, "location"},
609 {V_CHAR, 6, MACHINE_TABLE, "contact"},
612 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
613 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
614 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
615 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
616 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
619 static struct validate uhst_validate = {
631 static char *dhst_fields[] = {
635 static struct validate dhst_validate = {
647 static char *ghal_fields[] = {
648 "alias", "canonical_hostname",
649 "alias", "canonical_hostname"
652 static struct validate ghal_validate = {
664 static struct valobj ahal_valobj[] = {
665 {V_CHAR, 0, HOSTALIAS_TABLE, "name"},
666 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
669 static struct validate ahal_validate = {
673 "name = UPPER('%s')",
681 static struct valobj dhal_valobj[] = {
682 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
685 static struct validate dhal_validate = {
689 "name = UPPER('%s') AND mach_id = %d",
697 static char *gsnt_fields[] = {
699 "name", "description", "address", "mask", "low", "high", "prefix",
700 "ace_type", "ace_name", "modtime", "modby", "modwith"
703 static struct validate gsnt_validate = {
715 static char *asnt_fields[] = {
716 "name", "description", "address", "mask", "low", "high", "prefix",
717 "ace_type", "ace_name",
720 static struct valobj asnt_valobj[] = {
721 {V_CHAR, 0, SUBNET_TABLE, "name"},
722 {V_LEN, 1, SUBNET_TABLE, "description"},
727 {V_LEN, 6, SUBNET_TABLE, "prefix"},
728 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
729 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
732 static struct validate asnt_validate =
737 "name = UPPER('%s')",
742 set_uppercase_modtime,
745 static char *usnt_fields[] = {
747 "newname", "description", "address", "mask", "low", "high", "prefix",
748 "ace_type", "ace_name",
751 static struct valobj usnt_valobj[] = {
752 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
753 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
754 {V_LEN, 2, SUBNET_TABLE, "description"},
759 {V_LEN, 7, SUBNET_TABLE, "prefix"},
760 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
761 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
764 static struct validate usnt_validate =
777 static char *dsnt_fields[] = {
781 static struct validate dsnt_validate = {
793 static char *gclu_fields[] = {
795 "name", "description", "location", "modtime", "modby", "modwith",
798 static char *aclu_fields[] = {
799 "name", "description", "location",
802 static struct valobj aclu_valobj[] = {
803 {V_CHAR, 0, CLUSTERS_TABLE, "name"},
804 {V_LEN, 1, CLUSTERS_TABLE, "description"},
805 {V_LEN, 2, CLUSTERS_TABLE, "location"},
808 static struct validate aclu_validate =
821 static char *uclu_fields[] = {
823 "newname", "description", "location",
826 static struct valobj uclu_valobj[] = {
827 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
828 {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE},
829 {V_LEN, 2, CLUSTERS_TABLE, "description"},
830 {V_LEN, 3, CLUSTERS_TABLE, "location"},
833 static struct validate uclu_validate = {
845 static char *dclu_fields[] = {
849 static struct validate dclu_validate = {
861 static char *gmcm_fields[] = {
862 "machine", "cluster",
863 "machine", "cluster",
866 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
867 { /* DELETE_MACHINE_FROM_CLUSTER */
868 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
869 {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
872 static struct validate amtc_validate = /* for amtc and dmfc */
877 "mach_id = %d and clu_id = %d",
882 set_mach_modtime_by_id,
885 static char *gcld_fields[] = {
886 "cluster", "serv_label",
887 "cluster", "serv_label", "serv_cluster",
890 static char *acld_fields[] = {
891 "cluster", "serv_label", "serv_cluster",
894 static struct valobj acld_valobj[] =
896 {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER},
897 {V_CHAR, 1, SVC_TABLE, "serv_label"},
898 {V_CHAR, 2, SVC_TABLE, "serv_cluster"}
901 static struct validate acld_validate =
906 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
911 set_cluster_modtime_by_id,
914 static struct validate dcld_validate =
919 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
924 set_cluster_modtime_by_id,
927 static char *glin_fields[] = {
929 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
930 "ace_type", "ace_name", "description", "modtime", "modby", "modwith",
933 static struct validate glin_validate = {
940 access_vis_list_by_name,
945 static char *alis_fields[] = {
946 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
947 "ace_type", "ace_name", "description",
950 static struct valobj alis_valobj[] = {
951 {V_CHAR, 0, LIST_TABLE, "name"},
958 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
959 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
960 {V_LEN, 9, LIST_TABLE, "description"},
963 static struct validate alis_validate = {
975 static char *ulis_fields[] = {
977 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
978 "ace_type", "ace_name", "description",
981 static struct valobj ulis_valobj[] = {
982 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
983 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
990 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
991 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
992 {V_LEN, 10, LIST_TABLE, "description"},
995 static struct validate ulis_validate = {
1007 static char *dlis_fields[] = {
1011 static struct validate dlis_validate = {
1023 static char *amtl_fields[] = {
1024 "list_name", "member_type", "member_name",
1027 static struct valobj amtl_valobj[] = {
1028 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1029 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
1030 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
1033 static struct validate amtl_validate =
1046 static struct validate dmfl_validate =
1056 delete_member_from_list,
1059 static char *gaus_fields[] = {
1060 "ace_type", "ace_name",
1061 "use_type", "use_name",
1064 static struct valobj gaus_valobj[] = {
1065 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1066 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1069 static struct validate gaus_validate = {
1081 static char *qgli_fields[] = {
1082 "active", "publicflg", "hidden", "maillist", "grouplist",
1086 static struct valobj qgli_valobj[] = {
1087 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1088 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1089 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1090 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1091 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1094 static struct validate qgli_validate = {
1103 qualified_get_lists,
1106 static char *gmol_fields[] = {
1108 "member_type", "member_name",
1111 static struct validate gmol_validate = {
1118 access_visible_list,
1120 get_members_of_list,
1123 static struct validate geml_validate = {
1130 access_visible_list,
1132 get_end_members_of_list,
1135 static char *glom_fields[] = {
1136 "member_type", "member_name",
1137 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
1140 static struct valobj glom_valobj[] = {
1141 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
1142 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1145 static struct validate glom_validate = {
1154 get_lists_of_member,
1157 static char *cmol_fields[] = {
1162 static struct validate cmol_validate = {
1169 access_visible_list,
1171 count_members_of_list,
1174 static char *gsin_fields[] = {
1176 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
1177 "type", "enable", "inprogress", "harderror", "errmsg",
1178 "ace_type", "ace_name", "modtime", "modby", "modwith",
1181 static struct validate gsin_validate =
1194 static char *qgsv_fields[] = {
1195 "enable", "inprogress", "harderror",
1199 static struct valobj qgsv_valobj[] = {
1200 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1201 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1202 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1205 static struct validate qgsv_validate = {
1214 qualified_get_server,
1217 static char *asin_fields[] = {
1218 "service", "update_int", "target_file", "script", "type", "enable",
1219 "ace_type", "ace_name",
1222 static struct valobj asin_valobj[] = {
1223 {V_CHAR, 0, SERVERS_TABLE, "name"},
1225 {V_LEN, 2, SERVERS_TABLE, "target_file"},
1226 {V_LEN, 3, SERVERS_TABLE, "script"},
1227 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
1229 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
1230 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
1233 static struct validate asin_validate = /* for asin, usin */
1238 "name = UPPER('%s')",
1243 set_uppercase_modtime,
1246 static struct validate rsve_validate = {
1250 "name = UPPER('%s')",
1255 set_uppercase_modtime,
1258 static char *ssif_fields[] = {
1259 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
1262 static struct valobj ssif_valobj[] = {
1263 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
1268 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
1271 static struct validate ssif_validate = {
1275 "name = UPPER('%s')",
1283 static char *dsin_fields[] = {
1287 static struct validate dsin_validate = {
1291 "name = UPPER('%s')",
1299 static char *gshi_fields[] = {
1300 "service", "machine",
1301 "service", "machine", "enable", "override", "success", "inprogress",
1302 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
1303 "value3", "modtime", "modby", "modwith",
1306 static struct validate gshi_validate = {
1318 static char *qgsh_fields[] = {
1319 "service", "enable", "override", "success", "inprogress", "hosterror",
1320 "service", "machine",
1323 static struct valobj qgsh_valobj[] = {
1324 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1325 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1326 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1327 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1328 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
1331 static struct validate qgsh_validate = {
1340 qualified_get_serverhost,
1343 static char *ashi_fields[] = {
1344 "service", "machine", "enable", "value1", "value2", "value3",
1347 static struct valobj ashi_valobj[] = {
1348 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
1349 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1353 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
1356 static struct validate ashi_validate = /* ashi & ushi */
1361 "service = UPPER('%s') AND mach_id = %d",
1366 set_serverhost_modtime,
1369 static struct validate rshe_validate =
1374 "service = UPPER('%s') AND mach_id = %d",
1379 set_serverhost_modtime,
1382 static struct validate ssho_validate =
1387 "service = UPPER('%s') AND mach_id = %d",
1395 static char *sshi_fields[] = {
1396 "service", "machine", "override", "success", "inprogress",
1397 "hosterror", "errmsg", "ltt", "lts",
1400 static struct valobj sshi_valobj[] = {
1401 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
1402 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1407 {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"},
1412 static struct validate sshi_validate =
1425 static char *dshi_fields[] = {
1426 "service", "machine",
1429 static struct validate dshi_validate =
1434 "service = UPPER('%s') AND mach_id = %d",
1442 static char *gslo_fields[] = {
1444 "server", "machine",
1447 static char *gfsl_fields[] = {
1449 "label", "type", "machine", "name", "mount", "access", "comments",
1450 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
1453 static char *gfsm_fields[] = {
1455 "label", "type", "machine", "name", "mount", "access", "comments",
1456 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
1459 static struct validate gfsm_validate = {
1471 static char *gfsn_fields[] = {
1472 "machine", "parition",
1473 "label", "type", "machine", "name", "mount", "access", "comments",
1474 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
1477 static struct validate gfsn_validate = {
1489 static char *gfsp_fields[] = {
1491 "label", "type", "machine", "name", "mount", "access", "comments",
1492 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
1495 static char *gfsg_fields[] = {
1497 "label", "type", "machine", "name", "mount", "access", "comments",
1498 "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith",
1501 static struct validate gfsg_validate = {
1513 static char *afil_fields[] = {
1514 "label", "type", "machine", "name", "mount", "access", "comments",
1515 "owner", "owners", "create", "lockertype",
1518 static struct valobj afil_valobj[] = {
1519 {V_CHAR, 0, FILESYS_TABLE, "label"},
1520 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
1521 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1522 {V_CHAR, 3, FILESYS_TABLE, "name"},
1523 {V_LEN, 4, FILESYS_TABLE, "mount"},
1524 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
1525 {V_LEN, 6, FILESYS_TABLE, "comments"},
1526 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
1527 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
1529 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
1532 static struct validate afil_validate = {
1541 set_filesys_modtime,
1544 static char *ufil_fields[] = {
1545 "label", "newlabel", "type", "machine", "name", "mount", "access",
1546 "comments", "owner", "owners", "create", "lockertype",
1549 static struct valobj ufil_valobj[] = {
1550 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1551 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
1552 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
1553 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1554 {V_CHAR, 4, FILESYS_TABLE, "name"},
1555 {V_LEN, 5, FILESYS_TABLE, "mount"},
1556 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
1557 {V_LEN, 7, FILESYS_TABLE, "comments"},
1558 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
1559 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
1561 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
1564 static struct validate ufil_validate = {
1573 set_filesys_modtime,
1576 static char *dfil_fields[] = {
1580 static struct validate dfil_validate = {
1592 static char *gfgm_fields[] = {
1593 "fsgroup", "filesys", "sortkey"
1596 static struct validate gfgm_validate = {
1608 static struct valobj aftg_valobj[] = {
1609 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1610 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1613 static struct validate aftg_validate = {
1617 "group_id = %d and filsys_id = %d",
1625 static char *ganf_fields[] = {
1626 "machine", "dir", "device", "status", "allocated", "size",
1627 "modtime", "modby", "modwith",
1630 static char *gnfp_fields[] = {
1632 "machine", "dir", "device", "status", "allocated", "size",
1633 "modtime", "modby", "modwith",
1636 static struct validate gnfp_validate = {
1648 static struct valobj anfp_valobj[] = {
1649 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1650 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
1651 {V_LEN, 2, NFSPHYS_TABLE, "device"},
1657 static struct validate anfp_validate = {
1661 "mach_id = %d and dir = '%s'",
1666 set_nfsphys_modtime,
1669 static struct validate unfp_validate = {
1673 "mach_id = %d and dir = '%s'",
1678 set_nfsphys_modtime,
1681 static char *ajnf_fields[] = {
1682 "machine", "dir", "adjustment",
1685 static struct valobj ajnf_valobj[] = {
1686 {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE},
1687 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
1691 static struct validate ajnf_validate = {
1695 "mach_id = %d and dir = '%s'",
1700 set_nfsphys_modtime,
1703 static char *dnfp_fields[] = {
1707 static struct validate dnfp_validate = {
1711 "mach_id = %d and dir = '%s'",
1716 set_nfsphys_modtime,
1719 static char *gqot_fields[] = {
1720 "filesys", "type", "name",
1721 "filesys", "type", "name", "quota", "dir", "machine",
1722 "modtime", "modby", "modwith",
1725 static struct valobj gqot_valobj[] = {
1726 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
1727 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
1730 static struct validate gqot_validate = {
1742 static char *gqbf_fields[] = {
1744 "filesys", "type", "name", "quota", "dir", "machine",
1745 "modtime", "modby", "modwith",
1748 static struct validate gqbf_validate = {
1760 static char *aqot_fields[] = {
1761 "filesys", "type", "name", "quota",
1764 static struct valobj aqot_valobj[] = {
1765 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1766 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
1767 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
1771 static struct validate aqot_validate = {
1775 "filsys_id = %d and type = '%s' and entity_id = %d",
1783 static struct validate uqot_validate = {
1787 "filsys_id = %d AND type = '%s' AND entity_id = %d",
1795 static struct validate dqot_validate = {
1799 "filsys_id = %d AND type = '%s' AND entity_id = %d",
1807 static char *gnfq_fields[] = {
1809 "filesys", "login", "quota", "dir", "machine",
1810 "modtime", "modby", "modwith",
1813 static struct validate gnfq_validate = {
1825 static char *gnqp_fields[] = {
1827 "filesys", "login", "quota", "dir", "machine",
1828 "modtime", "modby", "modwith",
1831 static char *anfq_fields[] = {
1832 "filesys", "login", "quota",
1835 static struct valobj anfq_valobj[] = {
1836 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1837 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
1841 static struct validate anfq_validate = {
1845 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
1853 static struct validate unfq_validate = {
1857 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
1865 static struct validate dnfq_validate = {
1869 "filsys_id = %d AND entity_id = %d",
1877 static char *gzcl_fields[] = {
1879 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
1880 "iws_type", "iws_name", "iui_type", "iui_name",
1881 "modtime", "modby", "modwith",
1884 static struct validate gzcl_validate = {
1896 static char *azcl_fields[] = {
1897 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
1898 "iws_type", "iws_name", "iui_type", "iui_name",
1901 static struct valobj azcl_valobj[] = {
1902 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
1903 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
1904 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
1905 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
1906 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
1907 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
1908 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
1909 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1910 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1913 static struct validate azcl_validate = {
1925 static char *uzcl_fields[] = {
1926 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
1927 "iws_type", "iws_name", "iui_type", "iui_name",
1930 static struct valobj uzcl_valobj[] = {
1931 {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS},
1932 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
1933 {V_TYPE, 2, 0, "ace_type", 0, MR_ACE},
1934 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
1935 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
1936 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
1937 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
1938 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
1939 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1940 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1943 static struct validate uzcl_validate = {
1955 static struct validate dzcl_validate = {
1967 static char *gsha_fields[] = {
1969 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
1972 static struct validate gsha_validate =
1985 static char *asha_fields[] = {
1986 "machine", "ace_type", "ace_name",
1989 static struct valobj asha_valobj[] = {
1990 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1991 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
1992 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
1995 static struct validate asha_validate =
2008 static char *gsvc_fields[] = {
2010 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
2013 static char *asvc_fields[] = {
2014 "service", "protocol", "port", "description",
2017 static struct valobj asvc_valobj[] = {
2018 {V_CHAR, 0, SERVICES_TABLE, "name"},
2019 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
2021 {V_CHAR, 3, SERVICES_TABLE, "description"},
2024 static struct validate asvc_validate = {
2036 static char *gpce_fields[] = {
2038 "printer", "spooling_host", "spool_directory", "rprinter",
2039 "quotaserver", "authenticate", "price", "comments",
2040 "modtime", "modby", "modwith",
2043 static struct validate gpce_validate = {
2055 static char *apce_fields[] = {
2056 "printer", "spooling_host", "spool_directory", "rprinter",
2057 "quotaserver", "authenticate", "price", "comments",
2058 "modtime", "modby", "modwith",
2061 static struct valobj apce_valobj[] = {
2062 {V_CHAR, 0, PRINTCAP_TABLE, "name"},
2063 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2064 {V_LEN, 2, PRINTCAP_TABLE, "dir"},
2065 {V_LEN, 3, PRINTCAP_TABLE, "rp"},
2066 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2069 {V_CHAR, 7, PRINTCAP_TABLE, "comments"},
2072 static struct validate apce_validate = {
2084 static struct validate dpce_validate = {
2096 static char *gpcp_fields[] = {
2098 "printer", "spooling_host", "spool_directory", "rprinter", "comments",
2099 "modtime", "modby", "modwith",
2102 static char *gpdm_fields[] = {
2104 "name", "rpcnum", "host", "modtime", "modby", "modwith",
2107 static char *apdm_fields[] = {
2108 "name", "rpcnum", "host"
2111 static struct valobj apdm_valobj[] = {
2112 {V_CHAR, 0, PALLADIUM_TABLE, "name"},
2114 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2117 static struct validate apdm_validate = {
2129 static struct validate dpdm_validate = {
2141 static char *gali_fields[] = {
2142 "name", "type", "trans",
2143 "name", "type", "trans",
2146 static char *aali_fields[] = {
2147 "name", "type", "trans",
2150 static struct valobj aali_valobj[] = {
2151 {V_CHAR, 0, ALIAS_TABLE, "name"},
2152 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
2153 {V_CHAR, 2, ALIAS_TABLE, "trans"},
2156 static struct validate aali_validate = {
2160 "name = '%s' and type = '%s' and trans = '%s'",
2168 static struct validate dali_validate = /* DELETE_ALIAS */
2173 "name = '%s' and type = '%s' and trans = '%s'",
2181 static char *gval_fields[] = {
2185 static struct valobj gval_valobj[] = {
2186 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
2189 static struct validate gval_validate = {
2201 static char *aval_fields[] = {
2205 static struct valobj aval_valobj[] = {
2206 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
2210 static struct validate aval_validate = /* for aval, uval, and dval */
2223 static char *dval_fields[] = {
2227 static char *gats_fields[] = {
2228 "table_name", "appends", "updates", "deletes",
2229 "modtime", "modby", "modwith",
2232 static char *_sdl_fields[] = {
2236 static struct validate _sdl_validate =
2251 /* Generalized Query Definitions */
2253 /* Note: For any query which uses prefetch_value, the vcnt should be
2254 * one less than the number of %-format specifiers in the tlist.
2257 struct query Queries2[] = {
2259 /* Q_GALO - GET_ALL_LOGINS */
2265 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
2275 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
2276 "get_all_active_logins",
2281 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
2291 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN */
2292 "get_user_account_by_login",
2297 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, u.signature, u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
2300 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
2307 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID */
2308 "get_user_account_by_uid",
2313 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, u.signature, u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
2316 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
2323 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME */
2324 "get_user_account_by_name",
2329 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, u.signature, u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
2332 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
2339 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS */
2340 "get_user_account_by_class",
2345 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, u.signature, u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
2348 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
2355 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID */
2356 "get_user_account_by_id",
2361 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, u.signature, u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str",
2364 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
2371 /* Q_GUBL - GET_USER_BY_LOGIN */
2372 "get_user_by_login",
2377 "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",
2380 "u.login LIKE '%s' AND u.users_id != 0",
2387 /* Q_GUBU - GET_USER_BY_UID */
2393 "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",
2396 "u.unix_uid = %s AND u.users_id != 0",
2403 /* Q_GUBN - GET_USER_BY_NAME */
2409 "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",
2412 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
2419 /* Q_GUBC - GET_USER_BY_CLASS */
2420 "get_user_by_class",
2425 "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",
2428 "u.type = UPPER('%s') AND u.users_id != 0",
2435 /* Q_GUBM - GET_USER_BY_MITID */
2436 "get_user_by_mitid",
2441 "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",
2444 "u.clearid LIKE '%s' AND u.users_id != 0",
2451 /* Q_AUAC - ADD_USER_ACCOUNT */ /* uses prefetch_value() for users_id */
2457 "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, LENGTH(NVL('%s', CHR(0))), %s, %s)", /* followup_ausr fixes signature field */
2467 /* Q_AUSR - ADD_USER */ /* uses prefetch_value() for users_id */
2473 "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)",
2483 /* Q_RUSR - REGISTER_USER */
2499 /* Q_UUAC - UPDATE_USER_ACCOUNT */
2500 "update_user_account",
2505 "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 = LENGTH(NVL('%s', CHR(0))), secure = %s", /* followup_uuac fixes signature */
2515 /* Q_UUSR - UPDATE_USER */
2521 "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'",
2531 /* Q_UUSH - UPDATE_USER_SHELL */
2532 "update_user_shell",
2537 "users SET shell = '%s'",
2547 /* Q_UUST - UPDATE_USER_STATUS */
2548 "update_user_status",
2553 "users SET status = %s",
2563 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
2564 "update_user_security_status",
2569 "users SET secure = %s",
2579 /* Q_DUSR - DELETE_USER */
2595 /* Q_GKUM - GET_KERBEROS_USER_MAP */
2596 "get_kerberos_user_map",
2601 "u.login, str.string FROM krbmap km, users u, strings str",
2604 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
2606 "u.login, str.string",
2611 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
2612 "add_kerberos_user_map",
2617 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
2627 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
2628 "delete_kerberos_user_map",
2636 "users_id = %d AND string_id = %d",
2643 /* Q_GFBL - GET_FINGER_BY_LOGIN */
2644 "get_finger_by_login",
2649 "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",
2659 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
2660 "update_finger_by_login",
2665 "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))",
2675 /* Q_GPOB - GET_POBOX */
2681 "login, potype, pop_id || ':' || box_id, TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
2691 /* Q_GAPO - GET_ALL_POBOXES */
2697 "login, potype, pop_id || ':' || box_id FROM users",
2707 /* Q_GPOP - GET_POBOXES_POP */
2713 "login, potype, pop_id || ':' || box_id FROM users",
2723 /* Q_GPOF - GET_POBOXES_SMTP */
2729 "login, potype, pop_id || ':' || box_id FROM users",
2739 /* Q_SPOB - SET_POBOX */
2755 /* Q_SPOP - SET_POBOX_POP */
2761 "users SET potype = 'POP'",
2771 /* Q_DPOB - DELETE_POBOX */
2777 "users SET potype = 'NONE'",
2787 /* Q_GHST - GET_HOST */
2793 "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",
2796 "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",
2803 /* Q_AHST - ADD_HOST */ /* uses prefetch_value() for mach_id */
2809 "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)",
2819 /* Q_UHST - UPDATE_HOST */
2825 "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",
2835 /* Q_DHST - DELETE_HOST */
2851 /* Q_GMAC - GET_MACHINE */
2857 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
2860 "name LIKE UPPER('%s') AND mach_id != 0",
2867 /* Q_GHAL - GET_HOSTALIAS */
2873 "a.name, m.name FROM hostalias a, machine m",
2876 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
2883 /* Q_AHAL - ADD_HOSTALIAS */
2889 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)",
2899 /* Q_DHAL - DELETE_HOSTALIAS */
2908 "name = UPPER('%s') AND mach_id = %d",
2915 /* Q_GSNT - GET_SUBNET */
2921 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
2924 "name LIKE UPPER('%s')",
2931 /* Q_ASNT - ADD_SUBNET */
2937 "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)",
2947 /* Q_USNT - UPDATE_SUBNET */
2953 "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",
2963 /* Q_DSNT - DELETE_SUBNET */
2979 /* Q_GCLU - GET_CLUSTER */
2985 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
2988 "name LIKE '%s' AND clu_id != 0",
2995 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
3001 "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)",
3011 /* Q_UCLU - UPDATE_CLUSTER */
3017 "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))",
3027 /* Q_DCLU - DELETE_CLUSTER */
3043 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
3044 "get_machine_to_cluster_map",
3049 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
3052 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
3059 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
3060 "add_machine_to_cluster",
3065 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
3075 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
3076 "delete_machine_from_cluster",
3084 "mach_id = %d AND clu_id = %d",
3091 /* Q_GCLD - GET_CLUSTER_DATA */
3097 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
3100 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
3102 "c.name, svc.serv_label",
3107 /* Q_ACLD - ADD_CLUSTER_DATA */
3113 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')",
3123 /* Q_DCLD - DELETE_CLUSTER_DATA */
3124 "delete_cluster_data",
3132 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
3139 /* Q_GLIN - GET_LIST_INFO */
3145 "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",
3155 /* Q_EXLN - EXPAND_LIST_NAMES */
3156 "expand_list_names",
3164 "name LIKE '%s' AND list_id != 0",
3171 /* Q_ALIS - ADD_LIST */ /* uses prefetch_value() for list_id */
3177 "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)",
3187 /* Q_ULIS - UPDATE_LIST */
3193 "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))",
3203 /* Q_DLIS - DELETE_LIST */
3219 /* Q_AMTL - ADD_MEMBER_TO_LIST */
3220 "add_member_to_list",
3235 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
3236 "delete_member_from_list",
3251 /* Q_GAUS - GET_ACE_USE */
3267 /* Q_QGLI - QUALIFIED_GET_LISTS */
3268 "qualified_get_lists",
3283 /* Q_GMOL - GET_MEMBERS_OF_LIST */
3284 "get_members_of_list",
3299 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
3300 "get_end_members_of_list",
3315 /* Q_GLOM - GET_LISTS_OF_MEMBER */
3316 "get_lists_of_member",
3331 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
3332 "count_members_of_list",
3347 /* Q_GSIN - GET_SERVER_INFO */
3353 "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",
3356 "name LIKE UPPER('%s')",
3363 /* Q_QGSV - QUALIFIED_GET_SERVER */
3364 "qualified_get_server",
3379 /* Q_ASIN - ADD_SERVER_INFO */
3385 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)",
3395 /* Q_USIN - UPDATE_SERVER_INFO */
3396 "update_server_info",
3401 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
3404 "name = UPPER('%s')",
3411 /* Q_RSVE - RESET_SERVER_ERROR */
3412 "reset_server_error",
3417 "servers SET harderror = 0, dfcheck = dfgen",
3420 "name = UPPER('%s')",
3427 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
3428 "set_server_internal_flags",
3433 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))",
3436 "name = UPPER('%s')",
3443 /* Q_DSIN - DELETE_SERVER_INFO */
3444 "delete_server_info",
3452 "name = UPPER('%s')",
3459 /* Q_GSHI - GET_SERVER_HOST_INFO */
3460 "get_server_host_info",
3465 "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",
3468 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
3470 "sh.service, m.name",
3475 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
3476 "qualified_get_server_host",
3491 /* Q_ASHI - ADD_SERVER_HOST_INFO */
3492 "add_server_host_info",
3497 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))",
3507 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
3508 "update_server_host_info",
3513 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))",
3516 "service = UPPER('%s') AND mach_id = %d",
3523 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
3524 "reset_server_host_error",
3529 "serverhosts SET hosterror = 0",
3532 "service = UPPER('%s') AND mach_id = %d",
3539 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
3540 "set_server_host_override",
3545 "serverhosts SET override = 1",
3548 "service = UPPER('%s') AND mach_id = %d",
3555 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
3556 "set_server_host_internal",
3561 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s",
3564 "service = UPPER('%s') AND mach_id = %d",
3571 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
3572 "delete_server_host_info",
3580 "service = UPPER('%s') AND mach_id = %d",
3587 /* Q_GSLO - GET_SERVER_LOCATIONS */
3588 "get_server_locations",
3593 "sh.service, m.name FROM serverhosts sh, machine m",
3596 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
3598 "sh.service, m.name",
3603 /* Q_GFSL - GET_FILESYS_BY_LABEL */
3604 "get_filesys_by_label",
3609 "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",
3612 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
3619 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
3620 "get_filesys_by_machine",
3625 "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",
3628 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
3635 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
3636 "get_filesys_by_nfsphys",
3641 "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",
3644 "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' AND fs.type = 'NFS'",
3651 /* Q_GFSG - GET_FILESYS_BY_GROUP */
3652 "get_filesys_by_group",
3657 "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",
3660 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
3667 /* Q_GFSP - GET_FILESYS_BY_PATH */
3668 "get_filesys_by_path",
3673 "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",
3676 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
3683 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
3689 "INTO filesys (label, type, mach_id, name, mount, rwaccess, comments, owner, owners, createflg, lockertype, filsys_id) VALUES ('%s', '%s', %d, NVL('%s', CHR(0)), '%s', '%s', NVL('%s', CHR(0)), %d, %d, %s, '%s', %s)",
3699 /* Q_UFIL - UPDATE_FILESYS */
3705 "filesys SET label = '%s', type = '%s', mach_id = %d, name = NVL('%s', CHR(0)), mount = '%s', rwaccess = '%s', comments = NVL('%s', CHR(0)), owner = %d, owners = %d, createflg = %s, lockertype = '%s'",
3715 /* Q_DFIL - DELETE_FILESYS */
3731 /* Q_GFGM - GET_FSGROUP_MEMBERS */
3732 "get_fsgroup_members",
3737 "fs.label, fg.key FROM fsgroup fg, filesys fs",
3740 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
3747 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
3748 "add_filesys_to_fsgroup",
3753 "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')",
3763 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
3764 "remove_filesys_from_fsgroup",
3772 "group_id = %d AND filsys_id = %d",
3779 /* Q_GANF - GET_ALL_NFSPHYS */
3785 "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",
3788 "m.mach_id = np.mach_id",
3795 /* Q_GNFP - GET_NFSPHYS */
3801 "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",
3804 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
3811 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
3817 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)",
3827 /* Q_UNFP - UPDATE_NFSPHYS */
3833 "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s",
3836 "mach_id = %d AND dir = '%s'",
3843 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
3844 "adjust_nfsphys_allocation",
3849 "nfsphys SET allocated = allocated + %s",
3852 "mach_id = %d AND dir = '%s'",
3859 /* Q_DNFP - DELETE_NFSPHYS */
3868 "mach_id = %d AND dir = '%s'",
3875 /* Q_GQOT - GET_QUOTA */
3881 "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",
3884 "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",
3891 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
3892 "get_quota_by_filesys",
3897 "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",
3900 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
3907 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
3913 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
3923 /* Q_UQOT - UPDATE_QUOTA */
3929 "quota SET quota = %s",
3939 /* Q_DQOT - DELETE_QUOTA */
3955 /* Q_GNFQ - GET_NFS_QUOTAS */
3961 "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",
3964 "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'",
3966 "fs.label, u.login",
3971 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
3972 "get_nfs_quotas_by_partition",
3977 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
3980 "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",
3987 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
3993 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
4003 /* Q_UNFQ - UPDATE_NFS_QUOTA */
4009 "quota SET quota = %s",
4019 /* Q_DNFQ - DELETE_NFS_QUOTA */
4035 /* Q_GZCL - GET_ZEPHYR_CLASS */
4041 "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",
4051 /* Q_AZCL - ADD_ZEPHYR_CLASS */
4057 "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)",
4067 /* Q_UZCL - UPDATE_ZEPHYR_CLASS */
4068 "update_zephyr_class",
4073 "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",
4083 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
4084 "delete_zephyr_class",
4099 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
4100 "get_server_host_access",
4105 "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",
4108 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
4115 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
4116 "add_server_host_access",
4121 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)",
4131 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
4132 "update_server_host_access",
4137 "hostaccess SET acl_type = '%s', acl_id = %d",
4147 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
4148 "delete_server_host_access",
4163 /* Q_GSVC - GET_SERVICE */
4169 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
4179 /* Q_ASVC - ADD_SERVICE */
4185 "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))",
4195 /* Q_DSVC - DELETE_SERVICE */
4211 /* Q_GPCE - GET_PRINTCAP_ENTRY */
4212 "get_printcap_entry",
4217 "pc.name, m.name, pc.dir, pc.rp, pc.quotaserver, pc.auth, pc.price, pc.comments, TO_CHAR(pc.modtime, 'DD-mon-YYYY HH24:MI:SS'), pc.modby, pc.modwith FROM printcap pc, machine m",
4220 "pc.name LIKE '%s' AND m.mach_id = pc.mach_id",
4227 /* Q_APCE - ADD_PRINTCAP_ENTRY */
4228 "add_printcap_entry",
4233 "INTO printcap (name, mach_id, dir, rp, quotaserver, auth, price, comments) VALUES ('%s', %d, '%s', '%s', %d, %s, %s, NVL('%s', CHR(0)))",
4243 /* Q_DPCE - DELETE_PRINTCAP_ENTRY */
4244 "delete_printcap_entry",
4259 /* Q_GPCP - GET_PRINTCAP */
4265 "pc.name, m.name, pc.dir, pc.rp, pc.comments, TO_CHAR(pc.modtime, 'DD-mon-YYYY HH24:MI:SS'), pc.modby, pc.modwith FROM printcap pc, machine m",
4268 "pc.name LIKE '%s' AND m.mach_id = pc.mach_id",
4275 /* Q_DPCP - DELETE_PRINTCAP */
4291 /* Q_GPDM - GET_PALLADIUM */
4297 "pal.name, pal.identifier, m.name, TO_CHAR(pal.modtime, 'DD-mon-YYYY HH24:MI:SS'), pal.modby, pal.modwith FROM palladium pal, machine m",
4300 "pal.name LIKE '%s' AND m.mach_id = pal.mach_id",
4307 /* Q_APDM - ADD_PALLADIUM */
4313 "INTO palladium (name, identifier, mach_id) VALUES ('%s', %s, %d)",
4323 /* Q_DPDM - DELETE_PALLADIUM */
4339 /* Q_GALI - GET_ALIAS */
4345 "name, type, trans FROM alias",
4348 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
4350 "type, name, trans",
4355 /* Q_AALI - ADD_ALIAS */
4361 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
4371 /* Q_DALI - DELETE_ALIAS */
4380 "name = '%s' AND type = '%s' AND trans = '%s'",
4387 /* Q_GVAL - GET_VALUE */
4393 "value FROM numvalues",
4403 /* Q_AVAL - ADD_VALUE */
4409 "INTO numvalues (name, value) VALUES ('%s', %s)",
4419 /* Q_UVAL - UPDATE_VALUE */
4425 "numvalues SET value = %s",
4435 /* Q_DVAL - DELETE_VALUE */
4451 /* Q_GATS - GET_ALL_TABLE_STATS */
4452 "get_all_table_stats",
4457 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
4467 /* Q__SDL - _SET_DEBUG_LEVEL */
4484 int QueryCount2 = (sizeof(Queries2) / sizeof(struct query));