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},
662 static struct validate acld_validate = /* ADD_CLUSTER_DATA */
663 { /* DELETE_CLUSTER_DATA */
667 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
672 set_cluster_modtime_by_id,
675 static char *gsin_fields[] = {
677 SERVICE, "update_int", "target_file", "script", "dfgen", "dfcheck",
678 TYPE, "enable", "inprogress", "harderror", "errmsg",
679 ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
682 static struct validate gsin_validate =
695 static char *qgsv_fields[] = {
696 "enable", "inprogress", "harderror",
700 static struct valobj qgsv_valobj[] = {
701 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
702 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
703 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
706 static struct validate qgsv_validate = {
715 qualified_get_server,
718 static char *asin_fields[] = {
719 SERVICE, "update_int", "target_file", "script", TYPE, "enable",
723 static struct valobj asin_valobj[] = {
725 {V_TYPE, 4, "service", 0, 0, SMS_TYPE},
726 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
727 {V_TYPEDATA, 7, 0, 0, 0, SMS_ACE},
730 static struct validate asin_validate = /* for asin, usin */
735 "s.name = uppercase(\"%s\")",
743 static struct validate rsve_validate = {
747 "s.name = uppercase(\"%s\")",
755 static char *ssif_fields[] = {
756 SERVICE, "dfgen", "dfcheck", "inprogress", "harderror", "errmsg",
759 static struct validate ssif_validate = {
763 "s.name = uppercase(\"%s\")",
771 static char *dsin_fields[] = {
775 static struct validate dsin_validate = {
779 "s.name = uppercase(\"%s\")",
787 static char *gshi_fields[] = {
789 SERVICE, MACHINE, "enable", "override", "success", "inprogress",
790 "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2",
791 "value3", MOD1, MOD2, MOD3,
794 static struct validate gshi_validate = {
806 static char *qgsh_fields[] = {
807 "service", "enable", "override", "success", "inprogress", "hosterror",
811 static struct valobj qgsh_valobj[] = {
812 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
813 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
814 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
815 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
816 {V_TYPE, 5, "boolean", 0, 0, SMS_TYPE},
819 static struct validate qgsh_validate = {
828 qualified_get_serverhost,
831 static char *ashi_fields[] = {
832 SERVICE, MACHINE, "enable", "value1", "value2", "value3",
835 static struct valobj ashi_valobj[] = {
836 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
837 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
840 static struct validate ashi_validate = /* ashi & ushi */
845 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
850 set_serverhost_modtime,
853 static struct validate rshe_validate =
858 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
863 set_serverhost_modtime,
866 static struct validate ssho_validate =
871 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
879 static char *sshi_fields[] = {
880 "service", MACHINE, "override", "success", "inprogress",
881 "hosterror", "errmsg", "ltt", "lts"
884 static struct valobj sshi_valobj[] = {
885 {V_NAME, 0, "servers", NAME, 0, SMS_SERVICE},
886 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
889 static struct validate sshi_validate =
894 "s.service = uppercase(\"%s\") and s.mach_id = %d",
902 static char *dshi_fields[] = {
906 static struct validate dshi_validate =
911 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
919 static char *gsha_fields[] = {
921 MACHINE, ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3,
924 static struct validate gsha_validate =
937 static char *asha_fields[] = {
938 MACHINE, ACE_TYPE, ACE_NAME,
941 static struct valobj asha_valobj[] = {
942 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
943 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
944 {V_TYPEDATA, 2, 0, 0, 0, SMS_ACE},
947 static struct validate asha_validate =
960 static char *gslo_fields[] = {
965 static char *gfsl_fields[] = {
967 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
968 "create", "lockertype", MOD1, MOD2, MOD3,
971 static char *gfsm_fields[] = {
973 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
974 "create", "lockertype", MOD1, MOD2, MOD3,
977 static struct validate gfsm_validate = {
989 static char *gfsn_fields[] = {
991 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
992 "create", "lockertype", MOD1, MOD2, MOD3,
995 static char *gfsg_fields[] = {
997 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
998 "create", "lockertype", MOD1, MOD2, MOD3,
1001 static struct validate gfsg_validate = {
1013 static char *afil_fields[] = {
1014 LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners",
1015 "create", "lockertype",
1018 static struct valobj afil_valobj[] = {
1020 {V_TYPE, 1, FILESYS, 0, 0, SMS_FSTYPE},
1021 {V_ID, 2, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1023 {V_ID, 7, USERS, LOGIN, USERS_ID, SMS_USER},
1024 {V_ID, 8, LIST, NAME, LIST_ID, SMS_LIST},
1025 {V_TYPE, 10, "lockertype", 0, 0, SMS_TYPE}
1028 static struct validate afil_validate = {
1032 "fs.label = \"%s\"",
1037 set_filesys_modtime,
1040 static char *ufil_fields[] = {
1041 LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments",
1042 "owner", "owners", "create", "lockertype",
1045 static struct valobj ufil_valobj[] = {
1046 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1047 {V_RENAME, 1, FILESYS, LABEL, FILSYS_ID, SMS_NOT_UNIQUE},
1048 {V_TYPE, 2, FILESYS, 0, 0, SMS_FSTYPE},
1049 {V_ID, 3, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1051 {V_ID, 8, USERS, LOGIN, USERS_ID, SMS_USER},
1052 {V_ID, 9, LIST, NAME, LIST_ID, SMS_LIST},
1053 {V_TYPE, 11, "lockertype", 0, 0, SMS_TYPE}
1056 static struct validate ufil_validate = {
1060 "fs.filsys_id = %d",
1065 set_filesys_modtime,
1068 static char *dfil_fields[] = {
1072 static struct valobj dfil_valobj[] = {
1073 {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS},
1076 static struct validate dfil_validate = {
1080 "fs.filsys_id = %d",
1088 static char *ganf_fields[] = {
1089 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1092 static char *gnfp_fields[] = {
1094 MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3,
1097 static struct validate gnfp_validate = {
1109 static struct valobj anfp_valobj[] = {
1110 {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1114 static struct validate anfp_validate = {
1118 "np.mach_id = %d and np.dir = \"%s\"",
1123 set_nfsphys_modtime,
1126 static char *dnfp_fields[] = {
1130 static struct validate dnfp_validate = {
1134 "np.mach_id = %d and np.dir = \"%s\"",
1139 set_nfsphys_modtime,
1142 static char *gnfq_fields[] = {
1144 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1147 static struct valobj gnfq_valobj[] = {
1148 {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER},
1152 static struct validate gnfq_validate = {
1164 static char *gnqp_fields[] = {
1166 FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3,
1169 static char *anfq_fields[] = {
1170 FILESYS, LOGIN, "quota",
1173 static struct validate anfq_validate = {
1177 "nq.filsys_id = %d and nq.users_id = %d",
1185 static struct validate unfq_validate = {
1189 "nq.filsys_id = %d and nq.users_id = %d",
1197 static struct validate dnfq_validate = {
1201 "nq.filsys_id = %d and nq.users_id = %d",
1209 static char *glin_fields[] = {
1211 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1212 ACE_TYPE, ACE_NAME, DESC, MOD1, MOD2, MOD3,
1215 static struct validate glin_validate = {
1222 access_vis_list_by_name,
1227 static char *alis_fields[] = {
1228 NAME, "active", "public", "hidden", "maillist", "group", "gid",
1229 ACE_TYPE, ACE_NAME, DESC,
1232 static struct valobj alis_valobj[] = {
1234 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1235 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1238 static struct validate alis_validate = {
1250 static char *ulis_fields[] = {
1252 "newname", "active", "public", "hidden", "maillist", "group", "gid",
1253 ACE_TYPE, ACE_NAME, DESC,
1256 static struct valobj ulis_valobj[] = {
1257 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1258 {V_RENAME, 1, LIST, NAME, LIST_ID, SMS_NOT_UNIQUE},
1259 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1260 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1263 static struct validate ulis_validate = {
1275 static char *dlis_fields[] = {
1279 static struct validate dlis_validate = {
1291 static char *amtl_fields[] = {
1292 "list_name", "member_type", "member_name",
1295 static struct valobj amtl_valobj[] = {
1296 {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST},
1297 {V_TYPE, 1, "member", 0, 0, SMS_TYPE},
1298 {V_TYPEDATA, 2, 0, 0, 0, SMS_NO_MATCH},
1301 static struct validate amtl_validate = /* for amtl and dmfl */
1306 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
1314 static char *gaus_fields[] = {
1316 "use_type", "use_name",
1319 static struct valobj gaus_valobj[] = {
1320 {V_TYPE, 0, "gaus", 0, 0, SMS_TYPE},
1321 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1324 static struct validate gaus_validate = {
1336 static char *qgli_fields[] = {
1337 "active", "public", "hidden", "maillist", "group",
1341 static struct valobj qgli_valobj[] = {
1342 {V_TYPE, 0, "boolean", 0, 0, SMS_TYPE},
1343 {V_TYPE, 1, "boolean", 0, 0, SMS_TYPE},
1344 {V_TYPE, 2, "boolean", 0, 0, SMS_TYPE},
1345 {V_TYPE, 3, "boolean", 0, 0, SMS_TYPE},
1346 {V_TYPE, 4, "boolean", 0, 0, SMS_TYPE},
1349 static struct validate qgli_validate = {
1358 qualified_get_lists,
1361 static char *gmol_fields[] = {
1363 "member_type", "member_name",
1366 static struct validate gmol_validate = {
1373 access_visible_list,
1375 get_members_of_list,
1378 static char *glom_fields[] = {
1379 "member_type", "member_name",
1380 "list_name", "active", "public", "hidden", "maillist", "group",
1383 static struct valobj glom_valobj[] = {
1384 {V_TYPE, 0, "rmember", 0, 0, SMS_TYPE},
1385 {V_TYPEDATA, 1, 0, 0, 0, SMS_NO_MATCH},
1389 static struct validate glom_validate = {
1398 get_lists_of_member,
1401 static char *cmol_fields[] = {
1406 static struct validate cmol_validate = {
1413 access_visible_list,
1415 count_members_of_list,
1418 static char *augr_fields[] = {
1422 static struct validate augr_validate = {
1434 static char *gzcl_fields[] = {
1436 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1437 "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3,
1440 static struct validate gzcl_validate = {
1452 static char *azcl_fields[] = {
1453 CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name",
1454 "iws_type", "iws_name", "iui_type", "iui_name",
1457 static struct valobj azcl_valobj[] = {
1459 {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE},
1460 {V_TYPEDATA, 2, 0, 0, LIST_ID, SMS_ACE},
1461 {V_TYPE, 3, ACE_TYPE, 0, 0, SMS_ACE},
1462 {V_TYPEDATA, 4, 0, 0, LIST_ID, SMS_ACE},
1463 {V_TYPE, 5, ACE_TYPE, 0, 0, SMS_ACE},
1464 {V_TYPEDATA, 6, 0, 0, LIST_ID, SMS_ACE},
1465 {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE},
1466 {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE},
1469 static struct validate azcl_validate = {
1481 static char *uzcl_fields[] = {
1482 CLASS, "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name",
1483 "iws_type", "iws_name", "iui_type", "iui_name",
1486 static struct valobj uzcl_valobj[] = {
1487 {V_RENAME, 1, "zephyr", CLASS, 0, SMS_NOT_UNIQUE},
1488 {V_TYPE, 2, ACE_TYPE, 0, 0, SMS_ACE},
1489 {V_TYPEDATA, 3, 0, 0, LIST_ID, SMS_ACE},
1490 {V_TYPE, 4, ACE_TYPE, 0, 0, SMS_ACE},
1491 {V_TYPEDATA, 5, 0, 0, LIST_ID, SMS_ACE},
1492 {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE},
1493 {V_TYPEDATA, 7, 0, 0, LIST_ID, SMS_ACE},
1494 {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE},
1495 {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE},
1498 static struct validate uzcl_validate = {
1510 static struct validate dzcl_validate = {
1522 static char *gasv_fields[] = {
1523 SERVICE, "protocol", "port", DESC,
1526 static char *gpcp_fields[] = {
1528 "printer", "spooling_host", "spool_directory", "rprinter", "comments",
1532 static char *apcp_fields[] = {
1533 "printer", "spooling_host", "spool_directory", "rprinter", "comments",
1537 static struct valobj apcp_valobj[] = {
1539 {V_ID, 1, MACHINE, NAME, MACH_ID, SMS_MACHINE},
1542 static struct validate apcp_validate = {
1554 static struct validate dpcp_validate = {
1566 static char *gali_fields[] = {
1567 NAME, TYPE, "trans",
1568 NAME, TYPE, "trans",
1571 static char *aali_fields[] = {
1572 NAME, TYPE, "trans",
1575 static struct valobj aali_valobj[] = {
1577 {V_TYPE, 1, "alias", 0, 0, SMS_TYPE},
1581 static struct validate aali_validate = {
1585 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1593 static struct validate dali_validate = /* DELETE_ALIAS */
1598 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
1606 static char *gval_fields[] = {
1610 static struct valobj gval_valobj[] = {
1611 {V_NAME, 0, "values", NAME, 0, SMS_NO_MATCH},
1614 static struct validate gval_validate = {
1626 static char *aval_fields[] = {
1630 static struct validate aval_validate = /* for aval, uval, and dval */
1643 static char *dval_fields[] = {
1647 static char *gats_fields[] = {
1648 "table", "retrieves", "appends", "updates", "deletes", MOD1, MOD2, MOD3,
1653 /* Generalized Query Definitions */
1655 struct query Queries2[] = {
1657 /* Q_GALO - GET_ALL_LOGINS */
1663 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1672 /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */
1673 "get_all_active_logins",
1678 "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle",
1687 /* Q_GUBL - GET_USER_BY_LOGIN */
1688 "get_user_by_login",
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.login = \"%s\" and u.users_id != 0",
1702 /* Q_GUBU - GET_USER_BY_UID */
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.uid = %s and u.users_id != 0",
1717 /* Q_GUBN - GET_USER_BY_NAME */
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.first = \"%s\" and u.last = \"%s\" and u.users_id != 0",
1732 /* Q_GUBC - GET_USER_BY_CLASS */
1733 "get_user_by_class",
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_year = uppercase(\"%s\") and u.users_id != 0",
1747 /* Q_GUBM - GET_USER_BY_MITID */
1748 "get_user_by_mitid",
1753 "%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",
1756 "u.mit_id = \"%s\" and u.users_id != 0",
1762 /* Q_AUSR - ADD_USER */
1768 "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",
1771 "values.name = \"users_id\"",
1777 /* Q_RUSR - REGISTER_USER */
1792 /* Q_UUSR - UPDATE_USER */
1798 "login = %c, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c",
1807 /* Q_UUSH - UPDATE_USER_SHELL */
1808 "update_user_shell",
1822 /* Q_UUST - UPDATE_USER_STATUS */
1823 "update_user_status",
1828 "status = int4(%c)",
1837 /* Q_DUSR - DELETE_USER */
1852 /* Q_DUBU - DELETE_USER_BY_UID */
1853 "delete_user_by_uid",
1867 /* Q_GFBL - GET_FINGER_BY_LOGIN */
1868 "get_finger_by_login",
1873 "%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",
1882 /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */
1883 "update_finger_by_login",
1888 "fullname=%c,nickname=%c,home_addr=%c,home_phone=%c,office_addr=%c,office_phone=%c,mit_dept=%c,mit_affil=%c",
1897 /* Q_GPOB - GET_POBOX */
1903 "%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",
1912 /* Q_GAPO - GET_ALL_POBOXES */
1918 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1921 "u.potype != \"NONE\"",
1927 /* Q_GPOP - GET_POBOXES_POP */
1933 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1936 "u.potype = \"POP\"",
1942 /* Q_GPOF - GET_POBOXES_SMTP */
1948 "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)",
1951 "u.potype = \"SMTP\"",
1957 /* Q_SPOB - SET_POBOX */
1972 /* Q_SPOP - SET_POBOX_POP */
1987 /* Q_DPOB - DELETE_POBOX */
1993 "potype = \"NONE\"",
2002 /* Q_GMAC - GET_MACHINE */
2008 "%c = m.name, %c = m.type, %c = m.modtime, %c = text(m.modby), %c =m.modwith",
2011 "m.name = uppercase(\"%s\") and m.mach_id != 0",
2017 /* Q_AMAC - ADD_MACHINE */
2023 "name = uppercase(%c), mach_id = values.value, type = %c",
2026 "values.name = \"mach_id\"",
2032 /* Q_UMAC - UPDATE_MACHINE */
2038 "name = uppercase(%c), type = %c",
2047 /* Q_DMAC - DELETE_MACHINE */
2062 /* Q_GCLU - GET_CLUSTER */
2068 "%c = c.name, %c = c.desc, %c = c.location, %c = c.modtime, %c = text(c.modby), %c = c.modwith",
2071 "c.name = \"%s\" and c.clu_id != 0",
2077 /* Q_ACLU - ADD_CLUSTER */
2083 "name = %c, clu_id = values.value, desc = %c, location = %c",
2086 "values.name = \"clu_id\"",
2092 /* Q_UCLU - UPDATE_CLUSTER */
2098 "name = %c, desc = %c, location = %c",
2107 /* Q_DCLU - DELETE_CLUSTER */
2122 /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */
2123 "get_machine_to_cluster_map",
2128 "%c = machine.name, %c = cluster.name",
2131 "machine.name = uppercase(\"%s\") and cluster.name = \"%s\" and m.clu_id = cluster.clu_id and m.mach_id = machine.mach_id",
2137 /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */
2138 "add_machine_to_cluster",
2143 "mach_id = %i4, clu_id = %i4",
2152 /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */
2153 "delete_machine_from_cluster",
2161 "m.mach_id = %d and m.clu_id = %d",
2167 /* Q_GCLD - GET_CLUSTER_DATA */
2173 "%c = cluster.name, %c = s.serv_label, %c = s.serv_cluster",
2176 "cluster.clu_id = s.clu_id and cluster.name = \"%s\" and s.serv_label = \"%s\"",
2182 /* Q_ACLD - ADD_CLUSTER_DATA */
2188 "clu_id = %i4, serv_label = %c, serv_cluster = %c",
2197 /* Q_DCLD - DELETE_CLUSTER_DATA */
2198 "delete_cluster_data",
2206 "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"",
2212 /* Q_GSIN - GET_SERVER_INFO */
2218 "%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",
2221 "s.name = uppercase(\"%s\")",
2227 /* Q_QGSV - QUALIFIED_GET_SERVER */
2228 "qualified_get_server",
2242 /* Q_ASIN - ADD_SERVER_INFO */
2248 "name = uppercase(%c), update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2257 /* Q_USIN - UPDATE_SERVER_INFO */
2258 "update_server_info",
2263 "update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4",
2266 "s.name = uppercase(\"%s\")",
2272 /* Q_RSVE - RESET_SERVER_ERROR */
2273 "reset_server_error",
2278 "harderror = 0, dfcheck = s.dfgen",
2281 "s.name = uppercase(\"%s\")",
2287 /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */
2288 "set_server_internal_flags",
2293 "dfgen = int4(%c), dfcheck = int4(%c), inprogress = int1(%c), harderror = int1(%c), errmsg = %c",
2296 "s.name = uppercase(\"%s\")",
2302 /* Q_DSIN - DELETE_SERVER_INFO */
2303 "delete_server_info",
2311 "s.name = uppercase(\"%s\")",
2317 /* Q_GSHI - GET_SERVER_HOST_INFO */
2318 "get_server_host_info",
2323 "%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",
2326 "sh.service = uppercase(\"%s\") and machine.name = uppercase(\"%s\") and machine.mach_id = sh.mach_id",
2332 /* Q_QGSV - QUALIFIED_GET_SERVER_HOST */
2333 "qualified_get_server_host",
2347 /* Q_ASHI - ADD_SERVER_HOST_INFO */
2348 "add_server_host_info",
2353 "service = uppercase(%c), mach_id = %i4, enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2362 /* Q_USHI - UPDATE_SERVER_HOST_INFO */
2363 "update_server_host_info",
2368 "enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c",
2371 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2377 /* Q_RSHE - RESET_SERVER_HOST_ERROR */
2378 "reset_server_host_error",
2386 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2392 /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */
2393 "set_server_host_override",
2401 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2407 /* Q_SSHI - SET_SERVER_HOST_INTERNAL */
2408 "set_server_host_internal",
2413 "override = int1(%c), success = int1(%c), inprogress = int1(%c), hosterror = int1(%c), hosterrmsg = %c, ltt = int4(%c), lts = int4(%c)",
2416 "s.service = uppercase(\"%s\") and s.mach_id = %d",
2422 /* Q_DSHI - DELETE_SERVER_HOST_INFO */
2423 "delete_server_host_info",
2431 "sh.service = uppercase(\"%s\") and sh.mach_id = %d",
2437 /* Q_GSHA - GET_SERVER_HOST_ACCESS */
2438 "get_server_host_access",
2443 "%c = machine.name, %c = ha.acl_type, %c = text(ha.acl_id), %c = ha.modtime, %c = text(ha.modby), %c = ha.modwith",
2446 "machine.name = uppercase(\"%s\") and ha.mach_id = machine.mach_id",
2452 /* Q_ASHA - ADD_SERVER_HOST_ACCESS */
2453 "add_server_host_access",
2458 "mach_id = %i4, acl_type = %c, acl_id = %i4",
2467 /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */
2468 "update_server_host_access",
2473 "acl_type = %c, acl_id = %i4",
2482 /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */
2483 "delete_server_host_access",
2497 /* Q_GSLO - GET_SERVER_LOCATIONS */
2498 "get_server_locations",
2503 "%c = sh.service, %c = machine.name",
2506 "sh.service = uppercase(\"%s\") and sh.mach_id = machine.mach_id",
2512 /* Q_GFSL - GET_FILESYS_BY_LABEL */
2513 "get_filesys_by_label",
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.label = \"%s\" and fs.mach_id = machine.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2527 /* Q_GFSM - GET_FILESYS_BY_MACHINE */
2528 "get_filesys_by_machine",
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",
2542 /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */
2543 "get_filesys_by_nfsphys",
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.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\"",
2557 /* Q_GFSG - GET_FILESYS_BY_GROUP */
2558 "get_filesys_by_group",
2563 "%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",
2566 "fs.owners = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id",
2572 /* Q_AFIL - ADD_FILESYS */
2578 "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",
2581 "values.name = \"filsys_id\"",
2587 /* Q_UFIL - UPDATE_FILESYS */
2593 "label = %c, type = %c, mach_id = %i4, name = %c, mount = %c, access = %c, comments = %c, owner = %i4, owners = %i4, createflg = int1(%c), lockertype = %c",
2596 "fs.filsys_id = %d",
2602 /* Q_DFIL - DELETE_FILESYS */
2611 "fs.filsys_id = %d",
2617 /* Q_GANF - GET_ALL_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 "machine.mach_id = np.mach_id",
2632 /* Q_GNFP - GET_NFSPHYS */
2638 "%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",
2641 "np.mach_id = %d and np.dir = \"%s\" and machine.mach_id = np.mach_id",
2647 /* Q_ANFP - ADD_NFSPHYS */
2653 "nfsphys_id = values.value, mach_id = %i4, dir = %c, device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2656 "values.name = \"nfsphys_id\"",
2662 /* Q_UNFP - UPDATE_NFSPHYS */
2668 "device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)",
2671 "np.mach_id = %d and np.dir = \"%s\"",
2677 /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */
2678 "adjust_nfsphys_allocation",
2683 "allocated = np.allocated + int4(%c)",
2686 "np.mach_id = %d and np.dir = \"%s\"",
2692 /* Q_DNFP - DELETE_NFSPHYS */
2701 "np.mach_id = %d and np.dir = \"%s\"",
2707 /* Q_GNFQ - GET_NFS_QUOTAS */
2713 "%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",
2716 "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",
2722 /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */
2723 "get_nfs_quotas_by_partition",
2728 "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name",
2731 "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",
2737 /* Q_ANFQ - ADD_NFS_QUOTA */
2743 "filsys_id = filesys.filsys_id, users_id = %i4, quota = int4(%c), phys_id = filesys.phys_id",
2746 "filesys.filsys_id = %d",
2752 /* Q_UNFQ - UPDATE_NFS_QUOTA */
2761 "nq.filsys_id = %d and nq.users_id = %d",
2767 /* Q_DNFQ - DELETE_NFS_QUOTA */
2776 "nq.filsys_id = %d and nq.users_id = %d",
2782 /* Q_GLIN - GET_LIST_INFO */
2797 /* Q_EXLN - EXPAND_LIST_NAMES */
2798 "expand_list_names",
2806 "l.name = \"%s\" and l.list_id != 0",
2812 /* Q_ALIS - ADD_LIST */
2818 "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",
2821 "values.name = \"list_id\"",
2827 /* Q_ULIS - UPDATE_LIST */
2833 "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",
2842 /* Q_DLIS - DELETE_LIST */
2857 /* Q_AMTL - ADD_MEMBER_TO_LIST */
2858 "add_member_to_list",
2863 "list_id=%i4, member_type=%c, member_id=%i4",
2872 /* Q_DMFL - DELETE_MEMBER_FROM_LIST */
2873 "delete_member_from_list",
2881 "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d",
2887 /* Q_GAUS - GET_ACE_USE */
2902 /* Q_QGLI - QUALIFIED_GET_LISTS */
2903 "qualified_get_lists",
2917 /* Q_GMOL - GET_MEMBERS_OF_LIST */
2918 "get_members_of_list",
2932 /* Q_GLOM - GET_LISTS_OF_MEMBER */
2933 "get_lists_of_member",
2947 /* Q_CMOL - COUNT_MEMBERS_OF_LIST */
2948 "count_members_of_list",
2962 /* Q_AUGR - ADD_USER_GROUP */
2977 /* Q_GZCL - GET_ZEPHYR_CLASS */
2983 "%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",
2992 /* Q_AZCL - ADD_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_UZCL - UPDATE_ZEPHYR_CLASS */
3008 "update_zephyr_class",
3013 "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",
3022 /* Q_DZCL - DELETE_ZEPHYR_CLASS */
3023 "delete_zephyr_class",
3037 /* Q_GSVC - GET_SERVICE */
3043 "%c = s.name, %c = s.protocol, %c = text(s.port), %c = s.desc, %c = s.modtime, %c = text(s.modby), %c = s.modwith",
3052 /* Q_ASVC - ADD_SERVICE */
3058 "name = %c, protocol = %c, port = int2(%c), desc = %c",
3067 /* Q_DSVC - DELETE_SERVICE */
3082 /* Q_GPCP - GET_PRINTCAP */
3088 "%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",
3091 "p.name = \"%s\" and machine.mach_id = p.mach_id",
3097 /* Q_APCP - ADD_PRINTCAP */
3103 "name = %c, mach_id = %i4, dir = %c, rp = %c, comments = %c",
3112 /* Q_DPCP - DELETE_PRINTCAP */
3127 /* Q_GALI - GET_ALIAS */
3133 "%c = a.name, %c = a.type, %c = a.trans",
3136 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3142 /* Q_AALI - ADD_ALIAS */
3148 "name = %c, type = %c, trans = %c",
3157 /* Q_DALI - DELETE_ALIAS */
3166 "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"",
3172 /* Q_GVAL - GET_VALUE */
3178 "%c = text(v.value)",
3187 /* Q_AVAL - ADD_VALUE */
3193 "name = %c, value = int4(%c)",
3202 /* Q_UVAL - UPDATE_VALUE */
3217 /* Q_DVAL - DELETE_VALUE */
3232 /* Q_GATS - GET_ALL_TABLE_STATS */
3233 "get_all_table_stats",
3238 "%c = tbs.table, %c = text(tbs.retrieves), %c = text(tbs.appends), %c = text(tbs.updates), %c = text(tbs.deletes), %c = tbs.modtime",
3248 int QueryCount2 = (sizeof Queries2 / sizeof (struct query));