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 */
41 /* Query Followup Routines */
42 int followup_fix_modby();
53 int set_modtime_by_id();
54 int set_finger_modtime();
55 int set_pobox_modtime();
56 int set_mach_modtime();
57 int set_mach_modtime_by_id();
58 int set_cluster_modtime_by_id();
59 int set_serverhost_modtime();
60 int set_nfsphys_modtime();
61 int set_filesys_modtime();
62 int set_zephyr_modtime();
68 int qualified_get_lists();
69 int get_members_of_list();
70 int qualified_get_server();
71 int qualified_get_serverhost();
73 int count_members_of_list();
74 int get_lists_of_member();
81 * These are commonly used strings in the table, defined here so that
85 static char ACE_NAME[] = "ace_name";
86 static char ACE_TYPE[] = "ace_type";
87 static char CLASS[] = "class";
88 static char CLU_ID[] = "clu_id";
89 static char CLUSTER[] = "cluster";
90 static char DESC[] = "description";
91 static char DEVICE[] = "device";
92 static char DIR[] = "dir";
93 static char FILESYS[] = "filesys";
94 static char FILSYS_ID[] = "filsys_id";
95 static char FIRST[] = "firstname";
96 static char LABEL[] = "label";
97 static char LAST[] = "lastname";
98 static char LIST[] = "list";
99 static char LIST_ID[] = "list_id";
100 static char LOCATION[] = "location";
101 static char LOGIN[] = "login";
102 static char MACH_ID[] = "mach_id";
103 static char MACHINE[] = "machine";
104 static char MIDDLE[] = "middle";
105 static char MIT_ID[] = "mit_id";
106 static char MOD1[] = "modtime";
107 static char MOD2[] = "modby";
108 static char MOD3[] = "modwith";
109 static char NAME[] = "name";
110 static char SERVICE[] = "service";
111 static char SHELL[] = "shell";
112 static char STATUS[] = "status";
113 static char TYPE[] = "type";
114 static char USERS[] = "users";
115 static char USERS_ID[] = "users_id";
116 static char UID[] = "uid";
121 * These are commonly used validation objects, defined here so that they
125 static struct valobj VOsort0[] = {
126 {V_SORT, 0, 0, 0, 0, 0},
129 static struct valobj VOdate1[] = {
130 {V_DATE, 1, 0, 0, 0, SMS_DATE},
133 static struct valobj VOuser0[] = {
134 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
137 static struct valobj VOmach0[] = {
138 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
141 static struct valobj VOclu0[] = {
142 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
145 static struct valobj VOlist0[] = {
146 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
149 static struct valobj VOchar0[] = {
153 static struct valobj VOsort01[] = {
158 static struct valobj VOuser0sort[] = {
159 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
163 static struct valobj VOfilsys0user1[] = {
164 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
165 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
170 * Commonly used validation records defined here so that they may
174 static struct validate VDmach = { VOmach0, 1 };
175 static struct validate VDsort2= { VOsort01,2 };
176 static struct validate VDsortf = {
192 static char *galo_fields[] = {
193 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE,
196 static char *gubl_fields[] = {
198 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
199 MIT_ID, CLASS, MOD1, MOD2, MOD3
202 static struct validate gubx_validate = /* gubl, gubu */
215 static char *gubu_fields[] = {
217 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
218 MIT_ID, CLASS, MOD1, MOD2, MOD3,
221 static char *gubn_fields[] = {
223 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
224 MIT_ID, CLASS, MOD1, MOD2, MOD3,
227 static char *gubc_fields[] = {
229 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
230 MIT_ID, CLASS, MOD1, MOD2, MOD3,
233 static char *gubm_fields[] = {
235 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
236 MIT_ID, CLASS, MOD1, MOD2, MOD3,
239 static char *ausr_fields[] = {
240 LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
244 static struct valobj ausr_valobj[] = {
250 {V_TYPE, 8, CLASS, 0, 0, SMS_BAD_CLASS},
253 static struct validate ausr_validate = {
265 static char *rusr_fields[] = {
266 UID, LOGIN, "fs_type"
269 static struct validate rusr_validate = {
281 static char *uusr_fields[] = {
283 "newlogin", UID, SHELL, LAST, FIRST, MIDDLE, STATUS,
287 static struct valobj uusr_valobj[] = {
288 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
289 {V_RENAME, 1, USERS, LOGIN, USERS_ID, SMS_NOT_UNIQUE},
294 {V_TYPE, 9, CLASS, 0, 0, SMS_BAD_CLASS},
297 static struct validate uusr_validate = {
309 static char *uush_fields[] = {
314 static struct validate uush_validate = {
326 static char *uust_fields[] = {
331 static struct validate uust_validate = {
343 static char *dusr_fields[] = {
347 static struct validate dusr_validate = {
359 static char *dubu_fields[] = {
363 static struct valobj dubu_valobj[] = {
364 {V_ID, 0, USERS, UID, USERS_ID, SMS_USER}
367 static struct validate dubu_validate = {
379 static char *gfbl_fields[] = {
381 LOGIN, "fullname", "nickname", "home_addr",
382 "home_phone", "office_address", "office_phone", "mit_dept",
383 "mit_affil", MOD1, MOD2, MOD3,
386 static struct validate gfbl_validate = {
398 static char *ufbl_fields[] = {
400 "fullname", "nickname", "home_addr",
401 "home_phone", "office_address", "office_phone", "mit_dept",
405 static struct validate ufbl_validate = {
417 static char *gpob_fields[] = {
419 LOGIN, TYPE, "box", MOD1, MOD2, MOD3,
422 static struct validate gpob_validate = {
426 "u.potype != \"NONE\" and u.users_id=%d",
434 static char *gpox_fields[] = {
438 static struct validate gpox_validate = {
450 static char *spob_fields[] = {
454 static struct valobj spob_valobj[] = {
455 {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER},
456 {V_TYPE, 1, "pobox", 0, 0, SMS_TYPE},
459 static struct validate spob_validate = /* SET_POBOX */
472 static struct validate spop_validate = /* SET_POBOX_POP */
485 static struct validate dpob_validate = /* DELETE_POBOX */
498 static char *gmac_fields[] = {
500 NAME, TYPE, MOD1, MOD2, MOD3,
503 static char *amac_fields[] = {
507 static struct valobj amac_valobj[] = {
509 {V_TYPE, 1, "mac_type", 0, 0, SMS_TYPE},
512 static struct validate amac_validate = {
516 "m.name = uppercase(\"%s\")",
524 static char *umac_fields[] = {
529 static struct valobj umac_valobj[] = {
530 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
531 {V_RENAME, 1, MACHINE, NAME, MACH_ID, SMS_NOT_UNIQUE},
532 {V_TYPE, 2, "mac_type", 0, 0, SMS_TYPE},
535 static struct validate umac_validate = {
547 static char *dmac_fields[] = {
551 static struct validate dmac_validate = {
563 static char *gclu_fields[] = {
565 NAME, DESC, LOCATION, MOD1, MOD2, MOD3,
568 static char *aclu_fields[] = {
569 NAME, DESC, LOCATION,
572 static struct validate aclu_validate = /* for aclu */
585 static char *uclu_fields[] = {
587 "newname", DESC, LOCATION,
590 static struct valobj uclu_valobj[] = {
591 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
592 {V_RENAME, 1, CLUSTER, NAME, CLU_ID, SMS_NOT_UNIQUE},
595 static struct validate uclu_validate = {
607 static char *dclu_fields[] = {
611 static struct validate dclu_validate = {
623 static char *gmcm_fields[] = {
628 static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */
629 { /* DELETE_MACHINE_FROM_CLUSTER */
630 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
631 {V_ID, 1, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
634 static struct validate amtc_validate = /* for amtc and dmfc */
639 "m.mach_id = %d and m.clu_id = %d",
644 set_mach_modtime_by_id,
647 static char *gcld_fields[] = {
648 CLUSTER, "serv_label",
649 CLUSTER, "serv_label", "serv_cluster",
652 static char *acld_fields[] = {
653 CLUSTER, "serv_label", "serv_cluster",
656 static struct valobj acld_valobj[] =
658 {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER},
659 {V_TYPE, 1, "slabel", 0, 0, SMS_TYPE},
663 static struct validate acld_validate = /* ADD_CLUSTER_DATA */
664 { /* DELETE_CLUSTER_DATA */
668 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
673 set_cluster_modtime_by_id,
676 static char *gsin_fields[] = {
678 SERVICE, "update_int", "target_file", "script", "dfgen", "dfcheck",
679 TYPE, "enable", "inprogress", "harderror", "errmsg",
680 ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
683 static struct validate gsin_validate =
696 static char *qgsv_fields[] = {
697 "enable", "inprogress", "harderror",
701 static struct valobj qgsv_valobj[] = {
702 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
703 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
704 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
707 static struct validate qgsv_validate = {
716 qualified_get_server,
719 static char *asin_fields[] = {
720 SERVICE, "update_int", "target_file", "script", TYPE, "enable",
724 static struct valobj asin_valobj[] = {
726 {V_TYPE, 4, "service", 0, 0, SMS_TYPE},
727 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
728 {V_TYPEDATA, 7, 0, 0, 0, SMS_ACE},
731 static struct validate asin_validate = /* for asin, usin */
736 "s.name = uppercase(\"%s\")",
744 static struct validate rsve_validate = {
748 "s.name = uppercase(\"%s\")",
756 static char *ssif_fields[] = {
757 SERVICE, "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
760 static struct validate ssif_validate = {
764 "s.name = uppercase(\"%s\")",
772 static char *dsin_fields[] = {
776 static struct validate dsin_validate = {
780 "s.name = uppercase(\"%s\")",
788 static char *gshi_fields[] = {
790 SERVICE, MACHINE, "enable", "override", "success", "inprogress",
791 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
792 "value3", MOD1, MOD2, MOD3,
795 static struct validate gshi_validate = {
807 static char *qgsh_fields[] = {
808 "service", "enable", "override", "success", "inprogress", "hosterror",
812 static struct valobj qgsh_valobj[] = {
813 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
814 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
815 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
816 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
817 {V_TYPE, 5, "boolean", 0, 0, SMS_TYPE},
820 static struct validate qgsh_validate = {
829 qualified_get_serverhost,
832 static char *ashi_fields[] = {
833 SERVICE, MACHINE, "enable", "value1", "value2", "value3",
836 static struct valobj ashi_valobj[] = {
837 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
838 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
841 static struct validate ashi_validate = /* ashi & ushi */
846 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
851 set_serverhost_modtime,
854 static struct validate rshe_validate =
859 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
864 set_serverhost_modtime,
867 static struct validate ssho_validate =
872 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
880 static char *sshi_fields[] = {
881 "service", MACHINE, "override", "success", "inprogress",
882 "hosterror", "errmsg", "ltt", "lts"
885 static struct valobj sshi_valobj[] = {
886 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
887 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
890 static struct validate sshi_validate =
895 "s.service = uppercase(\"%s\") and s.mach_id = %d",
903 static char *dshi_fields[] = {
907 static struct validate dshi_validate =
912 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
920 static char *gsha_fields[] = {
922 MACHINE, ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
925 static struct validate gsha_validate =
938 static char *asha_fields[] = {
939 MACHINE, ACE_TYPE, ACE_NAME,
942 static struct valobj asha_valobj[] = {
943 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
944 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
945 {V_TYPEDATA, 2, 0, 0, 0, SMS_ACE},
948 static struct validate asha_validate =
961 static char *gslo_fields[] = {
966 static char *gfsl_fields[] = {
968 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
969 "create", "lockertype", MOD1, MOD2, MOD3,
972 static char *gfsm_fields[] = {
974 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
975 "create", "lockertype", MOD1, MOD2, MOD3,
978 static struct validate gfsm_validate = {
990 static char *gfsn_fields[] = {
992 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
993 "create", "lockertype", MOD1, MOD2, MOD3,
996 static char *gfsg_fields[] = {
998 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
999 "create", "lockertype", MOD1, MOD2, MOD3,
1002 static struct validate gfsg_validate = {
1014 static char *afil_fields[] = {
1015 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
1016 "create", "lockertype",
1019 static struct valobj afil_valobj[] = {
1021 {V_TYPE, 1, FILESYS, 0, 0, SMS_FSTYPE},
1022 {V_ID, 2, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1024 {V_ID, 7, USERS, LOGIN, USERS_ID, SMS_USER},
1025 {V_ID, 8, LIST, NAME, LIST_ID, SMS_LIST},
1026 {V_TYPE, 10, "lockertype", 0, 0, SMS_TYPE}
1029 static struct validate afil_validate = {
1033 "fs.label = \"%s\"",
1038 set_filesys_modtime,
1041 static char *ufil_fields[] = {
1042 LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments",
1043 "owner", "owners", "create", "lockertype",
1046 static struct valobj ufil_valobj[] = {
1047 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1048 {V_RENAME, 1, FILESYS, LABEL, FILSYS_ID, SMS_NOT_UNIQUE},
1049 {V_TYPE, 2, FILESYS, 0, 0, SMS_FSTYPE},
1050 {V_ID, 3, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1052 {V_ID, 8, USERS, LOGIN, USERS_ID, SMS_USER},
1053 {V_ID, 9, LIST, NAME, LIST_ID, SMS_LIST},
1054 {V_TYPE, 11, "lockertype", 0, 0, SMS_TYPE}
1057 static struct validate ufil_validate = {
1061 "fs.filsys_id = %d",
1066 set_filesys_modtime,
1069 static char *dfil_fields[] = {
1073 static struct valobj dfil_valobj[] = {
1074 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1077 static struct validate dfil_validate = {
1081 "fs.filsys_id = %d",
1089 static char *ganf_fields[] = {
1090 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1093 static char *gnfp_fields[] = {
1095 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1098 static struct validate gnfp_validate = {
1110 static struct valobj anfp_valobj[] = {
1111 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1115 static struct validate anfp_validate = {
1119 "np.mach_id = %d and np.dir = \"%s\"",
1124 set_nfsphys_modtime,
1127 static char *dnfp_fields[] = {
1131 static struct validate dnfp_validate = {
1135 "np.mach_id = %d and np.dir = \"%s\"",
1140 set_nfsphys_modtime,
1143 static char *gnfq_fields[] = {
1145 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1148 static struct valobj gnfq_valobj[] = {
1149 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
1153 static struct validate gnfq_validate = {
1165 static char *gnqp_fields[] = {
1167 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1170 static char *anfq_fields[] = {
1171 FILESYS, LOGIN, "quota",
1174 static struct validate anfq_validate = {
1178 "nq.filsys_id = %d and nq.users_id = %d",
1186 static struct validate unfq_validate = {
1190 "nq.filsys_id = %d and nq.users_id = %d",
1198 static struct validate dnfq_validate = {
1202 "nq.filsys_id = %d and nq.users_id = %d",
1210 static char *glin_fields[] = {
1212 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1213 ACE_TYPE, ACE_NAME, DESC, MOD1, MOD2, MOD3,
1216 static struct validate glin_validate = {
1223 access_vis_list_by_name,
1228 static char *alis_fields[] = {
1229 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1230 ACE_TYPE, ACE_NAME, DESC,
1233 static struct valobj alis_valobj[] = {
1235 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1236 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1239 static struct validate alis_validate = {
1251 static char *ulis_fields[] = {
1253 "newname", "active", "public", "hidden", "maillist", "group", "gid",
1254 ACE_TYPE, ACE_NAME, DESC,
1257 static struct valobj ulis_valobj[] = {
1258 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1259 {V_RENAME, 1, LIST, NAME, LIST_ID, SMS_NOT_UNIQUE},
1260 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1261 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1264 static struct validate ulis_validate = {
1276 static char *dlis_fields[] = {
1280 static struct validate dlis_validate = {
1292 static char *amtl_fields[] = {
1293 "list_name", "member_type", "member_name",
1296 static struct valobj amtl_valobj[] = {
1297 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1298 {V_TYPE, 1, "member", 0, 0, SMS_TYPE},
1299 {V_TYPEDATA, 2, 0, 0, 0, SMS_NO_MATCH},
1302 static struct validate amtl_validate = /* for amtl and dmfl */
1307 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
1315 static char *gaus_fields[] = {
1317 "use_type", "use_name",
1320 static struct valobj gaus_valobj[] = {
1321 {V_TYPE, 0, "gaus", 0, 0, SMS_TYPE},
1322 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1325 static struct validate gaus_validate = {
1337 static char *qgli_fields[] = {
1338 "active", "public", "hidden", "maillist", "group",
1342 static struct valobj qgli_valobj[] = {
1343 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
1344 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
1345 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
1346 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
1347 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
1350 static struct validate qgli_validate = {
1359 qualified_get_lists,
1362 static char *gmol_fields[] = {
1364 "member_type", "member_name",
1367 static struct validate gmol_validate = {
1374 access_visible_list,
1376 get_members_of_list,
1379 static char *glom_fields[] = {
1380 "member_type", "member_name",
1381 "list_name", "active", "public", "hidden", "maillist", "group",
1384 static struct valobj glom_valobj[] = {
1385 {V_TYPE, 0, "rmember", 0, 0, SMS_TYPE},
1386 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1390 static struct validate glom_validate = {
1399 get_lists_of_member,
1402 static char *cmol_fields[] = {
1407 static struct validate cmol_validate = {
1414 access_visible_list,
1416 count_members_of_list,
1419 static char *augr_fields[] = {
1423 static struct validate augr_validate = {
1435 static char *gzcl_fields[] = {
1437 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1438 "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3,
1441 static struct validate gzcl_validate = {
1453 static char *azcl_fields[] = {
1454 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1455 "iws_type", "iws_name", "iui_type", "iui_name",
1458 static struct valobj azcl_valobj[] = {
1460 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
1461 {V_TYPEDATA, 2, 0, 0, LIST_ID, SMS_ACE},
1462 {V_TYPE, 3, ACE_TYPE, 0, 0, SMS_ACE},
1463 {V_TYPEDATA, 4, 0, 0, LIST_ID, SMS_ACE},
1464 {V_TYPE, 5, ACE_TYPE, 0, 0, SMS_ACE},
1465 {V_TYPEDATA, 6, 0, 0, LIST_ID, SMS_ACE},
1466 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1467 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1470 static struct validate azcl_validate = {
1482 static char *uzcl_fields[] = {
1483 CLASS, "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
1484 "iws_type", "iws_name", "iui_type", "iui_name",
1487 static struct valobj uzcl_valobj[] = {
1488 {V_RENAME, 1, "zephyr", CLASS, 0, SMS_NOT_UNIQUE},
1489 {V_TYPE, 2, ACE_TYPE, 0, 0, SMS_ACE},
1490 {V_TYPEDATA, 3, 0, 0, LIST_ID, SMS_ACE},
1491 {V_TYPE, 4, ACE_TYPE, 0, 0, SMS_ACE},
1492 {V_TYPEDATA, 5, 0, 0, LIST_ID, SMS_ACE},
1493 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
1494 {V_TYPEDATA, 7, 0, 0, LIST_ID, SMS_ACE},
1495 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1496 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1499 static struct validate uzcl_validate = {
1511 static struct validate dzcl_validate = {
1523 static char *gasv_fields[] = {
1524 SERVICE, "protocol", "port", DESC,
1527 static char *gpcp_fields[] = {
1529 "printer", "printcap", MOD1, MOD2, MOD3,
1532 static char *apcp_fields[] = {
1533 "printer", "printcap", MOD1, MOD2, MOD3,
1536 static struct validate apcp_validate = {
1548 static char *gali_fields[] = {
1549 NAME, TYPE, "trans",
1550 NAME, TYPE, "trans",
1553 static char *aali_fields[] = {
1554 NAME, TYPE, "trans",
1557 static struct valobj aali_valobj[] = {
1559 {V_TYPE, 1, "alias", 0, 0, SMS_TYPE},
1563 static struct validate aali_validate = {
1567 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1575 static struct validate dali_validate = /* DELETE_ALIAS */
1580 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1588 static char *gval_fields[] = {
1592 static struct valobj gval_valobj[] = {
1593 {V_NAME, 0, "values", NAME, 0, SMS_NO_MATCH},
1596 static struct validate gval_validate = {
1608 static char *aval_fields[] = {
1612 static struct validate aval_validate = /* for aval, uval, and dval */
1625 static char *dval_fields[] = {
1629 static char *gats_fields[] = {
1630 "table", "retrieves", "appends", "updates", "deletes", MOD1, MOD2, MOD3,
1635 /* Generalized Query Definitions */
1637 struct query Queries2[] = {
1639 /* Q_GALO - GET_ALL_LOGINS */
1645 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1654 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
1655 "get_all_active_logins",
1660 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1669 /* Q_GUBL - GET_USER_BY_LOGIN */
1670 "get_user_by_login",
1675 "%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",
1678 "u.login = \"%s\" and u.users_id != 0",
1684 /* Q_GUBU - GET_USER_BY_UID */
1690 "%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",
1693 "u.uid = %s and u.users_id != 0",
1699 /* Q_GUBN - GET_USER_BY_NAME */
1705 "%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",
1708 "u.first = \"%s\" and u.last = \"%s\" and u.users_id != 0",
1714 /* Q_GUBC - GET_USER_BY_CLASS */
1715 "get_user_by_class",
1720 "%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",
1723 "u.mit_year = uppercase(\"%s\") and u.users_id != 0",
1729 /* Q_GUBM - GET_USER_BY_MITID */
1730 "get_user_by_mitid",
1735 "%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",
1738 "u.mit_id = \"%s\" and u.users_id != 0",
1744 /* Q_AUSR - ADD_USER */
1750 "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",
1753 "values.name = \"users_id\"",
1759 /* Q_RUSR - REGISTER_USER */
1774 /* Q_UUSR - UPDATE_USER */
1780 "login = %c, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c",
1789 /* Q_UUSH - UPDATE_USER_SHELL */
1790 "update_user_shell",
1804 /* Q_UUST - UPDATE_USER_STATUS */
1805 "update_user_status",
1810 "status = int4(%c)",
1819 /* Q_DUSR - DELETE_USER */
1834 /* Q_DUBU - DELETE_USER_BY_UID */
1835 "delete_user_by_uid",
1849 /* Q_GFBL - GET_FINGER_BY_LOGIN */
1850 "get_finger_by_login",
1855 "%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",
1864 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
1865 "update_finger_by_login",
1870 "fullname=%c,nickname=%c,home_addr=%c,home_phone=%c,office_addr=%c,office_phone=%c,mit_dept=%c,mit_affil=%c",
1879 /* Q_GPOB - GET_POBOX */
1885 "%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",
1894 /* Q_GAPO - GET_ALL_POBOXES */
1900 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1903 "u.potype != \"NONE\"",
1909 /* Q_GPOP - GET_POBOXES_POP */
1915 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1918 "u.potype = \"POP\"",
1924 /* Q_GPOF - GET_POBOXES_SMTP */
1930 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1933 "u.potype = \"SMTP\"",
1939 /* Q_SPOB - SET_POBOX */
1954 /* Q_SPOP - SET_POBOX_POP */
1969 /* Q_DPOB - DELETE_POBOX */
1975 "potype = \"NONE\"",
1984 /* Q_GMAC - GET_MACHINE */
1990 "%c = m.name, %c = m.type, %c = m.modtime, %c = text(m.modby), %c =m.modwith",
1993 "m.name = uppercase(\"%s\") and m.mach_id != 0",
1999 /* Q_AMAC - ADD_MACHINE */
2005 "name = uppercase(%c), mach_id = values.value, type = %c",
2008 "values.name = \"mach_id\"",
2014 /* Q_UMAC - UPDATE_MACHINE */
2020 "name = uppercase(%c), type = %c",
2029 /* Q_DMAC - DELETE_MACHINE */
2044 /* Q_GCLU - GET_CLUSTER */
2050 "%c = c.name, %c = c.desc, %c = c.location, %c = c.modtime, %c = text(c.modby), %c = c.modwith",
2053 "c.name = \"%s\" and c.clu_id != 0",
2059 /* Q_ACLU - ADD_CLUSTER */
2065 "name = %c, clu_id = values.value, desc = %c, location = %c",
2068 "values.name = \"clu_id\"",
2074 /* Q_UCLU - UPDATE_CLUSTER */
2080 "name = %c, desc = %c, location = %c",
2089 /* Q_DCLU - DELETE_CLUSTER */
2104 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
2105 "get_machine_to_cluster_map",
2110 "%c = machine.name, %c = cluster.name",
2113 "machine.name = uppercase(\"%s\") and cluster.name = \"%s\" and m.clu_id = cluster.clu_id and m.mach_id = machine.mach_id",
2119 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
2120 "add_machine_to_cluster",
2125 "mach_id = %i4, clu_id = %i4",
2134 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
2135 "delete_machine_from_cluster",
2143 "m.mach_id = %d and m.clu_id = %d",
2149 /* Q_GCLD - GET_CLUSTER_DATA */
2155 "%c = cluster.name, %c = s.serv_label, %c = s.serv_cluster",
2158 "cluster.clu_id = s.clu_id and cluster.name = \"%s\" and s.serv_label = \"%s\"",
2164 /* Q_ACLD - ADD_CLUSTER_DATA */
2170 "clu_id = %i4, serv_label = %c, serv_cluster = %c",
2179 /* Q_DCLD - DELETE_CLUSTER_DATA */
2180 "delete_cluster_data",
2188 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
2194 /* Q_GSIN - GET_SERVER_INFO */
2200 "%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",
2203 "s.name = uppercase(\"%s\")",
2209 /* Q_QGSV - QUALIFIED_GET_SERVER */
2210 "qualified_get_server",
2224 /* Q_ASIN - ADD_SERVER_INFO */
2230 "name = uppercase(%c), update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2239 /* Q_USIN - UPDATE_SERVER_INFO */
2240 "update_server_info",
2245 "update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2248 "s.name = uppercase(\"%s\")",
2254 /* Q_RSVE - RESET_SERVER_ERROR */
2255 "reset_server_error",
2260 "harderror = 0, dfcheck = s.dfgen",
2263 "s.name = uppercase(\"%s\")",
2269 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
2270 "set_server_internal_flags",
2275 "dfgen = int4(%c), dfcheck = int4(%c), inprogress = int1(%c), harderror = int1(%c), errmsg = %c",
2278 "s.name = uppercase(\"%s\")",
2284 /* Q_DSIN - DELETE_SERVER_INFO */
2285 "delete_server_info",
2293 "s.name = uppercase(\"%s\")",
2299 /* Q_GSHI - GET_SERVER_HOST_INFO */
2300 "get_server_host_info",
2305 "%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",
2308 "sh.service = uppercase(\"%s\") and machine.name = uppercase(\"%s\") and machine.mach_id = sh.mach_id",
2314 /* Q_QGSV - QUALIFIED_GET_SERVER_HOST */
2315 "qualified_get_server_host",
2329 /* Q_ASHI - ADD_SERVER_HOST_INFO */
2330 "add_server_host_info",
2335 "service = uppercase(%c), mach_id = %i4, enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2344 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
2345 "update_server_host_info",
2350 "enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2353 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2359 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
2360 "reset_server_host_error",
2368 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2374 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
2375 "set_server_host_override",
2383 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2389 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
2390 "set_server_host_internal",
2395 "override = int1(%c), success = int1(%c), inprogress = int1(%c), hosterror = int1(%c), hosterrmsg = %c, ltt = int4(%c), lts = int4(%c)",
2398 "s.service = uppercase(\"%s\") and s.mach_id = %d",
2404 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
2405 "delete_server_host_info",
2413 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2419 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
2420 "get_server_host_access",
2425 "%c = machine.name, %c = ha.acl_type, %c = text(ha.acl_id), %c = ha.modtime, %c = text(ha.modby), %c = ha.modwith",
2428 "machine.name = uppercase(\"%s\") and ha.mach_id = machine.mach_id",
2434 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
2435 "add_server_host_access",
2440 "mach_id = %i4, acl_type = %c, acl_id = %i4",
2449 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
2450 "update_server_host_access",
2455 "acl_type = %c, acl_id = %i4",
2464 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
2465 "delete_server_host_access",
2479 /* Q_GSLO - GET_SERVER_LOCATIONS */
2480 "get_server_locations",
2485 "%c = sh.service, %c = machine.name",
2488 "sh.service = uppercase(\"%s\") and sh.mach_id = machine.mach_id",
2494 /* Q_GFSL - GET_FILESYS_BY_LABEL */
2495 "get_filesys_by_label",
2500 "%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",
2503 "fs.label = \"%s\" and fs.mach_id = machine.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2509 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
2510 "get_filesys_by_machine",
2515 "%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",
2518 "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2524 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
2525 "get_filesys_by_nfsphys",
2530 "%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",
2533 "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\"",
2539 /* Q_GFSG - GET_FILESYS_BY_GROUP */
2540 "get_filesys_by_group",
2545 "%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",
2548 "fs.owners = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2554 /* Q_AFIL - ADD_FILESYS */
2560 "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",
2563 "values.name = \"filsys_id\"",
2569 /* Q_UFIL - UPDATE_FILESYS */
2575 "label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c",
2578 "fs.filsys_id = %d",
2584 /* Q_DFIL - DELETE_FILESYS */
2593 "fs.filsys_id = %d",
2599 /* Q_GANF - GET_ALL_NFSPHYS */
2605 "%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",
2608 "machine.mach_id = np.mach_id",
2614 /* Q_GNFP - GET_NFSPHYS */
2620 "%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",
2623 "np.mach_id = %d and np.dir = \"%s\" and machine.mach_id = np.mach_id",
2629 /* Q_ANFP - ADD_NFSPHYS */
2635 "nfsphys_id = values.value, mach_id = %i4, dir = %c, device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2638 "values.name = \"nfsphys_id\"",
2644 /* Q_UNFP - UPDATE_NFSPHYS */
2650 "device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2653 "np.mach_id = %d and np.dir = \"%s\"",
2659 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
2660 "adjust_nfsphys_allocation",
2665 "allocated = np.allocated + int4(%c)",
2668 "np.mach_id = %d and np.dir = \"%s\"",
2674 /* Q_DNFP - DELETE_NFSPHYS */
2683 "np.mach_id = %d and np.dir = \"%s\"",
2689 /* Q_GNFQ - GET_NFS_QUOTAS */
2695 "%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",
2698 "filesys.label = \"%s\" and nq.users_id = %d and filesys.filsys_id = nq.filsys_id and nfsphys.nfsphys_id = filesys.phys_id and machine.mach_id = filesys.mach_id and users.users_id = nq.users_id",
2704 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
2705 "get_nfs_quotas_by_partition",
2710 "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name",
2713 "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",
2719 /* Q_ANFQ - ADD_NFS_QUOTA */
2725 "filsys_id = %i4, users_id = %i4, quota = int4(%c)",
2734 /* Q_UNFQ - UPDATE_NFS_QUOTA */
2743 "nq.filsys_id = %d and nq.users_id = %d",
2749 /* Q_DNFQ - DELETE_NFS_QUOTA */
2758 "nq.filsys_id = %d and nq.users_id = %d",
2764 /* Q_GLIN - GET_LIST_INFO */
2779 /* Q_EXLN - EXPAND_LIST_NAMES */
2780 "expand_list_names",
2788 "l.name = \"%s\" and l.list_id != 0",
2794 /* Q_ALIS - ADD_LIST */
2800 "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",
2803 "values.name = \"list_id\"",
2809 /* Q_ULIS - UPDATE_LIST */
2815 "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 /* Q_DLIS - DELETE_LIST */
2839 /* Q_AMTL - ADD_MEMBER_TO_LIST */
2840 "add_member_to_list",
2845 "list_id=%i4, member_type=%c, member_id=%i4",
2854 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
2855 "delete_member_from_list",
2863 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
2869 /* Q_GAUS - GET_ACE_USE */
2884 /* Q_QGLI - QUALIFIED_GET_LISTS */
2885 "qualified_get_lists",
2899 /* Q_GMOL - GET_MEMBERS_OF_LIST */
2900 "get_members_of_list",
2914 /* Q_GLOM - GET_LISTS_OF_MEMBER */
2915 "get_lists_of_member",
2929 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
2930 "count_members_of_list",
2944 /* Q_AUGR - ADD_USER_GROUP */
2959 /* Q_GZCL - GET_ZEPHYR_CLASS */
2965 "%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",
2974 /* Q_AZCL - ADD_ZEPHYR_CLASS */
2980 "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",
2989 /* Q_UZCL - UPDATE_ZEPHYR_CLASS */
2990 "update_zephyr_class",
2995 "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",
3004 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
3005 "delete_zephyr_class",
3019 /* Q_GSVC - GET_SERVICE */
3025 "%c = s.name, %c = s.protocol, %c = text(s.port), %c = s.desc, %c = s.modtime, %c = text(s.modby), %c = s.modwith",
3034 /* Q_ASVC - ADD_SERVICE */
3040 "name = %c, protocol = %c, port = int2(%c), desc = %c",
3049 /* Q_DSVC - DELETE_SERVICE */
3064 /* Q_GPCP - GET_PRINTCAP */
3070 "%c = p.name, %c = p.pcap, %c = p.modtime, %c = text(p.modby), %c = p.modwith",
3079 /* Q_APCP - ADD_PRINTCAP */
3085 "name = %c, pcap = %c",
3094 /* Q_DPCP - DELETE_PRINTCAP */
3109 /* Q_GALI - GET_ALIAS */
3115 "%c = a.name, %c = a.type, %c = a.trans",
3118 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3124 /* Q_AALI - ADD_ALIAS */
3130 "name = %c, type = %c, trans = %c",
3139 /* Q_DALI - DELETE_ALIAS */
3148 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3154 /* Q_GVAL - GET_VALUE */
3160 "%c = text(v.value)",
3169 /* Q_AVAL - ADD_VALUE */
3175 "name = %c, value = int4(%c)",
3184 /* Q_UVAL - UPDATE_VALUE */
3199 /* Q_DVAL - DELETE_VALUE */
3214 /* Q_GATS - GET_ALL_TABLE_STATS */
3215 "get_all_table_stats",
3220 "%c = tbs.table, %c = text(tbs.retrieves), %c = text(tbs.appends), %c = text(tbs.updates), %c = text(tbs.deletes), %c = tbs.modtime",
3230 int QueryCount2 = (sizeof Queries2 / sizeof (struct query));