1 /* This file defines the query dispatch table for version 2 of the protocol
5 * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
11 /* Specialized Support Query Routines */
13 /* Special Access Check Routines */
17 int access_visible_list();
18 int access_vis_list_by_name();
24 /* Query Setup Routines */
43 /* Query Followup Routines */
44 int followup_fix_modby();
54 int set_modtime_by_id();
55 int set_finger_modtime();
56 int set_pobox_modtime();
57 int set_mach_modtime();
58 int set_mach_modtime_by_id();
59 int set_cluster_modtime_by_id();
60 int set_serverhost_modtime();
61 int set_nfsphys_modtime();
62 int set_filesys_modtime();
63 int set_zephyr_modtime();
69 int qualified_get_lists();
70 int get_members_of_list();
71 int qualified_get_server();
72 int qualified_get_serverhost();
74 int count_members_of_list();
75 int get_lists_of_member();
82 * These are commonly used strings in the table, defined here so that
86 static char ACE_NAME[] = "ace_name";
87 static char ACE_TYPE[] = "ace_type";
88 static char CLASS[] = "class";
89 static char CLU_ID[] = "clu_id";
90 static char CLUSTER[] = "cluster";
91 static char DESC[] = "description";
92 static char DEVICE[] = "device";
93 static char DIR[] = "dir";
94 static char FILESYS[] = "filesys";
95 static char FILSYS_ID[] = "filsys_id";
96 static char FIRST[] = "firstname";
97 static char LABEL[] = "label";
98 static char LAST[] = "lastname";
99 static char LIST[] = "list";
100 static char LIST_ID[] = "list_id";
101 static char LOCATION[] = "location";
102 static char LOGIN[] = "login";
103 static char MACH_ID[] = "mach_id";
104 static char MACHINE[] = "machine";
105 static char MIDDLE[] = "middle";
106 static char MIT_ID[] = "mit_id";
107 static char MOD1[] = "modtime";
108 static char MOD2[] = "modby";
109 static char MOD3[] = "modwith";
110 static char NAME[] = "name";
111 static char SERVICE[] = "service";
112 static char SHELL[] = "shell";
113 static char STATUS[] = "status";
114 static char TYPE[] = "type";
115 static char USERS[] = "users";
116 static char USERS_ID[] = "users_id";
117 static char UID[] = "uid";
122 * These are commonly used validation objects, defined here so that they
126 static struct valobj VOsort0[] = {
127 {V_SORT, 0, 0, 0, 0, 0},
130 static struct valobj VOdate1[] = {
131 {V_DATE, 1, 0, 0, 0, SMS_DATE},
134 static struct valobj VOuser0[] = {
135 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
138 static struct valobj VOmach0[] = {
139 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
142 static struct valobj VOclu0[] = {
143 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
146 static struct valobj VOlist0[] = {
147 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
150 static struct valobj VOchar0[] = {
154 static struct valobj VOsort01[] = {
159 static struct valobj VOuser0sort[] = {
160 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
164 static struct valobj VOfilsys0user1[] = {
165 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
166 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
171 * Commonly used validation records defined here so that they may
175 static struct validate VDmach = { VOmach0, 1 };
176 static struct validate VDsort2= { VOsort01,2 };
177 static struct validate VDsortf = {
193 static char *galo_fields[] = {
194 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE,
197 static char *gubl_fields[] = {
199 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
200 MIT_ID, CLASS, MOD1, MOD2, MOD3
203 static struct validate gubx_validate = /* gubl, gubu */
216 static char *gubu_fields[] = {
218 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
219 MIT_ID, CLASS, MOD1, MOD2, MOD3,
222 static char *gubn_fields[] = {
224 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
225 MIT_ID, CLASS, MOD1, MOD2, MOD3,
228 static char *gubc_fields[] = {
230 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
231 MIT_ID, CLASS, MOD1, MOD2, MOD3,
234 static char *gubm_fields[] = {
236 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
237 MIT_ID, CLASS, MOD1, MOD2, MOD3,
240 static char *ausr_fields[] = {
241 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
245 static struct valobj ausr_valobj[] = {
251 {V_TYPE, 8, CLASS, 0, 0, SMS_BAD_CLASS},
254 static struct validate ausr_validate = {
266 static char *rusr_fields[] = {
267 UID, LOGIN, "fs_type"
270 static struct validate rusr_validate = {
282 static char *uusr_fields[] = {
284 "newlogin", UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
288 static struct valobj uusr_valobj[] = {
289 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
290 {V_RENAME, 1, USERS, LOGIN, USERS_ID, SMS_NOT_UNIQUE},
295 {V_TYPE, 9, CLASS, 0, 0, SMS_BAD_CLASS},
298 static struct validate uusr_validate = {
310 static char *uush_fields[] = {
315 static struct validate uush_validate = {
327 static char *uust_fields[] = {
332 static struct validate uust_validate = {
344 static char *dusr_fields[] = {
348 static struct validate dusr_validate = {
360 static char *dubu_fields[] = {
364 static struct valobj dubu_valobj[] = {
365 {V_ID, 0, USERS, UID, USERS_ID, SMS_USER}
368 static struct validate dubu_validate = {
380 static char *gfbl_fields[] = {
382 LOGIN, "fullname", "nickname", "home_addr",
383 "home_phone", "office_address", "office_phone", "mit_dept",
384 "mit_affil", MOD1, MOD2, MOD3,
387 static struct validate gfbl_validate = {
399 static char *ufbl_fields[] = {
401 "fullname", "nickname", "home_addr",
402 "home_phone", "office_address", "office_phone", "mit_dept",
406 static struct validate ufbl_validate = {
418 static char *gpob_fields[] = {
420 LOGIN, TYPE, "box", MOD1, MOD2, MOD3,
423 static struct validate gpob_validate = {
427 "u.potype != \"NONE\" and u.users_id=%d",
435 static char *gpox_fields[] = {
439 static struct validate gpox_validate = {
451 static char *spob_fields[] = {
455 static struct valobj spob_valobj[] = {
456 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
457 {V_TYPE, 1, "pobox", 0, 0, SMS_TYPE},
460 static struct validate spob_validate = /* SET_POBOX */
473 static struct validate spop_validate = /* SET_POBOX_POP */
486 static struct validate dpob_validate = /* DELETE_POBOX */
499 static char *gmac_fields[] = {
501 NAME, TYPE, MOD1, MOD2, MOD3,
504 static char *amac_fields[] = {
508 static struct valobj amac_valobj[] = {
510 {V_TYPE, 1, "mac_type", 0, 0, SMS_TYPE},
513 static struct validate amac_validate = {
517 "m.name = uppercase(\"%s\")",
525 static char *umac_fields[] = {
530 static struct valobj umac_valobj[] = {
531 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
532 {V_RENAME, 1, MACHINE, NAME, MACH_ID, SMS_NOT_UNIQUE},
533 {V_TYPE, 2, "mac_type", 0, 0, SMS_TYPE},
536 static struct validate umac_validate = {
548 static char *dmac_fields[] = {
552 static struct validate dmac_validate = {
564 static char *gclu_fields[] = {
566 NAME, DESC, LOCATION, MOD1, MOD2, MOD3,
569 static char *aclu_fields[] = {
570 NAME, DESC, LOCATION,
573 static struct validate aclu_validate = /* for aclu */
586 static char *uclu_fields[] = {
588 "newname", DESC, LOCATION,
591 static struct valobj uclu_valobj[] = {
592 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
593 {V_RENAME, 1, CLUSTER, NAME, CLU_ID, SMS_NOT_UNIQUE},
596 static struct validate uclu_validate = {
608 static char *dclu_fields[] = {
612 static struct validate dclu_validate = {
624 static char *gmcm_fields[] = {
629 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
630 { /* DELETE_MACHINE_FROM_CLUSTER */
631 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
632 {V_ID, 1, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
635 static struct validate amtc_validate = /* for amtc and dmfc */
640 "m.mach_id = %d and m.clu_id = %d",
645 set_mach_modtime_by_id,
648 static char *gcld_fields[] = {
649 CLUSTER, "serv_label",
650 CLUSTER, "serv_label", "serv_cluster",
653 static char *acld_fields[] = {
654 CLUSTER, "serv_label", "serv_cluster",
657 static struct valobj acld_valobj[] =
659 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
660 {V_TYPE, 1, "slabel", 0, 0, SMS_TYPE},
664 static struct validate acld_validate = /* ADD_CLUSTER_DATA */
665 { /* DELETE_CLUSTER_DATA */
669 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
674 set_cluster_modtime_by_id,
677 static char *gsin_fields[] = {
679 SERVICE, "update_int", "target_file", "script", "dfgen",
680 TYPE, "enable", "inprogress", "harderror", "errmsg",
681 ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
684 static struct validate gsin_validate =
697 static char *qgsv_fields[] = {
698 "enable", "inprogress", "harderror",
702 static struct valobj qgsv_valobj[] = {
703 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
704 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
705 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
708 static struct validate qgsv_validate = {
717 qualified_get_server,
720 static char *asin_fields[] = {
721 SERVICE, "update_int", "target_file", "script", TYPE, "enable",
725 static struct valobj asin_valobj[] = {
727 {V_TYPE, 4, "service", 0, 0, SMS_TYPE},
728 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
729 {V_TYPEDATA, 7, 0, 0, 0, SMS_ACE},
732 static struct validate asin_validate = /* for asin, usin */
737 "s.name = uppercase(\"%s\")",
745 static struct validate rsve_validate = {
749 "s.name = uppercase(\"%s\")",
757 static char *ssif_fields[] = {
758 SERVICE, "dfgen", "inprogress", "harderror", "errmsg",
761 static struct validate ssif_validate = {
765 "s.name = uppercase(\"%s\")",
773 static char *dsin_fields[] = {
777 static struct validate dsin_validate = {
781 "s.name = uppercase(\"%s\")",
789 static char *gshi_fields[] = {
791 SERVICE, MACHINE, "enable", "override", "success", "inprogress",
792 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
793 "value3", MOD1, MOD2, MOD3,
796 static struct validate gshi_validate = {
808 static char *qgsh_fields[] = {
809 "service", "enable", "override", "success", "inprogress", "hosterror",
813 static struct valobj qgsh_valobj[] = {
814 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
815 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
816 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
817 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
818 {V_TYPE, 5, "boolean", 0, 0, SMS_TYPE},
821 static struct validate qgsh_validate = {
830 qualified_get_serverhost,
833 static char *ashi_fields[] = {
834 SERVICE, MACHINE, "enable", "value1", "value2", "value3",
837 static struct valobj ashi_valobj[] = {
838 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
839 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
842 static struct validate ashi_validate = /* ashi & ushi */
847 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
852 set_serverhost_modtime,
855 static struct validate rshe_validate =
860 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
865 set_serverhost_modtime,
868 static struct validate ssho_validate =
873 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
881 static char *sshi_fields[] = {
882 "service", MACHINE, "override", "success", "inprogress",
883 "hosterror", "errmsg", "ltt", "lts"
886 static struct valobj sshi_valobj[] = {
887 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
888 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
889 {V_DATE, 7, 0, 0, 0, SMS_DATE},
890 {V_DATE, 8, 0, 0, 0, SMS_DATE},
893 static struct validate sshi_validate =
898 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
906 static char *dshi_fields[] = {
910 static struct validate dshi_validate =
915 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
923 static char *gsha_fields[] = {
925 MACHINE, ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
928 static struct validate gsha_validate =
941 static char *asha_fields[] = {
942 MACHINE, ACE_TYPE, ACE_NAME,
945 static struct valobj asha_valobj[] = {
946 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
947 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
948 {V_TYPEDATA, 2, 0, 0, 0, SMS_ACE},
951 static struct validate asha_validate =
964 static char *gslo_fields[] = {
969 static char *gfsl_fields[] = {
971 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
972 "create", "lockertype", MOD1, MOD2, MOD3,
975 static char *gfsm_fields[] = {
977 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
978 "create", "lockertype", MOD1, MOD2, MOD3,
981 static struct validate gfsm_validate = {
993 static char *gfsn_fields[] = {
995 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
996 "create", "lockertype", MOD1, MOD2, MOD3,
999 static char *gfsg_fields[] = {
1001 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
1002 "create", "lockertype", MOD1, MOD2, MOD3,
1005 static struct validate gfsg_validate = {
1017 static char *afil_fields[] = {
1018 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
1019 "create", "lockertype",
1022 static struct valobj afil_valobj[] = {
1024 {V_TYPE, 1, FILESYS, 0, 0, SMS_FSTYPE},
1025 {V_ID, 2, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1027 {V_ID, 7, USERS, LOGIN, USERS_ID, SMS_USER},
1028 {V_ID, 8, LIST, NAME, LIST_ID, SMS_LIST},
1029 {V_TYPE, 10, "lockertype", 0, 0, SMS_TYPE}
1032 static struct validate afil_validate = {
1036 "fs.label = \"%s\"",
1041 set_filesys_modtime,
1044 static char *ufil_fields[] = {
1045 LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments",
1046 "owner", "owners", "create", "lockertype",
1049 static struct valobj ufil_valobj[] = {
1050 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1051 {V_RENAME, 1, FILESYS, LABEL, FILSYS_ID, SMS_NOT_UNIQUE},
1052 {V_TYPE, 2, FILESYS, 0, 0, SMS_FSTYPE},
1053 {V_ID, 3, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1055 {V_ID, 8, USERS, LOGIN, USERS_ID, SMS_USER},
1056 {V_ID, 9, LIST, NAME, LIST_ID, SMS_LIST},
1057 {V_TYPE, 11, "lockertype", 0, 0, SMS_TYPE}
1060 static struct validate ufil_validate = {
1064 "fs.filsys_id = %d",
1069 set_filesys_modtime,
1072 static char *dfil_fields[] = {
1076 static struct valobj dfil_valobj[] = {
1077 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1080 static struct validate dfil_validate = {
1084 "fs.filsys_id = %d",
1092 static char *ganf_fields[] = {
1093 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1096 static char *gnfp_fields[] = {
1098 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1101 static struct validate gnfp_validate = {
1113 static struct valobj anfp_valobj[] = {
1114 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1118 static struct validate anfp_validate = {
1122 "np.mach_id = %d and np.dir = \"%s\"",
1127 set_nfsphys_modtime,
1130 static char *dnfp_fields[] = {
1134 static struct validate dnfp_validate = {
1138 "np.mach_id = %d and np.dir = \"%s\"",
1143 set_nfsphys_modtime,
1146 static char *gnfq_fields[] = {
1148 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1151 static struct valobj gnfq_valobj[] = {
1152 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
1156 static struct validate gnfq_validate = {
1168 static char *gnqp_fields[] = {
1170 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1173 static char *anfq_fields[] = {
1174 FILESYS, LOGIN, "quota",
1177 static struct validate anfq_validate = {
1181 "nq.filsys_id = %d and nq.users_id = %d",
1189 static struct validate unfq_validate = {
1193 "nq.filsys_id = %d and nq.users_id = %d",
1201 static struct validate dnfq_validate = {
1205 "nq.filsys_id = %d and nq.users_id = %d",
1213 static char *glin_fields[] = {
1215 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1216 ACE_TYPE, ACE_NAME, DESC, MOD1, MOD2, MOD3,
1219 static struct validate glin_validate = {
1226 access_vis_list_by_name,
1231 static char *alis_fields[] = {
1232 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1233 ACE_TYPE, ACE_NAME, DESC,
1236 static struct valobj alis_valobj[] = {
1238 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1239 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1242 static struct validate alis_validate = {
1254 static char *ulis_fields[] = {
1256 "newname", "active", "public", "hidden", "maillist", "group", "gid",
1257 ACE_TYPE, ACE_NAME, DESC,
1260 static struct valobj ulis_valobj[] = {
1261 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1262 {V_RENAME, 1, LIST, NAME, LIST_ID, SMS_NOT_UNIQUE},
1263 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1264 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1267 static struct validate ulis_validate = {
1279 static char *dlis_fields[] = {
1283 static struct validate dlis_validate = {
1295 static char *amtl_fields[] = {
1296 "list_name", "member_type", "member_name",
1299 static struct valobj amtl_valobj[] = {
1300 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1301 {V_TYPE, 1, "member", 0, 0, SMS_TYPE},
1302 {V_TYPEDATA, 2, 0, 0, 0, SMS_NO_MATCH},
1305 static struct validate amtl_validate = /* for amtl and dmfl */
1310 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
1318 static char *gaus_fields[] = {
1320 "use_type", "use_name",
1323 static struct valobj gaus_valobj[] = {
1324 {V_TYPE, 0, "gaus", 0, 0, SMS_TYPE},
1325 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1328 static struct validate gaus_validate = {
1340 static char *qgli_fields[] = {
1341 "active", "public", "hidden", "maillist", "group",
1345 static struct valobj qgli_valobj[] = {
1346 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
1347 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
1348 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
1349 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
1350 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
1353 static struct validate qgli_validate = {
1362 qualified_get_lists,
1365 static char *gmol_fields[] = {
1367 "member_type", "member_name",
1370 static struct validate gmol_validate = {
1377 access_visible_list,
1379 get_members_of_list,
1382 static char *glom_fields[] = {
1383 "member_type", "member_name",
1384 "list_name", "active", "public", "hidden", "maillist", "group",
1387 static struct valobj glom_valobj[] = {
1388 {V_TYPE, 0, "rmember", 0, 0, SMS_TYPE},
1389 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1393 static struct validate glom_validate = {
1402 get_lists_of_member,
1405 static char *cmol_fields[] = {
1410 static struct validate cmol_validate = {
1417 access_visible_list,
1419 count_members_of_list,
1422 static char *augr_fields[] = {
1426 static struct validate augr_validate = {
1438 static char *gzcl_fields[] = {
1440 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1441 "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3,
1444 static struct validate gzcl_validate = {
1456 static char *azcl_fields[] = {
1457 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1458 "iws_type", "iws_name", "iui_type", "iui_name",
1461 static struct valobj azcl_valobj[] = {
1463 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
1464 {V_TYPEDATA, 2, 0, 0, LIST_ID, SMS_ACE},
1465 {V_TYPE, 3, ACE_TYPE, 0, 0, SMS_ACE},
1466 {V_TYPEDATA, 4, 0, 0, LIST_ID, SMS_ACE},
1467 {V_TYPE, 5, ACE_TYPE, 0, 0, SMS_ACE},
1468 {V_TYPEDATA, 6, 0, 0, LIST_ID, SMS_ACE},
1469 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1470 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1473 static struct validate azcl_validate = {
1485 static char *uzcl_fields[] = {
1486 CLASS, "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
1487 "iws_type", "iws_name", "iui_type", "iui_name",
1490 static struct valobj uzcl_valobj[] = {
1491 {V_RENAME, 1, "zephyr", CLASS, 0, SMS_NOT_UNIQUE},
1492 {V_TYPE, 2, ACE_TYPE, 0, 0, SMS_ACE},
1493 {V_TYPEDATA, 3, 0, 0, LIST_ID, SMS_ACE},
1494 {V_TYPE, 4, ACE_TYPE, 0, 0, SMS_ACE},
1495 {V_TYPEDATA, 5, 0, 0, LIST_ID, SMS_ACE},
1496 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
1497 {V_TYPEDATA, 7, 0, 0, LIST_ID, SMS_ACE},
1498 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1499 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1502 static struct validate uzcl_validate = {
1514 static struct validate dzcl_validate = {
1526 static char *gasv_fields[] = {
1527 SERVICE, "protocol", "port", DESC,
1530 static char *gpcp_fields[] = {
1532 "printer", "printcap", MOD1, MOD2, MOD3,
1535 static char *apcp_fields[] = {
1536 "printer", "printcap", MOD1, MOD2, MOD3,
1539 static struct validate apcp_validate = {
1551 static char *gali_fields[] = {
1552 NAME, TYPE, "trans",
1553 NAME, TYPE, "trans",
1556 static char *aali_fields[] = {
1557 NAME, TYPE, "trans",
1560 static struct valobj aali_valobj[] = {
1562 {V_TYPE, 1, "alias", 0, 0, SMS_TYPE},
1566 static struct validate aali_validate = {
1570 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1578 static struct validate dali_validate = /* DELETE_ALIAS */
1583 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1591 static char *gval_fields[] = {
1595 static struct valobj gval_valobj[] = {
1596 {V_NAME, 0, "values", NAME, 0, SMS_NO_MATCH},
1599 static struct validate gval_validate = {
1611 static char *aval_fields[] = {
1615 static struct validate aval_validate = /* for aval, uval, and dval */
1628 static char *dval_fields[] = {
1632 static char *gats_fields[] = {
1633 "table", "retrieves", "appends", "updates", "deletes", MOD1, MOD2, MOD3,
1638 /* Generalized Query Definitions */
1640 struct query Queries2[] = {
1642 /* Q_GALO - GET_ALL_LOGINS */
1648 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1657 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
1658 "get_all_active_logins",
1663 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1672 /* Q_GUBL - GET_USER_BY_LOGIN */
1673 "get_user_by_login",
1678 "%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",
1681 "u.login = \"%s\" and u.users_id != 0",
1687 /* Q_GUBU - GET_USER_BY_UID */
1693 "%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",
1696 "u.uid = %s and u.users_id != 0",
1702 /* Q_GUBN - GET_USER_BY_NAME */
1708 "%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",
1711 "u.first = \"%s\" and u.last = \"%s\" and u.users_id != 0",
1717 /* Q_GUBC - GET_USER_BY_CLASS */
1718 "get_user_by_class",
1723 "%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",
1726 "u.mit_year = uppercase(\"%s\") and u.users_id != 0",
1732 /* Q_GUBM - GET_USER_BY_MITID */
1733 "get_user_by_mitid",
1738 "%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",
1741 "u.mit_id = \"%s\" and u.users_id != 0",
1747 /* Q_AUSR - ADD_USER */
1753 "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",
1756 "values.name = \"users_id\"",
1762 /* Q_RUSR - REGISTER_USER */
1777 /* Q_UUSR - UPDATE_USER */
1783 "login = %c, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c",
1792 /* Q_UUSH - UPDATE_USER_SHELL */
1793 "update_user_shell",
1807 /* Q_UUST - UPDATE_USER_STATUS */
1808 "update_user_status",
1813 "status = int4(%c)",
1822 /* Q_DUSR - DELETE_USER */
1837 /* Q_DUBU - DELETE_USER_BY_UID */
1838 "delete_user_by_uid",
1852 /* Q_GFBL - GET_FINGER_BY_LOGIN */
1853 "get_finger_by_login",
1858 "%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",
1867 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
1868 "update_finger_by_login",
1873 "fullname=%c,nickname=%c,home_addr=%c,home_phone=%c,office_addr=%c,office_phone=%c,mit_dept=%c,mit_affil=%c",
1882 /* Q_GPOB - GET_POBOX */
1888 "%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",
1897 /* Q_GAPO - GET_ALL_POBOXES */
1903 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1906 "u.potype != \"NONE\"",
1912 /* Q_GPOP - GET_POBOXES_POP */
1918 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1921 "u.potype = \"POP\"",
1927 /* Q_GPOF - GET_POBOXES_SMTP */
1933 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1936 "u.potype = \"SMTP\"",
1942 /* Q_SPOB - SET_POBOX */
1957 /* Q_SPOP - SET_POBOX_POP */
1972 /* Q_DPOB - DELETE_POBOX */
1978 "potype = \"NONE\"",
1987 /* Q_GMAC - GET_MACHINE */
1993 "%c = m.name, %c = m.type, %c = m.modtime, %c = text(m.modby), %c =m.modwith",
1996 "m.name = uppercase(\"%s\") and m.mach_id != 0",
2002 /* Q_AMAC - ADD_MACHINE */
2008 "name = uppercase(%c), mach_id = values.value, type = %c",
2011 "values.name = \"mach_id\"",
2017 /* Q_UMAC - UPDATE_MACHINE */
2023 "name = uppercase(%c), type = %c",
2032 /* Q_DMAC - DELETE_MACHINE */
2047 /* Q_GCLU - GET_CLUSTER */
2053 "%c = c.name, %c = c.desc, %c = c.location, %c = c.modtime, %c = text(c.modby), %c = c.modwith",
2056 "c.name = \"%s\" and c.clu_id != 0",
2062 /* Q_ACLU - ADD_CLUSTER */
2068 "name = %c, clu_id = values.value, desc = %c, location = %c",
2071 "values.name = \"clu_id\"",
2077 /* Q_UCLU - UPDATE_CLUSTER */
2083 "name = %c, desc = %c, location = %c",
2092 /* Q_DCLU - DELETE_CLUSTER */
2107 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
2108 "get_machine_to_cluster_map",
2113 "%c = machine.name, %c = cluster.name",
2116 "machine.name = uppercase(\"%s\") and cluster.name = \"%s\" and m.clu_id = cluster.clu_id and m.mach_id = machine.mach_id",
2122 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
2123 "add_machine_to_cluster",
2128 "mach_id = %i4, clu_id = %i4",
2137 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
2138 "delete_machine_from_cluster",
2146 "m.mach_id = %d and m.clu_id = %d",
2152 /* Q_GCLD - GET_CLUSTER_DATA */
2158 "%c = cluster.name, %c = s.serv_label, %c = s.serv_cluster",
2161 "cluster.clu_id = s.clu_id and cluster.name = \"%s\" and s.serv_label = \"%s\"",
2167 /* Q_ACLD - ADD_CLUSTER_DATA */
2173 "clu_id = %i4, serv_label = %c, serv_cluster = %c",
2182 /* Q_DCLD - DELETE_CLUSTER_DATA */
2183 "delete_cluster_data",
2191 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
2197 /* Q_GSIN - GET_SERVER_INFO */
2203 "%c = s.name, %c = text(s.update_int), %c = s.target_file, %c = s.script, %c = s.dfgen, %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",
2206 "s.name = uppercase(\"%s\")",
2212 /* Q_QGSV - QUALIFIED_GET_SERVER */
2213 "qualified_get_server",
2227 /* Q_ASIN - ADD_SERVER_INFO */
2233 "name = uppercase(%c), update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2242 /* Q_USIN - UPDATE_SERVER_INFO */
2243 "update_server_info",
2248 "update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2251 "s.name = uppercase(\"%s\")",
2257 /* Q_RSVE - RESET_SERVER_ERROR */
2258 "reset_server_error",
2266 "s.name = uppercase(\"%s\")",
2272 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
2273 "set_server_internal_flags",
2278 "dfgen = %c, inprogress = int1(%c), harderror = int1(%c), errmsg = %c",
2281 "s.name = uppercase(\"%s\")",
2287 /* Q_DSIN - DELETE_SERVER_INFO */
2288 "delete_server_info",
2296 "s.name = uppercase(\"%s\")",
2302 /* Q_GSHI - GET_SERVER_HOST_INFO */
2303 "get_server_host_info",
2308 "%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 = sh.ltt, %c = sh.lts, %c = text(sh.value1), %c = text(sh.value2), %c = sh.value3, %c = sh.modtime, %c = text(sh.modby), %c = sh.modwith",
2311 "sh.service = uppercase(\"%s\") and machine.name = uppercase(\"%s\") and machine.mach_id = sh.mach_id",
2317 /* Q_QGSV - QUALIFIED_GET_SERVER_HOST */
2318 "qualified_get_server_host",
2332 /* Q_ASHI - ADD_SERVER_HOST_INFO */
2333 "add_server_host_info",
2338 "service = uppercase(%c), mach_id = %i4, enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2347 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
2348 "update_server_host_info",
2353 "enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2356 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2362 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
2363 "reset_server_host_error",
2371 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2377 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
2378 "set_server_host_override",
2386 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2392 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
2393 "set_server_host_internal",
2398 "override = int1(%c), success = int1(%c), inprogress = int1(%c), hosterror = int1(%c), hosterrmsg = %c, ltt = %c, lts = %c",
2401 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2407 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
2408 "delete_server_host_info",
2416 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2422 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
2423 "get_server_host_access",
2428 "%c = machine.name, %c = ha.acl_type, %c = text(ha.acl_id), %c = ha.modtime, %c = text(ha.modby), %c = ha.modwith",
2431 "machine.name = uppercase(\"%s\") and ha.mach_id = machine.mach_id",
2437 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
2438 "add_server_host_access",
2443 "mach_id = %i4, acl_type = %c, acl_id = %i4",
2452 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
2453 "update_server_host_access",
2458 "acl_type = %c, acl_id = %i4",
2467 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
2468 "delete_server_host_access",
2482 /* Q_GSLO - GET_SERVER_LOCATIONS */
2483 "get_server_locations",
2488 "%c = sh.service, %c = machine.name",
2491 "sh.service = uppercase(\"%s\") and sh.mach_id = machine.mach_id",
2497 /* Q_GFSL - GET_FILESYS_BY_LABEL */
2498 "get_filesys_by_label",
2503 "%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",
2506 "fs.label = \"%s\" and fs.mach_id = machine.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2512 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
2513 "get_filesys_by_machine",
2518 "%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",
2521 "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2527 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
2528 "get_filesys_by_nfsphys",
2533 "%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",
2536 "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\"",
2542 /* Q_GFSG - GET_FILESYS_BY_GROUP */
2543 "get_filesys_by_group",
2548 "%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",
2551 "fs.owners = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2557 /* Q_AFIL - ADD_FILESYS */
2563 "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",
2566 "values.name = \"filsys_id\"",
2572 /* Q_UFIL - UPDATE_FILESYS */
2578 "label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c",
2581 "fs.filsys_id = %d",
2587 /* Q_DFIL - DELETE_FILESYS */
2596 "fs.filsys_id = %d",
2602 /* Q_GANF - GET_ALL_NFSPHYS */
2608 "%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",
2611 "machine.mach_id = np.mach_id",
2617 /* Q_GNFP - GET_NFSPHYS */
2623 "%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",
2626 "np.mach_id = %d and np.dir = \"%s\" and machine.mach_id = np.mach_id",
2632 /* Q_ANFP - ADD_NFSPHYS */
2638 "nfsphys_id = values.value, mach_id = %i4, dir = %c, device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2641 "values.name = \"nfsphys_id\"",
2647 /* Q_UNFP - UPDATE_NFSPHYS */
2653 "device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2656 "np.mach_id = %d and np.dir = \"%s\"",
2662 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
2663 "adjust_nfsphys_allocation",
2668 "allocated = np.allocated + int4(%c)",
2671 "np.mach_id = %d and np.dir = \"%s\"",
2677 /* Q_DNFP - DELETE_NFSPHYS */
2686 "np.mach_id = %d and np.dir = \"%s\"",
2692 /* Q_GNFQ - GET_NFS_QUOTAS */
2698 "%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",
2701 "filesys.label = \"%s\" and users.users_id = %d and filesys.phys_id = nfsphys.nfsphys_id and machine.mach_id = filesys.mach_id and users.users_id = nq.users_id and filesys.filsys_id = nq.filsys_id",
2707 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
2708 "get_nfs_quotas_by_partition",
2713 "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name",
2716 "filesys.mach_id = %d and nfsphys.dir = \"%s\" and nq.filsys_id = filesys.filsys_id and nfsphys.nfsphys_id = filesys.phys_id and users.users_id = nq.users_id and machine.mach_id = filesys.mach_id",
2722 /* Q_ANFQ - ADD_NFS_QUOTA */
2728 "filsys_id = %i4, users_id = %i4, quota = int4(%c)",
2737 /* Q_UNFQ - UPDATE_NFS_QUOTA */
2746 "nq.filsys_id = %d and nq.users_id = %d",
2752 /* Q_DNFQ - DELETE_NFS_QUOTA */
2761 "nq.filsys_id = %d and nq.users_id = %d",
2767 /* Q_GLIN - GET_LIST_INFO */
2782 /* Q_EXLN - EXPAND_LIST_NAMES */
2783 "expand_list_names",
2791 "l.name = \"%s\" and l.list_id != 0",
2797 /* Q_ALIS - ADD_LIST */
2803 "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",
2806 "values.name = \"list_id\"",
2812 /* Q_ULIS - UPDATE_LIST */
2818 "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",
2827 /* Q_DLIS - DELETE_LIST */
2842 /* Q_AMTL - ADD_MEMBER_TO_LIST */
2843 "add_member_to_list",
2848 "list_id=%i4, member_type=%c, member_id=%i4",
2857 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
2858 "delete_member_from_list",
2866 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
2872 /* Q_GAUS - GET_ACE_USE */
2887 /* Q_QGLI - QUALIFIED_GET_LISTS */
2888 "qualified_get_lists",
2902 /* Q_GMOL - GET_MEMBERS_OF_LIST */
2903 "get_members_of_list",
2917 /* Q_GLOM - GET_LISTS_OF_MEMBER */
2918 "get_lists_of_member",
2932 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
2933 "count_members_of_list",
2947 /* Q_AUGR - ADD_USER_GROUP */
2962 /* Q_GZCL - GET_ZEPHYR_CLASS */
2968 "%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",
2977 /* Q_AZCL - ADD_ZEPHYR_CLASS */
2983 "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",
2992 /* Q_UZCL - UPDATE_ZEPHYR_CLASS */
2993 "update_zephyr_class",
2998 "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",
3007 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
3008 "delete_zephyr_class",
3022 /* Q_GSVC - GET_SERVICE */
3028 "%c = s.name, %c = s.protocol, %c = text(s.port), %c = s.desc, %c = s.modtime, %c = text(s.modby), %c = s.modwith",
3037 /* Q_ASVC - ADD_SERVICE */
3043 "name = %c, protocol = %c, port = int2(%c), desc = %c",
3052 /* Q_DSVC - DELETE_SERVICE */
3067 /* Q_GPCP - GET_PRINTCAP */
3073 "%c = p.name, %c = p.pcap, %c = p.modtime, %c = text(p.modby), %c = p.modwith",
3082 /* Q_APCP - ADD_PRINTCAP */
3088 "name = %c, pcap = %c",
3097 /* Q_DPCP - DELETE_PRINTCAP */
3112 /* Q_GALI - GET_ALIAS */
3118 "%c = a.name, %c = a.type, %c = a.trans",
3121 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3127 /* Q_AALI - ADD_ALIAS */
3133 "name = %c, type = %c, trans = %c",
3142 /* Q_DALI - DELETE_ALIAS */
3151 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3157 /* Q_GVAL - GET_VALUE */
3163 "%c = text(v.value)",
3172 /* Q_AVAL - ADD_VALUE */
3178 "name = %c, value = int4(%c)",
3187 /* Q_UVAL - UPDATE_VALUE */
3202 /* Q_DVAL - DELETE_VALUE */
3217 /* Q_GATS - GET_ALL_TABLE_STATS */
3218 "get_all_table_stats",
3223 "%c = tbs.table, %c = text(tbs.retrieves), %c = text(tbs.appends), %c = text(tbs.updates), %c = text(tbs.deletes), %c = tbs.modtime",
3233 int QueryCount2 = (sizeof Queries2 / sizeof (struct query));