]>
Commit | Line | Data |
---|---|---|
d33e787c | 1 | /* This file defines the query dispatch table for version 2 of the protocol |
2 | * | |
3 | * $Header$ | |
4 | * | |
5 | * Copyright 1987, 1988 by the Massachusetts Institute of Technology. | |
6 | */ | |
7 | ||
8 | #include "query.h" | |
9 | #include "sms_et.h" | |
10 | ||
11 | /* Specialized Support Query Routines */ | |
12 | ||
13 | /* Special Access Check Routines */ | |
14 | int access_user(); | |
15 | int access_login(); | |
16 | int access_list(); | |
17 | int access_visible_list(); | |
18 | int access_vis_list_by_name(); | |
19 | int access_member(); | |
20 | int access_qgli(); | |
21 | int access_service(); | |
22 | int access_filesys(); | |
23 | ||
24 | /* Query Setup Routines */ | |
25 | int setup_ausr(); | |
26 | int setup_dusr(); | |
27 | int setup_spop(); | |
28 | int setup_dpob(); | |
29 | int setup_dmac(); | |
30 | int setup_dclu(); | |
31 | int setup_alis(); | |
32 | int setup_dlis(); | |
33 | int setup_dsin(); | |
34 | int setup_dshi(); | |
35 | int setup_afil(); | |
36 | int setup_ufil(); | |
37 | int setup_dfil(); | |
d33e787c | 38 | int setup_dnfp(); |
39 | int setup_dnfq(); | |
40 | ||
41 | /* Query Followup Routines */ | |
42 | int followup_fix_modby(); | |
43 | int followup_ausr(); | |
44 | int followup_gpob(); | |
45 | int followup_glin(); | |
46 | int followup_amtl(); | |
47 | int followup_anfq(); | |
48 | int followup_gzcl(); | |
49 | int followup_gsha(); | |
7ac4c1b1 | 50 | int followup_gnfq(); |
d33e787c | 51 | |
52 | int set_modtime(); | |
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(); | |
63 | ||
64 | /* Special Queries */ | |
65 | int set_pobox(); | |
66 | int get_list_info(); | |
88343c5e | 67 | int get_ace_use(); |
d33e787c | 68 | int qualified_get_lists(); |
69 | int get_members_of_list(); | |
70 | int qualified_get_server(); | |
71 | int qualified_get_serverhost(); | |
72 | int trigger_dcm(); | |
73 | int count_members_of_list(); | |
74 | int get_lists_of_member(); | |
75 | int register_user(); | |
76 | int add_user_group(); | |
77 | ||
78 | ||
79 | \f | |
80 | /* String compression | |
81 | * These are commonly used strings in the table, defined here so that | |
82 | * they can be shared. | |
83 | */ | |
84 | ||
88343c5e | 85 | static char ACE_NAME[] = "ace_name"; |
86 | static char ACE_TYPE[] = "ace_type"; | |
d33e787c | 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"; | |
117 | ||
118 | ||
119 | ||
120 | /* VALOBJS | |
121 | * These are commonly used validation objects, defined here so that they | |
122 | * can be shared. | |
123 | */ | |
124 | ||
125 | static struct valobj VOsort0[] = { | |
126 | {V_SORT, 0, 0, 0, 0, 0}, | |
127 | }; | |
128 | ||
129 | static struct valobj VOdate1[] = { | |
130 | {V_DATE, 1, 0, 0, 0, SMS_DATE}, | |
131 | }; | |
132 | ||
133 | static struct valobj VOuser0[] = { | |
134 | {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER}, | |
135 | }; | |
136 | ||
137 | static struct valobj VOmach0[] = { | |
138 | {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
139 | }; | |
140 | ||
141 | static struct valobj VOclu0[] = { | |
142 | {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER}, | |
143 | }; | |
144 | ||
145 | static struct valobj VOlist0[] = { | |
146 | {V_ID, 0, LIST, NAME, LIST_ID, SMS_LIST}, | |
147 | }; | |
148 | ||
149 | static struct valobj VOchar0[] = { | |
150 | {V_CHAR, 0}, | |
151 | }; | |
152 | ||
153 | static struct valobj VOsort01[] = { | |
154 | {V_SORT, 1}, | |
155 | {V_SORT, 0}, | |
156 | }; | |
157 | ||
158 | static struct valobj VOuser0sort[] = { | |
159 | {V_ID, 0, USERS, LOGIN, USERS_ID, SMS_USER}, | |
160 | {V_SORT, 0}, | |
161 | }; | |
162 | ||
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}, | |
166 | }; | |
167 | ||
168 | ||
169 | /* Validations | |
170 | * Commonly used validation records defined here so that they may | |
171 | * be shared. | |
172 | */ | |
173 | ||
174 | static struct validate VDmach = { VOmach0, 1 }; | |
175 | static struct validate VDsort2= { VOsort01,2 }; | |
176 | static struct validate VDsortf = { | |
177 | VOsort0, | |
178 | 1, | |
179 | 0, | |
180 | 0, | |
181 | 0, | |
182 | 0, | |
183 | 0, | |
184 | 0, | |
185 | followup_fix_modby, | |
186 | }; | |
187 | ||
188 | ||
189 | \f | |
190 | /* Query data */ | |
191 | ||
192 | static char *galo_fields[] = { | |
193 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, | |
194 | }; | |
195 | ||
196 | static char *gubl_fields[] = { | |
197 | LOGIN, | |
198 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
199 | MIT_ID, CLASS, MOD1, MOD2, MOD3 | |
200 | }; | |
201 | ||
202 | static struct validate gubx_validate = /* gubl, gubu */ | |
203 | { | |
204 | VOsort0, | |
205 | 1, | |
206 | 0, | |
207 | 0, | |
208 | 0, | |
209 | 0, | |
210 | access_login, | |
211 | 0, | |
212 | followup_fix_modby, | |
213 | }; | |
214 | ||
215 | static char *gubu_fields[] = { | |
216 | UID, | |
217 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
218 | MIT_ID, CLASS, MOD1, MOD2, MOD3, | |
219 | }; | |
220 | ||
221 | static char *gubn_fields[] = { | |
222 | FIRST, LAST, | |
223 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
224 | MIT_ID, CLASS, MOD1, MOD2, MOD3, | |
225 | }; | |
226 | ||
227 | static char *gubc_fields[] = { | |
228 | CLASS, | |
229 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
230 | MIT_ID, CLASS, MOD1, MOD2, MOD3, | |
231 | }; | |
232 | ||
233 | static char *gubm_fields[] = { | |
234 | MIT_ID, | |
235 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
236 | MIT_ID, CLASS, MOD1, MOD2, MOD3, | |
237 | }; | |
238 | ||
239 | static char *ausr_fields[] = { | |
240 | LOGIN, UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
241 | MIT_ID, CLASS, | |
242 | }; | |
243 | ||
244 | static struct valobj ausr_valobj[] = { | |
245 | {V_CHAR, 0}, | |
246 | {V_CHAR, 3}, | |
247 | {V_CHAR, 4}, | |
248 | {V_CHAR, 5}, | |
249 | {V_CHAR, 7}, | |
250 | {V_TYPE, 8, CLASS, 0, 0, SMS_BAD_CLASS}, | |
251 | }; | |
252 | ||
253 | static struct validate ausr_validate = { | |
254 | ausr_valobj, | |
255 | 6, | |
256 | LOGIN, | |
257 | "u.login = \"%s\"", | |
258 | 1, | |
259 | USERS_ID, | |
260 | 0, | |
261 | setup_ausr, | |
262 | followup_ausr, | |
263 | }; | |
264 | ||
265 | static char *rusr_fields[] = { | |
266 | UID, LOGIN, "fs_type" | |
267 | }; | |
268 | ||
269 | static struct validate rusr_validate = { | |
270 | 0, | |
271 | 0, | |
272 | 0, | |
273 | 0, | |
274 | 0, | |
275 | 0, | |
276 | 0, | |
277 | register_user, | |
278 | 0, | |
279 | }; | |
280 | ||
281 | static char *uusr_fields[] = { | |
282 | LOGIN, | |
283 | "newlogin", UID, SHELL, LAST, FIRST, MIDDLE, STATUS, | |
284 | MIT_ID, CLASS, | |
285 | }; | |
286 | ||
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}, | |
290 | {V_CHAR, 4}, | |
291 | {V_CHAR, 5}, | |
292 | {V_CHAR, 6}, | |
293 | {V_CHAR, 8}, | |
294 | {V_TYPE, 9, CLASS, 0, 0, SMS_BAD_CLASS}, | |
295 | }; | |
296 | ||
297 | static struct validate uusr_validate = { | |
298 | uusr_valobj, | |
299 | 7, | |
300 | 0, | |
301 | 0, | |
302 | 0, | |
303 | USERS_ID, | |
304 | 0, | |
305 | 0, | |
306 | set_modtime_by_id, | |
307 | }; | |
308 | ||
309 | static char *uush_fields[] = { | |
310 | LOGIN, | |
311 | SHELL, | |
312 | }; | |
313 | ||
314 | static struct validate uush_validate = { | |
315 | VOuser0, | |
316 | 1, | |
317 | 0, | |
318 | 0, | |
319 | 0, | |
320 | USERS_ID, | |
321 | access_user, | |
322 | 0, | |
323 | set_modtime_by_id, | |
324 | }; | |
325 | ||
326 | static char *uust_fields[] = { | |
327 | LOGIN, | |
328 | STATUS, | |
329 | }; | |
330 | ||
331 | static struct validate uust_validate = { | |
332 | VOuser0, | |
333 | 1, | |
334 | 0, | |
335 | 0, | |
336 | 0, | |
337 | USERS_ID, | |
338 | 0, | |
339 | 0, | |
340 | set_modtime_by_id, | |
341 | }; | |
342 | ||
343 | static char *dusr_fields[] = { | |
344 | LOGIN, | |
345 | }; | |
346 | ||
347 | static struct validate dusr_validate = { | |
348 | VOuser0, | |
349 | 1, | |
350 | 0, | |
351 | 0, | |
352 | 0, | |
353 | 0, | |
354 | 0, | |
355 | setup_dusr, | |
356 | 0, | |
357 | }; | |
358 | ||
359 | static char *dubu_fields[] = { | |
360 | UID, | |
361 | }; | |
362 | ||
363 | static struct valobj dubu_valobj[] = { | |
364 | {V_ID, 0, USERS, UID, USERS_ID, SMS_USER} | |
365 | }; | |
366 | ||
367 | static struct validate dubu_validate = { | |
368 | dubu_valobj, | |
369 | 1, | |
370 | 0, | |
371 | 0, | |
372 | 0, | |
373 | 0, | |
374 | 0, | |
375 | setup_dusr, | |
376 | 0, | |
377 | }; | |
378 | ||
379 | static char *gfbl_fields[] = { | |
380 | LOGIN, | |
381 | LOGIN, "fullname", "nickname", "home_addr", | |
382 | "home_phone", "office_address", "office_phone", "mit_dept", | |
383 | "mit_affil", MOD1, MOD2, MOD3, | |
384 | }; | |
385 | ||
386 | static struct validate gfbl_validate = { | |
387 | VOuser0, | |
388 | 1, | |
389 | 0, | |
390 | 0, | |
391 | 0, | |
392 | 0, | |
393 | access_user, | |
394 | 0, | |
395 | followup_fix_modby, | |
396 | }; | |
397 | ||
398 | static char *ufbl_fields[] = { | |
399 | LOGIN, | |
400 | "fullname", "nickname", "home_addr", | |
401 | "home_phone", "office_address", "office_phone", "mit_dept", | |
402 | "mit_affil", | |
403 | }; | |
404 | ||
405 | static struct validate ufbl_validate = { | |
406 | VOuser0, | |
407 | 1, | |
408 | 0, | |
409 | 0, | |
410 | 0, | |
411 | 0, | |
412 | access_user, | |
413 | 0, | |
414 | set_finger_modtime, | |
415 | }; | |
416 | ||
417 | static char *gpob_fields[] = { | |
418 | LOGIN, | |
419 | LOGIN, TYPE, "box", MOD1, MOD2, MOD3, | |
420 | }; | |
421 | ||
422 | static struct validate gpob_validate = { | |
423 | VOuser0, | |
424 | 1, | |
425 | "potype", | |
426 | "u.potype != \"NONE\" and u.users_id=%d", | |
427 | 1, | |
428 | 0, | |
429 | access_user, | |
430 | 0, | |
431 | followup_gpob, | |
432 | }; | |
433 | ||
434 | static char *gpox_fields[] = { | |
435 | LOGIN, TYPE, "box", | |
436 | }; | |
437 | ||
438 | static struct validate gpox_validate = { | |
439 | 0, | |
440 | 0, | |
441 | 0, | |
442 | 0, | |
443 | 0, | |
444 | 0, | |
445 | 0, | |
446 | 0, | |
447 | followup_gpob, | |
448 | }; | |
449 | ||
450 | static char *spob_fields[] = { | |
451 | LOGIN, TYPE, "box", | |
452 | }; | |
453 | ||
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}, | |
457 | }; | |
458 | ||
459 | static struct validate spob_validate = /* SET_POBOX */ | |
460 | { | |
461 | spob_valobj, | |
462 | 2, | |
463 | 0, | |
464 | 0, | |
465 | 0, | |
466 | 0, | |
467 | access_user, | |
468 | 0, | |
469 | set_pobox, | |
470 | }; | |
471 | ||
472 | static struct validate spop_validate = /* SET_POBOX_POP */ | |
473 | { | |
474 | VOuser0, | |
475 | 1, | |
476 | 0, | |
477 | 0, | |
478 | 0, | |
479 | 0, | |
480 | access_user, | |
481 | setup_spop, | |
482 | set_pobox_modtime, | |
483 | }; | |
484 | ||
485 | static struct validate dpob_validate = /* DELETE_POBOX */ | |
486 | { | |
487 | VOuser0, | |
488 | 1, | |
489 | 0, | |
490 | 0, | |
491 | 0, | |
492 | 0, | |
493 | access_user, | |
494 | setup_dpob, | |
495 | set_pobox_modtime, | |
496 | }; | |
497 | ||
498 | static char *gmac_fields[] = { | |
499 | NAME, | |
500 | NAME, TYPE, MOD1, MOD2, MOD3, | |
501 | }; | |
502 | ||
503 | static char *amac_fields[] = { | |
504 | NAME, TYPE | |
505 | }; | |
506 | ||
507 | static struct valobj amac_valobj[] = { | |
508 | {V_CHAR, 0}, | |
509 | {V_TYPE, 1, "mac_type", 0, 0, SMS_TYPE}, | |
510 | }; | |
511 | ||
512 | static struct validate amac_validate = { | |
513 | amac_valobj, | |
514 | 2, | |
515 | NAME, | |
516 | "m.name = uppercase(\"%s\")", | |
517 | 1, | |
518 | MACH_ID, | |
519 | 0, | |
520 | 0, | |
521 | set_mach_modtime, | |
522 | }; | |
523 | ||
524 | static char *umac_fields[] = { | |
525 | NAME, | |
526 | "newname", TYPE, | |
527 | }; | |
528 | ||
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}, | |
533 | }; | |
534 | ||
535 | static struct validate umac_validate = { | |
536 | umac_valobj, | |
537 | 3, | |
538 | 0, | |
539 | 0, | |
540 | 0, | |
541 | MACH_ID, | |
542 | 0, | |
543 | 0, | |
544 | set_modtime_by_id, | |
545 | }; | |
546 | ||
547 | static char *dmac_fields[] = { | |
548 | NAME, | |
549 | }; | |
550 | ||
551 | static struct validate dmac_validate = { | |
552 | VOmach0, | |
553 | 1, | |
554 | 0, | |
555 | 0, | |
556 | 0, | |
557 | 0, | |
558 | 0, | |
559 | setup_dmac, | |
560 | 0, | |
561 | }; | |
562 | ||
563 | static char *gclu_fields[] = { | |
564 | NAME, | |
565 | NAME, DESC, LOCATION, MOD1, MOD2, MOD3, | |
566 | }; | |
567 | ||
568 | static char *aclu_fields[] = { | |
569 | NAME, DESC, LOCATION, | |
570 | }; | |
571 | ||
572 | static struct validate aclu_validate = /* for aclu */ | |
573 | { | |
574 | VOchar0, | |
575 | 1, | |
576 | NAME, | |
577 | "c.name = \"%s\"", | |
578 | 1, | |
579 | "clu_id", | |
580 | 0, | |
581 | 0, | |
582 | set_modtime, | |
583 | }; | |
584 | ||
585 | static char *uclu_fields[] = { | |
586 | NAME, | |
587 | "newname", DESC, LOCATION, | |
588 | }; | |
589 | ||
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}, | |
593 | }; | |
594 | ||
595 | static struct validate uclu_validate = { | |
596 | uclu_valobj, | |
597 | 2, | |
598 | 0, | |
599 | 0, | |
600 | 0, | |
601 | CLU_ID, | |
602 | 0, | |
603 | 0, | |
604 | set_modtime_by_id, | |
605 | }; | |
606 | ||
607 | static char *dclu_fields[] = { | |
608 | NAME, | |
609 | }; | |
610 | ||
611 | static struct validate dclu_validate = { | |
612 | VOclu0, | |
613 | 1, | |
614 | 0, | |
615 | 0, | |
616 | 0, | |
617 | 0, | |
618 | 0, | |
619 | setup_dclu, | |
620 | 0, | |
621 | }; | |
622 | ||
623 | static char *gmcm_fields[] = { | |
624 | MACHINE, CLUSTER, | |
625 | MACHINE, CLUSTER, | |
626 | }; | |
627 | ||
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}, | |
632 | }; | |
633 | ||
634 | static struct validate amtc_validate = /* for amtc and dmfc */ | |
635 | { | |
636 | amtc_valobj, | |
637 | 2, | |
638 | MACH_ID, | |
639 | "m.mach_id = %d and m.clu_id = %d", | |
640 | 2, | |
641 | 0, | |
642 | 0, | |
643 | 0, | |
644 | set_mach_modtime_by_id, | |
645 | }; | |
646 | ||
647 | static char *gcld_fields[] = { | |
88343c5e | 648 | CLUSTER, "serv_label", |
649 | CLUSTER, "serv_label", "serv_cluster", | |
650 | }; | |
651 | ||
652 | static char *acld_fields[] = { | |
d33e787c | 653 | CLUSTER, "serv_label", "serv_cluster", |
654 | }; | |
655 | ||
656 | static struct valobj acld_valobj[] = | |
657 | { | |
658 | {V_ID, 0, CLUSTER, NAME, CLU_ID, SMS_CLUSTER}, | |
659 | {V_TYPE, 1, "slabel", 0, 0, SMS_TYPE}, | |
660 | {V_CHAR, 2}, | |
661 | }; | |
662 | ||
663 | static struct validate acld_validate = /* ADD_CLUSTER_DATA */ | |
664 | { /* DELETE_CLUSTER_DATA */ | |
665 | acld_valobj, | |
666 | 2, | |
667 | CLU_ID, | |
668 | "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"", | |
669 | 3, | |
670 | 0, | |
671 | 0, | |
672 | 0, | |
673 | set_cluster_modtime_by_id, | |
674 | }; | |
675 | ||
676 | static char *gsin_fields[] = { | |
677 | SERVICE, | |
7ac4c1b1 | 678 | SERVICE, "update_int", "target_file", "script", "dfgen", "dfcheck", |
d33e787c | 679 | TYPE, "enable", "inprogress", "harderror", "errmsg", |
88343c5e | 680 | ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3, |
d33e787c | 681 | }; |
682 | ||
683 | static struct validate gsin_validate = | |
684 | { | |
685 | 0, | |
686 | 0, | |
687 | 0, | |
688 | 0, | |
689 | 0, | |
690 | 0, | |
691 | access_service, | |
692 | 0, | |
693 | followup_glin, | |
694 | }; | |
695 | ||
696 | static char *qgsv_fields[] = { | |
697 | "enable", "inprogress", "harderror", | |
698 | "service", | |
699 | }; | |
700 | ||
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}, | |
705 | }; | |
706 | ||
707 | static struct validate qgsv_validate = { | |
708 | qgsv_valobj, | |
709 | 3, | |
710 | 0, | |
711 | 0, | |
712 | 0, | |
713 | 0, | |
714 | 0, | |
715 | 0, | |
716 | qualified_get_server, | |
717 | }; | |
718 | ||
719 | static char *asin_fields[] = { | |
720 | SERVICE, "update_int", "target_file", "script", TYPE, "enable", | |
88343c5e | 721 | ACE_TYPE, ACE_NAME, |
d33e787c | 722 | }; |
723 | ||
724 | static struct valobj asin_valobj[] = { | |
725 | {V_CHAR, 0}, | |
726 | {V_TYPE, 4, "service", 0, 0, SMS_TYPE}, | |
88343c5e | 727 | {V_TYPE, 6, ACE_TYPE, 0, 0, SMS_ACE}, |
728 | {V_TYPEDATA, 7, 0, 0, 0, SMS_ACE}, | |
d33e787c | 729 | }; |
730 | ||
731 | static struct validate asin_validate = /* for asin, usin */ | |
732 | { | |
733 | asin_valobj, | |
734 | 4, | |
735 | NAME, | |
88343c5e | 736 | "s.name = uppercase(\"%s\")", |
d33e787c | 737 | 1, |
738 | 0, | |
739 | 0, | |
740 | 0, | |
741 | set_modtime, | |
742 | }; | |
743 | ||
744 | static struct validate rsve_validate = { | |
745 | 0, | |
746 | 0, | |
747 | NAME, | |
88343c5e | 748 | "s.name = uppercase(\"%s\")", |
d33e787c | 749 | 1, |
750 | 0, | |
751 | access_service, | |
752 | 0, | |
753 | set_modtime, | |
754 | }; | |
755 | ||
756 | static char *ssif_fields[] = { | |
7ac4c1b1 | 757 | SERVICE, "dfgen", "dfcheck", "inprogress", "harderror", "errmsg", |
d33e787c | 758 | }; |
759 | ||
760 | static struct validate ssif_validate = { | |
87167924 | 761 | 0, |
762 | 0, | |
d33e787c | 763 | NAME, |
88343c5e | 764 | "s.name = uppercase(\"%s\")", |
d33e787c | 765 | 1, |
766 | 0, | |
767 | 0, | |
87167924 | 768 | 0, |
d33e787c | 769 | 0, |
770 | }; | |
771 | ||
772 | static char *dsin_fields[] = { | |
773 | SERVICE, | |
774 | }; | |
775 | ||
776 | static struct validate dsin_validate = { | |
777 | 0, | |
778 | 0, | |
779 | NAME, | |
88343c5e | 780 | "s.name = uppercase(\"%s\")", |
d33e787c | 781 | 1, |
782 | 0, | |
783 | 0, | |
784 | setup_dsin, | |
785 | 0, | |
786 | }; | |
787 | ||
788 | static char *gshi_fields[] = { | |
789 | SERVICE, MACHINE, | |
790 | SERVICE, MACHINE, "enable", "override", "success", "inprogress", | |
791 | "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2", | |
792 | "value3", MOD1, MOD2, MOD3, | |
793 | }; | |
794 | ||
795 | static struct validate gshi_validate = { | |
796 | 0, | |
797 | 0, | |
798 | 0, | |
799 | 0, | |
800 | 0, | |
801 | 0, | |
802 | access_service, | |
803 | 0, | |
804 | followup_fix_modby, | |
805 | }; | |
806 | ||
807 | static char *qgsh_fields[] = { | |
808 | "service", "enable", "override", "success", "inprogress", "hosterror", | |
809 | "service", MACHINE, | |
810 | }; | |
811 | ||
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}, | |
818 | }; | |
819 | ||
820 | static struct validate qgsh_validate = { | |
821 | qgsh_valobj, | |
822 | 5, | |
823 | 0, | |
824 | 0, | |
825 | 0, | |
826 | 0, | |
827 | 0, | |
828 | 0, | |
829 | qualified_get_serverhost, | |
830 | }; | |
831 | ||
832 | static char *ashi_fields[] = { | |
833 | SERVICE, MACHINE, "enable", "value1", "value2", "value3", | |
834 | }; | |
835 | ||
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}, | |
839 | }; | |
840 | ||
841 | static struct validate ashi_validate = /* ashi & ushi */ | |
842 | { | |
843 | ashi_valobj, | |
844 | 2, | |
845 | SERVICE, | |
88343c5e | 846 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 847 | 2, |
848 | 0, | |
849 | access_service, | |
850 | 0, | |
851 | set_serverhost_modtime, | |
852 | }; | |
853 | ||
854 | static struct validate rshe_validate = | |
855 | { | |
856 | ashi_valobj, | |
857 | 2, | |
858 | SERVICE, | |
88343c5e | 859 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 860 | 2, |
861 | 0, | |
862 | access_service, | |
863 | 0, | |
864 | set_serverhost_modtime, | |
865 | }; | |
866 | ||
867 | static struct validate ssho_validate = | |
868 | { | |
869 | ashi_valobj, | |
870 | 2, | |
871 | SERVICE, | |
88343c5e | 872 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 873 | 2, |
874 | 0, | |
875 | access_service, | |
876 | 0, | |
877 | trigger_dcm, | |
878 | }; | |
879 | ||
880 | static char *sshi_fields[] = { | |
881 | "service", MACHINE, "override", "success", "inprogress", | |
882 | "hosterror", "errmsg", "ltt", "lts" | |
883 | }; | |
884 | ||
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}, | |
d33e787c | 888 | }; |
889 | ||
890 | static struct validate sshi_validate = | |
891 | { | |
892 | sshi_valobj, | |
87167924 | 893 | 2, |
d33e787c | 894 | SERVICE, |
7ac4c1b1 | 895 | "s.service = uppercase(\"%s\") and s.mach_id = %d", |
d33e787c | 896 | 2, |
897 | 0, | |
898 | 0, | |
87167924 | 899 | 0, |
d33e787c | 900 | 0, |
901 | }; | |
902 | ||
903 | static char *dshi_fields[] = { | |
904 | SERVICE, MACHINE, | |
905 | }; | |
906 | ||
907 | static struct validate dshi_validate = | |
908 | { | |
909 | ashi_valobj, | |
910 | 2, | |
911 | SERVICE, | |
88343c5e | 912 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 913 | 2, |
914 | 0, | |
915 | access_service, | |
916 | setup_dshi, | |
917 | 0, | |
918 | }; | |
919 | ||
920 | static char *gsha_fields[] = { | |
921 | MACHINE, | |
88343c5e | 922 | MACHINE, ACE_TYPE, ACE_NAME, MOD1, MOD2, MOD3, |
d33e787c | 923 | }; |
924 | ||
925 | static struct validate gsha_validate = | |
926 | { | |
927 | 0, | |
928 | 0, | |
929 | 0, | |
930 | 0, | |
931 | 0, | |
932 | 0, | |
933 | 0, | |
934 | 0, | |
935 | followup_gsha, | |
936 | }; | |
937 | ||
938 | static char *asha_fields[] = { | |
88343c5e | 939 | MACHINE, ACE_TYPE, ACE_NAME, |
d33e787c | 940 | }; |
941 | ||
942 | static struct valobj asha_valobj[] = { | |
943 | {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
88343c5e | 944 | {V_TYPE, 1, ACE_TYPE, 0, 0, SMS_ACE}, |
945 | {V_TYPEDATA, 2, 0, 0, 0, SMS_ACE}, | |
d33e787c | 946 | }; |
947 | ||
948 | static struct validate asha_validate = | |
949 | { | |
950 | asha_valobj, | |
951 | 3, | |
952 | MACH_ID, | |
953 | "ha.mach_id = %d", | |
954 | 1, | |
955 | MACH_ID, | |
956 | 0, | |
957 | 0, | |
958 | set_modtime_by_id, | |
959 | }; | |
960 | ||
961 | static char *gslo_fields[] = { | |
962 | "server", | |
963 | "server", MACHINE, | |
964 | }; | |
965 | ||
966 | static char *gfsl_fields[] = { | |
967 | LABEL, | |
968 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
969 | "create", "lockertype", MOD1, MOD2, MOD3, | |
970 | }; | |
971 | ||
972 | static char *gfsm_fields[] = { | |
973 | MACHINE, | |
974 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
975 | "create", "lockertype", MOD1, MOD2, MOD3, | |
976 | }; | |
977 | ||
978 | static struct validate gfsm_validate = { | |
979 | VOmach0, | |
980 | 1, | |
981 | 0, | |
982 | 0, | |
983 | 0, | |
984 | 0, | |
985 | 0, | |
986 | 0, | |
987 | followup_fix_modby, | |
988 | }; | |
989 | ||
88343c5e | 990 | static char *gfsn_fields[] = { |
991 | MACHINE, "parition", | |
992 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
993 | "create", "lockertype", MOD1, MOD2, MOD3, | |
994 | }; | |
995 | ||
d33e787c | 996 | static char *gfsg_fields[] = { |
997 | LIST, | |
998 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
999 | "create", "lockertype", MOD1, MOD2, MOD3, | |
1000 | }; | |
1001 | ||
1002 | static struct validate gfsg_validate = { | |
1003 | VOlist0, | |
1004 | 1, | |
1005 | 0, | |
1006 | 0, | |
1007 | 0, | |
1008 | 0, | |
1009 | access_list, | |
1010 | 0, | |
1011 | followup_fix_modby, | |
1012 | }; | |
1013 | ||
1014 | static char *afil_fields[] = { | |
1015 | LABEL, TYPE, MACHINE, NAME, "mount", "access", "comments", "owner", "owners", | |
1016 | "create", "lockertype", | |
1017 | }; | |
1018 | ||
1019 | static struct valobj afil_valobj[] = { | |
1020 | {V_CHAR, 0}, | |
88343c5e | 1021 | {V_TYPE, 1, FILESYS, 0, 0, SMS_FSTYPE}, |
d33e787c | 1022 | {V_ID, 2, MACHINE, NAME, MACH_ID, SMS_MACHINE}, |
1023 | {V_CHAR, 3}, | |
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} | |
1027 | }; | |
1028 | ||
1029 | static struct validate afil_validate = { | |
1030 | afil_valobj, | |
1031 | 7, | |
1032 | LABEL, | |
1033 | "fs.label = \"%s\"", | |
1034 | 1, | |
1035 | FILSYS_ID, | |
1036 | 0, | |
1037 | setup_afil, | |
1038 | set_filesys_modtime, | |
1039 | }; | |
1040 | ||
1041 | static char *ufil_fields[] = { | |
1042 | LABEL, "newlabel", TYPE, MACHINE, NAME, "mount", "access", "comments", | |
1043 | "owner", "owners", "create", "lockertype", | |
1044 | }; | |
1045 | ||
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}, | |
88343c5e | 1049 | {V_TYPE, 2, FILESYS, 0, 0, SMS_FSTYPE}, |
d33e787c | 1050 | {V_ID, 3, MACHINE, NAME, MACH_ID, SMS_MACHINE}, |
1051 | {V_CHAR, 4}, | |
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} | |
1055 | }; | |
1056 | ||
1057 | static struct validate ufil_validate = { | |
1058 | ufil_valobj, | |
1059 | 8, | |
1060 | LABEL, | |
1061 | "fs.filsys_id = %d", | |
1062 | 1, | |
1063 | FILSYS_ID, | |
1064 | 0, | |
1065 | setup_ufil, | |
1066 | set_filesys_modtime, | |
1067 | }; | |
1068 | ||
1069 | static char *dfil_fields[] = { | |
1070 | LABEL, | |
1071 | }; | |
1072 | ||
1073 | static struct valobj dfil_valobj[] = { | |
1074 | {V_ID, 0, FILESYS, LABEL, FILSYS_ID, SMS_FILESYS}, | |
1075 | }; | |
1076 | ||
1077 | static struct validate dfil_validate = { | |
1078 | dfil_valobj, | |
1079 | 1, | |
1080 | "label", | |
1081 | "fs.filsys_id = %d", | |
1082 | 1, | |
1083 | 0, | |
1084 | 0, | |
1085 | setup_dfil, | |
1086 | 0, | |
1087 | }; | |
1088 | ||
1089 | static char *ganf_fields[] = { | |
1090 | MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3, | |
1091 | }; | |
1092 | ||
1093 | static char *gnfp_fields[] = { | |
1094 | MACHINE, DIR, | |
1095 | MACHINE, DIR, DEVICE, STATUS, "allocated", "size", MOD1, MOD2, MOD3, | |
1096 | }; | |
1097 | ||
1098 | static struct validate gnfp_validate = { | |
1099 | VOmach0, | |
1100 | 1, | |
1101 | 0, | |
1102 | 0, | |
1103 | 0, | |
1104 | 0, | |
1105 | 0, | |
1106 | 0, | |
1107 | followup_fix_modby, | |
1108 | }; | |
1109 | ||
1110 | static struct valobj anfp_valobj[] = { | |
1111 | {V_ID, 0, MACHINE, NAME, MACH_ID, SMS_MACHINE}, | |
1112 | {V_CHAR, 1}, | |
1113 | }; | |
1114 | ||
1115 | static struct validate anfp_validate = { | |
1116 | anfp_valobj, | |
1117 | 2, | |
1118 | DIR, | |
1119 | "np.mach_id = %d and np.dir = \"%s\"", | |
1120 | 2, | |
1121 | "nfsphys_id", | |
1122 | 0, | |
1123 | 0, | |
1124 | set_nfsphys_modtime, | |
1125 | }; | |
1126 | ||
1127 | static char *dnfp_fields[] = { | |
1128 | MACHINE, DIR, | |
1129 | }; | |
1130 | ||
1131 | static struct validate dnfp_validate = { | |
1132 | VOmach0, | |
1133 | 1, | |
1134 | DIR, | |
1135 | "np.mach_id = %d and np.dir = \"%s\"", | |
1136 | 2, | |
1137 | "nfsphys_id", | |
1138 | 0, | |
1139 | setup_dnfp, | |
1140 | set_nfsphys_modtime, | |
1141 | }; | |
1142 | ||
1143 | static char *gnfq_fields[] = { | |
88343c5e | 1144 | FILESYS, LOGIN, |
d33e787c | 1145 | FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3, |
1146 | }; | |
1147 | ||
88343c5e | 1148 | static struct valobj gnfq_valobj[] = { |
1149 | {V_ID, 1, USERS, LOGIN, USERS_ID, SMS_USER}, | |
1150 | {V_SORT, 0}, | |
1151 | }; | |
1152 | ||
d33e787c | 1153 | static struct validate gnfq_validate = { |
88343c5e | 1154 | gnfq_valobj, |
1155 | 2, | |
d33e787c | 1156 | 0, |
1157 | 0, | |
1158 | 0, | |
1159 | 0, | |
1160 | access_filesys, | |
1161 | 0, | |
1162 | followup_fix_modby, | |
1163 | }; | |
1164 | ||
1165 | static char *gnqp_fields[] = { | |
1166 | MACHINE, DIR, | |
1167 | FILESYS, LOGIN, "quota", DIR, MACHINE, MOD1, MOD2, MOD3, | |
1168 | }; | |
1169 | ||
d33e787c | 1170 | static char *anfq_fields[] = { |
1171 | FILESYS, LOGIN, "quota", | |
1172 | }; | |
1173 | ||
1174 | static struct validate anfq_validate = { | |
1175 | VOfilsys0user1, | |
1176 | 2, | |
1177 | USERS_ID, | |
1178 | "nq.filsys_id = %d and nq.users_id = %d", | |
1179 | 2, | |
1180 | 0, | |
1181 | 0, | |
1182 | 0, | |
1183 | followup_anfq, | |
1184 | }; | |
1185 | ||
1186 | static struct validate unfq_validate = { | |
1187 | VOfilsys0user1, | |
1188 | 2, | |
1189 | USERS_ID, | |
1190 | "nq.filsys_id = %d and nq.users_id = %d", | |
1191 | 2, | |
1192 | 0, | |
1193 | 0, | |
1194 | setup_dnfq, | |
1195 | followup_anfq, | |
1196 | }; | |
1197 | ||
1198 | static struct validate dnfq_validate = { | |
1199 | VOfilsys0user1, | |
1200 | 2, | |
1201 | USERS_ID, | |
1202 | "nq.filsys_id = %d and nq.users_id = %d", | |
1203 | 2, | |
1204 | 0, | |
1205 | 0, | |
1206 | setup_dnfq, | |
1207 | 0, | |
1208 | }; | |
1209 | ||
1210 | static char *glin_fields[] = { | |
1211 | NAME, | |
1212 | NAME, "active", "public", "hidden", "maillist", "group", "gid", | |
88343c5e | 1213 | ACE_TYPE, ACE_NAME, DESC, MOD1, MOD2, MOD3, |
d33e787c | 1214 | }; |
1215 | ||
1216 | static struct validate glin_validate = { | |
1217 | 0, | |
1218 | 0, | |
1219 | 0, | |
1220 | 0, | |
1221 | 0, | |
1222 | 0, | |
1223 | access_vis_list_by_name, | |
1224 | 0, | |
1225 | get_list_info, | |
1226 | }; | |
1227 | ||
1228 | static char *alis_fields[] = { | |
1229 | NAME, "active", "public", "hidden", "maillist", "group", "gid", | |
88343c5e | 1230 | ACE_TYPE, ACE_NAME, DESC, |
d33e787c | 1231 | }; |
1232 | ||
1233 | static struct valobj alis_valobj[] = { | |
1234 | {V_CHAR, 0}, | |
88343c5e | 1235 | {V_TYPE, 7, ACE_TYPE, 0, 0, SMS_ACE}, |
1236 | {V_TYPEDATA, 8, 0, 0, LIST_ID, SMS_ACE}, | |
d33e787c | 1237 | }; |
1238 | ||
1239 | static struct validate alis_validate = { | |
1240 | alis_valobj, | |
1241 | 3, | |
1242 | NAME, | |
1243 | "l.name = \"%s\"", | |
1244 | 1, | |
1245 | LIST_ID, | |
1246 | 0, | |
1247 | setup_alis, | |
1248 | set_modtime, | |
1249 | }; | |
1250 | ||
1251 | static char *ulis_fields[] = { | |
1252 | NAME, | |
1253 | "newname", "active", "public", "hidden", "maillist", "group", "gid", | |
88343c5e | 1254 | ACE_TYPE, ACE_NAME, DESC, |
d33e787c | 1255 | }; |
1256 | ||
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}, | |
88343c5e | 1260 | {V_TYPE, 8, ACE_TYPE, 0, 0, SMS_ACE}, |
1261 | {V_TYPEDATA, 9, 0, 0, LIST_ID, SMS_ACE}, | |
d33e787c | 1262 | }; |
1263 | ||
1264 | static struct validate ulis_validate = { | |
1265 | ulis_valobj, | |
1266 | 4, | |
1267 | NAME, | |
1268 | "l.list_id = %d", | |
1269 | 1, | |
1270 | LIST_ID, | |
1271 | access_list, | |
1272 | setup_alis, | |
1273 | set_modtime_by_id, | |
1274 | }; | |
1275 | ||
1276 | static char *dlis_fields[] = { | |
1277 | NAME, | |
1278 | }; | |
1279 | ||
1280 | static struct validate dlis_validate = { | |
1281 | VOlist0, | |
1282 | 1, | |
1283 | NAME, | |
1284 | "l.list_id = %d", | |
1285 | 1, | |
1286 | 0, | |
1287 | access_list, | |
1288 | setup_dlis, | |
1289 | 0, | |
1290 | }; | |
1291 | ||
1292 | static char *amtl_fields[] = { | |
1293 | "list_name", "member_type", "member_name", | |
1294 | }; | |
1295 | ||
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}, | |
1300 | }; | |
1301 | ||
1302 | static struct validate amtl_validate = /* for amtl and dmfl */ | |
1303 | { | |
1304 | amtl_valobj, | |
1305 | 3, | |
1306 | "member_id", | |
1307 | "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d", | |
1308 | 3, | |
1309 | 0, | |
1310 | access_list, | |
1311 | 0, | |
1312 | followup_amtl, | |
1313 | }; | |
1314 | ||
1315 | static char *gaus_fields[] = { | |
88343c5e | 1316 | ACE_TYPE, ACE_NAME, |
d33e787c | 1317 | "use_type", "use_name", |
1318 | }; | |
1319 | ||
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}, | |
1323 | }; | |
1324 | ||
1325 | static struct validate gaus_validate = { | |
1326 | gaus_valobj, | |
1327 | 2, | |
1328 | 0, | |
1329 | 0, | |
1330 | 0, | |
1331 | 0, | |
1332 | access_member, | |
1333 | 0, | |
88343c5e | 1334 | get_ace_use, |
d33e787c | 1335 | }; |
1336 | ||
1337 | static char *qgli_fields[] = { | |
1338 | "active", "public", "hidden", "maillist", "group", | |
1339 | "list", | |
1340 | }; | |
1341 | ||
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}, | |
1348 | }; | |
1349 | ||
1350 | static struct validate qgli_validate = { | |
1351 | qgli_valobj, | |
1352 | 5, | |
1353 | 0, | |
1354 | 0, | |
1355 | 0, | |
1356 | 0, | |
1357 | access_qgli, | |
1358 | 0, | |
1359 | qualified_get_lists, | |
1360 | }; | |
1361 | ||
1362 | static char *gmol_fields[] = { | |
1363 | "list_name", | |
1364 | "member_type", "member_name", | |
1365 | }; | |
1366 | ||
1367 | static struct validate gmol_validate = { | |
1368 | VOlist0, | |
1369 | 1, | |
1370 | 0, | |
1371 | 0, | |
1372 | 0, | |
1373 | 0, | |
1374 | access_visible_list, | |
1375 | 0, | |
1376 | get_members_of_list, | |
1377 | }; | |
1378 | ||
1379 | static char *glom_fields[] = { | |
1380 | "member_type", "member_name", | |
1381 | "list_name", "active", "public", "hidden", "maillist", "group", | |
1382 | }; | |
1383 | ||
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}, | |
1387 | {V_SORT, 0}, | |
1388 | }; | |
1389 | ||
1390 | static struct validate glom_validate = { | |
1391 | glom_valobj, | |
1392 | 3, | |
1393 | 0, | |
1394 | 0, | |
1395 | 0, | |
1396 | 0, | |
1397 | access_member, | |
1398 | 0, | |
1399 | get_lists_of_member, | |
1400 | }; | |
1401 | ||
1402 | static char *cmol_fields[] = { | |
1403 | "list_name", | |
1404 | "count", | |
1405 | }; | |
1406 | ||
1407 | static struct validate cmol_validate = { | |
1408 | VOlist0, | |
1409 | 1, | |
1410 | 0, | |
1411 | 0, | |
1412 | 0, | |
1413 | 0, | |
1414 | access_visible_list, | |
1415 | 0, | |
1416 | count_members_of_list, | |
1417 | }; | |
1418 | ||
1419 | static char *augr_fields[] = { | |
1420 | LOGIN, | |
1421 | }; | |
1422 | ||
1423 | static struct validate augr_validate = { | |
1424 | 0, | |
1425 | 0, | |
1426 | 0, | |
1427 | 0, | |
1428 | 0, | |
1429 | 0, | |
1430 | 0, | |
1431 | 0, | |
1432 | add_user_group, | |
1433 | }; | |
1434 | ||
1435 | static char *gzcl_fields[] = { | |
1436 | CLASS, | |
1437 | CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name", | |
1438 | "iws_type", "iws_name", "iui_type", "iui_name", MOD1, MOD2, MOD3, | |
1439 | }; | |
1440 | ||
1441 | static struct validate gzcl_validate = { | |
1442 | VOsort0, | |
1443 | 1, | |
1444 | 0, | |
1445 | 0, | |
1446 | 0, | |
1447 | 0, | |
1448 | 0, | |
1449 | 0, | |
1450 | followup_gzcl, | |
1451 | }; | |
1452 | ||
1453 | static char *azcl_fields[] = { | |
1454 | CLASS, "xmt_type", "xmt_name", "sub_type", "sub_name", | |
1455 | "iws_type", "iws_name", "iui_type", "iui_name", | |
1456 | }; | |
1457 | ||
1458 | static struct valobj azcl_valobj[] = { | |
1459 | {V_CHAR, 0}, | |
88343c5e | 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}, | |
d33e787c | 1468 | }; |
1469 | ||
1470 | static struct validate azcl_validate = { | |
1471 | azcl_valobj, | |
1472 | 8, | |
1473 | CLASS, | |
1474 | "z.class = \"%s\"", | |
1475 | 1, | |
1476 | 0, | |
1477 | 0, | |
1478 | 0, | |
1479 | set_zephyr_modtime, | |
1480 | }; | |
1481 | ||
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", | |
1485 | }; | |
1486 | ||
1487 | static struct valobj uzcl_valobj[] = { | |
1488 | {V_RENAME, 1, "zephyr", CLASS, 0, SMS_NOT_UNIQUE}, | |
88343c5e | 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}, | |
d33e787c | 1497 | }; |
1498 | ||
1499 | static struct validate uzcl_validate = { | |
1500 | uzcl_valobj, | |
1501 | 9, | |
1502 | CLASS, | |
1503 | "z.class = \"%s\"", | |
1504 | 1, | |
1505 | 0, | |
1506 | 0, | |
1507 | 0, | |
1508 | set_zephyr_modtime, | |
1509 | }; | |
1510 | ||
1511 | static struct validate dzcl_validate = { | |
1512 | 0, | |
1513 | 0, | |
1514 | CLASS, | |
1515 | "z.class = \"%s\"", | |
1516 | 1, | |
1517 | 0, | |
1518 | 0, | |
1519 | 0, | |
1520 | 0, | |
1521 | }; | |
1522 | ||
1523 | static char *gasv_fields[] = { | |
1524 | SERVICE, "protocol", "port", DESC, | |
1525 | }; | |
1526 | ||
1527 | static char *gpcp_fields[] = { | |
1528 | "printer", | |
1529 | "printer", "printcap", MOD1, MOD2, MOD3, | |
1530 | }; | |
1531 | ||
1532 | static char *apcp_fields[] = { | |
1533 | "printer", "printcap", MOD1, MOD2, MOD3, | |
1534 | }; | |
1535 | ||
1536 | static struct validate apcp_validate = { | |
1537 | VOchar0, | |
1538 | 1, | |
1539 | NAME, | |
1540 | "p.name = \"%s\"", | |
1541 | 1, | |
1542 | 0, | |
1543 | 0, | |
1544 | 0, | |
1545 | set_modtime, | |
1546 | }; | |
1547 | ||
1548 | static char *gali_fields[] = { | |
1549 | NAME, TYPE, "trans", | |
1550 | NAME, TYPE, "trans", | |
1551 | }; | |
1552 | ||
1553 | static char *aali_fields[] = { | |
1554 | NAME, TYPE, "trans", | |
1555 | }; | |
1556 | ||
1557 | static struct valobj aali_valobj[] = { | |
1558 | {V_CHAR, 0}, | |
1559 | {V_TYPE, 1, "alias", 0, 0, SMS_TYPE}, | |
1560 | {V_CHAR, 2}, | |
1561 | }; | |
1562 | ||
1563 | static struct validate aali_validate = { | |
1564 | aali_valobj, | |
1565 | 3, | |
1566 | "trans", | |
1567 | "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"", | |
1568 | 3, | |
1569 | 0, | |
1570 | 0, | |
1571 | 0, | |
1572 | 0, | |
1573 | }; | |
1574 | ||
1575 | static struct validate dali_validate = /* DELETE_ALIAS */ | |
1576 | { | |
1577 | 0, | |
1578 | 0, | |
1579 | "trans", | |
1580 | "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"", | |
1581 | 3, | |
1582 | 0, | |
1583 | 0, | |
1584 | 0, | |
1585 | 0, | |
1586 | }; | |
1587 | ||
1588 | static char *gval_fields[] = { | |
1589 | NAME, "value", | |
1590 | }; | |
1591 | ||
1592 | static struct valobj gval_valobj[] = { | |
1593 | {V_NAME, 0, "values", NAME, 0, SMS_NO_MATCH}, | |
1594 | }; | |
1595 | ||
1596 | static struct validate gval_validate = { | |
1597 | gval_valobj, | |
1598 | 1, | |
1599 | 0, | |
1600 | 0, | |
1601 | 0, | |
1602 | 0, | |
1603 | 0, | |
1604 | 0, | |
1605 | 0, | |
1606 | }; | |
1607 | ||
1608 | static char *aval_fields[] = { | |
1609 | NAME, "value", | |
1610 | }; | |
1611 | ||
1612 | static struct validate aval_validate = /* for aval, uval, and dval */ | |
1613 | { | |
1614 | VOchar0, | |
1615 | 1, | |
1616 | NAME, | |
1617 | "v.name = \"%s\"", | |
1618 | 1, | |
1619 | 0, | |
1620 | 0, | |
1621 | 0, | |
1622 | 0, | |
1623 | }; | |
1624 | ||
1625 | static char *dval_fields[] = { | |
1626 | NAME, | |
1627 | }; | |
1628 | ||
1629 | static char *gats_fields[] = { | |
1630 | "table", "retrieves", "appends", "updates", "deletes", MOD1, MOD2, MOD3, | |
1631 | }; | |
1632 | ||
1633 | ||
1634 | \f | |
1635 | /* Generalized Query Definitions */ | |
1636 | ||
1637 | struct query Queries2[] = { | |
1638 | { | |
1639 | /* Q_GALO - GET_ALL_LOGINS */ | |
1640 | "get_all_logins", | |
1641 | "galo", | |
1642 | RETRIEVE, | |
1643 | "u", | |
1644 | USERS, | |
1645 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle", | |
1646 | galo_fields, | |
1647 | 6, | |
1648 | "u.users_id != 0", | |
1649 | 0, | |
1650 | 0, | |
1651 | }, | |
1652 | ||
1653 | { | |
1654 | /* Q_GAAL - GET_ALL_ACTIVE_LOGINS */ | |
1655 | "get_all_active_logins", | |
1656 | "gaal", | |
1657 | RETRIEVE, | |
1658 | "u", | |
1659 | USERS, | |
1660 | "%c = u.login, %c = text(u.uid), %c = u.shell, %c = u.last, %c = u.first, %c = u.middle", | |
1661 | galo_fields, | |
1662 | 6, | |
91cdc7c5 | 1663 | "u.status = 1", |
d33e787c | 1664 | 0, |
1665 | 0, | |
1666 | }, | |
1667 | ||
1668 | { | |
1669 | /* Q_GUBL - GET_USER_BY_LOGIN */ | |
1670 | "get_user_by_login", | |
1671 | "gubl", | |
1672 | RETRIEVE, | |
1673 | "u", | |
1674 | USERS, | |
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", | |
1676 | gubl_fields, | |
1677 | 12, | |
1678 | "u.login = \"%s\" and u.users_id != 0", | |
1679 | 1, | |
1680 | &gubx_validate, | |
1681 | }, | |
1682 | ||
1683 | { | |
1684 | /* Q_GUBU - GET_USER_BY_UID */ | |
1685 | "get_user_by_uid", | |
1686 | "gubu", | |
1687 | RETRIEVE, | |
1688 | "u", | |
1689 | USERS, | |
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", | |
1691 | gubu_fields, | |
1692 | 12, | |
1693 | "u.uid = %s and u.users_id != 0", | |
1694 | 1, | |
1695 | &gubx_validate, | |
1696 | }, | |
1697 | ||
1698 | { | |
1699 | /* Q_GUBN - GET_USER_BY_NAME */ | |
1700 | "get_user_by_name", | |
1701 | "gubn", | |
1702 | RETRIEVE, | |
1703 | "u", | |
1704 | USERS, | |
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", | |
1706 | gubn_fields, | |
1707 | 12, | |
1708 | "u.first = \"%s\" and u.last = \"%s\" and u.users_id != 0", | |
1709 | 2, | |
1710 | &VDsortf, | |
1711 | }, | |
1712 | ||
1713 | { | |
1714 | /* Q_GUBC - GET_USER_BY_CLASS */ | |
1715 | "get_user_by_class", | |
1716 | "gubc", | |
1717 | RETRIEVE, | |
1718 | "u", | |
1719 | USERS, | |
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", | |
1721 | gubc_fields, | |
1722 | 12, | |
1723 | "u.mit_year = uppercase(\"%s\") and u.users_id != 0", | |
1724 | 1, | |
1725 | &VDsortf, | |
1726 | }, | |
1727 | ||
1728 | { | |
1729 | /* Q_GUBM - GET_USER_BY_MITID */ | |
1730 | "get_user_by_mitid", | |
1731 | "gubm", | |
1732 | RETRIEVE, | |
1733 | "u", | |
1734 | USERS, | |
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", | |
1736 | gubm_fields, | |
1737 | 12, | |
1738 | "u.mit_id = \"%s\" and u.users_id != 0", | |
1739 | 1, | |
1740 | &VDsortf, | |
1741 | }, | |
1742 | ||
1743 | { | |
1744 | /* Q_AUSR - ADD_USER */ | |
1745 | "add_user", | |
1746 | "ausr", | |
1747 | APPEND, | |
1748 | "u", | |
1749 | USERS, | |
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", | |
1751 | ausr_fields, | |
1752 | 9, | |
1753 | "values.name = \"users_id\"", | |
1754 | 0, | |
1755 | &ausr_validate, | |
1756 | }, | |
1757 | ||
1758 | { | |
1759 | /* Q_RUSR - REGISTER_USER */ | |
1760 | "register_user", | |
1761 | "rusr", | |
1762 | APPEND, | |
1763 | 0, | |
1764 | 0, | |
1765 | 0, | |
1766 | rusr_fields, | |
1767 | 3, | |
1768 | 0, | |
1769 | 0, | |
1770 | &rusr_validate, | |
1771 | }, | |
1772 | ||
1773 | { | |
1774 | /* Q_UUSR - UPDATE_USER */ | |
1775 | "update_user", | |
1776 | "uusr", | |
1777 | UPDATE, | |
1778 | "u", | |
1779 | USERS, | |
1780 | "login = %c, uid = int4(%c), shell = %c, last = %c, first = %c, middle = %c, status = int4(%c), mit_id = %c, mit_year = %c", | |
1781 | uusr_fields, | |
1782 | 9, | |
1783 | "u.users_id = %d", | |
1784 | 1, | |
1785 | &uusr_validate, | |
1786 | }, | |
1787 | ||
1788 | { | |
1789 | /* Q_UUSH - UPDATE_USER_SHELL */ | |
1790 | "update_user_shell", | |
1791 | "uush", | |
1792 | UPDATE, | |
1793 | "u", | |
1794 | USERS, | |
1795 | "shell = %c", | |
1796 | uush_fields, | |
1797 | 1, | |
1798 | "u.users_id = %d", | |
1799 | 1, | |
1800 | &uush_validate, | |
1801 | }, | |
1802 | ||
1803 | { | |
1804 | /* Q_UUST - UPDATE_USER_STATUS */ | |
1805 | "update_user_status", | |
1806 | "uust", | |
1807 | UPDATE, | |
1808 | "u", | |
1809 | USERS, | |
1810 | "status = int4(%c)", | |
1811 | uust_fields, | |
1812 | 1, | |
1813 | "u.users_id = %d", | |
1814 | 1, | |
1815 | &uust_validate, | |
1816 | }, | |
1817 | ||
1818 | { | |
1819 | /* Q_DUSR - DELETE_USER */ | |
1820 | "delete_user", | |
1821 | "dusr", | |
1822 | DELETE, | |
1823 | "u", | |
1824 | USERS, | |
1825 | (char *)0, | |
1826 | dusr_fields, | |
1827 | 0, | |
1828 | "u.users_id = %d", | |
1829 | 1, | |
1830 | &dusr_validate, | |
1831 | }, | |
1832 | ||
1833 | { | |
1834 | /* Q_DUBU - DELETE_USER_BY_UID */ | |
1835 | "delete_user_by_uid", | |
1836 | "dubu", | |
1837 | DELETE, | |
1838 | "u", | |
1839 | USERS, | |
1840 | (char *)0, | |
1841 | dubu_fields, | |
1842 | 0, | |
1843 | "u.users_id = %d", | |
1844 | 1, | |
1845 | &dubu_validate, | |
1846 | }, | |
1847 | ||
1848 | { | |
1849 | /* Q_GFBL - GET_FINGER_BY_LOGIN */ | |
1850 | "get_finger_by_login", | |
1851 | "gfbl", | |
1852 | RETRIEVE, | |
1853 | "u", | |
1854 | USERS, | |
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", | |
1856 | gfbl_fields, | |
1857 | 12, | |
1858 | "u.users_id = %d", | |
1859 | 1, | |
1860 | &gfbl_validate, | |
1861 | }, | |
1862 | ||
1863 | { | |
1864 | /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */ | |
1865 | "update_finger_by_login", | |
1866 | "ufbl", | |
1867 | UPDATE, | |
1868 | "u", | |
1869 | USERS, | |
1870 | "fullname=%c,nickname=%c,home_addr=%c,home_phone=%c,office_addr=%c,office_phone=%c,mit_dept=%c,mit_affil=%c", | |
1871 | ufbl_fields, | |
1872 | 8, | |
1873 | "u.users_id = %d", | |
1874 | 1, | |
1875 | &ufbl_validate, | |
1876 | }, | |
1877 | ||
1878 | { | |
1879 | /* Q_GPOB - GET_POBOX */ | |
1880 | "get_pobox", | |
1881 | "gpob", | |
1882 | RETRIEVE, | |
1883 | "u", | |
1884 | USERS, | |
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", | |
1886 | gpob_fields, | |
1887 | 6, | |
1888 | "u.users_id = %d", | |
1889 | 1, | |
1890 | &gpob_validate, | |
1891 | }, | |
1892 | ||
1893 | { | |
1894 | /* Q_GAPO - GET_ALL_POBOXES */ | |
1895 | "get_all_poboxes", | |
1896 | "gapo", | |
1897 | RETRIEVE, | |
1898 | "u", | |
1899 | USERS, | |
1900 | "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)", | |
1901 | gpox_fields, | |
1902 | 3, | |
1903 | "u.potype != \"NONE\"", | |
1904 | 0, | |
1905 | &gpox_validate, | |
1906 | }, | |
1907 | ||
1908 | { | |
1909 | /* Q_GPOP - GET_POBOXES_POP */ | |
1910 | "get_poboxes_pop", | |
1911 | "gpop", | |
1912 | RETRIEVE, | |
1913 | "u", | |
1914 | USERS, | |
1915 | "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)", | |
1916 | gpox_fields, | |
1917 | 3, | |
1918 | "u.potype = \"POP\"", | |
1919 | 0, | |
1920 | &gpox_validate | |
1921 | }, | |
1922 | ||
1923 | { | |
1924 | /* Q_GPOF - GET_POBOXES_SMTP */ | |
1925 | "get_poboxes_smtp", | |
1926 | "gpos", | |
1927 | RETRIEVE, | |
1928 | "u", | |
1929 | USERS, | |
1930 | "%c = u.login, %c = u.potype, %c = text(u.pop_id) + \":\" + text(u.box_id)", | |
1931 | gpox_fields, | |
1932 | 3, | |
1933 | "u.potype = \"SMTP\"", | |
1934 | 0, | |
1935 | &gpox_validate | |
1936 | }, | |
1937 | ||
1938 | { | |
1939 | /* Q_SPOB - SET_POBOX */ | |
1940 | "set_pobox", | |
1941 | "spob", | |
1942 | UPDATE, | |
1943 | 0, | |
1944 | USERS, | |
1945 | 0, | |
1946 | spob_fields, | |
1947 | 3, | |
1948 | (char *)0, | |
1949 | 0, | |
1950 | &spob_validate, | |
1951 | }, | |
1952 | ||
1953 | { | |
1954 | /* Q_SPOP - SET_POBOX_POP */ | |
1955 | "set_pobox_pop", | |
1956 | "spop", | |
1957 | UPDATE, | |
1958 | "u", | |
1959 | USERS, | |
1960 | "potype = \"POP\"", | |
1961 | spob_fields, | |
1962 | 0, | |
1963 | "u.users_id = %d", | |
1964 | 1, | |
1965 | &spop_validate, | |
1966 | }, | |
1967 | ||
1968 | { | |
1969 | /* Q_DPOB - DELETE_POBOX */ | |
1970 | "delete_pobox", | |
1971 | "dpob", | |
1972 | UPDATE, | |
1973 | "u", | |
1974 | USERS, | |
1975 | "potype = \"NONE\"", | |
1976 | spob_fields, | |
1977 | 0, | |
1978 | "u.users_id = %d", | |
1979 | 1, | |
1980 | &dpob_validate, | |
1981 | }, | |
1982 | ||
1983 | { | |
1984 | /* Q_GMAC - GET_MACHINE */ | |
1985 | "get_machine", | |
1986 | "gmac", | |
1987 | RETRIEVE, | |
1988 | "m", | |
1989 | MACHINE, | |
1990 | "%c = m.name, %c = m.type, %c = m.modtime, %c = text(m.modby), %c =m.modwith", | |
1991 | gmac_fields, | |
1992 | 5, | |
1993 | "m.name = uppercase(\"%s\") and m.mach_id != 0", | |
1994 | 1, | |
1995 | &VDsortf, | |
1996 | }, | |
1997 | ||
1998 | { | |
1999 | /* Q_AMAC - ADD_MACHINE */ | |
2000 | "add_machine", | |
2001 | "amac", | |
2002 | APPEND, | |
2003 | "m", | |
2004 | MACHINE, | |
2005 | "name = uppercase(%c), mach_id = values.value, type = %c", | |
2006 | amac_fields, | |
2007 | 2, | |
2008 | "values.name = \"mach_id\"", | |
2009 | 0, | |
2010 | &amac_validate, | |
2011 | }, | |
2012 | ||
2013 | { | |
2014 | /* Q_UMAC - UPDATE_MACHINE */ | |
2015 | "update_machine", | |
2016 | "umac", | |
2017 | UPDATE, | |
2018 | "m", | |
2019 | MACHINE, | |
2020 | "name = uppercase(%c), type = %c", | |
2021 | umac_fields, | |
2022 | 2, | |
2023 | "m.mach_id = %d", | |
2024 | 1, | |
2025 | &umac_validate, | |
2026 | }, | |
2027 | ||
2028 | { | |
2029 | /* Q_DMAC - DELETE_MACHINE */ | |
2030 | "delete_machine", | |
2031 | "dmac", | |
2032 | DELETE, | |
2033 | "m", | |
2034 | MACHINE, | |
2035 | (char *)0, | |
2036 | dmac_fields, | |
2037 | 0, | |
2038 | "m.mach_id = %d", | |
2039 | 1, | |
2040 | &dmac_validate, | |
2041 | }, | |
2042 | ||
2043 | { | |
2044 | /* Q_GCLU - GET_CLUSTER */ | |
2045 | "get_cluster", | |
2046 | "gclu", | |
2047 | RETRIEVE, | |
2048 | "c", | |
2049 | CLUSTER, | |
2050 | "%c = c.name, %c = c.desc, %c = c.location, %c = c.modtime, %c = text(c.modby), %c = c.modwith", | |
2051 | gclu_fields, | |
2052 | 6, | |
2053 | "c.name = \"%s\" and c.clu_id != 0", | |
2054 | 1, | |
2055 | &VDsortf, | |
2056 | }, | |
2057 | ||
2058 | { | |
2059 | /* Q_ACLU - ADD_CLUSTER */ | |
2060 | "add_cluster", | |
2061 | "aclu", | |
2062 | APPEND, | |
2063 | "c", | |
2064 | CLUSTER, | |
2065 | "name = %c, clu_id = values.value, desc = %c, location = %c", | |
2066 | aclu_fields, | |
2067 | 3, | |
2068 | "values.name = \"clu_id\"", | |
2069 | 0, | |
2070 | &aclu_validate, | |
2071 | }, | |
2072 | ||
2073 | { | |
2074 | /* Q_UCLU - UPDATE_CLUSTER */ | |
2075 | "update_cluster", | |
2076 | "uclu", | |
2077 | UPDATE, | |
2078 | "c", | |
2079 | CLUSTER, | |
2080 | "name = %c, desc = %c, location = %c", | |
2081 | uclu_fields, | |
2082 | 3, | |
2083 | "c.clu_id = %d", | |
2084 | 1, | |
2085 | &uclu_validate, | |
2086 | }, | |
2087 | ||
2088 | { | |
2089 | /* Q_DCLU - DELETE_CLUSTER */ | |
2090 | "delete_cluster", | |
2091 | "dclu", | |
2092 | DELETE, | |
2093 | "c", | |
2094 | CLUSTER, | |
2095 | (char *)0, | |
2096 | dclu_fields, | |
2097 | 0, | |
2098 | "c.clu_id = %d", | |
2099 | 1, | |
2100 | &dclu_validate, | |
2101 | }, | |
2102 | ||
2103 | { | |
2104 | /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */ | |
2105 | "get_machine_to_cluster_map", | |
2106 | "gmcm", | |
2107 | RETRIEVE, | |
2108 | "m", | |
2109 | "mcmap", | |
2110 | "%c = machine.name, %c = cluster.name", | |
2111 | gmcm_fields, | |
2112 | 2, | |
2113 | "machine.name = uppercase(\"%s\") and cluster.name = \"%s\" and m.clu_id = cluster.clu_id and m.mach_id = machine.mach_id", | |
2114 | 2, | |
2115 | &VDsort2, | |
2116 | }, | |
2117 | ||
2118 | { | |
2119 | /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */ | |
2120 | "add_machine_to_cluster", | |
2121 | "amtc", | |
2122 | APPEND, | |
2123 | "m", | |
2124 | "mcmap", | |
2125 | "mach_id = %i4, clu_id = %i4", | |
2126 | gmcm_fields, | |
2127 | 2, | |
2128 | 0, | |
2129 | 0, | |
2130 | &amtc_validate, | |
2131 | }, | |
2132 | ||
2133 | { | |
2134 | /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */ | |
2135 | "delete_machine_from_cluster", | |
2136 | "dmfc", | |
2137 | DELETE, | |
2138 | "m", | |
2139 | "mcmap", | |
2140 | 0, | |
2141 | gmcm_fields, | |
2142 | 0, | |
2143 | "m.mach_id = %d and m.clu_id = %d", | |
2144 | 2, | |
2145 | &amtc_validate, | |
2146 | }, | |
2147 | ||
2148 | { | |
2149 | /* Q_GCLD - GET_CLUSTER_DATA */ | |
2150 | "get_cluster_data", | |
2151 | "gcld", | |
2152 | RETRIEVE, | |
2153 | "s", | |
2154 | "svc", | |
2155 | "%c = cluster.name, %c = s.serv_label, %c = s.serv_cluster", | |
2156 | gcld_fields, | |
2157 | 3, | |
2158 | "cluster.clu_id = s.clu_id and cluster.name = \"%s\" and s.serv_label = \"%s\"", | |
2159 | 2, | |
2160 | &VDsort2, | |
2161 | }, | |
2162 | ||
2163 | { | |
2164 | /* Q_ACLD - ADD_CLUSTER_DATA */ | |
2165 | "add_cluster_data", | |
2166 | "acld", | |
2167 | APPEND, | |
2168 | "s", | |
2169 | "svc", | |
2170 | "clu_id = %i4, serv_label = %c, serv_cluster = %c", | |
88343c5e | 2171 | acld_fields, |
d33e787c | 2172 | 3, |
2173 | (char *)0, | |
2174 | 0, | |
2175 | &acld_validate, | |
2176 | }, | |
2177 | ||
2178 | { | |
2179 | /* Q_DCLD - DELETE_CLUSTER_DATA */ | |
2180 | "delete_cluster_data", | |
2181 | "dcld", | |
2182 | DELETE, | |
2183 | "s", | |
2184 | "svc", | |
2185 | (char *)0, | |
88343c5e | 2186 | acld_fields, |
d33e787c | 2187 | 0, |
2188 | "s.clu_id = %d and s.serv_label = \"%s\" and s.serv_cluster = \"%s\"", | |
2189 | 3, | |
2190 | &acld_validate, | |
2191 | }, | |
2192 | ||
2193 | { | |
2194 | /* Q_GSIN - GET_SERVER_INFO */ | |
2195 | "get_server_info", | |
2196 | "gsin", | |
2197 | RETRIEVE, | |
2198 | "s", | |
2199 | "servers", | |
7ac4c1b1 | 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", |
d33e787c | 2201 | gsin_fields, |
7ac4c1b1 | 2202 | 16, |
88343c5e | 2203 | "s.name = uppercase(\"%s\")", |
d33e787c | 2204 | 1, |
2205 | &gsin_validate, | |
2206 | }, | |
2207 | ||
2208 | { | |
2209 | /* Q_QGSV - QUALIFIED_GET_SERVER */ | |
2210 | "qualified_get_server", | |
2211 | "qgsv", | |
2212 | RETRIEVE, | |
2213 | 0, | |
2214 | "servers", | |
2215 | 0, | |
2216 | qgsv_fields, | |
2217 | 1, | |
2218 | 0, | |
2219 | 3, | |
2220 | &qgsv_validate, | |
2221 | }, | |
2222 | ||
2223 | { | |
2224 | /* Q_ASIN - ADD_SERVER_INFO */ | |
2225 | "add_server_info", | |
2226 | "asin", | |
2227 | APPEND, | |
2228 | "s", | |
2229 | "servers", | |
88343c5e | 2230 | "name = uppercase(%c), update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4", |
d33e787c | 2231 | asin_fields, |
2232 | 8, | |
2233 | (char *)0, | |
2234 | 0, | |
2235 | &asin_validate, | |
2236 | }, | |
2237 | ||
2238 | { | |
2239 | /* Q_USIN - UPDATE_SERVER_INFO */ | |
2240 | "update_server_info", | |
2241 | "usin", | |
2242 | UPDATE, | |
2243 | "s", | |
2244 | "servers", | |
2245 | "update_int = int4(%c), target_file = %c, script = %c, type = %c, enable = int1(%c), acl_type = %c, acl_id = %i4", | |
2246 | asin_fields, | |
2247 | 7, | |
88343c5e | 2248 | "s.name = uppercase(\"%s\")", |
d33e787c | 2249 | 1, |
2250 | &asin_validate, | |
2251 | }, | |
2252 | ||
2253 | { | |
2254 | /* Q_RSVE - RESET_SERVER_ERROR */ | |
2255 | "reset_server_error", | |
2256 | "rsve", | |
2257 | UPDATE, | |
2258 | "s", | |
2259 | "servers", | |
7ac4c1b1 | 2260 | "harderror = 0, dfcheck = s.dfgen", |
d33e787c | 2261 | dsin_fields, |
2262 | 0, | |
88343c5e | 2263 | "s.name = uppercase(\"%s\")", |
d33e787c | 2264 | 1, |
2265 | &rsve_validate, | |
2266 | }, | |
2267 | ||
2268 | { | |
2269 | /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */ | |
2270 | "set_server_internal_flags", | |
2271 | "ssif", | |
2272 | UPDATE, | |
2273 | "s", | |
2274 | "servers", | |
7ac4c1b1 | 2275 | "dfgen = int4(%c), dfcheck = int4(%c), inprogress = int1(%c), harderror = int1(%c), errmsg = %c", |
d33e787c | 2276 | ssif_fields, |
7ac4c1b1 | 2277 | 5, |
88343c5e | 2278 | "s.name = uppercase(\"%s\")", |
d33e787c | 2279 | 1, |
2280 | &ssif_validate, | |
2281 | }, | |
2282 | ||
2283 | { | |
2284 | /* Q_DSIN - DELETE_SERVER_INFO */ | |
2285 | "delete_server_info", | |
2286 | "dsin", | |
2287 | DELETE, | |
2288 | "s", | |
2289 | "servers", | |
2290 | (char *)0, | |
2291 | dsin_fields, | |
2292 | 0, | |
88343c5e | 2293 | "s.name = uppercase(\"%s\")", |
d33e787c | 2294 | 1, |
2295 | &dsin_validate, | |
2296 | }, | |
2297 | ||
2298 | { | |
2299 | /* Q_GSHI - GET_SERVER_HOST_INFO */ | |
2300 | "get_server_host_info", | |
2301 | "gshi", | |
2302 | RETRIEVE, | |
2303 | "sh", | |
2304 | "serverhosts", | |
87167924 | 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", |
d33e787c | 2306 | gshi_fields, |
2307 | 16, | |
88343c5e | 2308 | "sh.service = uppercase(\"%s\") and machine.name = uppercase(\"%s\") and machine.mach_id = sh.mach_id", |
d33e787c | 2309 | 2, |
2310 | &gshi_validate, | |
2311 | }, | |
2312 | ||
2313 | { | |
2314 | /* Q_QGSV - QUALIFIED_GET_SERVER_HOST */ | |
2315 | "qualified_get_server_host", | |
2316 | "qgsh", | |
2317 | RETRIEVE, | |
2318 | 0, | |
2319 | "serverhosts", | |
2320 | 0, | |
2321 | qgsh_fields, | |
2322 | 2, | |
2323 | 0, | |
2324 | 6, | |
2325 | &qgsh_validate, | |
2326 | }, | |
2327 | ||
2328 | { | |
2329 | /* Q_ASHI - ADD_SERVER_HOST_INFO */ | |
2330 | "add_server_host_info", | |
2331 | "ashi", | |
2332 | APPEND, | |
2333 | "sh", | |
2334 | "serverhosts", | |
88343c5e | 2335 | "service = uppercase(%c), mach_id = %i4, enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c", |
d33e787c | 2336 | ashi_fields, |
2337 | 6, | |
2338 | (char *)0, | |
2339 | 0, | |
2340 | &ashi_validate, | |
2341 | }, | |
2342 | ||
2343 | { | |
2344 | /* Q_USHI - UPDATE_SERVER_HOST_INFO */ | |
2345 | "update_server_host_info", | |
2346 | "ushi", | |
2347 | UPDATE, | |
2348 | "sh", | |
2349 | "serverhosts", | |
2350 | "enable = int1(%c), value1 = int4(%c), value2 = int4(%c), value3 = %c", | |
2351 | ashi_fields, | |
2352 | 4, | |
88343c5e | 2353 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 2354 | 2, |
2355 | &ashi_validate, | |
2356 | }, | |
2357 | ||
2358 | { | |
2359 | /* Q_RSHE - RESET_SERVER_HOST_ERROR */ | |
2360 | "reset_server_host_error", | |
2361 | "rshe", | |
2362 | UPDATE, | |
2363 | "sh", | |
2364 | "serverhosts", | |
2365 | "hosterror = 0", | |
2366 | dshi_fields, | |
2367 | 0, | |
88343c5e | 2368 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 2369 | 2, |
2370 | &rshe_validate, | |
2371 | }, | |
2372 | ||
2373 | { | |
2374 | /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */ | |
2375 | "set_server_host_override", | |
2376 | "ssho", | |
2377 | UPDATE, | |
2378 | "sh", | |
2379 | "serverhosts", | |
2380 | "override = 1", | |
2381 | dshi_fields, | |
2382 | 0, | |
88343c5e | 2383 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 2384 | 2, |
2385 | &ssho_validate, | |
2386 | }, | |
2387 | ||
2388 | { | |
2389 | /* Q_SSHI - SET_SERVER_HOST_INTERNAL */ | |
2390 | "set_server_host_internal", | |
2391 | "sshi", | |
2392 | UPDATE, | |
7ac4c1b1 | 2393 | "s", |
d33e787c | 2394 | "serverhosts", |
87167924 | 2395 | "override = int1(%c), success = int1(%c), inprogress = int1(%c), hosterror = int1(%c), hosterrmsg = %c, ltt = int4(%c), lts = int4(%c)", |
d33e787c | 2396 | sshi_fields, |
2397 | 7, | |
7ac4c1b1 | 2398 | "s.service = uppercase(\"%s\") and s.mach_id = %d", |
d33e787c | 2399 | 2, |
2400 | &sshi_validate, | |
2401 | }, | |
2402 | ||
2403 | { | |
2404 | /* Q_DSHI - DELETE_SERVER_HOST_INFO */ | |
2405 | "delete_server_host_info", | |
2406 | "dshi", | |
2407 | DELETE, | |
2408 | "sh", | |
2409 | "serverhosts", | |
2410 | (char *)0, | |
2411 | dshi_fields, | |
2412 | 0, | |
88343c5e | 2413 | "sh.service = uppercase(\"%s\") and sh.mach_id = %d", |
d33e787c | 2414 | 2, |
2415 | &dshi_validate, | |
2416 | }, | |
2417 | ||
2418 | { | |
2419 | /* Q_GSHA - GET_SERVER_HOST_ACCESS */ | |
2420 | "get_server_host_access", | |
2421 | "gsha", | |
2422 | RETRIEVE, | |
2423 | "ha", | |
2424 | "hostaccess", | |
2425 | "%c = machine.name, %c = ha.acl_type, %c = text(ha.acl_id), %c = ha.modtime, %c = text(ha.modby), %c = ha.modwith", | |
2426 | gsha_fields, | |
2427 | 6, | |
2428 | "machine.name = uppercase(\"%s\") and ha.mach_id = machine.mach_id", | |
2429 | 1, | |
2430 | &gsha_validate, | |
2431 | }, | |
2432 | ||
2433 | { | |
2434 | /* Q_ASHA - ADD_SERVER_HOST_ACCESS */ | |
2435 | "add_server_host_access", | |
2436 | "asha", | |
2437 | APPEND, | |
2438 | "ha", | |
2439 | "hostaccess", | |
2440 | "mach_id = %i4, acl_type = %c, acl_id = %i4", | |
2441 | asha_fields, | |
2442 | 3, | |
2443 | 0, | |
2444 | 0, | |
2445 | &asha_validate, | |
2446 | }, | |
2447 | ||
2448 | { | |
2449 | /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */ | |
2450 | "update_server_host_access", | |
2451 | "usha", | |
2452 | UPDATE, | |
2453 | "ha", | |
2454 | "hostaccess", | |
2455 | "acl_type = %c, acl_id = %i4", | |
2456 | asha_fields, | |
2457 | 2, | |
2458 | "ha.mach_id = %d", | |
2459 | 1, | |
2460 | &asha_validate, | |
2461 | }, | |
2462 | ||
2463 | { | |
2464 | /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */ | |
2465 | "delete_server_host_access", | |
2466 | "dsha", | |
2467 | DELETE, | |
2468 | "ha", | |
2469 | "hostaccess", | |
2470 | 0, | |
2471 | asha_fields, | |
2472 | 0, | |
2473 | "ha.mach_id = %d", | |
2474 | 1, | |
2475 | &VDmach, | |
2476 | }, | |
2477 | ||
2478 | { | |
2479 | /* Q_GSLO - GET_SERVER_LOCATIONS */ | |
2480 | "get_server_locations", | |
2481 | "gslo", | |
2482 | RETRIEVE, | |
2483 | "sh", | |
2484 | "serverhosts", | |
2485 | "%c = sh.service, %c = machine.name", | |
2486 | gslo_fields, | |
2487 | 2, | |
88343c5e | 2488 | "sh.service = uppercase(\"%s\") and sh.mach_id = machine.mach_id", |
d33e787c | 2489 | 1, |
2490 | 0, | |
2491 | }, | |
2492 | ||
2493 | { | |
2494 | /* Q_GFSL - GET_FILESYS_BY_LABEL */ | |
2495 | "get_filesys_by_label", | |
2496 | "gfsl", | |
2497 | RETRIEVE, | |
2498 | "fs", | |
2499 | FILESYS, | |
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", | |
2501 | gfsl_fields, | |
2502 | 14, | |
2503 | "fs.label = \"%s\" and fs.mach_id = machine.mach_id and fs.owner = users.users_id and fs.owners = list.list_id", | |
2504 | 1, | |
2505 | &VDsortf, | |
2506 | }, | |
2507 | ||
2508 | { | |
2509 | /* Q_GFSM - GET_FILESYS_BY_MACHINE */ | |
2510 | "get_filesys_by_machine", | |
2511 | "gfsm", | |
2512 | RETRIEVE, | |
2513 | "fs", | |
2514 | FILESYS, | |
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", | |
2516 | gfsm_fields, | |
2517 | 14, | |
2518 | "fs.mach_id = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id", | |
2519 | 1, | |
2520 | &gfsm_validate, | |
2521 | }, | |
2522 | ||
88343c5e | 2523 | { |
2524 | /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */ | |
2525 | "get_filesys_by_nfsphys", | |
2526 | "gfsn", | |
2527 | RETRIEVE, | |
2528 | "fs", | |
2529 | FILESYS, | |
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", | |
2531 | gfsn_fields, | |
2532 | 14, | |
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\"", | |
2534 | 2, | |
2535 | &gfsm_validate, | |
2536 | }, | |
2537 | ||
d33e787c | 2538 | { |
2539 | /* Q_GFSG - GET_FILESYS_BY_GROUP */ | |
2540 | "get_filesys_by_group", | |
2541 | "gfsg", | |
2542 | RETRIEVE, | |
2543 | "fs", | |
2544 | FILESYS, | |
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", | |
2546 | gfsg_fields, | |
2547 | 14, | |
2548 | "fs.owners = %d and machine.mach_id = fs.mach_id and fs.owner = users.users_id and fs.owners = list.list_id", | |
2549 | 1, | |
2550 | &gfsg_validate, | |
2551 | }, | |
2552 | ||
2553 | { | |
2554 | /* Q_AFIL - ADD_FILESYS */ | |
2555 | "add_filesys", | |
2556 | "afil", | |
2557 | APPEND, | |
2558 | "fs", | |
2559 | 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", | |
2561 | afil_fields, | |
2562 | 11, | |
2563 | "values.name = \"filsys_id\"", | |
2564 | 0, | |
2565 | &afil_validate, | |
2566 | }, | |
2567 | ||
2568 | { | |
2569 | /* Q_UFIL - UPDATE_FILESYS */ | |
2570 | "update_filesys", | |
2571 | "ufil", | |
2572 | UPDATE, | |
2573 | "fs", | |
2574 | 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", | |
2576 | ufil_fields, | |
2577 | 11, | |
2578 | "fs.filsys_id = %d", | |
2579 | 1, | |
2580 | &ufil_validate, | |
2581 | }, | |
2582 | ||
2583 | { | |
2584 | /* Q_DFIL - DELETE_FILESYS */ | |
2585 | "delete_filesys", | |
2586 | "dfil", | |
2587 | DELETE, | |
2588 | "fs", | |
2589 | FILESYS, | |
2590 | (char *)0, | |
2591 | dfil_fields, | |
2592 | 0, | |
2593 | "fs.filsys_id = %d", | |
2594 | 1, | |
2595 | &dfil_validate, | |
2596 | }, | |
2597 | ||
2598 | { | |
2599 | /* Q_GANF - GET_ALL_NFSPHYS */ | |
2600 | "get_all_nfsphys", | |
2601 | "ganf", | |
2602 | RETRIEVE, | |
2603 | "np", | |
2604 | "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", | |
2606 | ganf_fields, | |
2607 | 9, | |
2608 | "machine.mach_id = np.mach_id", | |
2609 | 0, | |
2610 | &VDsortf, | |
2611 | }, | |
2612 | ||
2613 | { | |
2614 | /* Q_GNFP - GET_NFSPHYS */ | |
2615 | "get_nfsphys", | |
2616 | "gnfp", | |
2617 | RETRIEVE, | |
2618 | "np", | |
2619 | "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", | |
2621 | gnfp_fields, | |
2622 | 9, | |
2623 | "np.mach_id = %d and np.dir = \"%s\" and machine.mach_id = np.mach_id", | |
2624 | 2, | |
2625 | &gnfp_validate, | |
2626 | }, | |
2627 | ||
2628 | { | |
2629 | /* Q_ANFP - ADD_NFSPHYS */ | |
2630 | "add_nfsphys", | |
2631 | "anfp", | |
2632 | APPEND, | |
2633 | "np", | |
2634 | "nfsphys", | |
2635 | "nfsphys_id = values.value, mach_id = %i4, dir = %c, device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)", | |
2636 | ganf_fields, | |
2637 | 6, | |
2638 | "values.name = \"nfsphys_id\"", | |
2639 | 0, | |
2640 | &anfp_validate, | |
2641 | }, | |
2642 | ||
2643 | { | |
2644 | /* Q_UNFP - UPDATE_NFSPHYS */ | |
2645 | "update_nfsphys", | |
2646 | "unfp", | |
2647 | UPDATE, | |
2648 | "np", | |
2649 | "nfsphys", | |
2650 | "device = %c, status = int4(%c), allocated = int4(%c), size = int4(%c)", | |
2651 | gnfp_fields, | |
2652 | 4, | |
2653 | "np.mach_id = %d and np.dir = \"%s\"", | |
2654 | 2, | |
2655 | &anfp_validate, | |
2656 | }, | |
2657 | ||
2658 | { | |
2659 | /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */ | |
2660 | "adjust_nfsphys_allocation", | |
2661 | "ajnf", | |
2662 | UPDATE, | |
2663 | "np", | |
2664 | "nfsphys", | |
2665 | "allocated = np.allocated + int4(%c)", | |
2666 | dnfp_fields, | |
2667 | 1, | |
2668 | "np.mach_id = %d and np.dir = \"%s\"", | |
2669 | 2, | |
2670 | &anfp_validate, | |
2671 | }, | |
2672 | ||
2673 | { | |
2674 | /* Q_DNFP - DELETE_NFSPHYS */ | |
2675 | "delete_nfsphys", | |
2676 | "dnfp", | |
2677 | DELETE, | |
2678 | "np", | |
2679 | "nfsphys", | |
2680 | (char *)0, | |
2681 | dnfp_fields, | |
2682 | 0, | |
2683 | "np.mach_id = %d and np.dir = \"%s\"", | |
2684 | 2, | |
2685 | &dnfp_validate, | |
2686 | }, | |
2687 | ||
2688 | { | |
2689 | /* Q_GNFQ - GET_NFS_QUOTAS */ | |
88343c5e | 2690 | "get_nfs_quota", |
d33e787c | 2691 | "gnfq", |
2692 | RETRIEVE, | |
2693 | "nq", | |
2694 | "nfsquota", | |
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", | |
2696 | gnfq_fields, | |
2697 | 8, | |
7ac4c1b1 | 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", |
88343c5e | 2699 | 2, |
d33e787c | 2700 | &gnfq_validate, |
2701 | }, | |
2702 | ||
2703 | { | |
2704 | /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */ | |
2705 | "get_nfs_quotas_by_partition", | |
2706 | "gnqp", | |
2707 | RETRIEVE, | |
2708 | "nq", | |
2709 | "nfsquota", | |
2710 | "%c = filesys.label, %c = users.login, %c = text(nq.quota), %c = nfsphys.dir, %c = machine.name", | |
2711 | gnqp_fields, | |
2712 | 5, | |
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", | |
2714 | 2, | |
2715 | &VDmach, | |
2716 | }, | |
2717 | ||
d33e787c | 2718 | { |
2719 | /* Q_ANFQ - ADD_NFS_QUOTA */ | |
2720 | "add_nfs_quota", | |
2721 | "anfq", | |
2722 | APPEND, | |
2723 | "nq", | |
2724 | "nfsquota", | |
2725 | "filsys_id = %i4, users_id = %i4, quota = int4(%c)", | |
2726 | anfq_fields, | |
2727 | 3, | |
2728 | (char *)0, | |
2729 | 0, | |
2730 | &anfq_validate, | |
2731 | }, | |
2732 | ||
2733 | { | |
2734 | /* Q_UNFQ - UPDATE_NFS_QUOTA */ | |
2735 | "update_nfs_quota", | |
2736 | "unfq", | |
2737 | UPDATE, | |
2738 | "nq", | |
2739 | "nfsquota", | |
2740 | "quota = int4(%c)", | |
2741 | anfq_fields, | |
2742 | 1, | |
2743 | "nq.filsys_id = %d and nq.users_id = %d", | |
2744 | 2, | |
2745 | &unfq_validate, | |
2746 | }, | |
2747 | ||
2748 | { | |
2749 | /* Q_DNFQ - DELETE_NFS_QUOTA */ | |
2750 | "delete_nfs_quota", | |
2751 | "dnfq", | |
2752 | DELETE, | |
2753 | "nq", | |
2754 | "nfsquota", | |
2755 | (char *)0, | |
2756 | anfq_fields, | |
2757 | 0, | |
2758 | "nq.filsys_id = %d and nq.users_id = %d", | |
2759 | 2, | |
2760 | &dnfq_validate, | |
2761 | }, | |
2762 | ||
2763 | { | |
2764 | /* Q_GLIN - GET_LIST_INFO */ | |
2765 | "get_list_info", | |
2766 | "glin", | |
2767 | RETRIEVE, | |
2768 | 0, | |
2769 | LIST, | |
2770 | 0, | |
2771 | glin_fields, | |
2772 | 13, | |
2773 | 0, | |
2774 | 1, | |
2775 | &glin_validate, | |
2776 | }, | |
2777 | ||
2778 | { | |
2779 | /* Q_EXLN - EXPAND_LIST_NAMES */ | |
2780 | "expand_list_names", | |
2781 | "exln", | |
2782 | RETRIEVE, | |
2783 | "l", | |
2784 | LIST, | |
2785 | "%c = l.name", | |
2786 | glin_fields, | |
2787 | 1, | |
2788 | "l.name = \"%s\" and l.list_id != 0", | |
2789 | 1, | |
2790 | 0 | |
2791 | }, | |
2792 | ||
2793 | { | |
2794 | /* Q_ALIS - ADD_LIST */ | |
2795 | "add_list", | |
2796 | "alis", | |
2797 | APPEND, | |
2798 | "l", | |
2799 | 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", | |
2801 | alis_fields, | |
2802 | 10, | |
2803 | "values.name = \"list_id\"", | |
2804 | 0, | |
2805 | &alis_validate, | |
2806 | }, | |
2807 | ||
2808 | { | |
2809 | /* Q_ULIS - UPDATE_LIST */ | |
2810 | "update_list", | |
2811 | "ulis", | |
2812 | UPDATE, | |
2813 | "l", | |
2814 | 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", | |
2816 | ulis_fields, | |
2817 | 10, | |
2818 | "l.list_id = %d", | |
2819 | 1, | |
2820 | &ulis_validate, | |
2821 | }, | |
2822 | ||
2823 | { | |
2824 | /* Q_DLIS - DELETE_LIST */ | |
2825 | "delete_list", | |
2826 | "dlis", | |
2827 | DELETE, | |
2828 | "l", | |
2829 | LIST, | |
2830 | (char *)0, | |
2831 | dlis_fields, | |
2832 | 0, | |
2833 | "l.list_id = %d", | |
2834 | 1, | |
2835 | &dlis_validate, | |
2836 | }, | |
2837 | ||
2838 | { | |
2839 | /* Q_AMTL - ADD_MEMBER_TO_LIST */ | |
2840 | "add_member_to_list", | |
2841 | "amtl", | |
2842 | APPEND, | |
2843 | "m", | |
2844 | "members", | |
2845 | "list_id=%i4, member_type=%c, member_id=%i4", | |
2846 | amtl_fields, | |
2847 | 3, | |
2848 | (char *)0, | |
2849 | 0, | |
2850 | &amtl_validate, | |
2851 | }, | |
2852 | ||
2853 | { | |
2854 | /* Q_DMFL - DELETE_MEMBER_FROM_LIST */ | |
2855 | "delete_member_from_list", | |
2856 | "dmfl", | |
2857 | DELETE, | |
2858 | "m", | |
2859 | "members", | |
2860 | (char *)0, | |
2861 | amtl_fields, | |
2862 | 0, | |
2863 | "m.list_id = %d and m.member_type = \"%s\" and m.member_id = %d", | |
2864 | 3, | |
2865 | &amtl_validate, | |
2866 | }, | |
2867 | ||
2868 | { | |
88343c5e | 2869 | /* Q_GAUS - GET_ACE_USE */ |
2870 | "get_ace_use", | |
d33e787c | 2871 | "gaus", |
2872 | RETRIEVE, | |
2873 | 0, | |
2874 | 0, | |
2875 | 0, | |
2876 | gaus_fields, | |
2877 | 2, | |
2878 | 0, | |
2879 | 2, | |
2880 | &gaus_validate, | |
2881 | }, | |
2882 | ||
2883 | { | |
2884 | /* Q_QGLI - QUALIFIED_GET_LISTS */ | |
2885 | "qualified_get_lists", | |
2886 | "qgli", | |
2887 | RETRIEVE, | |
2888 | 0, | |
2889 | LIST, | |
2890 | 0, | |
2891 | qgli_fields, | |
2892 | 1, | |
2893 | 0, | |
2894 | 5, | |
2895 | &qgli_validate, | |
2896 | }, | |
2897 | ||
2898 | { | |
2899 | /* Q_GMOL - GET_MEMBERS_OF_LIST */ | |
2900 | "get_members_of_list", | |
2901 | "gmol", | |
2902 | RETRIEVE, | |
2903 | (char *)0, | |
2904 | "members", | |
2905 | (char *)0, | |
2906 | gmol_fields, | |
2907 | 0, | |
2908 | (char *)0, | |
2909 | 1, | |
2910 | &gmol_validate, | |
2911 | }, | |
2912 | ||
2913 | { | |
2914 | /* Q_GLOM - GET_LISTS_OF_MEMBER */ | |
2915 | "get_lists_of_member", | |
2916 | "glom", | |
2917 | RETRIEVE, | |
2918 | 0, | |
2919 | "members", | |
2920 | 0, | |
2921 | glom_fields, | |
2922 | 6, | |
2923 | 0, | |
2924 | 2, | |
2925 | &glom_validate, | |
2926 | }, | |
2927 | ||
2928 | { | |
2929 | /* Q_CMOL - COUNT_MEMBERS_OF_LIST */ | |
2930 | "count_members_of_list", | |
2931 | "cmol", | |
2932 | RETRIEVE, | |
2933 | 0, | |
2934 | "members", | |
2935 | 0, | |
2936 | cmol_fields, | |
2937 | 1, | |
2938 | 0, | |
2939 | 1, | |
2940 | &cmol_validate, | |
2941 | }, | |
7ac4c1b1 | 2942 | #ifdef notdef |
d33e787c | 2943 | { |
2944 | /* Q_AUGR - ADD_USER_GROUP */ | |
2945 | "add_user_group", | |
2946 | "augr", | |
2947 | APPEND, | |
2948 | (char *)0, | |
2949 | (char *)0, | |
2950 | (char *)0, | |
2951 | augr_fields, | |
2952 | 1, | |
2953 | (char *)0, | |
2954 | 0, | |
2955 | &augr_validate, | |
2956 | }, | |
7ac4c1b1 | 2957 | #endif |
d33e787c | 2958 | { |
2959 | /* Q_GZCL - GET_ZEPHYR_CLASS */ | |
2960 | "get_zephyr_class", | |
2961 | "gzcl", | |
2962 | RETRIEVE, | |
2963 | "z", | |
2964 | "zephyr", | |
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", | |
2966 | gzcl_fields, | |
2967 | 12, | |
2968 | "z.class = \"%s\"", | |
2969 | 1, | |
2970 | &gzcl_validate, | |
2971 | }, | |
2972 | ||
2973 | { | |
2974 | /* Q_AZCL - ADD_ZEPHYR_CLASS */ | |
2975 | "add_zephyr_class", | |
2976 | "azcl", | |
2977 | APPEND, | |
2978 | "z", | |
2979 | "zephyr", | |
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", | |
2981 | azcl_fields, | |
2982 | 9, | |
2983 | 0, | |
2984 | 0, | |
2985 | &azcl_validate, | |
2986 | }, | |
2987 | ||
2988 | { | |
2989 | /* Q_UZCL - UPDATE_ZEPHYR_CLASS */ | |
2990 | "update_zephyr_class", | |
2991 | "uzcl", | |
2992 | UPDATE, | |
2993 | "z", | |
2994 | "zephyr", | |
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", | |
2996 | uzcl_fields, | |
2997 | 9, | |
2998 | "z.class = \"%s\"", | |
2999 | 1, | |
3000 | &uzcl_validate, | |
3001 | }, | |
3002 | ||
3003 | { | |
3004 | /* Q_DZCL - DELETE_ZEPHYR_CLASS */ | |
3005 | "delete_zephyr_class", | |
3006 | "dzcl", | |
3007 | DELETE, | |
3008 | "z", | |
3009 | "zephyr", | |
3010 | 0, | |
3011 | uzcl_fields, | |
3012 | 0, | |
3013 | "z.class = \"%s\"", | |
3014 | 1, | |
3015 | &dzcl_validate, | |
3016 | }, | |
3017 | #ifdef notdef | |
3018 | { | |
3019 | /* Q_GSVC - GET_SERVICE */ | |
3020 | "get_service", | |
3021 | "gsvc", | |
3022 | RETRIEVE, | |
3023 | "s", | |
3024 | "services", | |
3025 | "%c = s.name, %c = s.protocol, %c = text(s.port), %c = s.desc, %c = s.modtime, %c = text(s.modby), %c = s.modwith", | |
3026 | gasv_fields, | |
3027 | 7, | |
3028 | (char *)0, | |
3029 | 0, | |
3030 | &gsvc_validate, | |
3031 | }, | |
3032 | ||
3033 | { | |
3034 | /* Q_ASVC - ADD_SERVICE */ | |
3035 | "add_service", | |
3036 | "asvc", | |
3037 | APPEND, | |
3038 | "s", | |
3039 | "services", | |
3040 | "name = %c, protocol = %c, port = int2(%c), desc = %c", | |
3041 | gasv_fields, | |
3042 | 4, | |
3043 | (char *)0, | |
3044 | 0, | |
3045 | &asvc_validate, | |
3046 | }, | |
3047 | ||
3048 | { | |
3049 | /* Q_DSVC - DELETE_SERVICE */ | |
3050 | "delete_service", | |
3051 | "dsvc", | |
3052 | DELETE, | |
3053 | "s", | |
3054 | "services", | |
3055 | 0, | |
3056 | gasv_fields, | |
3057 | 0, | |
3058 | "s.name = \"%s\"", | |
3059 | 1, | |
3060 | &dsvc_validate, | |
3061 | }, | |
3062 | #endif | |
3063 | { | |
3064 | /* Q_GPCP - GET_PRINTCAP */ | |
3065 | "get_printcap", | |
3066 | "gpcp", | |
3067 | RETRIEVE, | |
3068 | "p", | |
3069 | "printcap", | |
3070 | "%c = p.name, %c = p.pcap, %c = p.modtime, %c = text(p.modby), %c = p.modwith", | |
3071 | gpcp_fields, | |
3072 | 5, | |
3073 | "p.name = \"%s\"", | |
3074 | 1, | |
3075 | &VDsortf, | |
3076 | }, | |
3077 | ||
3078 | { | |
3079 | /* Q_APCP - ADD_PRINTCAP */ | |
3080 | "add_printcap", | |
3081 | "apcp", | |
3082 | APPEND, | |
3083 | "p", | |
3084 | "printcap", | |
3085 | "name = %c, pcap = %c", | |
3086 | apcp_fields, | |
3087 | 2, | |
3088 | 0, | |
3089 | 0, | |
3090 | &apcp_validate, | |
3091 | }, | |
3092 | ||
3093 | { | |
3094 | /* Q_DPCP - DELETE_PRINTCAP */ | |
3095 | "delete_printcap", | |
3096 | "dpcp", | |
3097 | DELETE, | |
3098 | "p", | |
3099 | "printcap", | |
3100 | 0, | |
3101 | apcp_fields, | |
3102 | 0, | |
3103 | "p.name = \"%s\"", | |
3104 | 1, | |
3105 | &apcp_validate, | |
3106 | }, | |
3107 | ||
3108 | { | |
3109 | /* Q_GALI - GET_ALIAS */ | |
3110 | "get_alias", | |
3111 | "gali", | |
3112 | RETRIEVE, | |
3113 | "a", | |
3114 | "alias", | |
3115 | "%c = a.name, %c = a.type, %c = a.trans", | |
3116 | gali_fields, | |
3117 | 3, | |
3118 | "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"", | |
3119 | 3, | |
3120 | 0, | |
3121 | }, | |
3122 | ||
3123 | { | |
3124 | /* Q_AALI - ADD_ALIAS */ | |
3125 | "add_alias", | |
3126 | "aali", | |
3127 | APPEND, | |
3128 | "a", | |
3129 | "alias", | |
3130 | "name = %c, type = %c, trans = %c", | |
3131 | aali_fields, | |
3132 | 3, | |
3133 | (char *)0, | |
3134 | 0, | |
3135 | &aali_validate, | |
3136 | }, | |
3137 | ||
3138 | { | |
3139 | /* Q_DALI - DELETE_ALIAS */ | |
3140 | "delete_alias", | |
3141 | "dali", | |
3142 | DELETE, | |
3143 | "a", | |
3144 | "alias", | |
3145 | (char *)0, | |
3146 | aali_fields, | |
3147 | 0, | |
3148 | "a.name = \"%s\" and a.type = \"%s\" and a.trans = \"%s\"", | |
3149 | 3, | |
3150 | &dali_validate, | |
3151 | }, | |
3152 | ||
3153 | { | |
3154 | /* Q_GVAL - GET_VALUE */ | |
3155 | "get_value", | |
3156 | "gval", | |
3157 | RETRIEVE, | |
3158 | "v", | |
3159 | "values", | |
3160 | "%c = text(v.value)", | |
3161 | gval_fields, | |
3162 | 1, | |
3163 | "v.name = \"%s\"", | |
3164 | 1, | |
3165 | &gval_validate, | |
3166 | }, | |
3167 | ||
3168 | { | |
3169 | /* Q_AVAL - ADD_VALUE */ | |
3170 | "add_value", | |
3171 | "aval", | |
3172 | APPEND, | |
3173 | "v", | |
3174 | "values", | |
3175 | "name = %c, value = int4(%c)", | |
3176 | aval_fields, | |
3177 | 2, | |
3178 | (char *)0, | |
3179 | 0, | |
3180 | &aval_validate, | |
3181 | }, | |
3182 | ||
3183 | { | |
3184 | /* Q_UVAL - UPDATE_VALUE */ | |
3185 | "update_value", | |
3186 | "uval", | |
3187 | UPDATE, | |
3188 | "v", | |
3189 | "values", | |
3190 | "value = int4(%c)", | |
3191 | aval_fields, | |
3192 | 1, | |
3193 | "v.name = \"%s\"", | |
3194 | 1, | |
3195 | &aval_validate, | |
3196 | }, | |
3197 | ||
3198 | { | |
3199 | /* Q_DVAL - DELETE_VALUE */ | |
3200 | "delete_value", | |
3201 | "dval", | |
3202 | DELETE, | |
3203 | "v", | |
3204 | "values", | |
3205 | (char *)0, | |
3206 | dval_fields, | |
3207 | 0, | |
3208 | "v.name = \"%s\"", | |
3209 | 1, | |
3210 | &aval_validate, | |
3211 | }, | |
3212 | ||
3213 | { | |
3214 | /* Q_GATS - GET_ALL_TABLE_STATS */ | |
3215 | "get_all_table_stats", | |
3216 | "gats", | |
3217 | RETRIEVE, | |
3218 | "tbs", | |
3219 | "tblstats", | |
3220 | "%c = tbs.table, %c = text(tbs.retrieves), %c = text(tbs.appends), %c = text(tbs.updates), %c = text(tbs.deletes), %c = tbs.modtime", | |
3221 | gats_fields, | |
3222 | 6, | |
3223 | (char *)0, | |
3224 | 0, | |
3225 | 0, | |
3226 | }, | |
3227 | ||
3228 | }; | |
3229 | ||
3230 | int QueryCount2 = (sizeof Queries2 / sizeof (struct query)); |