1 /* This file defines the query dispatch table for version 2 of the protocol
5 * Copyright 1987, 1988 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"
15 /* Specialized Support Query Routines */
17 /* Special Access Check Routines */
21 int access_visible_list();
22 int access_vis_list_by_name();
31 /* Query Setup Routines */
33 int prefetch_filesys();
56 /* Query Followup Routines */
57 int followup_fix_modby();
73 int set_modtime_by_id();
74 int set_finger_modtime();
75 int set_pobox_modtime();
76 int set_uppercase_modtime();
77 int set_mach_modtime_by_id();
78 int set_cluster_modtime_by_id();
79 int set_serverhost_modtime();
80 int set_nfsphys_modtime();
81 int set_filesys_modtime();
82 int set_zephyr_modtime();
87 int add_member_to_list();
88 int delete_member_from_list();
90 int qualified_get_lists();
91 int get_members_of_list();
92 int get_end_members_of_list();
93 int qualified_get_server();
94 int qualified_get_serverhost();
96 int count_members_of_list();
97 int get_lists_of_member();
104 char *table_name[] = {
105 "none", "users", "krbmap", "machine", "hostalias", "subnet", "cluster",
106 "mcmap", "svc", "list", "imembers", "servers", "serverhosts", "filesys",
107 "fsgroup", "nfsphys", "quota", "zephyr", "hostaccess", "strings", "services",
108 "printcap", "palladium", "capacls", "alias", "numvalues", "tblstats",
114 * These are commonly used validation objects, defined here so that they
118 static struct valobj VOuser0[] = {
119 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
122 static struct valobj VOmach0[] = {
123 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
126 static struct valobj VOclu0[] = {
127 {V_ID, 0, CLUSTER_TABLE, "name", "clu_id", MR_CLUSTER},
130 static struct valobj VOsnet0[] = {
131 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_CLUSTER},
134 static struct valobj VOlist0[] = {
135 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
138 static struct valobj VOfilsys0[] = {
139 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
142 static struct valobj VOchar0[] = {
148 * Commonly used validation records defined here so that they may
152 static struct validate VDmach = { VOmach0, 1 };
153 static struct validate VDfixmodby = {
168 static char *galo_fields[] = {
169 "login", "uid", "shell", "last", "first", "middle",
172 static char *gual_fields[] = {
174 "login", "uid", "shell", "last", "first", "middle", "status",
175 "clearid", "class", "comments", "signature", "secure", "modtime", "modby", "modwith",
178 static char *gubl_fields[] = {
180 "login", "uid", "shell", "last", "first", "middle", "status",
181 "clearid", "class", "modtime", "modby", "modwith",
184 static struct validate gubl_validate =
197 static char *guau_fields[] = {
199 "login", "uid", "shell", "last", "first", "middle", "status",
200 "clearid", "class", "comments", "signature", "secure", "modtime", "modby", "modwith",
203 static char *guan_fields[] = {
205 "login", "uid", "shell", "last", "first", "middle", "status",
206 "clearid", "class", "comments", "signature", "secure", "modtime", "modby", "modwith",
209 static struct validate guan_validate =
222 static char *guac_fields[] = {
224 "login", "uid", "shell", "last", "first", "middle", "status",
225 "clearid", "class", "comments", "signature", "secure", "modtime", "modby", "modwith",
228 static char *guam_fields[] = {
230 "login", "uid", "shell", "last", "first", "middle", "status",
231 "clearid", "class", "comments", "signature", "secure", "modtime", "modby", "modwith",
234 static char *gubu_fields[] = {
236 "login", "uid", "shell", "last", "first", "middle", "status",
237 "clearid", "class", "modtime", "modby", "modwith",
240 static struct valobj gubu_valobj[] = {
244 static struct validate gubu_validate =
257 static char *gubn_fields[] = {
259 "login", "uid", "shell", "last", "first", "middle", "status",
260 "clearid", "class", "modtime", "modby", "modwith",
263 static struct validate gubn_validate =
276 static char *gubc_fields[] = {
278 "login", "uid", "shell", "last", "first", "middle", "status",
279 "clearid", "class", "modtime", "modby", "modwith",
282 static char *gubm_fields[] = {
284 "login", "uid", "shell", "last", "first", "middle", "status",
285 "clearid", "class", "modtime", "modby", "modwith",
288 static char *gudf_fields[] = {
290 "dirsuppress", "dirremote"
293 static struct validate gudf_validate =
306 static char *auac_fields[] = {
307 "login", "uid", "shell", "last", "first", "middle", "status",
308 "clearid", "class", "comments", "signature", "secure",
311 static struct valobj auac_valobj[] = {
312 {V_CHAR, 0, USERS_TABLE, "login"},
314 {V_CHAR, 2, USERS_TABLE, "shell"},
315 {V_CHAR, 3, USERS_TABLE, "last"},
316 {V_CHAR, 4, USERS_TABLE, "first"},
317 {V_CHAR, 5, USERS_TABLE, "middle"},
319 {V_CHAR, 7, USERS_TABLE, "clearid"},
320 {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS},
321 {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
325 static struct validate auac_validate = {
337 static struct validate ausr_validate = {
349 static char *rusr_fields[] = {
350 "uid", "login", "fs_type"
353 static struct valobj rusr_valobj[] = {
359 static struct validate rusr_validate = {
371 static char *uuac_fields[] = {
373 "newlogin", "uid", "shell", "last", "first", "middle", "status",
374 "clearid", "class", "comments", "signature", "secure",
377 static struct valobj uuac_valobj[] = {
378 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
379 {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE},
381 {V_CHAR, 3, USERS_TABLE, "shell"},
382 {V_CHAR, 4, USERS_TABLE, "first"},
383 {V_CHAR, 5, USERS_TABLE, "last"},
384 {V_CHAR, 6, USERS_TABLE, "middle"},
386 {V_CHAR, 8, USERS_TABLE, "clearid"},
387 {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS},
388 {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
392 static struct validate uuac_validate = {
404 static struct validate uusr_validate = {
416 static char *uush_fields[] = {
421 static struct valobj uush_valobj[] = {
422 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
423 {V_CHAR, 1, USERS_TABLE, "shell"},
426 static struct validate uush_validate = {
438 static char *uust_fields[] = {
443 static char *uuss_fields[] = {
448 static struct valobj uust_valobj[] = {
449 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
454 static struct validate uust_validate = {
466 static char *uudf_fields[] = {
468 "dirsuppress", "dirremote"
471 static struct validate uudf_validate = {
483 static char *dusr_fields[] = {
487 static struct validate dusr_validate = {
499 static char *dubu_fields[] = {
503 static struct valobj dubu_valobj[] = {
504 {V_ID, 0, USERS_TABLE, "uid", "users_id", MR_USER}
507 static struct validate dubu_validate = {
519 static char *gkum_fields[] = { "login", "kerberos",
520 "login", "kerberos" };
522 static char *akum_fields[] = { "login", "kerberos" };
524 static struct valobj akum_valobj[] =
526 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
527 {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
530 static struct validate akum_validate =
535 "users_id = %d or string_id = %d",
543 static struct validate dkum_validate =
548 "users_id = %d and string_id = %d",
556 static char *gfbl_fields[] = {
558 "login", "fullname", "nickname", "home_addr",
559 "home_phone", "office_addr", "office_phone", "department",
560 "affiliation", "modtime", "modby", "modwith",
563 static struct validate gfbl_validate = {
575 static char *ufbl_fields[] = {
577 "fullname", "nickname", "home_addr",
578 "home_phone", "office_addr", "office_phone", "department",
582 static struct valobj ufbl_valobj[] = {
583 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
584 {V_LEN, 1, USERS_TABLE, "fullname"},
585 {V_LEN, 2, USERS_TABLE, "nickname"},
586 {V_LEN, 3, USERS_TABLE, "home_addr"},
587 {V_LEN, 4, USERS_TABLE, "home_phone"},
588 {V_LEN, 5, USERS_TABLE, "office_addr"},
589 {V_LEN, 6, USERS_TABLE, "office_phone"},
590 {V_LEN, 7, USERS_TABLE, "department"},
591 {V_LEN, 8, USERS_TABLE, "affiliation"},
594 static struct validate ufbl_validate = {
606 static char *gpob_fields[] = {
608 "login", "type", "box", "modtime", "modby", "modwith",
611 static struct validate gpob_validate = {
615 "potype != 'NONE' and users_id=%d",
623 static char *gpox_fields[] = {
624 "login", "type", "box",
627 static struct validate gpox_validate = {
639 static char *spob_fields[] = {
640 "login", "type", "box",
643 static struct valobj spob_valobj[] = {
644 {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER},
645 {V_TYPE, 1, 0, "pobox", 0, MR_TYPE},
648 static struct validate spob_validate = /* SET_POBOX */
661 static struct validate spop_validate = /* SET_POBOX_POP */
674 static struct validate dpob_validate = /* DELETE_POBOX */
687 static char *gmac_fields[] = {
689 "name", "type", "modtime", "modby", "modwith",
692 static char *ghst_fields[] = {
693 "name", "address", "location", "network",
694 "name", "vendor", "model", "os", "location", "contact", "use", "status", "status_change", "network", "address", "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator", "inuse", "modtime", "modby", "modwith",
697 static struct validate ghst_validate = {
709 static char *ahst_fields[] = {
710 "name", "vendor", "model", "os", "location", "contact", "use", "status", "subnet", "address", "ace_type", "ace_name", "admin_comment", "ops_comment",
713 static struct valobj ahst_valobj[] = {
714 {V_CHAR, 0, MACHINE_TABLE, "name"},
715 {V_CHAR, 1, MACHINE_TABLE, "vendor"},
716 {V_CHAR, 2, MACHINE_TABLE, "model"},
717 {V_CHAR, 3, MACHINE_TABLE, "os"},
718 {V_CHAR, 4, MACHINE_TABLE, "location"},
719 {V_CHAR, 5, MACHINE_TABLE, "contact"},
722 {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
723 {V_TYPE, 10, 0, "ace_type", 0, MR_ACE},
724 {V_TYPEDATA, 11, 0, 0, 0, MR_ACE},
725 {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
726 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
729 static struct validate ahst_validate = {
733 "name = UPPER('%s')",
738 set_uppercase_modtime,
741 static char *uhst_fields[] = {
743 "newname", "vendor", "model", "os", "location", "contact", "use", "status", "subnet", "address", "ace_type", "ace_name", "admin_comment", "ops_comment",
746 static struct valobj uhst_valobj[] = {
747 {V_CHAR, 0, MACHINE_TABLE, "name"},
748 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
749 {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE},
750 {V_CHAR, 2, MACHINE_TABLE, "vendor"},
751 {V_CHAR, 3, MACHINE_TABLE, "model"},
752 {V_CHAR, 4, MACHINE_TABLE, "os"},
753 {V_CHAR, 5, MACHINE_TABLE, "location"},
754 {V_CHAR, 6, MACHINE_TABLE, "contact"},
757 {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET},
758 {V_TYPE, 11, 0, "ace_type", 0, MR_ACE},
759 {V_TYPEDATA, 12, 0, 0, 0, MR_ACE},
760 {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
761 {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH},
764 static struct validate uhst_validate = {
776 static char *dhst_fields[] = {
780 static struct validate dhst_validate = {
792 static char *ghal_fields[] = {
793 "alias", "canonical_hostname",
794 "alias", "canonical_hostname"
797 static struct validate ghal_validate = {
809 static struct valobj ahal_valobj[] = {
810 {V_CHAR, 0, HOSTALIAS_TABLE, "name"},
811 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
814 static struct validate ahal_validate = {
826 static struct valobj dhal_valobj[] = {
827 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
830 static struct validate dhal_validate = {
834 "name = '%s' AND mach_id = %d",
842 static char *gsnt_fields[] = {
844 "name", "description", "address", "mask", "low", "high", "prefix", "ace_type", "ace_name",
845 "modtime", "modby", "modwith"
848 static struct validate gsnt_validate = {
860 static char *asnt_fields[] = {
861 "name", "description", "address", "mask", "low", "high", "prefix", "ace_type", "ace_name",
864 static struct valobj asnt_valobj[] = {
865 {V_CHAR, 0, SUBNET_TABLE, "name"},
866 {V_LEN, 1, SUBNET_TABLE, "description"},
871 {V_LEN, 6, SUBNET_TABLE, "prefix"},
872 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
873 {V_TYPEDATA, 8, 0, 0, 0, MR_ACE},
876 static struct validate asnt_validate =
881 "name = UPPER('%s')",
886 set_uppercase_modtime,
889 static char *usnt_fields[] = {
891 "newname", "description", "address", "mask", "low", "high", "prefix", "ace_type", "ace_name",
894 static struct valobj usnt_valobj[] = {
895 {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH},
896 {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE},
897 {V_LEN, 2, SUBNET_TABLE, "description"},
902 {V_LEN, 7, SUBNET_TABLE, "prefix"},
903 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
904 {V_TYPEDATA, 9, 0, 0, 0, MR_ACE},
907 static struct validate usnt_validate =
920 static char *dsnt_fields[] = {
924 static struct validate dsnt_validate = {
936 static char *gclu_fields[] = {
938 "name", "description", "location", "modtime", "modby", "modwith",
941 static char *aclu_fields[] = {
942 "name", "description", "location",
945 static struct valobj aclu_valobj[] = {
946 {V_CHAR, 0, CLUSTER_TABLE, "name"},
947 {V_LEN, 1, CLUSTER_TABLE, "description"},
948 {V_LEN, 2, CLUSTER_TABLE, "location"},
951 static struct validate aclu_validate =
964 static char *uclu_fields[] = {
966 "newname", "description", "location",
969 static struct valobj uclu_valobj[] = {
970 {V_ID, 0, CLUSTER_TABLE, "name", "clu_id", MR_CLUSTER},
971 {V_RENAME, 1, CLUSTER_TABLE, "name", "clu_id", MR_NOT_UNIQUE},
972 {V_LEN, 2, CLUSTER_TABLE, "description"},
973 {V_LEN, 3, CLUSTER_TABLE, "location"},
976 static struct validate uclu_validate = {
988 static char *dclu_fields[] = {
992 static struct validate dclu_validate = {
1004 static char *gmcm_fields[] = {
1005 "machine", "cluster",
1006 "machine", "cluster",
1009 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
1010 { /* DELETE_MACHINE_FROM_CLUSTER */
1011 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1012 {V_ID, 1, CLUSTER_TABLE, "name", "clu_id", MR_CLUSTER},
1015 static struct validate amtc_validate = /* for amtc and dmfc */
1020 "mach_id = %d and clu_id = %d",
1025 set_mach_modtime_by_id,
1028 static char *gcld_fields[] = {
1029 "cluster", "serv_label",
1030 "cluster", "serv_label", "serv_cluster",
1033 static char *acld_fields[] = {
1034 "cluster", "serv_label", "serv_cluster",
1037 static struct valobj acld_valobj[] =
1039 {V_ID, 0, CLUSTER_TABLE, "name", "clu_id", MR_CLUSTER},
1040 {V_CHAR, 1, SVC_TABLE, "serv_label"},
1041 {V_CHAR, 2, SVC_TABLE, "serv_cluster"}
1044 static struct validate acld_validate =
1049 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1054 set_cluster_modtime_by_id,
1057 static struct valobj dcld_valobj[] =
1059 {V_ID, 0, CLUSTER_TABLE, "name", "clu_id", MR_CLUSTER},
1062 static struct validate dcld_validate =
1067 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
1072 set_cluster_modtime_by_id,
1075 static char *glin_fields[] = {
1077 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1078 "ace_type", "ace_name", "description", "modtime", "modby", "modwith",
1081 static struct validate glin_validate = {
1088 access_vis_list_by_name,
1093 static char *alis_fields[] = {
1094 "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1095 "ace_type", "ace_name", "description",
1098 static struct valobj alis_valobj[] = {
1099 {V_CHAR, 0, LIST_TABLE, "name"},
1106 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
1107 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
1108 {V_LEN, 9, LIST_TABLE, "description"},
1111 static struct validate alis_validate = {
1123 static char *ulis_fields[] = {
1125 "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid",
1126 "ace_type", "ace_name", "description",
1129 static struct valobj ulis_valobj[] = {
1130 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1131 {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE},
1138 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
1139 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
1140 {V_LEN, 10, LIST_TABLE, "description"},
1143 static struct validate ulis_validate = {
1155 static char *dlis_fields[] = {
1159 static struct validate dlis_validate = {
1171 static char *amtl_fields[] = {
1172 "list_name", "member_type", "member_name",
1175 static struct valobj amtl_valobj[] = {
1176 {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST},
1177 {V_TYPE, 1, 0, "member", 0, MR_TYPE},
1178 {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH},
1181 static struct validate amtl_validate =
1194 static struct validate dmfl_validate =
1204 delete_member_from_list,
1207 static char *gaus_fields[] = {
1208 "ace_type", "ace_name",
1209 "use_type", "use_name",
1212 static struct valobj gaus_valobj[] = {
1213 {V_TYPE, 0, 0, "gaus", 0, MR_TYPE},
1214 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1217 static struct validate gaus_validate = {
1229 static char *qgli_fields[] = {
1230 "active", "publicflg", "hidden", "maillist", "grouplist",
1234 static struct valobj qgli_valobj[] = {
1235 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1236 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1237 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1238 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1239 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1242 static struct validate qgli_validate = {
1251 qualified_get_lists,
1254 static char *gmol_fields[] = {
1256 "member_type", "member_name",
1259 static struct validate gmol_validate = {
1266 access_visible_list,
1268 get_members_of_list,
1271 static struct validate geml_validate = {
1278 access_visible_list,
1280 get_end_members_of_list,
1283 static char *glom_fields[] = {
1284 "member_type", "member_name",
1285 "list_name", "active", "publicflg", "hidden", "maillist", "grouplist",
1288 static struct valobj glom_valobj[] = {
1289 {V_TYPE, 0, 0, "rmember", 0, MR_TYPE},
1290 {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH},
1293 static struct validate glom_validate = {
1302 get_lists_of_member,
1305 static char *cmol_fields[] = {
1310 static struct validate cmol_validate = {
1317 access_visible_list,
1319 count_members_of_list,
1322 static char *gsin_fields[] = {
1324 "service", "update_int", "target_file", "script", "dfgen", "dfcheck",
1325 "type", "enable", "inprogress", "harderror", "errmsg",
1326 "ace_type", "ace_name", "modtime", "modby", "modwith",
1329 static struct validate gsin_validate =
1342 static char *qgsv_fields[] = {
1343 "enable", "inprogress", "harderror",
1347 static struct valobj qgsv_valobj[] = {
1348 {V_TYPE, 0, 0, "boolean", 0, MR_TYPE},
1349 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1350 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1353 static struct validate qgsv_validate = {
1362 qualified_get_server,
1365 static char *asin_fields[] = {
1366 "service", "update_int", "target_file", "script", "type", "enable",
1367 "ace_type", "ace_name",
1370 static struct valobj asin_valobj[] = {
1371 {V_CHAR, 0, SERVERS_TABLE, "name"},
1373 {V_LEN, 2, SERVERS_TABLE, "target_file"},
1374 {V_LEN, 3, SERVERS_TABLE, "script"},
1375 {V_TYPE, 4, 0, "service", 0, MR_TYPE},
1377 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
1378 {V_TYPEDATA, 7, 0, 0, 0, MR_ACE},
1381 static struct validate asin_validate = /* for asin, usin */
1386 "name = UPPER('%s')",
1391 set_uppercase_modtime,
1394 static struct validate rsve_validate = {
1398 "name = UPPER('%s')",
1403 set_uppercase_modtime,
1406 static char *ssif_fields[] = {
1407 "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
1410 static struct valobj ssif_valobj[] = {
1415 {V_LEN, 5, SERVERS_TABLE, "errmsg"},
1418 static struct validate ssif_validate = {
1422 "name = UPPER('%s')",
1430 static char *dsin_fields[] = {
1434 static struct validate dsin_validate = {
1438 "name = UPPER('%s')",
1446 static char *gshi_fields[] = {
1447 "service", "machine",
1448 "service", "machine", "enable", "override", "success", "inprogress",
1449 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
1450 "value3", "modtime", "modby", "modwith",
1453 static struct validate gshi_validate = {
1465 static char *qgsh_fields[] = {
1466 "service", "enable", "override", "success", "inprogress", "hosterror",
1467 "service", "machine",
1470 static struct valobj qgsh_valobj[] = {
1471 {V_TYPE, 1, 0, "boolean", 0, MR_TYPE},
1472 {V_TYPE, 2, 0, "boolean", 0, MR_TYPE},
1473 {V_TYPE, 3, 0, "boolean", 0, MR_TYPE},
1474 {V_TYPE, 4, 0, "boolean", 0, MR_TYPE},
1475 {V_TYPE, 5, 0, "boolean", 0, MR_TYPE},
1478 static struct validate qgsh_validate = {
1487 qualified_get_serverhost,
1490 static char *ashi_fields[] = {
1491 "service", "machine", "enable", "value1", "value2", "value3",
1494 static struct valobj ashi_valobj[] = {
1495 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
1496 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1500 {V_LEN, 5, SERVERHOSTS_TABLE, "value3"},
1503 static struct validate ashi_validate = /* ashi & ushi */
1508 "service = UPPER('%s') AND mach_id = %d",
1513 set_serverhost_modtime,
1516 static struct validate rshe_validate =
1521 "service = UPPER('%s') AND mach_id = %d",
1526 set_serverhost_modtime,
1529 static struct validate ssho_validate =
1534 "service = UPPER('%s') AND mach_id = %d",
1542 static char *sshi_fields[] = {
1543 "service", "machine", "override", "success", "inprogress",
1544 "hosterror", "errmsg", "ltt", "lts",
1547 static struct valobj sshi_valobj[] = {
1548 {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE},
1549 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1554 {V_LEN, 6, SERVERS_TABLE, "errmsg"},
1559 static struct validate sshi_validate =
1572 static char *dshi_fields[] = {
1573 "service", "machine",
1576 static struct validate dshi_validate =
1581 "service = UPPER('%s') AND mach_id = %d",
1589 static char *gslo_fields[] = {
1591 "server", "machine",
1594 static char *gfsl_fields[] = {
1596 "label", "type", "machine", "name", "mount", "access", "comments", "owner", "owners",
1597 "create", "lockertype", "modtime", "modby", "modwith",
1600 static char *gfsm_fields[] = {
1602 "label", "type", "machine", "name", "mount", "access", "comments", "owner", "owners",
1603 "create", "lockertype", "modtime", "modby", "modwith",
1606 static struct validate gfsm_validate = {
1618 static char *gfsn_fields[] = {
1619 "machine", "parition",
1620 "label", "type", "machine", "name", "mount", "access", "comments", "owner", "owners",
1621 "create", "lockertype", "modtime", "modby", "modwith",
1624 static struct validate gfsn_validate = {
1636 static char *gfsp_fields[] = {
1638 "label", "type", "machine", "name", "mount", "access", "comments", "owner", "owners",
1639 "create", "lockertype", "modtime", "modby", "modwith",
1642 static char *gfsg_fields[] = {
1644 "label", "type", "machine", "name", "mount", "access", "comments", "owner", "owners",
1645 "create", "lockertype", "modtime", "modby", "modwith",
1648 static struct validate gfsg_validate = {
1660 static char *afil_fields[] = {
1661 "label", "type", "machine", "name", "mount", "access", "comments", "owner", "owners",
1662 "create", "lockertype",
1665 static struct valobj afil_valobj[] = {
1666 {V_CHAR, 0, FILESYS_TABLE, "label"},
1667 {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE},
1668 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1669 {V_CHAR, 3, FILESYS_TABLE, "name"},
1670 {V_LEN, 4, FILESYS_TABLE, "mount"},
1671 {V_LEN, 5, FILESYS_TABLE, "rwaccess"},
1672 {V_LEN, 6, FILESYS_TABLE, "comments"},
1673 {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER},
1674 {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST},
1676 {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE},
1679 static struct validate afil_validate = {
1688 set_filesys_modtime,
1691 static char *ufil_fields[] = {
1692 "label", "newlabel", "type", "machine", "name", "mount", "access", "comments",
1693 "owner", "owners", "create", "lockertype",
1696 static struct valobj ufil_valobj[] = {
1697 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1698 {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE},
1699 {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE},
1700 {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1701 {V_CHAR, 4, FILESYS_TABLE, "name"},
1702 {V_LEN, 5, FILESYS_TABLE, "mount"},
1703 {V_LEN, 6, FILESYS_TABLE, "rwaccess"},
1704 {V_LEN, 7, FILESYS_TABLE, "comments"},
1705 {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER},
1706 {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST},
1708 {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE},
1711 static struct validate ufil_validate = {
1720 set_filesys_modtime,
1723 static char *dfil_fields[] = {
1727 static struct validate dfil_validate = {
1739 static char *gfgm_fields[] = {
1740 "fsgroup", "filesys", "sortkey"
1743 static struct validate gfgm_validate = {
1755 static struct valobj aftg_valobj[] = {
1756 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1757 {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1760 static struct validate aftg_validate = {
1764 "group_id = %d and filsys_id = %d",
1772 static char *ganf_fields[] = {
1773 "machine", "dir", "device", "status", "allocated", "size", "modtime", "modby", "modwith",
1776 static char *gnfp_fields[] = {
1778 "machine", "dir", "device", "status", "allocated", "size", "modtime", "modby", "modwith",
1781 static struct validate gnfp_validate = {
1793 static struct valobj anfp_valobj[] = {
1794 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1795 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
1796 {V_LEN, 2, NFSPHYS_TABLE, "device"},
1802 static struct validate anfp_validate = {
1806 "mach_id = %d and dir = '%s'",
1811 set_nfsphys_modtime,
1814 static struct validate unfp_validate = {
1818 "mach_id = %d and dir = '%s'",
1823 set_nfsphys_modtime,
1826 static char *ajnf_fields[] = {
1827 "machine", "dir", "adjustment",
1830 static struct valobj ajnf_valobj[] = {
1831 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
1832 {V_CHAR, 1, NFSPHYS_TABLE, "dir"},
1836 static struct validate ajnf_validate = {
1840 "mach_id = %d and dir = '%s'",
1845 set_nfsphys_modtime,
1848 static char *dnfp_fields[] = {
1852 static struct validate dnfp_validate = {
1856 "mach_id = %d and dir = '%s'",
1861 set_nfsphys_modtime,
1864 static char *gqot_fields[] = {
1865 "filesys", "type", "name",
1866 "filesys", "type", "name", "quota", "dir", "machine", "modtime", "modby", "modwith",
1869 static struct valobj gqot_valobj[] = {
1870 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
1871 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
1874 static struct validate gqot_validate = {
1886 static char *gqbf_fields[] = {
1888 "filesys", "type", "name", "quota", "dir", "machine", "modtime", "modby", "modwith",
1891 static struct validate gqbf_validate = {
1903 static char *aqot_fields[] = {
1904 "filesys", "type", "name", "quota",
1907 static struct valobj aqot_valobj[] = {
1908 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1909 {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE},
1910 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
1914 static struct validate aqot_validate = {
1918 "filsys_id = %d and type = '%s' and entity_id = %d",
1926 static struct validate uqot_validate = {
1930 "filsys_id = %d AND type = '%s' AND entity_id = %d",
1938 static struct validate dqot_validate = {
1942 "filsys_id = %d AND type = '%s' AND entity_id = %d",
1950 static char *gnfq_fields[] = {
1952 "filesys", "login", "quota", "dir", "machine", "modtime", "modby", "modwith",
1955 static struct validate gnfq_validate = {
1967 static char *gnqp_fields[] = {
1969 "filesys", "login", "quota", "dir", "machine", "modtime", "modby", "modwith",
1972 static char *anfq_fields[] = {
1973 "filesys", "login", "quota",
1976 static struct valobj anfq_valobj[] = {
1977 {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS},
1978 {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER},
1982 static struct validate anfq_validate = {
1986 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
1994 static struct validate unfq_validate = {
1998 "filsys_id = %d AND type = 'USER' AND entity_id = %d",
2006 static struct validate dnfq_validate = {
2010 "filsys_id = %d AND entity_id = %d",
2018 static char *gzcl_fields[] = {
2020 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2021 "iws_type", "iws_name", "iui_type", "iui_name", "modtime", "modby", "modwith",
2024 static struct validate gzcl_validate = {
2036 static char *azcl_fields[] = {
2037 "class", "xmt_type", "xmt_name", "sub_type", "sub_name",
2038 "iws_type", "iws_name", "iui_type", "iui_name",
2041 static struct valobj azcl_valobj[] = {
2042 {V_CHAR, 0, ZEPHYR_TABLE, "class"},
2043 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
2044 {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE},
2045 {V_TYPE, 3, 0, "ace_type", 0, MR_ACE},
2046 {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE},
2047 {V_TYPE, 5, 0, "ace_type", 0, MR_ACE},
2048 {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE},
2049 {V_TYPE, 7, 0, "ace_type", 0, MR_ACE},
2050 {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE},
2053 static struct validate azcl_validate = {
2065 static char *uzcl_fields[] = {
2066 "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
2067 "iws_type", "iws_name", "iui_type", "iui_name",
2070 static struct valobj uzcl_valobj[] = {
2071 {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE},
2072 {V_TYPE, 2, 0, "ace_type", 0, MR_ACE},
2073 {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE},
2074 {V_TYPE, 4, 0, "ace_type", 0, MR_ACE},
2075 {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE},
2076 {V_TYPE, 6, 0, "ace_type", 0, MR_ACE},
2077 {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE},
2078 {V_TYPE, 8, 0, "ace_type", 0, MR_ACE},
2079 {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE},
2082 static struct validate uzcl_validate = {
2094 static struct validate dzcl_validate = {
2106 static char *gsha_fields[] = {
2108 "machine", "ace_type", "ace_name", "modtime", "modby", "modwith",
2111 static struct validate gsha_validate =
2124 static char *asha_fields[] = {
2125 "machine", "ace_type", "ace_name",
2128 static struct valobj asha_valobj[] = {
2129 {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2130 {V_TYPE, 1, 0, "ace_type", 0, MR_ACE},
2131 {V_TYPEDATA, 2, 0, 0, 0, MR_ACE},
2134 static struct validate asha_validate =
2147 static char *gsvc_fields[] = {
2149 "service", "protocol", "port", "description", "modtime", "modby", "modwith",
2152 static char *asvc_fields[] = {
2153 "service", "protocol", "port", "description",
2156 static struct valobj asvc_valobj[] = {
2157 {V_CHAR, 0, SERVICES_TABLE, "name"},
2158 {V_CHAR, 1, SERVICES_TABLE, "protocol"},
2160 {V_CHAR, 3, SERVICES_TABLE, "description"},
2163 static struct validate asvc_validate = {
2175 static char *gpce_fields[] = {
2177 "printer", "spooling_host", "spool_directory", "rprinter",
2178 "quotaserver", "authenticate", "price", "comments",
2179 "modtime", "modby", "modwith",
2182 static struct validate gpce_validate = {
2194 static char *apce_fields[] = {
2195 "printer", "spooling_host", "spool_directory", "rprinter",
2196 "quotaserver", "authenticate", "price", "comments",
2197 "modtime", "modby", "modwith",
2200 static struct valobj apce_valobj[] = {
2201 {V_CHAR, 0, PRINTCAP_TABLE, "name"},
2202 {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2203 {V_LEN, 2, PRINTCAP_TABLE, "dir"},
2204 {V_LEN, 3, PRINTCAP_TABLE, "rp"},
2205 {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2208 {V_CHAR, 7, PRINTCAP_TABLE, "comments"},
2211 static struct validate apce_validate = {
2223 static struct validate dpce_validate = {
2235 static char *gpcp_fields[] = {
2237 "printer", "spooling_host", "spool_directory", "rprinter", "comments",
2238 "modtime", "modby", "modwith",
2241 static char *gpdm_fields[] = {
2243 "name", "rpcnum", "host", "modtime", "modby", "modwith",
2246 static char *apdm_fields[] = {
2247 "name", "rpcnum", "host"
2250 static struct valobj apdm_valobj[] = {
2251 {V_CHAR, 0, PALLADIUM_TABLE, "name"},
2253 {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE},
2256 static struct validate apdm_validate = {
2268 static struct validate dpdm_validate = {
2280 static char *gali_fields[] = {
2281 "name", "type", "trans",
2282 "name", "type", "trans",
2285 static char *aali_fields[] = {
2286 "name", "type", "trans",
2289 static struct valobj aali_valobj[] = {
2290 {V_CHAR, 0, ALIAS_TABLE, "name"},
2291 {V_TYPE, 1, 0, "alias", 0, MR_TYPE},
2292 {V_CHAR, 2, ALIAS_TABLE, "trans"},
2295 static struct validate aali_validate = {
2299 "name = '%s' and type = '%s' and trans = '%s'",
2307 static struct validate dali_validate = /* DELETE_ALIAS */
2312 "name = '%s' and type = '%s' and trans = '%s'",
2320 static char *gval_fields[] = {
2324 static struct valobj gval_valobj[] = {
2325 {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH},
2328 static struct validate gval_validate = {
2340 static char *aval_fields[] = {
2344 static struct valobj aval_valobj[] = {
2345 {V_CHAR, 0, NUMVALUES_TABLE, "name"},
2349 static struct validate aval_validate = /* for aval, uval, and dval */
2362 static char *dval_fields[] = {
2366 static char *gats_fields[] = {
2367 "table_name", "appends", "updates", "deletes", "modtime", "modby", "modwith",
2370 static char *_sdl_fields[] = {
2374 static struct valobj _sdl_valobj[] = {
2378 static struct validate _sdl_validate =
2393 /* Generalized Query Definitions */
2395 /* Note: For any query which uses prefetch_value, the vcnt should be
2396 * one less than the number of %-format specifiers in the tlist.
2399 struct query Queries2[] = {
2401 /* Q_GALO - GET_ALL_LOGINS */
2407 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
2417 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
2418 "get_all_active_logins",
2423 "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u",
2433 /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN */
2434 "get_user_account_by_login",
2439 "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",
2442 "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
2449 /* Q_GUAU - GET_USER_ACCOUNT_BY_UID */
2450 "get_user_account_by_uid",
2455 "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",
2458 "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id",
2465 /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME */
2466 "get_user_account_by_name",
2471 "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",
2474 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id",
2481 /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS */
2482 "get_user_account_by_class",
2487 "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",
2490 "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id",
2497 /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID */
2498 "get_user_account_by_id",
2503 "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",
2506 "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id",
2513 /* Q_GUBL - GET_USER_BY_LOGIN */
2514 "get_user_by_login",
2519 "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",
2522 "u.login LIKE '%s' AND u.users_id != 0",
2529 /* Q_GUBU - GET_USER_BY_UID */
2535 "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",
2538 "u.unix_uid = %s AND u.users_id != 0",
2545 /* Q_GUBN - GET_USER_BY_NAME */
2551 "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",
2554 "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0",
2561 /* Q_GUBC - GET_USER_BY_CLASS */
2562 "get_user_by_class",
2567 "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",
2570 "u.type = UPPER('%s') AND u.users_id != 0",
2577 /* Q_GUBM - GET_USER_BY_MITID */
2578 "get_user_by_mitid",
2583 "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",
2586 "u.clearid LIKE '%s' AND u.users_id != 0",
2593 /* Q_GUDF - GET_USER_DIRECTORY_FLAGS */
2594 "get_user_directory_flags",
2599 "u.dirsuppress, u.dirremote FROM users u",
2609 /* Q_AUAC - ADD_USER_ACCOUNT */ /* uses prefetch_value() for users_id */
2615 "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 */
2625 /* Q_AUSR - ADD_USER */ /* uses prefetch_value() for users_id */
2631 "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)",
2641 /* Q_RUSR - REGISTER_USER */
2657 /* Q_UUAC - UPDATE_USER_ACCOUNT */
2658 "update_user_account",
2663 "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 */
2673 /* Q_UUSR - UPDATE_USER */
2679 "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'",
2689 /* Q_UUSH - UPDATE_USER_SHELL */
2690 "update_user_shell",
2695 "users SET shell = '%s'",
2705 /* Q_UUST - UPDATE_USER_STATUS */
2706 "update_user_status",
2711 "users SET status = %s",
2721 /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */
2722 "update_user_security_status",
2727 "users SET secure = %s",
2737 /* Q_UUDF - UPDATE_USER_DIRECTORY_FLAGS */
2738 "update_user_directory_flags",
2743 "users SET dirsuppress = %s, dirremote = %s",
2753 /* Q_DUSR - DELETE_USER */
2769 /* Q_DUBU - DELETE_USER_BY_UID */
2770 "delete_user_by_uid",
2785 /* Q_GKUM - GET_KERBEROS_USER_MAP */
2786 "get_kerberos_user_map",
2791 "u.login, str.string FROM krbmap km, users u, strings str",
2794 "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id",
2801 /* Q_AKUM - ADD_KERBEROS_USER_MAP */
2802 "add_kerberos_user_map",
2807 "INTO krbmap (users_id, string_id) VALUES (%d, %d)",
2817 /* Q_DKUM - DELETE_KERBEROS_USER_MAP */
2818 "delete_kerberos_user_map",
2826 "users_id = %d AND string_id = %d",
2833 /* Q_GFBL - GET_FINGER_BY_LOGIN */
2834 "get_finger_by_login",
2839 "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",
2849 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
2850 "update_finger_by_login",
2855 "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))",
2865 /* Q_GPOB - GET_POBOX */
2871 "login, potype, pop_id || ':' || box_id, TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users",
2881 /* Q_GAPO - GET_ALL_POBOXES */
2887 "login, potype, pop_id || ':' || box_id FROM users",
2897 /* Q_GPOP - GET_POBOXES_POP */
2903 "login, potype, pop_id || ':' || box_id FROM users",
2913 /* Q_GPOF - GET_POBOXES_SMTP */
2919 "login, potype, pop_id || ':' || box_id FROM users",
2929 /* Q_SPOB - SET_POBOX */
2945 /* Q_SPOP - SET_POBOX_POP */
2951 "users SET potype = 'POP'",
2961 /* Q_DPOB - DELETE_POBOX */
2967 "users SET potype = 'NONE'",
2977 /* Q_GHST - GET_HOST */
2983 "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",
2986 "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",
2993 /* Q_AHST - ADD_HOST */ /* uses prefetch_value() for mach_id */
2999 "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)",
3009 /* Q_UHST - UPDATE_HOST */
3015 "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",
3025 /* Q_DHST - DELETE_HOST */
3041 /* Q_GMAC - GET_MACHINE */
3047 "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine",
3050 "name LIKE UPPER('%s') AND mach_id != 0",
3057 /* Q_GHAL - GET_HOSTALIAS */
3063 "a.name, m.name FROM hostalias a, machine m",
3066 "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')",
3073 /* Q_AHAL - ADD_HOSTALIAS */
3079 "INTO hostalias (name, mach_id) VALUES (UPPER('%s'),%d)",
3089 /* Q_DHAL - DELETE_HOSTALIAS */
3098 "name = UPPER('%s') AND mach_id = %d",
3105 /* Q_GSNT - GET_SUBNET */
3111 "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet",
3114 "name LIKE UPPER('%s') and snet_id != 0",
3121 /* Q_ASNT - ADD_SUBNET */
3127 "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)",
3137 /* Q_USNT - UPDATE_SUBNET */
3143 "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",
3153 /* Q_DSNT - DELETE_SUBNET */
3169 /* Q_GCLU - GET_CLUSTER */
3175 "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters",
3178 "name LIKE '%s' AND clu_id != 0",
3185 /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */
3191 "INTO clusters (name, description, location, clu_id) VALUES ('%s',NVL('%s',CHR(0)),NVL('%s',CHR(0)),%s)",
3201 /* Q_UCLU - UPDATE_CLUSTER */
3207 "clusters SET name = '%s', description = NVL('%s',CHR(0)), location = NVL('%s',CHR(0))",
3217 /* Q_DCLU - DELETE_CLUSTER */
3233 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
3234 "get_machine_to_cluster_map",
3239 "m.name, c.name FROM machine m, clusters c, mcmap mcm",
3242 "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id",
3249 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
3250 "add_machine_to_cluster",
3255 "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)",
3265 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
3266 "delete_machine_from_cluster",
3274 "mach_id = %d AND clu_id = %d",
3281 /* Q_GCLD - GET_CLUSTER_DATA */
3287 "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c",
3290 "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'",
3292 "c.name, svc.serv_label, svc.serv_cluster",
3297 /* Q_ACLD - ADD_CLUSTER_DATA */
3303 "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d,'%s','%s')",
3313 /* Q_DCLD - DELETE_CLUSTER_DATA */
3314 "delete_cluster_data",
3322 "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'",
3329 /* Q_GLIN - GET_LIST_INFO */
3345 /* Q_EXLN - EXPAND_LIST_NAMES */
3346 "expand_list_names",
3354 "name LIKE '%s' AND list_id != 0",
3361 /* Q_ALIS - ADD_LIST */ /* uses prefetch_value() for list_id */
3367 "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)",
3377 /* Q_ULIS - UPDATE_LIST */
3383 "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))",
3393 /* Q_DLIS - DELETE_LIST */
3409 /* Q_AMTL - ADD_MEMBER_TO_LIST */
3410 "add_member_to_list",
3425 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
3426 "delete_member_from_list",
3441 /* Q_GAUS - GET_ACE_USE */
3457 /* Q_QGLI - QUALIFIED_GET_LISTS */
3458 "qualified_get_lists",
3473 /* Q_GMOL - GET_MEMBERS_OF_LIST */
3474 "get_members_of_list",
3489 /* Q_GEML - GET_END_MEMBERS_OF_LIST */
3490 "get_end_members_of_list",
3505 /* Q_GLOM - GET_LISTS_OF_MEMBER */
3506 "get_lists_of_member",
3521 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
3522 "count_members_of_list",
3537 /* Q_GSIN - GET_SERVER_INFO */
3543 "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",
3546 "name LIKE UPPER('%s')",
3553 /* Q_QGSV - QUALIFIED_GET_SERVER */
3554 "qualified_get_server",
3569 /* Q_ASIN - ADD_SERVER_INFO */
3575 "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'),%s,'%s','%s','%s',%s,'%s',%d)",
3585 /* Q_USIN - UPDATE_SERVER_INFO */
3586 "update_server_info",
3591 "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d",
3594 "name = UPPER('%s')",
3601 /* Q_RSVE - RESET_SERVER_ERROR */
3602 "reset_server_error",
3607 "servers SET harderror = 0, dfcheck = dfgen",
3610 "name = UPPER('%s')",
3617 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
3618 "set_server_internal_flags",
3623 "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s',CHR(0))",
3626 "name = UPPER('%s')",
3633 /* Q_DSIN - DELETE_SERVER_INFO */
3634 "delete_server_info",
3642 "name = UPPER('%s')",
3649 /* Q_GSHI - GET_SERVER_HOST_INFO */
3650 "get_server_host_info",
3655 "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",
3658 "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id",
3665 /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */
3666 "qualified_get_server_host",
3681 /* Q_ASHI - ADD_SERVER_HOST_INFO */
3682 "add_server_host_info",
3687 "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s',CHR(0)))",
3697 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
3698 "update_server_host_info",
3703 "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s',CHR(0))",
3706 "service = UPPER('%s') AND mach_id = %d",
3713 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
3714 "reset_server_host_error",
3719 "serverhosts SET hosterror = 0",
3722 "service = UPPER('%s') AND mach_id = %d",
3729 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
3730 "set_server_host_override",
3735 "serverhosts SET override = 1",
3738 "service = UPPER('%s') AND mach_id = %d",
3745 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
3746 "set_server_host_internal",
3751 "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s',CHR(0)), ltt = %s, lts = %s",
3754 "service = UPPER('%s') AND mach_id = %d",
3761 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
3762 "delete_server_host_info",
3770 "service = UPPER('%s') AND mach_id = %d",
3777 /* Q_GSLO - GET_SERVER_LOCATIONS */
3778 "get_server_locations",
3783 "sh.service, m.name FROM serverhosts sh, machine m",
3786 "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id",
3788 "sh.service, m.name",
3793 /* Q_GFSL - GET_FILESYS_BY_LABEL */
3794 "get_filesys_by_label",
3799 "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",
3802 "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
3809 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
3810 "get_filesys_by_machine",
3815 "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",
3818 "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
3825 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
3826 "get_filesys_by_nfsphys",
3831 "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",
3834 "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'",
3841 /* Q_GFSG - GET_FILESYS_BY_GROUP */
3842 "get_filesys_by_group",
3847 "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",
3850 "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id",
3857 /* Q_GFSP - GET_FILESYS_BY_PATH */
3858 "get_filesys_by_path",
3863 "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",
3866 "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id",
3873 /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */
3879 "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)",
3889 /* Q_UFIL - UPDATE_FILESYS */
3895 "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'",
3905 /* Q_DFIL - DELETE_FILESYS */
3921 /* Q_GFGM - GET_FSGROUP_MEMBERS */
3922 "get_fsgroup_members",
3927 "fs.label, fg.key FROM fsgroup fg, filesys fs",
3930 "fg.group_id = %d AND fs.filsys_id = fg.filsys_id",
3937 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
3938 "add_filesys_to_fsgroup",
3943 "INTO fsgroup (group_id,filsys_id,key) VALUES (%d, %d, '%s')",
3953 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
3954 "remove_filesys_from_fsgroup",
3962 "group_id = %d AND filsys_id = %d",
3969 /* Q_GANF - GET_ALL_NFSPHYS */
3975 "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",
3978 "m.mach_id = np.mach_id",
3985 /* Q_GNFP - GET_NFSPHYS */
3991 "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",
3994 "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id",
4001 /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */
4007 "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s',CHR(0)), %s, %s, %s, %s)",
4017 /* Q_UNFP - UPDATE_NFSPHYS */
4023 "nfsphys SET device = NVL('%s',CHR(0)), status = %s, allocated = %s, partsize = %s",
4026 "mach_id = %d AND dir = '%s'",
4033 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
4034 "adjust_nfsphys_allocation",
4039 "nfsphys SET allocated = allocated + %s",
4042 "mach_id = %d AND dir = '%s'",
4049 /* Q_DNFP - DELETE_NFSPHYS */
4058 "mach_id = %d AND dir = '%s'",
4065 /* Q_GQOT - GET_QUOTA */
4071 "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",
4074 "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",
4081 /* Q_GQBF - GET_QUOTA_BY_FILESYS */
4082 "get_quota_by_filesys",
4087 "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",
4090 "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id",
4097 /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */
4103 "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)",
4113 /* Q_UQOT - UPDATE_QUOTA */
4119 "quota SET quota = %s",
4129 /* Q_DQOT - DELETE_QUOTA */
4145 /* Q_GNFQ - GET_NFS_QUOTAS */
4151 "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",
4154 "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'",
4156 "fs.label, u.login",
4161 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
4162 "get_nfs_quotas_by_partition",
4167 "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m",
4170 "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",
4172 "fs.label, np.dir, u.login",
4177 /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */
4183 "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)",
4193 /* Q_UNFQ - UPDATE_NFS_QUOTA */
4199 "quota SET quota = %s",
4209 /* Q_DNFQ - DELETE_NFS_QUOTA */
4225 /* Q_GZCL - GET_ZEPHYR_CLASS */
4231 "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",
4241 /* Q_AZCL - ADD_ZEPHYR_CLASS */
4247 "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)",
4257 /* Q_UZCL - UPDATE_ZEPHYR_CLASS */
4258 "update_zephyr_class",
4263 "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",
4273 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
4274 "delete_zephyr_class",
4289 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
4290 "get_server_host_access",
4295 "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",
4298 "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id",
4305 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
4306 "add_server_host_access",
4311 "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d,'%s',%d)",
4321 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
4322 "update_server_host_access",
4327 "hostaccess SET acl_type = '%s', acl_id = %d",
4337 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
4338 "delete_server_host_access",
4353 /* Q_GSVC - GET_SERVICE */
4359 "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services",
4369 /* Q_ASVC - ADD_SERVICE */
4375 "INTO services (name, protocol, port, description) VALUES ('%s','%s',%s,NVL('%s',CHR(0)))",
4385 /* Q_DSVC - DELETE_SERVICE */
4401 /* Q_GPCE - GET_PRINTCAP_ENTRY */
4402 "get_printcap_entry",
4407 "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",
4410 "pc.name LIKE '%s' AND m.mach_id = pc.mach_id",
4417 /* Q_APCE - ADD_PRINTCAP_ENTRY */
4418 "add_printcap_entry",
4423 "INTO printcap (name, mach_id, dir, rp, quotaserver, auth, price, comments) VALUES ('%s',%d,'%s','%s',%d,%s,%s,NVL('%s',CHR(0)))",
4433 /* Q_DPCE - DELETE_PRINTCAP_ENTRY */
4434 "delete_printcap_entry",
4449 /* Q_GPCP - GET_PRINTCAP */
4455 "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",
4458 "pc.name LIKE '%s' AND m.mach_id = pc.mach_id",
4465 /* Q_DPCP - DELETE_PRINTCAP */
4481 /* Q_GPDM - GET_PALLADIUM */
4487 "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",
4490 "pal.name LIKE '%s' AND m.mach_id = pal.mach_id",
4497 /* Q_APDM - ADD_PALLADIUM */
4503 "INTO palladium (name, identifier, mach_id) VALUES ('%s',%s,%d)",
4513 /* Q_DPDM - DELETE_PALLADIUM */
4529 /* Q_GALI - GET_ALIAS */
4535 "name, type, trans FROM alias",
4538 "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'",
4540 "name, type, trans",
4545 /* Q_AALI - ADD_ALIAS */
4551 "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')",
4561 /* Q_DALI - DELETE_ALIAS */
4570 "name = '%s' AND type = '%s' AND trans = '%s'",
4577 /* Q_GVAL - GET_VALUE */
4583 "value FROM numvalues",
4593 /* Q_AVAL - ADD_VALUE */
4599 "INTO numvalues (name, value) VALUES ('%s', %s)",
4609 /* Q_UVAL - UPDATE_VALUE */
4615 "numvalues SET value = %s",
4625 /* Q_DVAL - DELETE_VALUE */
4641 /* Q_GATS - GET_ALL_TABLE_STATS */
4642 "get_all_table_stats",
4647 "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats",
4657 /* Q__SDL - _SET_DEBUG_LEVEL */
4674 int QueryCount2 = (sizeof Queries2 / sizeof (struct query));