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 VOchar0[] = {
156 static struct valobj VOsort01[] = {
161 static struct valobj VOuser0sort[] = {
162 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
166 static struct valobj VOfilsys0user1[] = {
167 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
168 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
173 * Commonly used validation records defined here so that they may
177 static struct validate VDmach = { VOmach0, 1 };
178 static struct validate VDsort2= { VOsort01,2 };
179 static struct validate VDsortf = {
195 static char *galo_fields[] = {
196 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE,
199 static char *gubl_fields[] = {
201 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
202 MIT_ID, CLASS, MOD1, MOD2, MOD3
205 static struct validate gubx_validate = /* gubl, gubu */
218 static char *gubu_fields[] = {
220 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
221 MIT_ID, CLASS, MOD1, MOD2, MOD3,
224 static char *gubn_fields[] = {
226 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
227 MIT_ID, CLASS, MOD1, MOD2, MOD3,
230 static char *gubc_fields[] = {
232 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
233 MIT_ID, CLASS, MOD1, MOD2, MOD3,
236 static char *gubm_fields[] = {
238 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
239 MIT_ID, CLASS, MOD1, MOD2, MOD3,
242 static char *ausr_fields[] = {
243 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
247 static struct valobj ausr_valobj[] = {
253 {V_TYPE, 8, CLASS, 0, 0, SMS_BAD_CLASS},
256 static struct validate ausr_validate = {
268 static char *rusr_fields[] = {
269 UID, LOGIN, "fs_type"
272 static struct validate rusr_validate = {
284 static char *uusr_fields[] = {
286 "newlogin", UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
290 static struct valobj uusr_valobj[] = {
291 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
292 {V_RENAME, 1, USERS, LOGIN, USERS_ID, SMS_NOT_UNIQUE},
297 {V_TYPE, 9, CLASS, 0, 0, SMS_BAD_CLASS},
300 static struct validate uusr_validate = {
312 static char *uush_fields[] = {
317 static struct validate uush_validate = {
329 static char *uust_fields[] = {
334 static struct validate uust_validate = {
346 static char *dusr_fields[] = {
350 static struct validate dusr_validate = {
362 static char *dubu_fields[] = {
366 static struct valobj dubu_valobj[] = {
367 {V_ID, 0, USERS, UID, USERS_ID, SMS_USER}
370 static struct validate dubu_validate = {
382 static char *gfbl_fields[] = {
384 LOGIN, "fullname", "nickname", "home_addr",
385 "home_phone", "office_address", "office_phone", "mit_dept",
386 "mit_affil", MOD1, MOD2, MOD3,
389 static struct validate gfbl_validate = {
401 static char *ufbl_fields[] = {
403 "fullname", "nickname", "home_addr",
404 "home_phone", "office_address", "office_phone", "mit_dept",
408 static struct validate ufbl_validate = {
420 static char *gpob_fields[] = {
422 LOGIN, TYPE, "box", MOD1, MOD2, MOD3,
425 static struct validate gpob_validate = {
429 "u.potype != \"NONE\" and u.users_id=%d",
437 static char *gpox_fields[] = {
441 static struct validate gpox_validate = {
453 static char *spob_fields[] = {
457 static struct valobj spob_valobj[] = {
458 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
459 {V_TYPE, 1, "pobox", 0, 0, SMS_TYPE},
462 static struct validate spob_validate = /* SET_POBOX */
475 static struct validate spop_validate = /* SET_POBOX_POP */
488 static struct validate dpob_validate = /* DELETE_POBOX */
501 static char *gmac_fields[] = {
503 NAME, TYPE, MOD1, MOD2, MOD3,
506 static char *amac_fields[] = {
510 static struct valobj amac_valobj[] = {
512 {V_TYPE, 1, "mac_type", 0, 0, SMS_TYPE},
515 static struct validate amac_validate = {
519 "m.name = uppercase(\"%s\")",
524 set_uppercase_modtime,
527 static char *umac_fields[] = {
532 static struct valobj umac_valobj[] = {
533 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
534 {V_RENAME, 1, MACHINE, NAME, MACH_ID, SMS_NOT_UNIQUE},
535 {V_TYPE, 2, "mac_type", 0, 0, SMS_TYPE},
538 static struct validate umac_validate = {
550 static char *dmac_fields[] = {
554 static struct validate dmac_validate = {
566 static char *gclu_fields[] = {
568 NAME, DESC, LOCATION, MOD1, MOD2, MOD3,
571 static char *aclu_fields[] = {
572 NAME, DESC, LOCATION,
575 static struct validate aclu_validate = /* for aclu */
588 static char *uclu_fields[] = {
590 "newname", DESC, LOCATION,
593 static struct valobj uclu_valobj[] = {
594 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
595 {V_RENAME, 1, CLUSTER, NAME, CLU_ID, SMS_NOT_UNIQUE},
598 static struct validate uclu_validate = {
610 static char *dclu_fields[] = {
614 static struct validate dclu_validate = {
626 static char *gmcm_fields[] = {
631 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
632 { /* DELETE_MACHINE_FROM_CLUSTER */
633 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
634 {V_ID, 1, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
637 static struct validate amtc_validate = /* for amtc and dmfc */
642 "m.mach_id = %d and m.clu_id = %d",
647 set_mach_modtime_by_id,
650 static char *gcld_fields[] = {
651 CLUSTER, "serv_label",
652 CLUSTER, "serv_label", "serv_cluster",
655 static char *acld_fields[] = {
656 CLUSTER, "serv_label", "serv_cluster",
659 static struct valobj acld_valobj[] =
661 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
665 static struct validate acld_validate = /* ADD_CLUSTER_DATA */
666 { /* DELETE_CLUSTER_DATA */
670 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
675 set_cluster_modtime_by_id,
678 static char *gsin_fields[] = {
680 SERVICE, "update_int", "target_file", "script", "dfgen", "dfcheck",
681 TYPE, "enable", "inprogress", "harderror", "errmsg",
682 ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
685 static struct validate gsin_validate =
698 static char *qgsv_fields[] = {
699 "enable", "inprogress", "harderror",
703 static struct valobj qgsv_valobj[] = {
704 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
705 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
706 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
709 static struct validate qgsv_validate = {
718 qualified_get_server,
721 static char *asin_fields[] = {
722 SERVICE, "update_int", "target_file", "script", TYPE, "enable",
726 static struct valobj asin_valobj[] = {
728 {V_TYPE, 4, "service", 0, 0, SMS_TYPE},
729 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
730 {V_TYPEDATA, 7, 0, 0, 0, SMS_ACE},
733 static struct validate asin_validate = /* for asin, usin */
738 "s.name = uppercase(\"%s\")",
743 set_uppercase_modtime,
746 static struct validate rsve_validate = {
750 "s.name = uppercase(\"%s\")",
755 set_uppercase_modtime,
758 static char *ssif_fields[] = {
759 SERVICE, "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
762 static struct validate ssif_validate = {
766 "s.name = uppercase(\"%s\")",
774 static char *dsin_fields[] = {
778 static struct validate dsin_validate = {
782 "s.name = uppercase(\"%s\")",
790 static char *gshi_fields[] = {
792 SERVICE, MACHINE, "enable", "override", "success", "inprogress",
793 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
794 "value3", MOD1, MOD2, MOD3,
797 static struct validate gshi_validate = {
809 static char *qgsh_fields[] = {
810 "service", "enable", "override", "success", "inprogress", "hosterror",
814 static struct valobj qgsh_valobj[] = {
815 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
816 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
817 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
818 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
819 {V_TYPE, 5, "boolean", 0, 0, SMS_TYPE},
822 static struct validate qgsh_validate = {
831 qualified_get_serverhost,
834 static char *ashi_fields[] = {
835 SERVICE, MACHINE, "enable", "value1", "value2", "value3",
838 static struct valobj ashi_valobj[] = {
839 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
840 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
843 static struct validate ashi_validate = /* ashi & ushi */
848 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
853 set_serverhost_modtime,
856 static struct validate rshe_validate =
861 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
866 set_serverhost_modtime,
869 static struct validate ssho_validate =
874 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
882 static char *sshi_fields[] = {
883 "service", MACHINE, "override", "success", "inprogress",
884 "hosterror", "errmsg", "ltt", "lts"
887 static struct valobj sshi_valobj[] = {
888 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
889 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
892 static struct validate sshi_validate =
897 "s.service = uppercase(\"%s\") and s.mach_id = %d",
905 static char *dshi_fields[] = {
909 static struct validate dshi_validate =
914 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
922 static char *gsha_fields[] = {
924 MACHINE, ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
927 static struct validate gsha_validate =
940 static char *asha_fields[] = {
941 MACHINE, ACE_TYPE, ACE_NAME,
944 static struct valobj asha_valobj[] = {
945 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
946 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
947 {V_TYPEDATA, 2, 0, 0, 0, SMS_ACE},
950 static struct validate asha_validate =
963 static char *gslo_fields[] = {
968 static char *gfsl_fields[] = {
970 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
971 "create", "lockertype", MOD1, MOD2, MOD3,
974 static char *gfsm_fields[] = {
976 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
977 "create", "lockertype", MOD1, MOD2, MOD3,
980 static struct validate gfsm_validate = {
992 static char *gfsn_fields[] = {
994 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
995 "create", "lockertype", MOD1, MOD2, MOD3,
998 static char *gfsg_fields[] = {
1000 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
1001 "create", "lockertype", MOD1, MOD2, MOD3,
1004 static struct validate gfsg_validate = {
1016 static char *afil_fields[] = {
1017 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
1018 "create", "lockertype",
1021 static struct valobj afil_valobj[] = {
1023 {V_TYPE, 1, FILESYS, 0, 0, SMS_FSTYPE},
1024 {V_ID, 2, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1026 {V_ID, 7, USERS, LOGIN, USERS_ID, SMS_USER},
1027 {V_ID, 8, LIST, NAME, LIST_ID, SMS_LIST},
1028 {V_TYPE, 10, "lockertype", 0, 0, SMS_TYPE}
1031 static struct validate afil_validate = {
1035 "fs.label = \"%s\"",
1040 set_filesys_modtime,
1043 static char *ufil_fields[] = {
1044 LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments",
1045 "owner", "owners", "create", "lockertype",
1048 static struct valobj ufil_valobj[] = {
1049 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1050 {V_RENAME, 1, FILESYS, LABEL, FILSYS_ID, SMS_NOT_UNIQUE},
1051 {V_TYPE, 2, FILESYS, 0, 0, SMS_FSTYPE},
1052 {V_ID, 3, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1054 {V_ID, 8, USERS, LOGIN, USERS_ID, SMS_USER},
1055 {V_ID, 9, LIST, NAME, LIST_ID, SMS_LIST},
1056 {V_TYPE, 11, "lockertype", 0, 0, SMS_TYPE}
1059 static struct validate ufil_validate = {
1063 "fs.filsys_id = %d",
1068 set_filesys_modtime,
1071 static char *dfil_fields[] = {
1075 static struct valobj dfil_valobj[] = {
1076 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1079 static struct validate dfil_validate = {
1083 "fs.filsys_id = %d",
1091 static char *ganf_fields[] = {
1092 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1095 static char *gnfp_fields[] = {
1097 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1100 static struct validate gnfp_validate = {
1112 static struct valobj anfp_valobj[] = {
1113 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1117 static struct validate anfp_validate = {
1121 "np.mach_id = %d and np.dir = \"%s\"",
1126 set_nfsphys_modtime,
1129 static char *dnfp_fields[] = {
1133 static struct validate dnfp_validate = {
1137 "np.mach_id = %d and np.dir = \"%s\"",
1142 set_nfsphys_modtime,
1145 static char *gnfq_fields[] = {
1147 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1150 static struct valobj gnfq_valobj[] = {
1151 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
1155 static struct validate gnfq_validate = {
1167 static char *gnqp_fields[] = {
1169 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1172 static char *anfq_fields[] = {
1173 FILESYS, LOGIN, "quota",
1176 static struct validate anfq_validate = {
1180 "nq.filsys_id = %d and nq.users_id = %d",
1188 static struct validate unfq_validate = {
1192 "nq.filsys_id = %d and nq.users_id = %d",
1200 static struct validate dnfq_validate = {
1204 "nq.filsys_id = %d and nq.users_id = %d",
1212 static char *glin_fields[] = {
1214 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1215 ACE_TYPE, ACE_NAME, DESC, MOD1, MOD2, MOD3,
1218 static struct validate glin_validate = {
1225 access_vis_list_by_name,
1230 static char *alis_fields[] = {
1231 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1232 ACE_TYPE, ACE_NAME, DESC,
1235 static struct valobj alis_valobj[] = {
1237 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1238 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1241 static struct validate alis_validate = {
1253 static char *ulis_fields[] = {
1255 "newname", "active", "public", "hidden", "maillist", "group", "gid",
1256 ACE_TYPE, ACE_NAME, DESC,
1259 static struct valobj ulis_valobj[] = {
1260 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1261 {V_RENAME, 1, LIST, NAME, LIST_ID, SMS_NOT_UNIQUE},
1262 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1263 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1266 static struct validate ulis_validate = {
1278 static char *dlis_fields[] = {
1282 static struct validate dlis_validate = {
1294 static char *amtl_fields[] = {
1295 "list_name", "member_type", "member_name",
1298 static struct valobj amtl_valobj[] = {
1299 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1300 {V_TYPE, 1, "member", 0, 0, SMS_TYPE},
1301 {V_TYPEDATA, 2, 0, 0, 0, SMS_NO_MATCH},
1304 static struct validate amtl_validate = /* for amtl and dmfl */
1309 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
1317 static char *gaus_fields[] = {
1319 "use_type", "use_name",
1322 static struct valobj gaus_valobj[] = {
1323 {V_TYPE, 0, "gaus", 0, 0, SMS_TYPE},
1324 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1327 static struct validate gaus_validate = {
1339 static char *qgli_fields[] = {
1340 "active", "public", "hidden", "maillist", "group",
1344 static struct valobj qgli_valobj[] = {
1345 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
1346 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
1347 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
1348 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
1349 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
1352 static struct validate qgli_validate = {
1361 qualified_get_lists,
1364 static char *gmol_fields[] = {
1366 "member_type", "member_name",
1369 static struct validate gmol_validate = {
1376 access_visible_list,
1378 get_members_of_list,
1381 static char *glom_fields[] = {
1382 "member_type", "member_name",
1383 "list_name", "active", "public", "hidden", "maillist", "group",
1386 static struct valobj glom_valobj[] = {
1387 {V_TYPE, 0, "rmember", 0, 0, SMS_TYPE},
1388 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1392 static struct validate glom_validate = {
1401 get_lists_of_member,
1404 static char *cmol_fields[] = {
1409 static struct validate cmol_validate = {
1416 access_visible_list,
1418 count_members_of_list,
1421 static char *augr_fields[] = {
1425 static struct validate augr_validate = {
1437 static char *gzcl_fields[] = {
1439 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1440 "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3,
1443 static struct validate gzcl_validate = {
1455 static char *azcl_fields[] = {
1456 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1457 "iws_type", "iws_name", "iui_type", "iui_name",
1460 static struct valobj azcl_valobj[] = {
1462 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
1463 {V_TYPEDATA, 2, 0, 0, LIST_ID, SMS_ACE},
1464 {V_TYPE, 3, ACE_TYPE, 0, 0, SMS_ACE},
1465 {V_TYPEDATA, 4, 0, 0, LIST_ID, SMS_ACE},
1466 {V_TYPE, 5, ACE_TYPE, 0, 0, SMS_ACE},
1467 {V_TYPEDATA, 6, 0, 0, LIST_ID, SMS_ACE},
1468 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1469 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1472 static struct validate azcl_validate = {
1484 static char *uzcl_fields[] = {
1485 CLASS, "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
1486 "iws_type", "iws_name", "iui_type", "iui_name",
1489 static struct valobj uzcl_valobj[] = {
1490 {V_RENAME, 1, "zephyr", CLASS, 0, SMS_NOT_UNIQUE},
1491 {V_TYPE, 2, ACE_TYPE, 0, 0, SMS_ACE},
1492 {V_TYPEDATA, 3, 0, 0, LIST_ID, SMS_ACE},
1493 {V_TYPE, 4, ACE_TYPE, 0, 0, SMS_ACE},
1494 {V_TYPEDATA, 5, 0, 0, LIST_ID, SMS_ACE},
1495 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
1496 {V_TYPEDATA, 7, 0, 0, LIST_ID, SMS_ACE},
1497 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1498 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1501 static struct validate uzcl_validate = {
1513 static struct validate dzcl_validate = {
1525 static char *gasv_fields[] = {
1526 SERVICE, "protocol", "port", DESC,
1529 static char *gpcp_fields[] = {
1531 "printer", "spooling_host", "spool_directory", "rprinter", "comments",
1535 static char *apcp_fields[] = {
1536 "printer", "spooling_host", "spool_directory", "rprinter", "comments",
1540 static struct valobj apcp_valobj[] = {
1542 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1545 static struct validate apcp_validate = {
1557 static struct validate dpcp_validate = {
1569 static char *gali_fields[] = {
1570 NAME, TYPE, "trans",
1571 NAME, TYPE, "trans",
1574 static char *aali_fields[] = {
1575 NAME, TYPE, "trans",
1578 static struct valobj aali_valobj[] = {
1580 {V_TYPE, 1, "alias", 0, 0, SMS_TYPE},
1584 static struct validate aali_validate = {
1588 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1596 static struct validate dali_validate = /* DELETE_ALIAS */
1601 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1609 static char *gval_fields[] = {
1613 static struct valobj gval_valobj[] = {
1614 {V_NAME, 0, "values", NAME, 0, SMS_NO_MATCH},
1617 static struct validate gval_validate = {
1629 static char *aval_fields[] = {
1633 static struct validate aval_validate = /* for aval, uval, and dval */
1646 static char *dval_fields[] = {
1650 static char *gats_fields[] = {
1651 "table", "retrieves", "appends", "updates", "deletes", MOD1, MOD2, MOD3,
1656 /* Generalized Query Definitions */
1658 struct query Queries2[] = {
1660 /* Q_GALO - GET_ALL_LOGINS */
1666 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1675 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
1676 "get_all_active_logins",
1681 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1690 /* Q_GUBL - GET_USER_BY_LOGIN */
1691 "get_user_by_login",
1696 "%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",
1699 "u.login = \"%s\" and u.users_id != 0",
1705 /* Q_GUBU - GET_USER_BY_UID */
1711 "%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",
1714 "u.uid = %s and u.users_id != 0",
1720 /* Q_GUBN - GET_USER_BY_NAME */
1726 "%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",
1729 "u.first = \"%s\" and u.last = \"%s\" and u.users_id != 0",
1735 /* Q_GUBC - GET_USER_BY_CLASS */
1736 "get_user_by_class",
1741 "%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",
1744 "u.mit_year = uppercase(\"%s\") and u.users_id != 0",
1750 /* Q_GUBM - GET_USER_BY_MITID */
1751 "get_user_by_mitid",
1756 "%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",
1759 "u.mit_id = \"%s\" and u.users_id != 0",
1765 /* Q_AUSR - ADD_USER */
1771 "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",
1774 "values.name = \"users_id\"",
1780 /* Q_RUSR - REGISTER_USER */
1795 /* Q_UUSR - UPDATE_USER */
1801 "login = %c, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c",
1810 /* Q_UUSH - UPDATE_USER_SHELL */
1811 "update_user_shell",
1825 /* Q_UUST - UPDATE_USER_STATUS */
1826 "update_user_status",
1831 "status = int4(%c)",
1840 /* Q_DUSR - DELETE_USER */
1855 /* Q_DUBU - DELETE_USER_BY_UID */
1856 "delete_user_by_uid",
1870 /* Q_GFBL - GET_FINGER_BY_LOGIN */
1871 "get_finger_by_login",
1876 "%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",
1885 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
1886 "update_finger_by_login",
1891 "fullname=%c,nickname=%c,home_addr=%c,home_phone=%c,office_addr=%c,office_phone=%c,mit_dept=%c,mit_affil=%c",
1900 /* Q_GPOB - GET_POBOX */
1906 "%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",
1915 /* Q_GAPO - GET_ALL_POBOXES */
1921 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1924 "u.potype != \"NONE\"",
1930 /* Q_GPOP - GET_POBOXES_POP */
1936 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1939 "u.potype = \"POP\"",
1945 /* Q_GPOF - GET_POBOXES_SMTP */
1951 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1954 "u.potype = \"SMTP\"",
1960 /* Q_SPOB - SET_POBOX */
1975 /* Q_SPOP - SET_POBOX_POP */
1990 /* Q_DPOB - DELETE_POBOX */
1996 "potype = \"NONE\"",
2005 /* Q_GMAC - GET_MACHINE */
2011 "%c = m.name, %c = m.type, %c = m.modtime, %c = text(m.modby), %c =m.modwith",
2014 "m.name = uppercase(\"%s\") and m.mach_id != 0",
2020 /* Q_AMAC - ADD_MACHINE */
2026 "name = uppercase(%c), mach_id = values.value, type = %c",
2029 "values.name = \"mach_id\"",
2035 /* Q_UMAC - UPDATE_MACHINE */
2041 "name = uppercase(%c), type = %c",
2050 /* Q_DMAC - DELETE_MACHINE */
2065 /* Q_GCLU - GET_CLUSTER */
2071 "%c = c.name, %c = c.desc, %c = c.location, %c = c.modtime, %c = text(c.modby), %c = c.modwith",
2074 "c.name = \"%s\" and c.clu_id != 0",
2080 /* Q_ACLU - ADD_CLUSTER */
2086 "name = %c, clu_id = values.value, desc = %c, location = %c",
2089 "values.name = \"clu_id\"",
2095 /* Q_UCLU - UPDATE_CLUSTER */
2101 "name = %c, desc = %c, location = %c",
2110 /* Q_DCLU - DELETE_CLUSTER */
2125 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
2126 "get_machine_to_cluster_map",
2131 "%c = machine.name, %c = cluster.name",
2134 "machine.name = uppercase(\"%s\") and cluster.name = \"%s\" and m.clu_id = cluster.clu_id and m.mach_id = machine.mach_id",
2140 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
2141 "add_machine_to_cluster",
2146 "mach_id = %i4, clu_id = %i4",
2155 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
2156 "delete_machine_from_cluster",
2164 "m.mach_id = %d and m.clu_id = %d",
2170 /* Q_GCLD - GET_CLUSTER_DATA */
2176 "%c = cluster.name, %c = s.serv_label, %c = s.serv_cluster",
2179 "cluster.clu_id = s.clu_id and cluster.name = \"%s\" and s.serv_label = \"%s\"",
2185 /* Q_ACLD - ADD_CLUSTER_DATA */
2191 "clu_id = %i4, serv_label = %c, serv_cluster = %c",
2200 /* Q_DCLD - DELETE_CLUSTER_DATA */
2201 "delete_cluster_data",
2209 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
2215 /* Q_GSIN - GET_SERVER_INFO */
2221 "%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",
2224 "s.name = uppercase(\"%s\")",
2230 /* Q_QGSV - QUALIFIED_GET_SERVER */
2231 "qualified_get_server",
2245 /* Q_ASIN - ADD_SERVER_INFO */
2251 "name = uppercase(%c), update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2260 /* Q_USIN - UPDATE_SERVER_INFO */
2261 "update_server_info",
2266 "update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2269 "s.name = uppercase(\"%s\")",
2275 /* Q_RSVE - RESET_SERVER_ERROR */
2276 "reset_server_error",
2281 "harderror = 0, dfcheck = s.dfgen",
2284 "s.name = uppercase(\"%s\")",
2290 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
2291 "set_server_internal_flags",
2296 "dfgen = int4(%c), dfcheck = int4(%c), inprogress = int1(%c), harderror = int1(%c), errmsg = %c",
2299 "s.name = uppercase(\"%s\")",
2305 /* Q_DSIN - DELETE_SERVER_INFO */
2306 "delete_server_info",
2314 "s.name = uppercase(\"%s\")",
2320 /* Q_GSHI - GET_SERVER_HOST_INFO */
2321 "get_server_host_info",
2326 "%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",
2329 "sh.service = uppercase(\"%s\") and machine.name = uppercase(\"%s\") and machine.mach_id = sh.mach_id",
2335 /* Q_QGSV - QUALIFIED_GET_SERVER_HOST */
2336 "qualified_get_server_host",
2350 /* Q_ASHI - ADD_SERVER_HOST_INFO */
2351 "add_server_host_info",
2356 "service = uppercase(%c), mach_id = %i4, enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2365 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
2366 "update_server_host_info",
2371 "enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2374 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2380 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
2381 "reset_server_host_error",
2389 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2395 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
2396 "set_server_host_override",
2404 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2410 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
2411 "set_server_host_internal",
2416 "override = int1(%c), success = int1(%c), inprogress = int1(%c), hosterror = int1(%c), hosterrmsg = %c, ltt = int4(%c), lts = int4(%c)",
2419 "s.service = uppercase(\"%s\") and s.mach_id = %d",
2425 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
2426 "delete_server_host_info",
2434 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2440 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
2441 "get_server_host_access",
2446 "%c = machine.name, %c = ha.acl_type, %c = text(ha.acl_id), %c = ha.modtime, %c = text(ha.modby), %c = ha.modwith",
2449 "machine.name = uppercase(\"%s\") and ha.mach_id = machine.mach_id",
2455 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
2456 "add_server_host_access",
2461 "mach_id = %i4, acl_type = %c, acl_id = %i4",
2470 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
2471 "update_server_host_access",
2476 "acl_type = %c, acl_id = %i4",
2485 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
2486 "delete_server_host_access",
2500 /* Q_GSLO - GET_SERVER_LOCATIONS */
2501 "get_server_locations",
2506 "%c = sh.service, %c = machine.name",
2509 "sh.service = uppercase(\"%s\") and sh.mach_id = machine.mach_id",
2515 /* Q_GFSL - GET_FILESYS_BY_LABEL */
2516 "get_filesys_by_label",
2521 "%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",
2524 "fs.label = \"%s\" and fs.mach_id = machine.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2530 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
2531 "get_filesys_by_machine",
2536 "%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",
2539 "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2545 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
2546 "get_filesys_by_nfsphys",
2551 "%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",
2554 "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\"",
2560 /* Q_GFSG - GET_FILESYS_BY_GROUP */
2561 "get_filesys_by_group",
2566 "%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",
2569 "fs.owners = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2575 /* Q_AFIL - ADD_FILESYS */
2581 "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",
2584 "values.name = \"filsys_id\"",
2590 /* Q_UFIL - UPDATE_FILESYS */
2596 "label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c",
2599 "fs.filsys_id = %d",
2605 /* Q_DFIL - DELETE_FILESYS */
2614 "fs.filsys_id = %d",
2620 /* Q_GANF - GET_ALL_NFSPHYS */
2626 "%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",
2629 "machine.mach_id = np.mach_id",
2635 /* Q_GNFP - GET_NFSPHYS */
2641 "%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",
2644 "np.mach_id = %d and np.dir = \"%s\" and machine.mach_id = np.mach_id",
2650 /* Q_ANFP - ADD_NFSPHYS */
2656 "nfsphys_id = values.value, mach_id = %i4, dir = %c, device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2659 "values.name = \"nfsphys_id\"",
2665 /* Q_UNFP - UPDATE_NFSPHYS */
2671 "device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2674 "np.mach_id = %d and np.dir = \"%s\"",
2680 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
2681 "adjust_nfsphys_allocation",
2686 "allocated = np.allocated + int4(%c)",
2689 "np.mach_id = %d and np.dir = \"%s\"",
2695 /* Q_DNFP - DELETE_NFSPHYS */
2704 "np.mach_id = %d and np.dir = \"%s\"",
2710 /* Q_GNFQ - GET_NFS_QUOTAS */
2716 "%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",
2719 "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",
2725 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
2726 "get_nfs_quotas_by_partition",
2731 "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name",
2734 "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",
2740 /* Q_ANFQ - ADD_NFS_QUOTA */
2746 "filsys_id = filesys.filsys_id, users_id = %i4, quota = int4(%c), phys_id = filesys.phys_id",
2749 "filesys.filsys_id = %d",
2755 /* Q_UNFQ - UPDATE_NFS_QUOTA */
2764 "nq.filsys_id = %d and nq.users_id = %d",
2770 /* Q_DNFQ - DELETE_NFS_QUOTA */
2779 "nq.filsys_id = %d and nq.users_id = %d",
2785 /* Q_GLIN - GET_LIST_INFO */
2800 /* Q_EXLN - EXPAND_LIST_NAMES */
2801 "expand_list_names",
2809 "l.name = \"%s\" and l.list_id != 0",
2815 /* Q_ALIS - ADD_LIST */
2821 "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",
2824 "values.name = \"list_id\"",
2830 /* Q_ULIS - UPDATE_LIST */
2836 "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",
2845 /* Q_DLIS - DELETE_LIST */
2860 /* Q_AMTL - ADD_MEMBER_TO_LIST */
2861 "add_member_to_list",
2866 "list_id=%i4, member_type=%c, member_id=%i4",
2875 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
2876 "delete_member_from_list",
2884 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
2890 /* Q_GAUS - GET_ACE_USE */
2905 /* Q_QGLI - QUALIFIED_GET_LISTS */
2906 "qualified_get_lists",
2920 /* Q_GMOL - GET_MEMBERS_OF_LIST */
2921 "get_members_of_list",
2935 /* Q_GLOM - GET_LISTS_OF_MEMBER */
2936 "get_lists_of_member",
2950 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
2951 "count_members_of_list",
2965 /* Q_AUGR - ADD_USER_GROUP */
2980 /* Q_GZCL - GET_ZEPHYR_CLASS */
2986 "%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",
2995 /* Q_AZCL - ADD_ZEPHYR_CLASS */
3001 "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",
3010 /* Q_UZCL - UPDATE_ZEPHYR_CLASS */
3011 "update_zephyr_class",
3016 "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",
3025 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
3026 "delete_zephyr_class",
3040 /* Q_GSVC - GET_SERVICE */
3046 "%c = s.name, %c = s.protocol, %c = text(s.port), %c = s.desc, %c = s.modtime, %c = text(s.modby), %c = s.modwith",
3055 /* Q_ASVC - ADD_SERVICE */
3061 "name = %c, protocol = %c, port = int2(%c), desc = %c",
3070 /* Q_DSVC - DELETE_SERVICE */
3085 /* Q_GPCP - GET_PRINTCAP */
3091 "%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",
3094 "p.name = \"%s\" and machine.mach_id = p.mach_id",
3100 /* Q_APCP - ADD_PRINTCAP */
3106 "name = %c, mach_id = %i4, dir = %c, rp = %c, comments = %c",
3115 /* Q_DPCP - DELETE_PRINTCAP */
3130 /* Q_GALI - GET_ALIAS */
3136 "%c = a.name, %c = a.type, %c = a.trans",
3139 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3145 /* Q_AALI - ADD_ALIAS */
3151 "name = %c, type = %c, trans = %c",
3160 /* Q_DALI - DELETE_ALIAS */
3169 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3175 /* Q_GVAL - GET_VALUE */
3181 "%c = text(v.value)",
3190 /* Q_AVAL - ADD_VALUE */
3196 "name = %c, value = int4(%c)",
3205 /* Q_UVAL - UPDATE_VALUE */
3220 /* Q_DVAL - DELETE_VALUE */
3235 /* Q_GATS - GET_ALL_TABLE_STATS */
3236 "get_all_table_stats",
3241 "%c = tbs.table, %c = text(tbs.retrieves), %c = text(tbs.appends), %c = text(tbs.updates), %c = text(tbs.deletes), %c = tbs.modtime",
3251 int QueryCount2 = (sizeof Queries2 / sizeof (struct query));