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>
14 /* Specialized Support Query Routines */
16 /* Special Access Check Routines */
20 int access_visible_list();
21 int access_vis_list_by_name();
27 /* Query Setup Routines */
44 /* Query Followup Routines */
45 int followup_fix_modby();
56 int set_modtime_by_id();
57 int set_finger_modtime();
58 int set_pobox_modtime();
59 int set_uppercase_modtime();
60 int set_mach_modtime_by_id();
61 int set_cluster_modtime_by_id();
62 int set_serverhost_modtime();
63 int set_nfsphys_modtime();
64 int set_filesys_modtime();
65 int set_zephyr_modtime();
71 int qualified_get_lists();
72 int get_members_of_list();
73 int qualified_get_server();
74 int qualified_get_serverhost();
76 int count_members_of_list();
77 int get_lists_of_member();
84 * These are commonly used strings in the table, defined here so that
88 static char ACE_NAME[] = "ace_name";
89 static char ACE_TYPE[] = "ace_type";
90 static char CLASS[] = "class";
91 static char CLU_ID[] = "clu_id";
92 static char CLUSTER[] = "cluster";
93 static char DESC[] = "description";
94 static char DEVICE[] = "device";
95 static char DIR[] = "dir";
96 static char FILESYS[] = "filesys";
97 static char FILSYS_ID[] = "filsys_id";
98 static char FIRST[] = "firstname";
99 static char LABEL[] = "label";
100 static char LAST[] = "lastname";
101 static char LIST[] = "list";
102 static char LIST_ID[] = "list_id";
103 static char LOCATION[] = "location";
104 static char LOGIN[] = "login";
105 static char MACH_ID[] = "mach_id";
106 static char MACHINE[] = "machine";
107 static char MIDDLE[] = "middle";
108 static char MIT_ID[] = "mit_id";
109 static char MOD1[] = "modtime";
110 static char MOD2[] = "modby";
111 static char MOD3[] = "modwith";
112 static char NAME[] = "name";
113 static char SERVICE[] = "service";
114 static char SHELL[] = "shell";
115 static char STATUS[] = "status";
116 static char TYPE[] = "type";
117 static char USERS[] = "users";
118 static char USERS_ID[] = "users_id";
119 static char UID[] = "uid";
124 * These are commonly used validation objects, defined here so that they
128 static struct valobj VOsort0[] = {
129 {V_SORT, 0, 0, 0, 0, 0},
132 static struct valobj VOdate1[] = {
133 {V_DATE, 1, 0, 0, 0, SMS_DATE},
136 static struct valobj VOuser0[] = {
137 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
140 static struct valobj VOmach0[] = {
141 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
144 static struct valobj VOclu0[] = {
145 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
148 static struct valobj VOlist0[] = {
149 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
152 static struct valobj VOfilsys0[] = {
153 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
156 static struct valobj VOchar0[] = {
160 static struct valobj VOsort01[] = {
165 static struct valobj VOuser0sort[] = {
166 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
170 static struct valobj VOfilsys0user1[] = {
171 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
172 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
177 * Commonly used validation records defined here so that they may
181 static struct validate VDmach = { VOmach0, 1 };
182 static struct validate VDsort2= { VOsort01,2 };
183 static struct validate VDsortf = {
199 static char *galo_fields[] = {
200 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE,
203 static char *gubl_fields[] = {
205 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
206 MIT_ID, CLASS, MOD1, MOD2, MOD3
209 static struct validate gubx_validate = /* gubl, gubu */
222 static char *gubu_fields[] = {
224 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
225 MIT_ID, CLASS, MOD1, MOD2, MOD3,
228 static char *gubn_fields[] = {
230 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
231 MIT_ID, CLASS, MOD1, MOD2, MOD3,
234 static char *gubc_fields[] = {
236 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
237 MIT_ID, CLASS, MOD1, MOD2, MOD3,
240 static char *gubm_fields[] = {
242 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
243 MIT_ID, CLASS, MOD1, MOD2, MOD3,
246 static char *ausr_fields[] = {
247 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
251 static struct valobj ausr_valobj[] = {
257 {V_TYPE, 8, CLASS, 0, 0, SMS_BAD_CLASS},
260 static struct validate ausr_validate = {
272 static char *rusr_fields[] = {
273 UID, LOGIN, "fs_type"
276 static struct validate rusr_validate = {
288 static char *uusr_fields[] = {
290 "newlogin", UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
294 static struct valobj uusr_valobj[] = {
295 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
296 {V_RENAME, 1, USERS, LOGIN, USERS_ID, SMS_NOT_UNIQUE},
301 {V_TYPE, 9, CLASS, 0, 0, SMS_BAD_CLASS},
304 static struct validate uusr_validate = {
316 static char *uush_fields[] = {
321 static struct validate uush_validate = {
333 static char *uust_fields[] = {
338 static struct validate uust_validate = {
350 static char *dusr_fields[] = {
354 static struct validate dusr_validate = {
366 static char *dubu_fields[] = {
370 static struct valobj dubu_valobj[] = {
371 {V_ID, 0, USERS, UID, USERS_ID, SMS_USER}
374 static struct validate dubu_validate = {
386 static char *gfbl_fields[] = {
388 LOGIN, "fullname", "nickname", "home_addr",
389 "home_phone", "office_address", "office_phone", "mit_dept",
390 "mit_affil", MOD1, MOD2, MOD3,
393 static struct validate gfbl_validate = {
405 static char *ufbl_fields[] = {
407 "fullname", "nickname", "home_addr",
408 "home_phone", "office_address", "office_phone", "mit_dept",
412 static struct validate ufbl_validate = {
424 static char *gpob_fields[] = {
426 LOGIN, TYPE, "box", MOD1, MOD2, MOD3,
429 static struct validate gpob_validate = {
433 "u.potype != \"NONE\" and u.users_id=%d",
441 static char *gpox_fields[] = {
445 static struct validate gpox_validate = {
457 static char *spob_fields[] = {
461 static struct valobj spob_valobj[] = {
462 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
463 {V_TYPE, 1, "pobox", 0, 0, SMS_TYPE},
466 static struct validate spob_validate = /* SET_POBOX */
479 static struct validate spop_validate = /* SET_POBOX_POP */
492 static struct validate dpob_validate = /* DELETE_POBOX */
505 static char *gmac_fields[] = {
507 NAME, TYPE, MOD1, MOD2, MOD3,
510 static char *amac_fields[] = {
514 static struct valobj amac_valobj[] = {
516 {V_TYPE, 1, "mac_type", 0, 0, SMS_TYPE},
519 static struct validate amac_validate = {
523 "m.name = uppercase(\"%s\")",
528 set_uppercase_modtime,
531 static char *umac_fields[] = {
536 static struct valobj umac_valobj[] = {
537 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
538 {V_RENAME, 1, MACHINE, NAME, MACH_ID, SMS_NOT_UNIQUE},
539 {V_TYPE, 2, "mac_type", 0, 0, SMS_TYPE},
542 static struct validate umac_validate = {
554 static char *dmac_fields[] = {
558 static struct validate dmac_validate = {
570 static char *gclu_fields[] = {
572 NAME, DESC, LOCATION, MOD1, MOD2, MOD3,
575 static char *aclu_fields[] = {
576 NAME, DESC, LOCATION,
579 static struct validate aclu_validate = /* for aclu */
592 static char *uclu_fields[] = {
594 "newname", DESC, LOCATION,
597 static struct valobj uclu_valobj[] = {
598 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
599 {V_RENAME, 1, CLUSTER, NAME, CLU_ID, SMS_NOT_UNIQUE},
602 static struct validate uclu_validate = {
614 static char *dclu_fields[] = {
618 static struct validate dclu_validate = {
630 static char *gmcm_fields[] = {
635 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
636 { /* DELETE_MACHINE_FROM_CLUSTER */
637 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
638 {V_ID, 1, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
641 static struct validate amtc_validate = /* for amtc and dmfc */
646 "m.mach_id = %d and m.clu_id = %d",
651 set_mach_modtime_by_id,
654 static char *gcld_fields[] = {
655 CLUSTER, "serv_label",
656 CLUSTER, "serv_label", "serv_cluster",
659 static char *acld_fields[] = {
660 CLUSTER, "serv_label", "serv_cluster",
663 static struct valobj acld_valobj[] =
665 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
669 static struct validate acld_validate = /* ADD_CLUSTER_DATA */
670 { /* DELETE_CLUSTER_DATA */
674 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
679 set_cluster_modtime_by_id,
682 static char *gsin_fields[] = {
684 SERVICE, "update_int", "target_file", "script", "dfgen", "dfcheck",
685 TYPE, "enable", "inprogress", "harderror", "errmsg",
686 ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
689 static struct validate gsin_validate =
702 static char *qgsv_fields[] = {
703 "enable", "inprogress", "harderror",
707 static struct valobj qgsv_valobj[] = {
708 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
709 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
710 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
713 static struct validate qgsv_validate = {
722 qualified_get_server,
725 static char *asin_fields[] = {
726 SERVICE, "update_int", "target_file", "script", TYPE, "enable",
730 static struct valobj asin_valobj[] = {
732 {V_TYPE, 4, "service", 0, 0, SMS_TYPE},
733 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
734 {V_TYPEDATA, 7, 0, 0, 0, SMS_ACE},
737 static struct validate asin_validate = /* for asin, usin */
742 "s.name = uppercase(\"%s\")",
747 set_uppercase_modtime,
750 static struct validate rsve_validate = {
754 "s.name = uppercase(\"%s\")",
759 set_uppercase_modtime,
762 static char *ssif_fields[] = {
763 SERVICE, "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
766 static struct validate ssif_validate = {
770 "s.name = uppercase(\"%s\")",
778 static char *dsin_fields[] = {
782 static struct validate dsin_validate = {
786 "s.name = uppercase(\"%s\")",
794 static char *gshi_fields[] = {
796 SERVICE, MACHINE, "enable", "override", "success", "inprogress",
797 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
798 "value3", MOD1, MOD2, MOD3,
801 static struct validate gshi_validate = {
813 static char *qgsh_fields[] = {
814 "service", "enable", "override", "success", "inprogress", "hosterror",
818 static struct valobj qgsh_valobj[] = {
819 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
820 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
821 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
822 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
823 {V_TYPE, 5, "boolean", 0, 0, SMS_TYPE},
826 static struct validate qgsh_validate = {
835 qualified_get_serverhost,
838 static char *ashi_fields[] = {
839 SERVICE, MACHINE, "enable", "value1", "value2", "value3",
842 static struct valobj ashi_valobj[] = {
843 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
844 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
847 static struct validate ashi_validate = /* ashi & ushi */
852 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
857 set_serverhost_modtime,
860 static struct validate rshe_validate =
865 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
870 set_serverhost_modtime,
873 static struct validate ssho_validate =
878 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
886 static char *sshi_fields[] = {
887 "service", MACHINE, "override", "success", "inprogress",
888 "hosterror", "errmsg", "ltt", "lts"
891 static struct valobj sshi_valobj[] = {
892 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
893 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
896 static struct validate sshi_validate =
901 "s.service = uppercase(\"%s\") and s.mach_id = %d",
909 static char *dshi_fields[] = {
913 static struct validate dshi_validate =
918 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
926 static char *gsha_fields[] = {
928 MACHINE, ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
931 static struct validate gsha_validate =
944 static char *asha_fields[] = {
945 MACHINE, ACE_TYPE, ACE_NAME,
948 static struct valobj asha_valobj[] = {
949 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
950 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
951 {V_TYPEDATA, 2, 0, 0, 0, SMS_ACE},
954 static struct validate asha_validate =
967 static char *gslo_fields[] = {
972 static char *gfsl_fields[] = {
974 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
975 "create", "lockertype", MOD1, MOD2, MOD3,
978 static char *gfsm_fields[] = {
980 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
981 "create", "lockertype", MOD1, MOD2, MOD3,
984 static struct validate gfsm_validate = {
996 static char *gfsn_fields[] = {
998 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
999 "create", "lockertype", MOD1, MOD2, MOD3,
1002 static char *gfsg_fields[] = {
1004 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
1005 "create", "lockertype", MOD1, MOD2, MOD3,
1008 static struct validate gfsg_validate = {
1020 static char *afil_fields[] = {
1021 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
1022 "create", "lockertype",
1025 static struct valobj afil_valobj[] = {
1027 {V_TYPE, 1, FILESYS, 0, 0, SMS_FSTYPE},
1028 {V_ID, 2, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1030 {V_ID, 7, USERS, LOGIN, USERS_ID, SMS_USER},
1031 {V_ID, 8, LIST, NAME, LIST_ID, SMS_LIST},
1032 {V_TYPE, 10, "lockertype", 0, 0, SMS_TYPE}
1035 static struct validate afil_validate = {
1039 "fs.label = \"%s\"",
1044 set_filesys_modtime,
1047 static char *ufil_fields[] = {
1048 LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments",
1049 "owner", "owners", "create", "lockertype",
1052 static struct valobj ufil_valobj[] = {
1053 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1054 {V_RENAME, 1, FILESYS, LABEL, FILSYS_ID, SMS_NOT_UNIQUE},
1055 {V_TYPE, 2, FILESYS, 0, 0, SMS_FSTYPE},
1056 {V_ID, 3, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1058 {V_ID, 8, USERS, LOGIN, USERS_ID, SMS_USER},
1059 {V_ID, 9, LIST, NAME, LIST_ID, SMS_LIST},
1060 {V_TYPE, 11, "lockertype", 0, 0, SMS_TYPE}
1063 static struct validate ufil_validate = {
1067 "fs.filsys_id = %d",
1072 set_filesys_modtime,
1075 static char *dfil_fields[] = {
1079 static struct valobj dfil_valobj[] = {
1080 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1083 static struct validate dfil_validate = {
1087 "fs.filsys_id = %d",
1095 static char *gfgm_fields[] = {
1096 "fsgroup", FILESYS, "sortkey"
1099 static struct valobj gfgm_valobj[] = {
1100 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1105 static struct validate gfgm_validate = {
1117 static struct valobj aftg_valobj[] = {
1118 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1119 {V_ID, 1, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1122 static struct validate aftg_validate = {
1126 "fg.group_id = %d and fg.filsys_id = %d",
1134 static char *ganf_fields[] = {
1135 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1138 static char *gnfp_fields[] = {
1140 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1143 static struct validate gnfp_validate = {
1155 static struct valobj anfp_valobj[] = {
1156 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1160 static struct validate anfp_validate = {
1164 "np.mach_id = %d and np.dir = \"%s\"",
1169 set_nfsphys_modtime,
1172 static char *dnfp_fields[] = {
1176 static struct validate dnfp_validate = {
1180 "np.mach_id = %d and np.dir = \"%s\"",
1185 set_nfsphys_modtime,
1188 static char *gnfq_fields[] = {
1190 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1193 static struct valobj gnfq_valobj[] = {
1194 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
1198 static struct validate gnfq_validate = {
1210 static char *gnqp_fields[] = {
1212 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1215 static char *anfq_fields[] = {
1216 FILESYS, LOGIN, "quota",
1219 static struct validate anfq_validate = {
1223 "nq.filsys_id = %d and nq.users_id = %d",
1231 static struct validate unfq_validate = {
1235 "nq.filsys_id = %d and nq.users_id = %d",
1243 static struct validate dnfq_validate = {
1247 "nq.filsys_id = %d and nq.users_id = %d",
1255 static char *glin_fields[] = {
1257 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1258 ACE_TYPE, ACE_NAME, DESC, MOD1, MOD2, MOD3,
1261 static struct validate glin_validate = {
1268 access_vis_list_by_name,
1273 static char *alis_fields[] = {
1274 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1275 ACE_TYPE, ACE_NAME, DESC,
1278 static struct valobj alis_valobj[] = {
1280 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1281 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1284 static struct validate alis_validate = {
1296 static char *ulis_fields[] = {
1298 "newname", "active", "public", "hidden", "maillist", "group", "gid",
1299 ACE_TYPE, ACE_NAME, DESC,
1302 static struct valobj ulis_valobj[] = {
1303 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1304 {V_RENAME, 1, LIST, NAME, LIST_ID, SMS_NOT_UNIQUE},
1305 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1306 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1309 static struct validate ulis_validate = {
1321 static char *dlis_fields[] = {
1325 static struct validate dlis_validate = {
1337 static char *amtl_fields[] = {
1338 "list_name", "member_type", "member_name",
1341 static struct valobj amtl_valobj[] = {
1342 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1343 {V_TYPE, 1, "member", 0, 0, SMS_TYPE},
1344 {V_TYPEDATA, 2, 0, 0, 0, SMS_NO_MATCH},
1347 static struct validate amtl_validate = /* for amtl and dmfl */
1352 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
1360 static char *gaus_fields[] = {
1362 "use_type", "use_name",
1365 static struct valobj gaus_valobj[] = {
1366 {V_TYPE, 0, "gaus", 0, 0, SMS_TYPE},
1367 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1370 static struct validate gaus_validate = {
1382 static char *qgli_fields[] = {
1383 "active", "public", "hidden", "maillist", "group",
1387 static struct valobj qgli_valobj[] = {
1388 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
1389 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
1390 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
1391 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
1392 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
1395 static struct validate qgli_validate = {
1404 qualified_get_lists,
1407 static char *gmol_fields[] = {
1409 "member_type", "member_name",
1412 static struct validate gmol_validate = {
1419 access_visible_list,
1421 get_members_of_list,
1424 static char *glom_fields[] = {
1425 "member_type", "member_name",
1426 "list_name", "active", "public", "hidden", "maillist", "group",
1429 static struct valobj glom_valobj[] = {
1430 {V_TYPE, 0, "rmember", 0, 0, SMS_TYPE},
1431 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1435 static struct validate glom_validate = {
1444 get_lists_of_member,
1447 static char *cmol_fields[] = {
1452 static struct validate cmol_validate = {
1459 access_visible_list,
1461 count_members_of_list,
1464 static char *augr_fields[] = {
1468 static struct validate augr_validate = {
1480 static char *gzcl_fields[] = {
1482 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1483 "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3,
1486 static struct validate gzcl_validate = {
1498 static char *azcl_fields[] = {
1499 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1500 "iws_type", "iws_name", "iui_type", "iui_name",
1503 static struct valobj azcl_valobj[] = {
1505 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
1506 {V_TYPEDATA, 2, 0, 0, LIST_ID, SMS_ACE},
1507 {V_TYPE, 3, ACE_TYPE, 0, 0, SMS_ACE},
1508 {V_TYPEDATA, 4, 0, 0, LIST_ID, SMS_ACE},
1509 {V_TYPE, 5, ACE_TYPE, 0, 0, SMS_ACE},
1510 {V_TYPEDATA, 6, 0, 0, LIST_ID, SMS_ACE},
1511 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1512 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1515 static struct validate azcl_validate = {
1527 static char *uzcl_fields[] = {
1528 CLASS, "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
1529 "iws_type", "iws_name", "iui_type", "iui_name",
1532 static struct valobj uzcl_valobj[] = {
1533 {V_RENAME, 1, "zephyr", CLASS, 0, SMS_NOT_UNIQUE},
1534 {V_TYPE, 2, ACE_TYPE, 0, 0, SMS_ACE},
1535 {V_TYPEDATA, 3, 0, 0, LIST_ID, SMS_ACE},
1536 {V_TYPE, 4, ACE_TYPE, 0, 0, SMS_ACE},
1537 {V_TYPEDATA, 5, 0, 0, LIST_ID, SMS_ACE},
1538 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
1539 {V_TYPEDATA, 7, 0, 0, LIST_ID, SMS_ACE},
1540 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1541 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1544 static struct validate uzcl_validate = {
1556 static struct validate dzcl_validate = {
1568 static char *gasv_fields[] = {
1569 SERVICE, "protocol", "port", DESC,
1572 static char *gpcp_fields[] = {
1574 "printer", "spooling_host", "spool_directory", "rprinter", "comments",
1578 static char *apcp_fields[] = {
1579 "printer", "spooling_host", "spool_directory", "rprinter", "comments",
1583 static struct valobj apcp_valobj[] = {
1585 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1588 static struct validate apcp_validate = {
1600 static struct validate dpcp_validate = {
1612 static char *gali_fields[] = {
1613 NAME, TYPE, "trans",
1614 NAME, TYPE, "trans",
1617 static char *aali_fields[] = {
1618 NAME, TYPE, "trans",
1621 static struct valobj aali_valobj[] = {
1623 {V_TYPE, 1, "alias", 0, 0, SMS_TYPE},
1627 static struct validate aali_validate = {
1631 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1639 static struct validate dali_validate = /* DELETE_ALIAS */
1644 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1652 static char *gval_fields[] = {
1656 static struct valobj gval_valobj[] = {
1657 {V_NAME, 0, "values", NAME, 0, SMS_NO_MATCH},
1660 static struct validate gval_validate = {
1672 static char *aval_fields[] = {
1676 static struct validate aval_validate = /* for aval, uval, and dval */
1689 static char *dval_fields[] = {
1693 static char *gats_fields[] = {
1694 "table", "retrieves", "appends", "updates", "deletes", MOD1, MOD2, MOD3,
1699 /* Generalized Query Definitions */
1701 struct query Queries2[] = {
1703 /* Q_GALO - GET_ALL_LOGINS */
1709 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1718 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
1719 "get_all_active_logins",
1724 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1733 /* Q_GUBL - GET_USER_BY_LOGIN */
1734 "get_user_by_login",
1739 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
1742 "u.login = \"%s\" and u.users_id != 0",
1748 /* Q_GUBU - GET_USER_BY_UID */
1754 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
1757 "u.uid = %s and u.users_id != 0",
1763 /* Q_GUBN - GET_USER_BY_NAME */
1769 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
1772 "u.first = \"%s\" and u.last = \"%s\" and u.users_id != 0",
1778 /* Q_GUBC - GET_USER_BY_CLASS */
1779 "get_user_by_class",
1784 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
1787 "u.mit_year = uppercase(\"%s\") and u.users_id != 0",
1793 /* Q_GUBM - GET_USER_BY_MITID */
1794 "get_user_by_mitid",
1799 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle, %c = text(u.status), %c = u.mit_id, %c = u.mit_year, %c = u.modtime, %c = text(u.modby), %c = u.modwith",
1802 "u.mit_id = \"%s\" and u.users_id != 0",
1808 /* Q_AUSR - ADD_USER */
1814 "login = %c, users_id = values.value, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c",
1817 "values.name = \"users_id\"",
1823 /* Q_RUSR - REGISTER_USER */
1838 /* Q_UUSR - UPDATE_USER */
1844 "login = %c, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c",
1853 /* Q_UUSH - UPDATE_USER_SHELL */
1854 "update_user_shell",
1868 /* Q_UUST - UPDATE_USER_STATUS */
1869 "update_user_status",
1874 "status = int4(%c)",
1883 /* Q_DUSR - DELETE_USER */
1898 /* Q_DUBU - DELETE_USER_BY_UID */
1899 "delete_user_by_uid",
1913 /* Q_GFBL - GET_FINGER_BY_LOGIN */
1914 "get_finger_by_login",
1919 "%c = u.login,%c=u.fullname,%c=u.nickname,%c=u.home_addr,%c=u.home_phone,%c=u.office_addr,%c=u.office_phone,%c=u.mit_dept,%c=u.mit_affil,%c=u.fmodtime,%c=text(u.fmodby),%c=u.fmodwith",
1928 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
1929 "update_finger_by_login",
1934 "fullname=%c,nickname=%c,home_addr=%c,home_phone=%c,office_addr=%c,office_phone=%c,mit_dept=%c,mit_affil=%c",
1943 /* Q_GPOB - GET_POBOX */
1949 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id), %c = u.pmodtime, %c = text(u.pmodby), %c = u.pmodwith",
1958 /* Q_GAPO - GET_ALL_POBOXES */
1964 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1967 "u.potype != \"NONE\"",
1973 /* Q_GPOP - GET_POBOXES_POP */
1979 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1982 "u.potype = \"POP\"",
1988 /* Q_GPOF - GET_POBOXES_SMTP */
1994 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1997 "u.potype = \"SMTP\"",
2003 /* Q_SPOB - SET_POBOX */
2018 /* Q_SPOP - SET_POBOX_POP */
2033 /* Q_DPOB - DELETE_POBOX */
2039 "potype = \"NONE\"",
2048 /* Q_GMAC - GET_MACHINE */
2054 "%c = m.name, %c = m.type, %c = m.modtime, %c = text(m.modby), %c =m.modwith",
2057 "m.name = uppercase(\"%s\") and m.mach_id != 0",
2063 /* Q_AMAC - ADD_MACHINE */
2069 "name = uppercase(%c), mach_id = values.value, type = %c",
2072 "values.name = \"mach_id\"",
2078 /* Q_UMAC - UPDATE_MACHINE */
2084 "name = uppercase(%c), type = %c",
2093 /* Q_DMAC - DELETE_MACHINE */
2108 /* Q_GCLU - GET_CLUSTER */
2114 "%c = c.name, %c = c.desc, %c = c.location, %c = c.modtime, %c = text(c.modby), %c = c.modwith",
2117 "c.name = \"%s\" and c.clu_id != 0",
2123 /* Q_ACLU - ADD_CLUSTER */
2129 "name = %c, clu_id = values.value, desc = %c, location = %c",
2132 "values.name = \"clu_id\"",
2138 /* Q_UCLU - UPDATE_CLUSTER */
2144 "name = %c, desc = %c, location = %c",
2153 /* Q_DCLU - DELETE_CLUSTER */
2168 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
2169 "get_machine_to_cluster_map",
2174 "%c = machine.name, %c = cluster.name",
2177 "machine.name = uppercase(\"%s\") and cluster.name = \"%s\" and m.clu_id = cluster.clu_id and m.mach_id = machine.mach_id",
2183 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
2184 "add_machine_to_cluster",
2189 "mach_id = %i4, clu_id = %i4",
2198 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
2199 "delete_machine_from_cluster",
2207 "m.mach_id = %d and m.clu_id = %d",
2213 /* Q_GCLD - GET_CLUSTER_DATA */
2219 "%c = cluster.name, %c = s.serv_label, %c = s.serv_cluster",
2222 "cluster.clu_id = s.clu_id and cluster.name = \"%s\" and s.serv_label = \"%s\"",
2228 /* Q_ACLD - ADD_CLUSTER_DATA */
2234 "clu_id = %i4, serv_label = %c, serv_cluster = %c",
2243 /* Q_DCLD - DELETE_CLUSTER_DATA */
2244 "delete_cluster_data",
2252 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
2258 /* Q_GSIN - GET_SERVER_INFO */
2264 "%c = s.name, %c = text(s.update_int), %c = s.target_file, %c = s.script, %c = text(s.dfgen), %c = text(s.dfcheck), %c = s.type, %c = text(s.enable), %c = text(s.inprogress), %c = text(s.harderror), %c = s.errmsg, %c = s.acl_type, %c = text(s.acl_id), %c = s.modtime, %c = text(s.modby), %c = s.modwith",
2267 "s.name = uppercase(\"%s\")",
2273 /* Q_QGSV - QUALIFIED_GET_SERVER */
2274 "qualified_get_server",
2288 /* Q_ASIN - ADD_SERVER_INFO */
2294 "name = uppercase(%c), update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2303 /* Q_USIN - UPDATE_SERVER_INFO */
2304 "update_server_info",
2309 "update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2312 "s.name = uppercase(\"%s\")",
2318 /* Q_RSVE - RESET_SERVER_ERROR */
2319 "reset_server_error",
2324 "harderror = 0, dfcheck = s.dfgen",
2327 "s.name = uppercase(\"%s\")",
2333 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
2334 "set_server_internal_flags",
2339 "dfgen = int4(%c), dfcheck = int4(%c), inprogress = int1(%c), harderror = int1(%c), errmsg = %c",
2342 "s.name = uppercase(\"%s\")",
2348 /* Q_DSIN - DELETE_SERVER_INFO */
2349 "delete_server_info",
2357 "s.name = uppercase(\"%s\")",
2363 /* Q_GSHI - GET_SERVER_HOST_INFO */
2364 "get_server_host_info",
2369 "%c = sh.service, %c = machine.name, %c = text(sh.enable), %c = text(sh.override), %c = text(sh.success), %c = text(sh.inprogress), %c = text(sh.hosterror), %c = sh.hosterrmsg, %c = text(sh.ltt), %c = text(sh.lts), %c = text(sh.value1), %c = text(sh.value2), %c = sh.value3, %c = sh.modtime, %c = text(sh.modby), %c = sh.modwith",
2372 "sh.service = uppercase(\"%s\") and machine.name = uppercase(\"%s\") and machine.mach_id = sh.mach_id",
2378 /* Q_QGSV - QUALIFIED_GET_SERVER_HOST */
2379 "qualified_get_server_host",
2393 /* Q_ASHI - ADD_SERVER_HOST_INFO */
2394 "add_server_host_info",
2399 "service = uppercase(%c), mach_id = %i4, enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2408 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
2409 "update_server_host_info",
2414 "enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2417 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2423 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
2424 "reset_server_host_error",
2432 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2438 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
2439 "set_server_host_override",
2447 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2453 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
2454 "set_server_host_internal",
2459 "override = int1(%c), success = int1(%c), inprogress = int1(%c), hosterror = int1(%c), hosterrmsg = %c, ltt = int4(%c), lts = int4(%c)",
2462 "s.service = uppercase(\"%s\") and s.mach_id = %d",
2468 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
2469 "delete_server_host_info",
2477 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2483 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
2484 "get_server_host_access",
2489 "%c = machine.name, %c = ha.acl_type, %c = text(ha.acl_id), %c = ha.modtime, %c = text(ha.modby), %c = ha.modwith",
2492 "machine.name = uppercase(\"%s\") and ha.mach_id = machine.mach_id",
2498 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
2499 "add_server_host_access",
2504 "mach_id = %i4, acl_type = %c, acl_id = %i4",
2513 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
2514 "update_server_host_access",
2519 "acl_type = %c, acl_id = %i4",
2528 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
2529 "delete_server_host_access",
2543 /* Q_GSLO - GET_SERVER_LOCATIONS */
2544 "get_server_locations",
2549 "%c = sh.service, %c = machine.name",
2552 "sh.service = uppercase(\"%s\") and sh.mach_id = machine.mach_id",
2558 /* Q_GFSL - GET_FILESYS_BY_LABEL */
2559 "get_filesys_by_label",
2564 "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith",
2567 "fs.label = \"%s\" and fs.mach_id = machine.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2573 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
2574 "get_filesys_by_machine",
2579 "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith",
2582 "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2588 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
2589 "get_filesys_by_nfsphys",
2594 "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith",
2597 "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id and nfsphys.nfsphys_id = fs.phys_id and nfsphys.dir = \"%s\" and fs.type = \"NFS\"",
2603 /* Q_GFSG - GET_FILESYS_BY_GROUP */
2604 "get_filesys_by_group",
2609 "%c = fs.label, %c = fs.type, %c = machine.name, %c = fs.name, %c = fs.mount, %c = fs.access, %c = fs.comments, %c = users.login, %c = list.name, %c = text(fs.createflg), %c = fs.lockertype, %c = fs.modtime, %c = text(fs.modby), %c = fs.modwith",
2612 "fs.owners = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2618 /* Q_AFIL - ADD_FILESYS */
2624 "filsys_id = values.value, label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c",
2627 "values.name = \"filsys_id\"",
2633 /* Q_UFIL - UPDATE_FILESYS */
2639 "label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c",
2642 "fs.filsys_id = %d",
2648 /* Q_DFIL - DELETE_FILESYS */
2657 "fs.filsys_id = %d",
2663 /* Q_GFGM - GET_FSGROUOP_MEMBERS */
2664 "get_fsgroup_members",
2669 "%c = filesys.label, %c = fg.key",
2672 "fg.group_id = %d and filesys.filsys_id = fg.filsys_id",
2678 /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */
2679 "add_filesys_to_fsgroup",
2684 "group_id = filesys.filsys_id, filsys_id = %i4, key = %c",
2687 "filesys.filsys_id = %d and filesys.type = \"FSGROUP\"",
2693 /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */
2694 "remove_filesys_from_fsgroup",
2702 "fg.group_id = %d and fg.filsys_id = %d",
2708 /* Q_GANF - GET_ALL_NFSPHYS */
2714 "%c = machine.name, %c = np.dir, %c = np.device, %c = text(np.status), %c = text(np.allocated), %c = text(np.size), %c = np.modtime, %c = text(np.modby), %c = np.modwith",
2717 "machine.mach_id = np.mach_id",
2723 /* Q_GNFP - GET_NFSPHYS */
2729 "%c = machine.name, %c = np.dir, %c = np.device, %c = text(np.status), %c = text(np.allocated), %c = text(np.size), %c = np.modtime, %c = text(np.modby), %c = np.modwith",
2732 "np.mach_id = %d and np.dir = \"%s\" and machine.mach_id = np.mach_id",
2738 /* Q_ANFP - ADD_NFSPHYS */
2744 "nfsphys_id = values.value, mach_id = %i4, dir = %c, device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2747 "values.name = \"nfsphys_id\"",
2753 /* Q_UNFP - UPDATE_NFSPHYS */
2759 "device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2762 "np.mach_id = %d and np.dir = \"%s\"",
2768 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
2769 "adjust_nfsphys_allocation",
2774 "allocated = np.allocated + int4(%c)",
2777 "np.mach_id = %d and np.dir = \"%s\"",
2783 /* Q_DNFP - DELETE_NFSPHYS */
2792 "np.mach_id = %d and np.dir = \"%s\"",
2798 /* Q_GNFQ - GET_NFS_QUOTAS */
2804 "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name, %c = nq.modtime, %c = text(nq.modby), %c = nq.modwith",
2807 "filesys.label = \"%s\" and nq.users_id = %d and filesys.filsys_id = nq.filsys_id and nfsphys.nfsphys_id = nq.phys_id and machine.mach_id = filesys.mach_id and users.users_id = nq.users_id",
2813 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
2814 "get_nfs_quotas_by_partition",
2819 "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name",
2822 "nfsphys.mach_id = %d and nfsphys.dir = \"%s\" and nq.phys_id = nfsphys.nfsphys_id and filesys.filsys_id = nq.filsys_id and users.users_id = nq.users_id and machine.mach_id = nfsphys.mach_id",
2828 /* Q_ANFQ - ADD_NFS_QUOTA */
2834 "filsys_id = filesys.filsys_id, users_id = %i4, quota = int4(%c), phys_id = filesys.phys_id",
2837 "filesys.filsys_id = %d",
2843 /* Q_UNFQ - UPDATE_NFS_QUOTA */
2852 "nq.filsys_id = %d and nq.users_id = %d",
2858 /* Q_DNFQ - DELETE_NFS_QUOTA */
2867 "nq.filsys_id = %d and nq.users_id = %d",
2873 /* Q_GLIN - GET_LIST_INFO */
2888 /* Q_EXLN - EXPAND_LIST_NAMES */
2889 "expand_list_names",
2897 "l.name = \"%s\" and l.list_id != 0",
2903 /* Q_ALIS - ADD_LIST */
2909 "list_id=values.value, name=%c, active=int1(%c), public=int1(%c), hidden=int1(%c), maillist=int1(%c), group=int1(%c), gid=int2(%c), acl_type=%c, acl_id=%i4, desc=%c",
2912 "values.name = \"list_id\"",
2918 /* Q_ULIS - UPDATE_LIST */
2924 "name=%c, active=int1(%c), public=int1(%c), hidden=int1(%c), maillist=int1(%c), group=int1(%c), gid=int2(%c), acl_type=%c, acl_id=%i4, desc=%c",
2933 /* Q_DLIS - DELETE_LIST */
2948 /* Q_AMTL - ADD_MEMBER_TO_LIST */
2949 "add_member_to_list",
2954 "list_id=%i4, member_type=%c, member_id=%i4",
2963 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
2964 "delete_member_from_list",
2972 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
2978 /* Q_GAUS - GET_ACE_USE */
2993 /* Q_QGLI - QUALIFIED_GET_LISTS */
2994 "qualified_get_lists",
3008 /* Q_GMOL - GET_MEMBERS_OF_LIST */
3009 "get_members_of_list",
3023 /* Q_GLOM - GET_LISTS_OF_MEMBER */
3024 "get_lists_of_member",
3038 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
3039 "count_members_of_list",
3053 /* Q_AUGR - ADD_USER_GROUP */
3068 /* Q_GZCL - GET_ZEPHYR_CLASS */
3074 "%c = z.class, %c = z.xmt_type, %c = text(z.xmt_id),%c = z.sub_type, %c = text(z.sub_id),%c = z.iws_type, %c = text(z.iws_id),%c = z.iui_type, %c = text(z.iui_id), %c=z.modtime, %c = text(z.modby), %c = z.modwith",
3083 /* Q_AZCL - ADD_ZEPHYR_CLASS */
3089 "class = %c, xmt_type = %c, xmt_id = %i4, sub_type = %c, sub_id = %i4, iws_type = %c, iws_id = %i4, iui_type = %c, iui_id = %i4",
3098 /* Q_UZCL - UPDATE_ZEPHYR_CLASS */
3099 "update_zephyr_class",
3104 "class = %c, xmt_type = %c, xmt_id = %i4, sub_type = %c, sub_id = %i4, iws_type = %c, iws_id = %i4, iui_type = %c, iui_id = %i4",
3113 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
3114 "delete_zephyr_class",
3128 /* Q_GSVC - GET_SERVICE */
3134 "%c = s.name, %c = s.protocol, %c = text(s.port), %c = s.desc, %c = s.modtime, %c = text(s.modby), %c = s.modwith",
3143 /* Q_ASVC - ADD_SERVICE */
3149 "name = %c, protocol = %c, port = int2(%c), desc = %c",
3158 /* Q_DSVC - DELETE_SERVICE */
3173 /* Q_GPCP - GET_PRINTCAP */
3179 "%c = p.name, %c = machine.name, %c = p.dir, %c = p.rp, %c = p.comments, %c = p.modtime, %c = text(p.modby), %c = p.modwith",
3182 "p.name = \"%s\" and machine.mach_id = p.mach_id",
3188 /* Q_APCP - ADD_PRINTCAP */
3194 "name = %c, mach_id = %i4, dir = %c, rp = %c, comments = %c",
3203 /* Q_DPCP - DELETE_PRINTCAP */
3218 /* Q_GALI - GET_ALIAS */
3224 "%c = a.name, %c = a.type, %c = a.trans",
3227 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3233 /* Q_AALI - ADD_ALIAS */
3239 "name = %c, type = %c, trans = %c",
3248 /* Q_DALI - DELETE_ALIAS */
3257 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3263 /* Q_GVAL - GET_VALUE */
3269 "%c = text(v.value)",
3278 /* Q_AVAL - ADD_VALUE */
3284 "name = %c, value = int4(%c)",
3293 /* Q_UVAL - UPDATE_VALUE */
3308 /* Q_DVAL - DELETE_VALUE */
3323 /* Q_GATS - GET_ALL_TABLE_STATS */
3324 "get_all_table_stats",
3329 "%c = tbs.table, %c = text(tbs.retrieves), %c = text(tbs.appends), %c = text(tbs.updates), %c = text(tbs.deletes), %c = tbs.modtime",
3339 int QueryCount2 = (sizeof Queries2 / sizeof (struct query));