]>
Commit | Line | Data |
---|---|---|
7ac48069 | 1 | /* $Id$ |
d33e787c | 2 | * |
c44ddfa7 | 3 | * This file defines the query dispatch table |
d33e787c | 4 | * |
7ac48069 | 5 | * Copyright (C) 1987-1998 by the Massachusetts Institute of Technology. |
c801de4c | 6 | * For copying and distribution information, please see the file |
7 | * <mit-copyright.h>. | |
d33e787c | 8 | */ |
9 | ||
c801de4c | 10 | #include <mit-copyright.h> |
03c05291 | 11 | #include "mr_server.h" |
d33e787c | 12 | #include "query.h" |
d33e787c | 13 | |
7ac48069 | 14 | #include "mr_et.h" |
d33e787c | 15 | |
d33e787c | 16 | /* VALOBJS |
17 | * These are commonly used validation objects, defined here so that they | |
18 | * can be shared. | |
19 | */ | |
20 | ||
d33e787c | 21 | static struct valobj VOuser0[] = { |
e2b8245f | 22 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
d33e787c | 23 | }; |
24 | ||
25 | static struct valobj VOmach0[] = { | |
e2b8245f | 26 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
d33e787c | 27 | }; |
28 | ||
29 | static struct valobj VOclu0[] = { | |
e2b8245f | 30 | {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER}, |
d33e787c | 31 | }; |
32 | ||
d1b3a4bf | 33 | static struct valobj VOsnet0[] = { |
34 | {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
35 | }; | |
36 | ||
d33e787c | 37 | static struct valobj VOlist0[] = { |
e2b8245f | 38 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
d33e787c | 39 | }; |
40 | ||
d1b3a4bf | 41 | static struct valobj VOfilesys0[] = { |
42 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, | |
43 | }; | |
44 | ||
2fb668b0 | 45 | static struct valobj VOcon0[] = { |
46 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
47 | }; | |
48 | ||
f802fd0d | 49 | static struct valobj VOnum0[] = { |
50 | {V_NUM, 0}, | |
d33e787c | 51 | }; |
52 | ||
d33e787c | 53 | /* Validations |
54 | * Commonly used validation records defined here so that they may | |
55 | * be shared. | |
56 | */ | |
57 | ||
58 | static struct validate VDmach = { VOmach0, 1 }; | |
263a36d4 | 59 | |
29028043 | 60 | static struct validate VDfix_modby = { |
61 | 0, | |
62 | 0, | |
0c345c78 | 63 | 0, |
64 | 0, | |
65 | 0, | |
66 | 0, | |
67 | 0, | |
68 | 0, | |
69 | followup_fix_modby, | |
d33e787c | 70 | }; |
71 | ||
d33e787c | 72 | /* Query data */ |
73 | ||
186dd63b | 74 | static char *galo2_fields[] = { |
e2b8245f | 75 | "login", "unix_uid", "shell", "last", "first", "middle", |
d33e787c | 76 | }; |
77 | ||
186dd63b | 78 | static char *galo_fields[] = { |
79 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
80 | }; | |
81 | ||
82 | static char *gual2_fields[] = { | |
e2b8245f | 83 | "login", |
84 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 85 | "clearid", "class", "comments", "signature", "secure", |
86 | "modtime", "modby", "modwith", | |
4ffa124a | 87 | }; |
0c345c78 | 88 | |
186dd63b | 89 | static char *gual_fields[] = { |
90 | "login", | |
91 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
92 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 93 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 94 | }; |
95 | ||
96 | static char *gubl2_fields[] = { | |
e2b8245f | 97 | "login", |
98 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 99 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 100 | }; |
101 | ||
186dd63b | 102 | static char *gubl_fields[] = { |
103 | "login", | |
104 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
3b634eb3 | 105 | "status", "clearid", "class", "modtime", "modby", "modwith", "created", |
106 | "creator", | |
186dd63b | 107 | }; |
108 | ||
5eaef520 | 109 | static struct validate gubl_validate = |
d33e787c | 110 | { |
263a36d4 | 111 | 0, |
112 | 0, | |
d33e787c | 113 | 0, |
114 | 0, | |
115 | 0, | |
116 | 0, | |
117 | access_login, | |
118 | 0, | |
3b634eb3 | 119 | followup_get_user, |
d33e787c | 120 | }; |
121 | ||
186dd63b | 122 | static char *guau2_fields[] = { |
e2b8245f | 123 | "unix_uid", |
124 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 125 | "clearid", "class", "comments", "signature", "secure", |
126 | "modtime", "modby", "modwith", | |
4ffa124a | 127 | }; |
0c345c78 | 128 | |
186dd63b | 129 | static char *guau_fields[] = { |
130 | "unix_uid", | |
131 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
132 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 133 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 134 | }; |
135 | ||
136 | static char *guan2_fields[] = { | |
e2b8245f | 137 | "first", "last", |
138 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 139 | "clearid", "class", "comments", "signature", "secure", |
140 | "modtime", "modby", "modwith", | |
4ffa124a | 141 | }; |
0c345c78 | 142 | |
186dd63b | 143 | static char *guan_fields[] = { |
144 | "first", "last", | |
145 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
146 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 147 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 148 | }; |
149 | ||
5eaef520 | 150 | static struct validate guan_validate = |
60452f41 | 151 | { |
263a36d4 | 152 | 0, |
153 | 0, | |
60452f41 | 154 | 0, |
155 | 0, | |
156 | 0, | |
157 | 0, | |
158 | 0, | |
159 | 0, | |
3b634eb3 | 160 | followup_get_user, |
60452f41 | 161 | }; |
162 | ||
186dd63b | 163 | static char *guac2_fields[] = { |
e2b8245f | 164 | "class", |
165 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 166 | "clearid", "class", "comments", "signature", "secure", |
167 | "modtime", "modby", "modwith", | |
4ffa124a | 168 | }; |
0c345c78 | 169 | |
186dd63b | 170 | static char *guac_fields[] = { |
171 | "class", | |
172 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
173 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 174 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 175 | }; |
176 | ||
177 | static char *guam2_fields[] = { | |
e2b8245f | 178 | "clearid", |
179 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 180 | "clearid", "class", "comments", "signature", "secure", |
181 | "modtime", "modby", "modwith", | |
4ffa124a | 182 | }; |
0c345c78 | 183 | |
186dd63b | 184 | static char *guam_fields[] = { |
185 | "clearid", | |
186 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
187 | "status", "clearid", "class", "comments", "signature", "secure", | |
3b634eb3 | 188 | "modtime", "modby", "modwith", "created", "creator", |
186dd63b | 189 | }; |
190 | ||
191 | static char *gubu2_fields[] = { | |
e2b8245f | 192 | "unix_uid", |
193 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 194 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 195 | }; |
196 | ||
186dd63b | 197 | static char *gubu_fields[] = { |
198 | "unix_uid", | |
199 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
3b634eb3 | 200 | "status", "clearid", "class", "modtime", "modby", "modwith", "created", |
201 | "creator", | |
186dd63b | 202 | }; |
203 | ||
5eaef520 | 204 | static struct validate gubu_validate = |
f9f5c199 | 205 | { |
f802fd0d | 206 | VOnum0, |
207 | 1, | |
f9f5c199 | 208 | 0, |
209 | 0, | |
210 | 0, | |
211 | 0, | |
212 | access_login, | |
213 | 0, | |
3b634eb3 | 214 | followup_get_user, |
f9f5c199 | 215 | }; |
216 | ||
186dd63b | 217 | static char *gubn2_fields[] = { |
e2b8245f | 218 | "first", "last", |
219 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 220 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 221 | }; |
222 | ||
186dd63b | 223 | static char *gubn_fields[] = { |
224 | "first", "last", | |
225 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
3b634eb3 | 226 | "status", "clearid", "class", "modtime", "modby", "modwith", "created", |
227 | "creator", | |
186dd63b | 228 | }; |
229 | ||
99e09b48 | 230 | static struct validate gubn_validate = |
231 | { | |
263a36d4 | 232 | 0, |
233 | 0, | |
0c345c78 | 234 | 0, |
235 | 0, | |
236 | 0, | |
237 | 0, | |
238 | 0, | |
239 | 0, | |
3b634eb3 | 240 | followup_get_user, |
99e09b48 | 241 | }; |
242 | ||
186dd63b | 243 | static char *gubc2_fields[] = { |
e2b8245f | 244 | "class", |
245 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 246 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 247 | }; |
248 | ||
186dd63b | 249 | static char *gubc_fields[] = { |
250 | "class", | |
251 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", "middle", | |
252 | "status", "clearid", "class", "modtime", "modby", "modwith", | |
3b634eb3 | 253 | "created", "creator", |
186dd63b | 254 | }; |
255 | ||
256 | static char *gubm2_fields[] = { | |
e2b8245f | 257 | "clearid", |
258 | "login", "unix_uid", "shell", "last", "first", "middle", "status", | |
8db06f75 | 259 | "clearid", "class", "modtime", "modby", "modwith", |
d33e787c | 260 | }; |
261 | ||
186dd63b | 262 | static char *gubm_fields[] = { |
263 | "clearid", | |
264 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", | |
265 | "middle", "status", "clearid", "class", "modtime", "modby", "modwith", | |
3b634eb3 | 266 | "created", "creator", |
186dd63b | 267 | }; |
268 | ||
269 | static char *auac2_fields[] = { | |
e2b8245f | 270 | "login", "unix_uid", "shell", "last", "first", "middle", "status", |
271 | "clearid", "class", "comments", "signature", "secure", | |
d33e787c | 272 | }; |
273 | ||
186dd63b | 274 | static char *auac_fields[] = { |
275 | "login", "unix_uid", "shell", "winconsoleshell", "last", "first", | |
276 | "middle", "status", "clearid", "class", "comments", "signature", "secure", | |
277 | }; | |
278 | ||
279 | static struct valobj auac2_valobj[] = { | |
e2b8245f | 280 | {V_CHAR, 0, USERS_TABLE, "login"}, |
f802fd0d | 281 | {V_NUM, 1}, |
e2b8245f | 282 | {V_CHAR, 2, USERS_TABLE, "shell"}, |
283 | {V_CHAR, 3, USERS_TABLE, "last"}, | |
284 | {V_CHAR, 4, USERS_TABLE, "first"}, | |
285 | {V_CHAR, 5, USERS_TABLE, "middle"}, | |
f802fd0d | 286 | {V_NUM, 6}, |
e2b8245f | 287 | {V_CHAR, 7, USERS_TABLE, "clearid"}, |
288 | {V_TYPE, 8, 0, "class", 0, MR_BAD_CLASS}, | |
03c05291 | 289 | {V_ID, 9, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
9c45837e | 290 | {V_NUM, 11}, |
d33e787c | 291 | }; |
292 | ||
186dd63b | 293 | static struct valobj auac_valobj[] = { |
294 | {V_CHAR, 0, USERS_TABLE, "login"}, | |
295 | {V_NUM, 1}, | |
296 | {V_CHAR, 2, USERS_TABLE, "shell"}, | |
297 | {V_CHAR, 3, USERS_TABLE, "winconsoleshell"}, | |
298 | {V_CHAR, 4, USERS_TABLE, "last"}, | |
299 | {V_CHAR, 5, USERS_TABLE, "first"}, | |
300 | {V_CHAR, 6, USERS_TABLE, "middle"}, | |
301 | {V_NUM, 7}, | |
302 | {V_CHAR, 8, USERS_TABLE, "clearid"}, | |
303 | {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS}, | |
304 | {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
305 | {V_NUM, 12}, | |
306 | }; | |
307 | ||
308 | static struct validate auac2_validate = { | |
309 | auac2_valobj, | |
310 | 11, | |
311 | "login", | |
312 | "login = '%s'", | |
313 | 1, | |
314 | "users_id", | |
315 | 0, | |
316 | setup_ausr, | |
317 | followup_ausr, | |
318 | }; | |
319 | ||
4ffa124a | 320 | static struct validate auac_validate = { |
321 | auac_valobj, | |
186dd63b | 322 | 12, |
323 | "login", | |
324 | "login = '%s'", | |
325 | 1, | |
326 | "users_id", | |
327 | 0, | |
328 | setup_ausr, | |
329 | followup_ausr, | |
330 | }; | |
331 | ||
332 | static struct validate ausr2_validate = { | |
333 | auac2_valobj, | |
334 | 9, | |
e2b8245f | 335 | "login", |
03c05291 | 336 | "login = '%s'", |
4ffa124a | 337 | 1, |
e2b8245f | 338 | "users_id", |
4ffa124a | 339 | 0, |
340 | setup_ausr, | |
341 | followup_ausr, | |
342 | }; | |
0c345c78 | 343 | |
d33e787c | 344 | static struct validate ausr_validate = { |
4ffa124a | 345 | auac_valobj, |
186dd63b | 346 | 10, |
e2b8245f | 347 | "login", |
03c05291 | 348 | "login = '%s'", |
d33e787c | 349 | 1, |
e2b8245f | 350 | "users_id", |
d33e787c | 351 | 0, |
352 | setup_ausr, | |
353 | followup_ausr, | |
354 | }; | |
355 | ||
356 | static char *rusr_fields[] = { | |
b4bfb4d1 | 357 | "unix_uid", "login", "pobox_type" |
03c05291 | 358 | }; |
d33e787c | 359 | |
ba408d23 | 360 | static struct valobj rusr_valobj[] = { |
f802fd0d | 361 | {V_NUM, 0}, |
8bf97744 | 362 | {V_CHAR, 1, USERS_TABLE, "login"}, |
ba408d23 | 363 | }; |
364 | ||
d33e787c | 365 | static struct validate rusr_validate = { |
ba408d23 | 366 | rusr_valobj, |
b4bfb4d1 | 367 | 2, |
d33e787c | 368 | 0, |
369 | 0, | |
370 | 0, | |
371 | 0, | |
372 | 0, | |
373 | register_user, | |
374 | 0, | |
375 | }; | |
376 | ||
186dd63b | 377 | static char *uuac2_fields[] = { |
e2b8245f | 378 | "login", |
379 | "newlogin", "unix_uid", "shell", "last", "first", "middle", "status", | |
380 | "clearid", "class", "comments", "signature", "secure", | |
d33e787c | 381 | }; |
382 | ||
186dd63b | 383 | static char *uuac_fields[] = { |
384 | "login", | |
385 | "newlogin", "unix_uid", "shell", "winconsoleshell", "last", "first", | |
386 | "middle", "status", "clearid", "class", "comments", "signature", "secure", | |
387 | }; | |
388 | ||
389 | static struct valobj uuac2_valobj[] = { | |
e2b8245f | 390 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
391 | {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE}, | |
f802fd0d | 392 | {V_NUM, 2}, |
e2b8245f | 393 | {V_CHAR, 3, USERS_TABLE, "shell"}, |
394 | {V_CHAR, 4, USERS_TABLE, "first"}, | |
395 | {V_CHAR, 5, USERS_TABLE, "last"}, | |
396 | {V_CHAR, 6, USERS_TABLE, "middle"}, | |
f802fd0d | 397 | {V_NUM, 7}, |
e2b8245f | 398 | {V_CHAR, 8, USERS_TABLE, "clearid"}, |
399 | {V_TYPE, 9, 0, "class", 0, MR_BAD_CLASS}, | |
03c05291 | 400 | {V_ID, 10, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
f802fd0d | 401 | {V_NUM, 12}, |
d33e787c | 402 | }; |
186dd63b | 403 | |
404 | static struct valobj uuac_valobj[] = { | |
405 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, | |
406 | {V_RENAME, 1, USERS_TABLE, "login", "users_id", MR_NOT_UNIQUE}, | |
407 | {V_NUM, 2}, | |
408 | {V_CHAR, 3, USERS_TABLE, "shell"}, | |
409 | {V_CHAR, 4, USERS_TABLE, "winconsoleshell"}, | |
410 | {V_CHAR, 5, USERS_TABLE, "first"}, | |
411 | {V_CHAR, 6, USERS_TABLE, "last"}, | |
412 | {V_CHAR, 7, USERS_TABLE, "middle"}, | |
413 | {V_NUM, 8}, | |
414 | {V_CHAR, 9, USERS_TABLE, "clearid"}, | |
415 | {V_TYPE, 10, 0, "class", 0, MR_BAD_CLASS}, | |
416 | {V_ID, 11, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
417 | {V_NUM, 13}, | |
418 | }; | |
419 | ||
420 | static struct validate uuac2_validate = { | |
421 | uuac2_valobj, | |
422 | 12, | |
423 | 0, | |
424 | 0, | |
425 | 0, | |
426 | "users_id", | |
427 | 0, | |
428 | setup_ausr, | |
429 | set_modtime_by_id, | |
430 | }; | |
d33e787c | 431 | |
4ffa124a | 432 | static struct validate uuac_validate = { |
0c345c78 | 433 | uuac_valobj, |
186dd63b | 434 | 13, |
435 | 0, | |
436 | 0, | |
437 | 0, | |
438 | "users_id", | |
439 | 0, | |
440 | setup_ausr, | |
441 | set_modtime_by_id, | |
442 | }; | |
443 | ||
444 | static struct validate uusr2_validate = { | |
445 | uuac2_valobj, | |
446 | 10, | |
0c345c78 | 447 | 0, |
448 | 0, | |
449 | 0, | |
e2b8245f | 450 | "users_id", |
0c345c78 | 451 | 0, |
452 | setup_ausr, | |
d55429b2 | 453 | set_modtime_by_id, |
4ffa124a | 454 | }; |
0c345c78 | 455 | |
d33e787c | 456 | static struct validate uusr_validate = { |
4ffa124a | 457 | uuac_valobj, |
d1b3a4bf | 458 | 11, |
d33e787c | 459 | 0, |
460 | 0, | |
461 | 0, | |
e2b8245f | 462 | "users_id", |
d33e787c | 463 | 0, |
4ffa124a | 464 | setup_ausr, |
d33e787c | 465 | set_modtime_by_id, |
466 | }; | |
467 | ||
468 | static char *uush_fields[] = { | |
e2b8245f | 469 | "login", |
470 | "shell", | |
d33e787c | 471 | }; |
472 | ||
03c05291 | 473 | static struct valobj uush_valobj[] = { |
e2b8245f | 474 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
475 | {V_CHAR, 1, USERS_TABLE, "shell"}, | |
03c05291 | 476 | }; |
477 | ||
d33e787c | 478 | static struct validate uush_validate = { |
03c05291 | 479 | uush_valobj, |
d1b3a4bf | 480 | 2, |
d33e787c | 481 | 0, |
482 | 0, | |
483 | 0, | |
e2b8245f | 484 | "users_id", |
d33e787c | 485 | access_user, |
486 | 0, | |
a39342a9 | 487 | set_finger_modtime, |
d33e787c | 488 | }; |
489 | ||
29dbfca4 | 490 | static char *uuws_fields[] = { |
491 | "login", | |
492 | "winconsoleshell", | |
493 | }; | |
494 | ||
495 | static struct valobj uuws_valobj[] = { | |
496 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, | |
497 | {V_CHAR, 1, USERS_TABLE, "winconsoleshell"}, | |
498 | }; | |
499 | ||
500 | static struct validate uuws_validate = { | |
501 | uuws_valobj, | |
502 | 2, | |
503 | 0, | |
504 | 0, | |
505 | 0, | |
506 | "users_id", | |
507 | access_user, | |
508 | 0, | |
509 | set_finger_modtime, | |
510 | }; | |
511 | ||
d33e787c | 512 | static char *uust_fields[] = { |
e2b8245f | 513 | "login", |
514 | "status", | |
d33e787c | 515 | }; |
516 | ||
4ffa124a | 517 | static char *uuss_fields[] = { |
e2b8245f | 518 | "login", |
519 | "secure", | |
4ffa124a | 520 | }; |
0c345c78 | 521 | |
f802fd0d | 522 | static struct valobj uust_valobj[] = { |
f802fd0d | 523 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
524 | {V_NUM, 1}, | |
525 | {V_NUM, 2}, | |
526 | }; | |
527 | ||
d33e787c | 528 | static struct validate uust_validate = { |
f802fd0d | 529 | uust_valobj, |
d1b3a4bf | 530 | 2, |
d33e787c | 531 | 0, |
532 | 0, | |
533 | 0, | |
e2b8245f | 534 | "users_id", |
d33e787c | 535 | 0, |
536 | 0, | |
537 | set_modtime_by_id, | |
538 | }; | |
539 | ||
540 | static char *dusr_fields[] = { | |
e2b8245f | 541 | "login", |
d33e787c | 542 | }; |
543 | ||
544 | static struct validate dusr_validate = { | |
d1b3a4bf | 545 | VOuser0, |
546 | 1, | |
d33e787c | 547 | 0, |
548 | 0, | |
549 | 0, | |
550 | 0, | |
551 | 0, | |
552 | setup_dusr, | |
553 | 0, | |
554 | }; | |
555 | ||
77eb4bdf | 556 | static char *aurv_fields[] = { |
557 | "login", "reservation", | |
558 | }; | |
559 | ||
560 | static struct validate aurv_validate = { | |
561 | VOuser0, | |
562 | 1, | |
563 | 0, | |
564 | 0, | |
565 | 0, | |
566 | "users_id", | |
567 | 0, | |
568 | 0, | |
569 | do_user_reservation, | |
570 | }; | |
571 | ||
572 | static char *gurv_fields[] = { | |
573 | "login", | |
574 | "reservation", | |
575 | }; | |
576 | ||
577 | static struct validate gurv_validate = { | |
578 | VOuser0, | |
579 | 1, | |
580 | 0, | |
581 | 0, | |
582 | 0, | |
583 | 0, | |
584 | 0, | |
585 | 0, | |
586 | get_user_reservations, | |
587 | }; | |
588 | ||
589 | static char *gubr_fields[] = { | |
590 | "reservation", | |
591 | "login", | |
592 | }; | |
593 | ||
594 | static struct validate gubr_validate = { | |
595 | 0, | |
596 | 0, | |
597 | 0, | |
598 | 0, | |
599 | 0, | |
600 | 0, | |
601 | 0, | |
602 | 0, | |
603 | get_user_by_reservation, | |
604 | }; | |
605 | ||
e2b8245f | 606 | static char *gkum_fields[] = { "login", "kerberos", |
607 | "login", "kerberos" }; | |
012fc215 | 608 | |
e2b8245f | 609 | static char *akum_fields[] = { "login", "kerberos" }; |
012fc215 | 610 | |
611 | static struct valobj akum_valobj[] = | |
612 | { | |
e2b8245f | 613 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
03c05291 | 614 | {V_ID, 1, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
012fc215 | 615 | }; |
616 | ||
617 | static struct validate akum_validate = | |
618 | { | |
0c345c78 | 619 | akum_valobj, |
d1b3a4bf | 620 | 2, |
e2b8245f | 621 | "users_id", |
3e8c655c | 622 | "users_id = %d or string_id = %d", |
0c345c78 | 623 | 2, |
e2b8245f | 624 | "users_id", |
0c345c78 | 625 | access_user, |
996ffd1d | 626 | 0, |
135dcb80 | 627 | 0, |
628 | }; | |
012fc215 | 629 | |
630 | static struct validate dkum_validate = | |
631 | { | |
0c345c78 | 632 | akum_valobj, |
d1b3a4bf | 633 | 2, |
e2b8245f | 634 | "users_id", |
3e8c655c | 635 | "users_id = %d and string_id = %d", |
0c345c78 | 636 | 2, |
e2b8245f | 637 | "users_id", |
0c345c78 | 638 | access_user, |
639 | 0, | |
135dcb80 | 640 | 0, |
641 | }; | |
012fc215 | 642 | |
d33e787c | 643 | static char *gfbl_fields[] = { |
e2b8245f | 644 | "login", |
645 | "login", "fullname", "nickname", "home_addr", | |
5eaef520 | 646 | "home_phone", "office_addr", "office_phone", "department", |
8db06f75 | 647 | "affiliation", "modtime", "modby", "modwith", |
d33e787c | 648 | }; |
649 | ||
650 | static struct validate gfbl_validate = { | |
651 | VOuser0, | |
652 | 1, | |
653 | 0, | |
654 | 0, | |
655 | 0, | |
656 | 0, | |
657 | access_user, | |
658 | 0, | |
659 | followup_fix_modby, | |
660 | }; | |
661 | ||
662 | static char *ufbl_fields[] = { | |
e2b8245f | 663 | "login", |
d33e787c | 664 | "fullname", "nickname", "home_addr", |
5eaef520 | 665 | "home_phone", "office_addr", "office_phone", "department", |
4e5ec77f | 666 | "affiliation", |
d33e787c | 667 | }; |
668 | ||
03c05291 | 669 | static struct valobj ufbl_valobj[] = { |
e2b8245f | 670 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
03c05291 | 671 | {V_LEN, 1, USERS_TABLE, "fullname"}, |
672 | {V_LEN, 2, USERS_TABLE, "nickname"}, | |
673 | {V_LEN, 3, USERS_TABLE, "home_addr"}, | |
674 | {V_LEN, 4, USERS_TABLE, "home_phone"}, | |
675 | {V_LEN, 5, USERS_TABLE, "office_addr"}, | |
676 | {V_LEN, 6, USERS_TABLE, "office_phone"}, | |
677 | {V_LEN, 7, USERS_TABLE, "department"}, | |
678 | {V_LEN, 8, USERS_TABLE, "affiliation"}, | |
679 | }; | |
680 | ||
d33e787c | 681 | static struct validate ufbl_validate = { |
03c05291 | 682 | ufbl_valobj, |
d1b3a4bf | 683 | 9, |
d33e787c | 684 | 0, |
685 | 0, | |
686 | 0, | |
687 | 0, | |
688 | access_user, | |
689 | 0, | |
690 | set_finger_modtime, | |
691 | }; | |
692 | ||
693 | static char *gpob_fields[] = { | |
e2b8245f | 694 | "login", |
d6d830a1 | 695 | "login", "type", "box", "address", "modtime", "modby", "modwith", |
d33e787c | 696 | }; |
697 | ||
698 | static struct validate gpob_validate = { | |
699 | VOuser0, | |
700 | 1, | |
701 | "potype", | |
5eaef520 | 702 | "potype != 'NONE' and users_id = %d", |
d33e787c | 703 | 1, |
704 | 0, | |
705 | access_user, | |
706 | 0, | |
707 | followup_gpob, | |
708 | }; | |
709 | ||
710 | static char *gpox_fields[] = { | |
e2b8245f | 711 | "login", "type", "box", |
d33e787c | 712 | }; |
713 | ||
714 | static struct validate gpox_validate = { | |
d1b3a4bf | 715 | 0, |
716 | 0, | |
d33e787c | 717 | 0, |
718 | 0, | |
719 | 0, | |
720 | 0, | |
721 | 0, | |
722 | 0, | |
723 | followup_gpob, | |
724 | }; | |
725 | ||
726 | static char *spob_fields[] = { | |
e2b8245f | 727 | "login", "type", "box", |
d33e787c | 728 | }; |
729 | ||
730 | static struct valobj spob_valobj[] = { | |
e2b8245f | 731 | {V_ID, 0, USERS_TABLE, "login", "users_id", MR_USER}, |
03c05291 | 732 | {V_TYPE, 1, 0, "pobox", 0, MR_TYPE}, |
d33e787c | 733 | }; |
734 | ||
735 | static struct validate spob_validate = /* SET_POBOX */ | |
736 | { | |
737 | spob_valobj, | |
d1b3a4bf | 738 | 2, |
d33e787c | 739 | 0, |
740 | 0, | |
741 | 0, | |
742 | 0, | |
f659afb2 | 743 | access_spob, |
d33e787c | 744 | 0, |
745 | set_pobox, | |
746 | }; | |
747 | ||
748 | static struct validate spop_validate = /* SET_POBOX_POP */ | |
749 | { | |
d1b3a4bf | 750 | VOuser0, |
751 | 1, | |
d33e787c | 752 | 0, |
753 | 0, | |
754 | 0, | |
755 | 0, | |
756 | access_user, | |
17cb3de8 | 757 | 0, |
758 | set_pobox_pop, | |
d33e787c | 759 | }; |
760 | ||
761 | static struct validate dpob_validate = /* DELETE_POBOX */ | |
762 | { | |
d1b3a4bf | 763 | VOuser0, |
764 | 1, | |
d33e787c | 765 | 0, |
766 | 0, | |
767 | 0, | |
768 | 0, | |
769 | access_user, | |
770 | setup_dpob, | |
771 | set_pobox_modtime, | |
772 | }; | |
773 | ||
774 | static char *gmac_fields[] = { | |
e2b8245f | 775 | "name", |
8db06f75 | 776 | "name", "type", "modtime", "modby", "modwith", |
d33e787c | 777 | }; |
778 | ||
e4ae0190 | 779 | static char *ghst2_fields[] = { |
e2b8245f | 780 | "name", "address", "location", "network", |
8db06f75 | 781 | "name", "vendor", "model", "os", "location", "contact", "use", |
782 | "status", "status_change", "network", "address", "ace_type", | |
783 | "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
784 | "inuse", "modtime", "modby", "modwith", | |
d33e787c | 785 | }; |
786 | ||
e4ae0190 | 787 | static char *ghbh2_fields[] = { |
012e079f | 788 | "hwaddr", |
789 | "name", "vendor", "model", "os", "location", "contact", "use", | |
790 | "status", "status_change", "network", "address", "ace_type", | |
791 | "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
792 | "inuse", "modtime", "modby", "modwith", | |
793 | }; | |
794 | ||
4f6b1a05 | 795 | static char *ghst6_fields[] = { |
e4ae0190 | 796 | "name", "address", "location", "network", |
797 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
798 | "use", "status", "status_change", "network", "address", "ace_type", | |
799 | "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
800 | "inuse", "modtime", "modby", "modwith", | |
801 | }; | |
802 | ||
4f6b1a05 | 803 | static char *ghbh6_fields[] = { |
e4ae0190 | 804 | "hwaddr", |
805 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
806 | "use", "status", "status_change", "network", "address", "ace_type", | |
807 | "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
808 | "inuse", "modtime", "modby", "modwith", | |
809 | }; | |
810 | ||
4f6b1a05 | 811 | static char *ghst_fields[] = { |
812 | "name", "address", "location", "network", | |
813 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
814 | "account_number", "use", "status", "status_change", "network", "address", | |
815 | "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
816 | "inuse", "modtime", "modby", "modwith", | |
817 | }; | |
818 | ||
819 | static char *ghbh_fields[] = { | |
820 | "hwaddr", | |
821 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
822 | "account_number", "use", "status", "status_change", "network", "address", | |
823 | "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
824 | "inuse", "modtime", "modby", "modwith", | |
825 | }; | |
826 | ||
827 | static char *ghba_fields[] = { | |
828 | "account_number", | |
829 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
830 | "account_number", "use", "status", "status_change", "network", "address", | |
831 | "ace_type", "ace_name", "admin_comment", "ops_comment", "created", "creator", | |
832 | "inuse", "modtime", "modby", "modwith", | |
833 | }; | |
834 | ||
5eaef520 | 835 | static struct validate ghst_validate = { |
263a36d4 | 836 | 0, |
837 | 0, | |
a66a2204 | 838 | 0, |
839 | 0, | |
840 | 0, | |
841 | 0, | |
842 | access_host, | |
843 | 0, | |
844 | followup_ghst, | |
845 | }; | |
846 | ||
2884200f | 847 | static char *ghha_fields[] = { |
848 | "name", | |
849 | "hwaddr", | |
850 | }; | |
851 | ||
e4ae0190 | 852 | static char *ahst2_fields[] = { |
8db06f75 | 853 | "name", "vendor", "model", "os", "location", "contact", "use", |
854 | "status", "subnet", "address", "ace_type", "ace_name", | |
855 | "admin_comment", "ops_comment", | |
a66a2204 | 856 | }; |
857 | ||
e4ae0190 | 858 | static struct valobj ahst2_valobj[] = { |
e2b8245f | 859 | {V_CHAR, 0, MACHINE_TABLE, "name"}, |
03c05291 | 860 | {V_CHAR, 1, MACHINE_TABLE, "vendor"}, |
861 | {V_CHAR, 2, MACHINE_TABLE, "model"}, | |
862 | {V_CHAR, 3, MACHINE_TABLE, "os"}, | |
863 | {V_CHAR, 4, MACHINE_TABLE, "location"}, | |
864 | {V_CHAR, 5, MACHINE_TABLE, "contact"}, | |
f802fd0d | 865 | {V_NUM, 6}, |
866 | {V_NUM, 7}, | |
e2b8245f | 867 | {V_ID, 8, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, |
868 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, | |
a66a2204 | 869 | {V_TYPEDATA, 11, 0, 0, 0, MR_ACE}, |
03c05291 | 870 | {V_ID, 12, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
871 | {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
d33e787c | 872 | }; |
873 | ||
e4ae0190 | 874 | static struct validate ahst2_validate = { |
875 | ahst2_valobj, | |
876 | 13, | |
877 | "name", | |
878 | "name = UPPER('%s')", | |
879 | 1, | |
880 | "mach_id", | |
881 | access_host, | |
882 | setup_ahst, | |
883 | set_uppercase_modtime, | |
884 | }; | |
885 | ||
4f6b1a05 | 886 | static char *ahst6_fields[] = { |
e4ae0190 | 887 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", |
888 | "use", "status", "subnet", "address", "ace_type", "ace_name", | |
889 | "admin_comment", "ops_comment", | |
890 | }; | |
891 | ||
4f6b1a05 | 892 | static struct valobj ahst6_valobj[] = { |
e4ae0190 | 893 | {V_CHAR, 0, MACHINE_TABLE, "name"}, |
894 | {V_CHAR, 1, MACHINE_TABLE, "vendor"}, | |
895 | {V_CHAR, 2, MACHINE_TABLE, "model"}, | |
896 | {V_CHAR, 3, MACHINE_TABLE, "os"}, | |
897 | {V_CHAR, 4, MACHINE_TABLE, "location"}, | |
898 | {V_CHAR, 5, MACHINE_TABLE, "contact"}, | |
899 | {V_CHAR, 6, MACHINE_TABLE, "billing_contact"}, | |
900 | {V_NUM, 7}, | |
901 | {V_NUM, 8}, | |
902 | {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
903 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
904 | {V_TYPEDATA, 12, 0, 0, 0, MR_ACE}, | |
905 | {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
906 | {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
907 | }; | |
908 | ||
4f6b1a05 | 909 | static struct validate ahst6_validate = { |
910 | ahst6_valobj, | |
911 | 14, | |
912 | "name", | |
913 | "name = UPPER('%s')", | |
914 | 1, | |
915 | "mach_id", | |
916 | access_host, | |
917 | setup_ahst, | |
918 | set_uppercase_modtime, | |
919 | }; | |
920 | ||
921 | static char *ahst_fields[] = { | |
922 | "name", "vendor", "model", "os", "location", "contact", "billing_contact", | |
923 | "account_number", "use", "status", "subnet", "address", "ace_type", | |
924 | "ace_name", "admin_comment", "ops_comment", | |
925 | }; | |
926 | ||
927 | static struct valobj ahst_valobj[] = { | |
928 | {V_CHAR, 0, MACHINE_TABLE, "name"}, | |
929 | {V_CHAR, 1, MACHINE_TABLE, "vendor"}, | |
930 | {V_CHAR, 2, MACHINE_TABLE, "model"}, | |
931 | {V_CHAR, 3, MACHINE_TABLE, "os"}, | |
932 | {V_CHAR, 4, MACHINE_TABLE, "location"}, | |
933 | {V_CHAR, 5, MACHINE_TABLE, "contact"}, | |
934 | {V_CHAR, 6, MACHINE_TABLE, "billing_contact"}, | |
935 | {V_CHAR, 7, MACHINE_TABLE, "account_number"}, | |
936 | {V_NUM, 8}, | |
937 | {V_NUM, 9}, | |
938 | {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
939 | {V_TYPE, 12, 0, "ace_type", 0, MR_ACE}, | |
940 | {V_TYPEDATA, 13, 0, 0, 0, MR_ACE}, | |
941 | {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
942 | {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
943 | }; | |
944 | ||
a66a2204 | 945 | static struct validate ahst_validate = { |
946 | ahst_valobj, | |
4f6b1a05 | 947 | 15, |
e2b8245f | 948 | "name", |
03c05291 | 949 | "name = UPPER('%s')", |
d33e787c | 950 | 1, |
e2b8245f | 951 | "mach_id", |
a66a2204 | 952 | access_host, |
953 | setup_ahst, | |
0ec43029 | 954 | set_uppercase_modtime, |
d33e787c | 955 | }; |
956 | ||
e4ae0190 | 957 | static char *uhst2_fields[] = { |
e2b8245f | 958 | "name", |
8db06f75 | 959 | "newname", "vendor", "model", "os", "location", "contact", "use", |
960 | "status", "subnet", "address", "ace_type", "ace_name", | |
961 | "admin_comment", "ops_comment", | |
d33e787c | 962 | }; |
963 | ||
e4ae0190 | 964 | static struct valobj uhst2_valobj[] = { |
03c05291 | 965 | {V_CHAR, 0, MACHINE_TABLE, "name"}, |
e2b8245f | 966 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
967 | {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE}, | |
03c05291 | 968 | {V_CHAR, 2, MACHINE_TABLE, "vendor"}, |
969 | {V_CHAR, 3, MACHINE_TABLE, "model"}, | |
970 | {V_CHAR, 4, MACHINE_TABLE, "os"}, | |
971 | {V_CHAR, 5, MACHINE_TABLE, "location"}, | |
f802fd0d | 972 | {V_CHAR, 6, MACHINE_TABLE, "contact"}, |
973 | {V_NUM, 7}, | |
974 | {V_NUM, 8}, | |
e2b8245f | 975 | {V_ID, 9, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, |
976 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
a66a2204 | 977 | {V_TYPEDATA, 12, 0, 0, 0, MR_ACE}, |
03c05291 | 978 | {V_ID, 13, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
979 | {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
d33e787c | 980 | }; |
981 | ||
e4ae0190 | 982 | static struct validate uhst2_validate = { |
983 | uhst2_valobj, | |
984 | 15, | |
985 | 0, | |
986 | 0, | |
987 | 0, | |
988 | "mach_id", | |
989 | access_host, | |
990 | setup_ahst, | |
991 | set_modtime_by_id, | |
992 | }; | |
993 | ||
4f6b1a05 | 994 | static char *uhst6_fields[] = { |
e4ae0190 | 995 | "name", |
996 | "newname", "vendor", "model", "os", "location", "contact", "billing_contact", | |
997 | "use", "status", "subnet", "address", "ace_type", "ace_name", | |
998 | "admin_comment", "ops_comment", | |
999 | }; | |
1000 | ||
4f6b1a05 | 1001 | static struct valobj uhst6_valobj[] = { |
e4ae0190 | 1002 | {V_CHAR, 0, MACHINE_TABLE, "name"}, |
1003 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
1004 | {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE}, | |
1005 | {V_CHAR, 2, MACHINE_TABLE, "vendor"}, | |
1006 | {V_CHAR, 3, MACHINE_TABLE, "model"}, | |
1007 | {V_CHAR, 4, MACHINE_TABLE, "os"}, | |
1008 | {V_CHAR, 5, MACHINE_TABLE, "location"}, | |
1009 | {V_CHAR, 6, MACHINE_TABLE, "contact"}, | |
1010 | {V_CHAR, 7, MACHINE_TABLE, "billing_contact"}, | |
1011 | {V_NUM, 8}, | |
1012 | {V_NUM, 9}, | |
1013 | {V_ID, 10, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
1014 | {V_TYPE, 12, 0, "ace_type", 0, MR_ACE}, | |
1015 | {V_TYPEDATA, 13, 0, 0, 0, MR_ACE}, | |
1016 | {V_ID, 14, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1017 | {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1018 | }; | |
1019 | ||
4f6b1a05 | 1020 | static struct validate uhst6_validate = { |
1021 | uhst6_valobj, | |
1022 | 16, | |
1023 | 0, | |
1024 | 0, | |
1025 | 0, | |
1026 | "mach_id", | |
1027 | access_host, | |
1028 | setup_ahst, | |
1029 | set_modtime_by_id, | |
1030 | }; | |
1031 | ||
1032 | static char *uhst_fields[] = { | |
1033 | "name", | |
1034 | "newname", "vendor", "model", "os", "location", "contact", "billing_contact", | |
1035 | "account_number", "use", "status", "subnet", "address", "ace_type", | |
1036 | "ace_name", "admin_comment", "ops_comment", | |
1037 | }; | |
1038 | ||
1039 | static struct valobj uhst_valobj[] = { | |
1040 | {V_CHAR, 0, MACHINE_TABLE, "name"}, | |
1041 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
1042 | {V_RENAME, 1, MACHINE_TABLE, "name", "mach_id", MR_NOT_UNIQUE}, | |
1043 | {V_CHAR, 2, MACHINE_TABLE, "vendor"}, | |
1044 | {V_CHAR, 3, MACHINE_TABLE, "model"}, | |
1045 | {V_CHAR, 4, MACHINE_TABLE, "os"}, | |
1046 | {V_CHAR, 5, MACHINE_TABLE, "location"}, | |
1047 | {V_CHAR, 6, MACHINE_TABLE, "contact"}, | |
1048 | {V_CHAR, 7, MACHINE_TABLE, "billing_contact"}, | |
1049 | {V_CHAR, 8, MACHINE_TABLE, "account_number"}, | |
1050 | {V_NUM, 9}, | |
1051 | {V_NUM, 10}, | |
1052 | {V_ID, 11, SUBNET_TABLE, "name", "snet_id", MR_SUBNET}, | |
1053 | {V_TYPE, 13, 0, "ace_type", 0, MR_ACE}, | |
1054 | {V_TYPEDATA, 14, 0, 0, 0, MR_ACE}, | |
1055 | {V_ID, 15, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1056 | {V_ID, 16, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, | |
1057 | }; | |
1058 | ||
a66a2204 | 1059 | static struct validate uhst_validate = { |
1060 | uhst_valobj, | |
4f6b1a05 | 1061 | 17, |
d33e787c | 1062 | 0, |
1063 | 0, | |
1064 | 0, | |
e2b8245f | 1065 | "mach_id", |
a66a2204 | 1066 | access_host, |
1067 | setup_ahst, | |
d33e787c | 1068 | set_modtime_by_id, |
1069 | }; | |
1070 | ||
2884200f | 1071 | static char *uhha_fields[] = { |
1072 | "name", | |
1073 | "hwaddr" | |
1074 | }; | |
1075 | ||
1076 | static struct valobj uhha_valobj[] = { | |
1077 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
1078 | {V_CHAR, 1, MACHINE_TABLE, "hwaddr"}, | |
1079 | }; | |
1080 | ||
1081 | static struct validate uhha_validate = { | |
1082 | uhha_valobj, | |
1083 | 2, | |
1084 | 0, | |
1085 | 0, | |
1086 | 0, | |
1087 | "mach_id", | |
1088 | 0, | |
1089 | setup_uhha, | |
1090 | set_modtime_by_id, | |
1091 | }; | |
1092 | ||
a66a2204 | 1093 | static char *dhst_fields[] = { |
e2b8245f | 1094 | "name", |
d33e787c | 1095 | }; |
1096 | ||
a66a2204 | 1097 | static struct validate dhst_validate = { |
d1b3a4bf | 1098 | VOmach0, |
1099 | 1, | |
d33e787c | 1100 | 0, |
1101 | 0, | |
1102 | 0, | |
1103 | 0, | |
1104 | 0, | |
1105 | setup_dmac, | |
1106 | 0, | |
1107 | }; | |
1108 | ||
a66a2204 | 1109 | static char *ghal_fields[] = { |
e2b8245f | 1110 | "alias", "canonical_hostname", |
1111 | "alias", "canonical_hostname" | |
a66a2204 | 1112 | }; |
1113 | ||
a66a2204 | 1114 | static struct validate ghal_validate = { |
263a36d4 | 1115 | 0, |
1116 | 0, | |
a66a2204 | 1117 | 0, |
1118 | 0, | |
1119 | 0, | |
1120 | 0, | |
65adfb53 | 1121 | access_ahal, |
a66a2204 | 1122 | 0, |
03c05291 | 1123 | 0, |
a66a2204 | 1124 | }; |
1125 | ||
1126 | static struct valobj ahal_valobj[] = { | |
e2b8245f | 1127 | {V_CHAR, 0, HOSTALIAS_TABLE, "name"}, |
e2b8245f | 1128 | {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
a66a2204 | 1129 | }; |
1130 | ||
1131 | static struct validate ahal_validate = { | |
1132 | ahal_valobj, | |
263a36d4 | 1133 | 2, |
e2b8245f | 1134 | "name", |
996ffd1d | 1135 | "name = UPPER('%s')", |
a66a2204 | 1136 | 1, |
e2b8245f | 1137 | "mach_id", |
a66a2204 | 1138 | access_ahal, |
1139 | setup_ahal, | |
1140 | 0, | |
1141 | }; | |
1142 | ||
1143 | static struct valobj dhal_valobj[] = { | |
e2b8245f | 1144 | {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
a66a2204 | 1145 | }; |
1146 | ||
1147 | static struct validate dhal_validate = { | |
1148 | dhal_valobj, | |
263a36d4 | 1149 | 1, |
e2b8245f | 1150 | "name", |
996ffd1d | 1151 | "name = UPPER('%s') AND mach_id = %d", |
a66a2204 | 1152 | 2, |
e2b8245f | 1153 | "mach_id", |
a66a2204 | 1154 | access_ahal, |
1155 | 0, | |
1156 | 0, | |
1157 | }; | |
1158 | ||
4f6b1a05 | 1159 | static char *gsnt2_fields[] = { |
e2b8245f | 1160 | "name", |
8db06f75 | 1161 | "name", "description", "address", "mask", "low", "high", "prefix", |
1162 | "ace_type", "ace_name", "modtime", "modby", "modwith" | |
3c1d412c | 1163 | }; |
1164 | ||
4f6b1a05 | 1165 | static char *gsnt_fields[] = { |
1166 | "name", | |
1167 | "name", "description", "status", "contact", "account_number", "address", | |
1168 | "mask", "low", "high", "prefix", "ace_type", "ace_name", "modtime", | |
1169 | "modby", "modwith" | |
1170 | }; | |
1171 | ||
3c1d412c | 1172 | static struct validate gsnt_validate = { |
263a36d4 | 1173 | 0, |
1174 | 0, | |
3c1d412c | 1175 | 0, |
1176 | 0, | |
1177 | 0, | |
1178 | 0, | |
a70337e7 | 1179 | access_snt, |
3c1d412c | 1180 | 0, |
1181 | followup_gsnt, | |
1182 | }; | |
1183 | ||
4f6b1a05 | 1184 | static char *asnt2_fields[] = { |
8db06f75 | 1185 | "name", "description", "address", "mask", "low", "high", "prefix", |
1186 | "ace_type", "ace_name", | |
3c1d412c | 1187 | }; |
1188 | ||
4f6b1a05 | 1189 | static struct valobj asnt2_valobj[] = { |
e2b8245f | 1190 | {V_CHAR, 0, SUBNET_TABLE, "name"}, |
1191 | {V_LEN, 1, SUBNET_TABLE, "description"}, | |
f802fd0d | 1192 | {V_NUM, 2}, |
1193 | {V_NUM, 3}, | |
1194 | {V_NUM, 4}, | |
1195 | {V_NUM, 5}, | |
03c05291 | 1196 | {V_LEN, 6, SUBNET_TABLE, "prefix"}, |
e2b8245f | 1197 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, |
bd8c26ff | 1198 | {V_TYPEDATA, 8, 0, 0, 0, MR_ACE}, |
3c1d412c | 1199 | }; |
1200 | ||
4f6b1a05 | 1201 | static struct validate asnt2_validate = |
3c1d412c | 1202 | { |
4f6b1a05 | 1203 | asnt2_valobj, |
d1b3a4bf | 1204 | 9, |
e2b8245f | 1205 | "name", |
5eaef520 | 1206 | "name = UPPER('%s')", |
1207 | 1, | |
e2b8245f | 1208 | "snet_id", |
5eaef520 | 1209 | 0, |
1210 | prefetch_value, | |
1211 | set_uppercase_modtime, | |
3c1d412c | 1212 | }; |
1213 | ||
4f6b1a05 | 1214 | static char *asnt_fields[] = { |
1215 | "name", "description", "status", "contact", "account_number", "address", | |
1216 | "mask", "low", "high", "prefix", "ace_type", "ace_name", | |
1217 | }; | |
1218 | ||
1219 | static struct valobj asnt_valobj[] = { | |
1220 | {V_CHAR, 0, SUBNET_TABLE, "name"}, | |
1221 | {V_LEN, 1, SUBNET_TABLE, "description"}, | |
1222 | {V_NUM, 2}, | |
1223 | {V_CHAR, 3, SUBNET_TABLE, "contact"}, | |
1224 | {V_CHAR, 4, SUBNET_TABLE, "account_number"}, | |
1225 | {V_NUM, 5}, | |
1226 | {V_NUM, 6}, | |
1227 | {V_NUM, 7}, | |
1228 | {V_NUM, 8}, | |
1229 | {V_LEN, 9, SUBNET_TABLE, "prefix"}, | |
1230 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, | |
1231 | {V_TYPEDATA, 11, 0, 0, 0, MR_ACE}, | |
1232 | }; | |
1233 | ||
1234 | static struct validate asnt_validate = | |
1235 | { | |
1236 | asnt_valobj, | |
1237 | 12, | |
1238 | "name", | |
1239 | "name = UPPER('%s')", | |
1240 | 1, | |
1241 | "snet_id", | |
1242 | 0, | |
1243 | setup_asnt, | |
1244 | set_uppercase_modtime, | |
1245 | }; | |
1246 | ||
1247 | static char *usnt2_fields[] = { | |
e2b8245f | 1248 | "name", |
8db06f75 | 1249 | "newname", "description", "address", "mask", "low", "high", "prefix", |
1250 | "ace_type", "ace_name", | |
3c1d412c | 1251 | }; |
1252 | ||
4f6b1a05 | 1253 | static struct valobj usnt2_valobj[] = { |
e2b8245f | 1254 | {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH}, |
1255 | {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE}, | |
1256 | {V_LEN, 2, SUBNET_TABLE, "description"}, | |
f802fd0d | 1257 | {V_NUM, 3}, |
1258 | {V_NUM, 4}, | |
1259 | {V_NUM, 5}, | |
1260 | {V_NUM, 6}, | |
03c05291 | 1261 | {V_LEN, 7, SUBNET_TABLE, "prefix"}, |
e2b8245f | 1262 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, |
bd8c26ff | 1263 | {V_TYPEDATA, 9, 0, 0, 0, MR_ACE}, |
3c1d412c | 1264 | }; |
1265 | ||
4f6b1a05 | 1266 | static struct validate usnt2_validate = |
3c1d412c | 1267 | { |
4f6b1a05 | 1268 | usnt2_valobj, |
d1b3a4bf | 1269 | 10, |
e2b8245f | 1270 | "name", |
5eaef520 | 1271 | "snet_id = %d", |
1272 | 1, | |
e2b8245f | 1273 | "snet_id", |
5eaef520 | 1274 | 0, |
1275 | 0, | |
1276 | set_modtime_by_id, | |
3c1d412c | 1277 | }; |
1278 | ||
4f6b1a05 | 1279 | static char *usnt_fields[] = { |
1280 | "name", | |
1281 | "newname", "description", "status", "contact", "account_number", "address", | |
1282 | "mask", "low", "high", "prefix", "ace_type", "ace_name", | |
1283 | }; | |
1284 | ||
1285 | static struct valobj usnt_valobj[] = { | |
1286 | {V_ID, 0, SUBNET_TABLE, "name", "snet_id", MR_NO_MATCH}, | |
1287 | {V_RENAME, 1, SUBNET_TABLE, "name", "snet_id", MR_NOT_UNIQUE}, | |
1288 | {V_LEN, 2, SUBNET_TABLE, "description"}, | |
1289 | {V_NUM, 3}, | |
1290 | {V_CHAR, 4, SUBNET_TABLE, "contact"}, | |
1291 | {V_CHAR, 5, SUBNET_TABLE, "account_number"}, | |
1292 | {V_NUM, 6}, | |
1293 | {V_NUM, 7}, | |
1294 | {V_NUM, 8}, | |
1295 | {V_NUM, 9}, | |
1296 | {V_LEN, 10, SUBNET_TABLE, "prefix"}, | |
1297 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
1298 | {V_TYPEDATA, 12, 0, 0, 0, MR_ACE}, | |
1299 | }; | |
1300 | ||
1301 | static struct validate usnt_validate = | |
1302 | { | |
1303 | usnt_valobj, | |
1304 | 13, | |
1305 | "name", | |
1306 | "snet_id = %d", | |
1307 | 1, | |
1308 | "snet_id", | |
1309 | 0, | |
1310 | setup_asnt, | |
1311 | set_modtime_by_id, | |
1312 | }; | |
1313 | ||
3c1d412c | 1314 | static char *dsnt_fields[] = { |
e2b8245f | 1315 | "name", |
3c1d412c | 1316 | }; |
1317 | ||
3c1d412c | 1318 | static struct validate dsnt_validate = { |
d1b3a4bf | 1319 | VOsnet0, |
1320 | 1, | |
3c1d412c | 1321 | 0, |
1322 | 0, | |
1323 | 0, | |
1324 | 0, | |
1325 | 0, | |
1326 | setup_dsnt, | |
1327 | 0, | |
1328 | }; | |
1329 | ||
d33e787c | 1330 | static char *gclu_fields[] = { |
e2b8245f | 1331 | "name", |
8db06f75 | 1332 | "name", "description", "location", "modtime", "modby", "modwith", |
d33e787c | 1333 | }; |
1334 | ||
1335 | static char *aclu_fields[] = { | |
e2b8245f | 1336 | "name", "description", "location", |
d33e787c | 1337 | }; |
0c345c78 | 1338 | |
339a00a3 | 1339 | static struct valobj aclu_valobj[] = { |
e2b8245f | 1340 | {V_CHAR, 0, CLUSTERS_TABLE, "name"}, |
1341 | {V_LEN, 1, CLUSTERS_TABLE, "description"}, | |
1342 | {V_LEN, 2, CLUSTERS_TABLE, "location"}, | |
339a00a3 | 1343 | }; |
1344 | ||
5eaef520 | 1345 | static struct validate aclu_validate = |
d33e787c | 1346 | { |
339a00a3 | 1347 | aclu_valobj, |
d1b3a4bf | 1348 | 3, |
e2b8245f | 1349 | "name", |
03c05291 | 1350 | "name = '%s'", |
d33e787c | 1351 | 1, |
e2b8245f | 1352 | "clu_id", |
d33e787c | 1353 | 0, |
45bf7573 | 1354 | prefetch_value, |
d33e787c | 1355 | set_modtime, |
1356 | }; | |
1357 | ||
1358 | static char *uclu_fields[] = { | |
e2b8245f | 1359 | "name", |
1360 | "newname", "description", "location", | |
d33e787c | 1361 | }; |
1362 | ||
1363 | static struct valobj uclu_valobj[] = { | |
e2b8245f | 1364 | {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER}, |
1365 | {V_RENAME, 1, CLUSTERS_TABLE, "name", "clu_id", MR_NOT_UNIQUE}, | |
1366 | {V_LEN, 2, CLUSTERS_TABLE, "description"}, | |
1367 | {V_LEN, 3, CLUSTERS_TABLE, "location"}, | |
d33e787c | 1368 | }; |
1369 | ||
1370 | static struct validate uclu_validate = { | |
1371 | uclu_valobj, | |
d1b3a4bf | 1372 | 4, |
d33e787c | 1373 | 0, |
1374 | 0, | |
1375 | 0, | |
e2b8245f | 1376 | "clu_id", |
d33e787c | 1377 | 0, |
1378 | 0, | |
1379 | set_modtime_by_id, | |
1380 | }; | |
1381 | ||
1382 | static char *dclu_fields[] = { | |
e2b8245f | 1383 | "name", |
d33e787c | 1384 | }; |
1385 | ||
1386 | static struct validate dclu_validate = { | |
0c345c78 | 1387 | VOclu0, |
1388 | 1, | |
1389 | 0, | |
1390 | 0, | |
1391 | 0, | |
1392 | 0, | |
1393 | 0, | |
1394 | setup_dclu, | |
1395 | 0, | |
d33e787c | 1396 | }; |
1397 | ||
1398 | static char *gmcm_fields[] = { | |
e2b8245f | 1399 | "machine", "cluster", |
1400 | "machine", "cluster", | |
d33e787c | 1401 | }; |
1402 | ||
1403 | static struct valobj amtc_valobj[] = /* ADD_MACHINE_TO_CLUSTER */ | |
1404 | { /* DELETE_MACHINE_FROM_CLUSTER */ | |
e2b8245f | 1405 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
1406 | {V_ID, 1, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER}, | |
d33e787c | 1407 | }; |
1408 | ||
1409 | static struct validate amtc_validate = /* for amtc and dmfc */ | |
1410 | { | |
1411 | amtc_valobj, | |
1412 | 2, | |
e2b8245f | 1413 | "mach_id", |
3e8c655c | 1414 | "mach_id = %d and clu_id = %d", |
d33e787c | 1415 | 2, |
1416 | 0, | |
1417 | 0, | |
1418 | 0, | |
1419 | set_mach_modtime_by_id, | |
1420 | }; | |
1421 | ||
1422 | static char *gcld_fields[] = { | |
e2b8245f | 1423 | "cluster", "serv_label", |
1424 | "cluster", "serv_label", "serv_cluster", | |
88343c5e | 1425 | }; |
1426 | ||
1427 | static char *acld_fields[] = { | |
e2b8245f | 1428 | "cluster", "serv_label", "serv_cluster", |
d33e787c | 1429 | }; |
1430 | ||
1431 | static struct valobj acld_valobj[] = | |
1432 | { | |
e2b8245f | 1433 | {V_ID, 0, CLUSTERS_TABLE, "name", "clu_id", MR_CLUSTER}, |
03c05291 | 1434 | {V_CHAR, 1, SVC_TABLE, "serv_label"}, |
1435 | {V_CHAR, 2, SVC_TABLE, "serv_cluster"} | |
d33e787c | 1436 | }; |
1437 | ||
5eaef520 | 1438 | static struct validate acld_validate = |
1439 | { | |
d33e787c | 1440 | acld_valobj, |
99e09b48 | 1441 | 3, |
e2b8245f | 1442 | "clu_id", |
03c05291 | 1443 | "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'", |
99e09b48 | 1444 | 3, |
1445 | 0, | |
1446 | 0, | |
1447 | 0, | |
1448 | set_cluster_modtime_by_id, | |
1449 | }; | |
1450 | ||
5eaef520 | 1451 | static struct validate dcld_validate = |
1452 | { | |
d1b3a4bf | 1453 | VOclu0, |
03c05291 | 1454 | 1, |
e2b8245f | 1455 | "clu_id", |
3e8c655c | 1456 | "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'", |
d33e787c | 1457 | 3, |
1458 | 0, | |
1459 | 0, | |
1460 | 0, | |
1461 | set_cluster_modtime_by_id, | |
1462 | }; | |
1463 | ||
44da57b2 | 1464 | static char *glin2_fields[] = { |
e2b8245f | 1465 | "name", |
1466 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
8db06f75 | 1467 | "ace_type", "ace_name", "description", "modtime", "modby", "modwith", |
99e09b48 | 1468 | }; |
1469 | ||
59c3208b | 1470 | static char *glin3_fields[] = { |
44da57b2 | 1471 | "name", |
1472 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1473 | "nfsgroup", "ace_type", "ace_name", "description", "modtime", "modby", | |
1474 | "modwith", | |
1475 | }; | |
1476 | ||
59c3208b | 1477 | static char *glin_fields[] = { |
1478 | "name", | |
1479 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
4529bc5f | 1480 | "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name", |
59c3208b | 1481 | "description", "modtime", "modby", "modwith", |
1482 | }; | |
1483 | ||
03c05291 | 1484 | static struct validate glin_validate = { |
0c345c78 | 1485 | 0, |
0c345c78 | 1486 | 0, |
1487 | 0, | |
1488 | 0, | |
1489 | 0, | |
1490 | 0, | |
03c05291 | 1491 | access_vis_list_by_name, |
0c345c78 | 1492 | 0, |
263a36d4 | 1493 | followup_glin, |
d33e787c | 1494 | }; |
1495 | ||
44da57b2 | 1496 | static char *alis2_fields[] = { |
e2b8245f | 1497 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", |
1498 | "ace_type", "ace_name", "description", | |
d33e787c | 1499 | }; |
1500 | ||
44da57b2 | 1501 | static struct valobj alis2_valobj[] = { |
e2b8245f | 1502 | {V_CHAR, 0, LIST_TABLE, "name"}, |
f802fd0d | 1503 | {V_NUM, 1}, |
1504 | {V_NUM, 2}, | |
1505 | {V_NUM, 3}, | |
1506 | {V_NUM, 4}, | |
1507 | {V_NUM, 5}, | |
1508 | {V_NUM, 6}, | |
e2b8245f | 1509 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, |
1510 | {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE}, | |
1511 | {V_LEN, 9, LIST_TABLE, "description"}, | |
d33e787c | 1512 | }; |
1513 | ||
44da57b2 | 1514 | static struct validate alis2_validate = { |
1515 | alis2_valobj, | |
1516 | 10, | |
1517 | "name", | |
1518 | "name = '%s'", | |
1519 | 1, | |
1520 | "list_id", | |
1521 | 0, | |
1522 | setup_alis, | |
1523 | set_modtime, | |
1524 | }; | |
1525 | ||
59c3208b | 1526 | static char *alis3_fields[] = { |
44da57b2 | 1527 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", |
1528 | "nfsgroup", "ace_type", "ace_name", "description", | |
1529 | }; | |
1530 | ||
59c3208b | 1531 | static struct valobj alis3_valobj[] = { |
44da57b2 | 1532 | {V_CHAR, 0, LIST_TABLE, "name"}, |
1533 | {V_NUM, 1}, | |
1534 | {V_NUM, 2}, | |
1535 | {V_NUM, 3}, | |
1536 | {V_NUM, 4}, | |
1537 | {V_NUM, 5}, | |
1538 | {V_NUM, 6}, | |
1539 | {V_NUM, 7}, | |
1540 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, | |
1541 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, | |
1542 | {V_LEN, 10, LIST_TABLE, "description"}, | |
1543 | }; | |
1544 | ||
59c3208b | 1545 | static struct validate alis3_validate = { |
1546 | alis3_valobj, | |
1547 | 11, | |
1548 | "name", | |
1549 | "name = '%s'", | |
1550 | 1, | |
1551 | "list_id", | |
1552 | 0, | |
1553 | setup_alis, | |
1554 | set_modtime, | |
1555 | }; | |
1556 | ||
1557 | static char *alis_fields[] = { | |
1558 | "name", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1559 | "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name", | |
1560 | "description", | |
1561 | }; | |
1562 | ||
1563 | static struct valobj alis_valobj[] = { | |
1564 | {V_CHAR, 0, LIST_TABLE, "name"}, | |
1565 | {V_NUM, 1}, | |
1566 | {V_NUM, 2}, | |
1567 | {V_NUM, 3}, | |
1568 | {V_NUM, 4}, | |
1569 | {V_NUM, 5}, | |
1570 | {V_NUM, 6}, | |
1571 | {V_NUM, 7}, | |
1572 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, | |
1573 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, | |
1574 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, | |
1575 | {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE}, | |
1576 | {V_LEN, 12, LIST_TABLE, "description"}, | |
1577 | }; | |
1578 | ||
03c05291 | 1579 | static struct validate alis_validate = { |
1580 | alis_valobj, | |
59c3208b | 1581 | 13, |
e2b8245f | 1582 | "name", |
03c05291 | 1583 | "name = '%s'", |
d33e787c | 1584 | 1, |
e2b8245f | 1585 | "list_id", |
d33e787c | 1586 | 0, |
03c05291 | 1587 | setup_alis, |
1588 | set_modtime, | |
d33e787c | 1589 | }; |
1590 | ||
44da57b2 | 1591 | static char *ulis2_fields[] = { |
e2b8245f | 1592 | "name", |
03c05291 | 1593 | "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", |
e2b8245f | 1594 | "ace_type", "ace_name", "description", |
d33e787c | 1595 | }; |
1596 | ||
44da57b2 | 1597 | static struct valobj ulis2_valobj[] = { |
e2b8245f | 1598 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
1599 | {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE}, | |
f802fd0d | 1600 | {V_NUM, 2}, |
1601 | {V_NUM, 3}, | |
1602 | {V_NUM, 4}, | |
1603 | {V_NUM, 5}, | |
1604 | {V_NUM, 6}, | |
1605 | {V_NUM, 7}, | |
1606 | {V_TYPE, 8, 0, "ace_type", 0, MR_ACE}, | |
e2b8245f | 1607 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, |
e2b8245f | 1608 | {V_LEN, 10, LIST_TABLE, "description"}, |
d33e787c | 1609 | }; |
1610 | ||
44da57b2 | 1611 | static struct validate ulis2_validate = { |
1612 | ulis2_valobj, | |
d1b3a4bf | 1613 | 11, |
e2b8245f | 1614 | "name", |
03c05291 | 1615 | "list_id = %d", |
d33e787c | 1616 | 1, |
e2b8245f | 1617 | "list_id", |
03c05291 | 1618 | access_list, |
1619 | setup_alis, | |
1620 | set_modtime_by_id, | |
d33e787c | 1621 | }; |
1622 | ||
59c3208b | 1623 | static char *ulis3_fields[] = { |
44da57b2 | 1624 | "name", |
1625 | "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1626 | "nfsgroup", "ace_type", "ace_name", "description", | |
1627 | }; | |
1628 | ||
59c3208b | 1629 | static struct valobj ulis3_valobj[] = { |
44da57b2 | 1630 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
1631 | {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE}, | |
1632 | {V_NUM, 2}, | |
1633 | {V_NUM, 3}, | |
1634 | {V_NUM, 4}, | |
1635 | {V_NUM, 5}, | |
1636 | {V_NUM, 6}, | |
1637 | {V_NUM, 7}, | |
1638 | {V_NUM, 8}, | |
1639 | {V_TYPE, 9, 0, "ace_type", 0, MR_ACE}, | |
1640 | {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE}, | |
1641 | {V_LEN, 11, LIST_TABLE, "description"}, | |
1642 | }; | |
1643 | ||
59c3208b | 1644 | static struct validate ulis3_validate = { |
1645 | ulis3_valobj, | |
44da57b2 | 1646 | 12, |
1647 | "name", | |
1648 | "list_id = %d", | |
1649 | 1, | |
1650 | "list_id", | |
1651 | access_list, | |
1652 | setup_alis, | |
1653 | set_modtime_by_id, | |
1654 | }; | |
1655 | ||
59c3208b | 1656 | static char *ulis_fields[] = { |
1657 | "name", | |
1658 | "newname", "active", "publicflg", "hidden", "maillist", "grouplist", "gid", | |
1659 | "nfsgroup", "ace_type", "ace_name", "memace_type", "memace_name", | |
1660 | "description", | |
1661 | }; | |
1662 | ||
1663 | static struct valobj ulis_valobj[] = { | |
1664 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, | |
1665 | {V_RENAME, 1, LIST_TABLE, "name", "list_id", MR_NOT_UNIQUE}, | |
1666 | {V_NUM, 2}, | |
1667 | {V_NUM, 3}, | |
1668 | {V_NUM, 4}, | |
1669 | {V_NUM, 5}, | |
1670 | {V_NUM, 6}, | |
1671 | {V_NUM, 7}, | |
1672 | {V_NUM, 8}, | |
1673 | {V_TYPE, 9, 0, "ace_type", 0, MR_ACE}, | |
1674 | {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE}, | |
1675 | {V_TYPE, 11, 0, "ace_type", 0, MR_ACE}, | |
1676 | {V_TYPEDATA, 12, 0, 0, "list_id", MR_ACE}, | |
1677 | {V_LEN, 13, LIST_TABLE, "description"}, | |
1678 | }; | |
1679 | ||
1680 | static struct validate ulis_validate = { | |
1681 | ulis_valobj, | |
1682 | 14, | |
1683 | "name", | |
1684 | "list_id = %d", | |
1685 | 1, | |
1686 | "list_id", | |
1687 | access_list, | |
1688 | setup_alis, | |
1689 | set_modtime_by_id, | |
1690 | }; | |
1691 | ||
03c05291 | 1692 | static char *dlis_fields[] = { |
e2b8245f | 1693 | "name", |
d33e787c | 1694 | }; |
1695 | ||
03c05291 | 1696 | static struct validate dlis_validate = { |
d1b3a4bf | 1697 | VOlist0, |
1698 | 1, | |
e2b8245f | 1699 | "name", |
03c05291 | 1700 | "list_id = %d", |
d33e787c | 1701 | 1, |
1702 | 0, | |
03c05291 | 1703 | access_list, |
1704 | setup_dlis, | |
d33e787c | 1705 | 0, |
1706 | }; | |
1707 | ||
03c05291 | 1708 | static char *amtl_fields[] = { |
1709 | "list_name", "member_type", "member_name", | |
d33e787c | 1710 | }; |
1711 | ||
46b6f1f6 | 1712 | static char *atml_fields[] = { |
1713 | "list_name", "member_type", "member_name", "tag", | |
1714 | }; | |
1715 | ||
03c05291 | 1716 | static struct valobj amtl_valobj[] = { |
e2b8245f | 1717 | {V_ID, 0, LIST_TABLE, "name", "list_id", MR_LIST}, |
03c05291 | 1718 | {V_TYPE, 1, 0, "member", 0, MR_TYPE}, |
1719 | {V_TYPEDATA, 2, 0, 0, 0, MR_NO_MATCH}, | |
46b6f1f6 | 1720 | {V_ID, 3, STRINGS_TABLE, "string", "string_id", MR_NO_MATCH}, |
99e09b48 | 1721 | }; |
1722 | ||
03c05291 | 1723 | static struct validate amtl_validate = |
1724 | { | |
1725 | amtl_valobj, | |
d1b3a4bf | 1726 | 3, |
d33e787c | 1727 | 0, |
1728 | 0, | |
1729 | 0, | |
1730 | 0, | |
03c05291 | 1731 | access_list, |
d33e787c | 1732 | 0, |
03c05291 | 1733 | add_member_to_list, |
d33e787c | 1734 | }; |
1735 | ||
46b6f1f6 | 1736 | static struct validate atml_validate = |
1737 | { | |
1738 | amtl_valobj, | |
1739 | 4, | |
1740 | 0, | |
1741 | 0, | |
1742 | 0, | |
1743 | 0, | |
1744 | access_list, | |
1745 | 0, | |
1746 | add_member_to_list, | |
1747 | }; | |
1748 | ||
1749 | static struct validate tmol_validate = | |
1750 | { | |
1751 | amtl_valobj, | |
1752 | 4, | |
46b6f1f6 | 1753 | 0, |
46b6f1f6 | 1754 | 0, |
1755 | 0, | |
20541c25 | 1756 | 0, |
1757 | access_list, | |
1758 | 0, | |
1759 | tag_member_of_list, | |
46b6f1f6 | 1760 | }; |
1761 | ||
03c05291 | 1762 | static struct validate dmfl_validate = |
1763 | { | |
1764 | amtl_valobj, | |
d1b3a4bf | 1765 | 3, |
0c345c78 | 1766 | 0, |
1767 | 0, | |
1768 | 0, | |
1769 | 0, | |
03c05291 | 1770 | access_list, |
0c345c78 | 1771 | 0, |
03c05291 | 1772 | delete_member_from_list, |
d33e787c | 1773 | }; |
1774 | ||
03c05291 | 1775 | static char *gaus_fields[] = { |
e2b8245f | 1776 | "ace_type", "ace_name", |
03c05291 | 1777 | "use_type", "use_name", |
d33e787c | 1778 | }; |
1779 | ||
03c05291 | 1780 | static struct valobj gaus_valobj[] = { |
03c05291 | 1781 | {V_TYPE, 0, 0, "gaus", 0, MR_TYPE}, |
1782 | {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH}, | |
d33e787c | 1783 | }; |
1784 | ||
03c05291 | 1785 | static struct validate gaus_validate = { |
1786 | gaus_valobj, | |
d1b3a4bf | 1787 | 2, |
d33e787c | 1788 | 0, |
d33e787c | 1789 | 0, |
d33e787c | 1790 | 0, |
d33e787c | 1791 | 0, |
03c05291 | 1792 | access_member, |
d33e787c | 1793 | 0, |
03c05291 | 1794 | get_ace_use, |
d33e787c | 1795 | }; |
1796 | ||
d3051625 | 1797 | static char *ghbo_fields[] = { |
1798 | "ace_type", "ace_name", | |
1799 | "name", | |
1800 | }; | |
1801 | ||
1802 | static struct valobj ghbo_valobj[] = { | |
1803 | {V_TYPE, 0, 0, "gaus", 0, MR_TYPE}, | |
1804 | {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH}, | |
1805 | }; | |
1806 | ||
1807 | static struct validate ghbo_validate = { | |
1808 | ghbo_valobj, | |
1809 | 2, | |
1810 | 0, | |
1811 | 0, | |
1812 | 0, | |
1813 | 0, | |
1814 | access_member, | |
1815 | 0, | |
1816 | get_host_by_owner, | |
1817 | }; | |
1818 | ||
03c05291 | 1819 | static char *qgli_fields[] = { |
1820 | "active", "publicflg", "hidden", "maillist", "grouplist", | |
1821 | "list", | |
3e8c655c | 1822 | }; |
d33e787c | 1823 | |
03c05291 | 1824 | static struct valobj qgli_valobj[] = { |
1825 | {V_TYPE, 0, 0, "boolean", 0, MR_TYPE}, | |
1826 | {V_TYPE, 1, 0, "boolean", 0, MR_TYPE}, | |
1827 | {V_TYPE, 2, 0, "boolean", 0, MR_TYPE}, | |
1828 | {V_TYPE, 3, 0, "boolean", 0, MR_TYPE}, | |
1829 | {V_TYPE, 4, 0, "boolean", 0, MR_TYPE}, | |
d33e787c | 1830 | }; |
1831 | ||
03c05291 | 1832 | static struct validate qgli_validate = { |
1833 | qgli_valobj, | |
1834 | 5, | |
647daf33 | 1835 | 0, |
d33e787c | 1836 | 0, |
1837 | 0, | |
87167924 | 1838 | 0, |
03c05291 | 1839 | access_qgli, |
d33e787c | 1840 | 0, |
03c05291 | 1841 | qualified_get_lists, |
d33e787c | 1842 | }; |
1843 | ||
03c05291 | 1844 | static char *gmol_fields[] = { |
1845 | "list_name", | |
1846 | "member_type", "member_name", | |
d33e787c | 1847 | }; |
1848 | ||
46b6f1f6 | 1849 | static char *gtml_fields[] = { |
1850 | "list_name", | |
1851 | "member_type", "member_name", "tag", | |
d33e787c | 1852 | }; |
1853 | ||
46b6f1f6 | 1854 | static struct validate gmol_validate = { |
d1b3a4bf | 1855 | VOlist0, |
1856 | 1, | |
d33e787c | 1857 | 0, |
1858 | 0, | |
1859 | 0, | |
1860 | 0, | |
03c05291 | 1861 | access_visible_list, |
d33e787c | 1862 | 0, |
46b6f1f6 | 1863 | get_members_of_list, |
d33e787c | 1864 | }; |
1865 | ||
03c05291 | 1866 | static char *glom_fields[] = { |
1867 | "member_type", "member_name", | |
1868 | "list_name", "active", "publicflg", "hidden", "maillist", "grouplist", | |
d33e787c | 1869 | }; |
1870 | ||
03c05291 | 1871 | static struct valobj glom_valobj[] = { |
5eaef520 | 1872 | {V_TYPE, 0, 0, "rmember", 0, MR_TYPE}, |
1873 | {V_TYPEDATA, 1, 0, 0, 0, MR_NO_MATCH}, | |
d33e787c | 1874 | }; |
1875 | ||
03c05291 | 1876 | static struct validate glom_validate = { |
1877 | glom_valobj, | |
d1b3a4bf | 1878 | 2, |
d33e787c | 1879 | 0, |
1880 | 0, | |
03c05291 | 1881 | 0, |
1882 | 0, | |
1883 | access_member, | |
1884 | 0, | |
1885 | get_lists_of_member, | |
d33e787c | 1886 | }; |
1887 | ||
03c05291 | 1888 | static char *cmol_fields[] = { |
1889 | "list_name", | |
1890 | "count", | |
d33e787c | 1891 | }; |
1892 | ||
03c05291 | 1893 | static struct validate cmol_validate = { |
1894 | VOlist0, | |
d33e787c | 1895 | 1, |
1896 | 0, | |
1897 | 0, | |
1898 | 0, | |
1899 | 0, | |
03c05291 | 1900 | access_visible_list, |
d33e787c | 1901 | 0, |
03c05291 | 1902 | count_members_of_list, |
d33e787c | 1903 | }; |
1904 | ||
03c05291 | 1905 | static char *gsin_fields[] = { |
e2b8245f | 1906 | "service", |
1907 | "service", "update_int", "target_file", "script", "dfgen", "dfcheck", | |
1908 | "type", "enable", "inprogress", "harderror", "errmsg", | |
8db06f75 | 1909 | "ace_type", "ace_name", "modtime", "modby", "modwith", |
88343c5e | 1910 | }; |
1911 | ||
5eaef520 | 1912 | static struct validate gsin_validate = |
03c05291 | 1913 | { |
263a36d4 | 1914 | 0, |
1915 | 0, | |
99e09b48 | 1916 | 0, |
1917 | 0, | |
1918 | 0, | |
1919 | 0, | |
03c05291 | 1920 | access_service, |
99e09b48 | 1921 | 0, |
59c3208b | 1922 | followup_gsin, |
99e09b48 | 1923 | }; |
1924 | ||
03c05291 | 1925 | static char *qgsv_fields[] = { |
1926 | "enable", "inprogress", "harderror", | |
1927 | "service", | |
4ffa124a | 1928 | }; |
0c345c78 | 1929 | |
03c05291 | 1930 | static struct valobj qgsv_valobj[] = { |
1931 | {V_TYPE, 0, 0, "boolean", 0, MR_TYPE}, | |
1932 | {V_TYPE, 1, 0, "boolean", 0, MR_TYPE}, | |
1933 | {V_TYPE, 2, 0, "boolean", 0, MR_TYPE}, | |
d33e787c | 1934 | }; |
1935 | ||
03c05291 | 1936 | static struct validate qgsv_validate = { |
1937 | qgsv_valobj, | |
1938 | 3, | |
d33e787c | 1939 | 0, |
1940 | 0, | |
1941 | 0, | |
1942 | 0, | |
d33e787c | 1943 | 0, |
03c05291 | 1944 | 0, |
1945 | qualified_get_server, | |
d33e787c | 1946 | }; |
1947 | ||
03c05291 | 1948 | static char *asin_fields[] = { |
e2b8245f | 1949 | "service", "update_int", "target_file", "script", "type", "enable", |
1950 | "ace_type", "ace_name", | |
d33e787c | 1951 | }; |
1952 | ||
03c05291 | 1953 | static struct valobj asin_valobj[] = { |
e2b8245f | 1954 | {V_CHAR, 0, SERVERS_TABLE, "name"}, |
f802fd0d | 1955 | {V_NUM, 1}, |
03c05291 | 1956 | {V_LEN, 2, SERVERS_TABLE, "target_file"}, |
1957 | {V_LEN, 3, SERVERS_TABLE, "script"}, | |
1958 | {V_TYPE, 4, 0, "service", 0, MR_TYPE}, | |
f802fd0d | 1959 | {V_NUM, 5}, |
e2b8245f | 1960 | {V_TYPE, 6, 0, "ace_type", 0, MR_ACE}, |
03c05291 | 1961 | {V_TYPEDATA, 7, 0, 0, 0, MR_ACE}, |
d33e787c | 1962 | }; |
1963 | ||
03c05291 | 1964 | static struct validate asin_validate = /* for asin, usin */ |
1965 | { | |
1966 | asin_valobj, | |
d1b3a4bf | 1967 | 8, |
e2b8245f | 1968 | "name", |
03c05291 | 1969 | "name = UPPER('%s')", |
d33e787c | 1970 | 1, |
d33e787c | 1971 | 0, |
03c05291 | 1972 | 0, |
1973 | 0, | |
1974 | set_uppercase_modtime, | |
d33e787c | 1975 | }; |
1976 | ||
03c05291 | 1977 | static struct validate rsve_validate = { |
1978 | asin_valobj, | |
d1b3a4bf | 1979 | 1, |
e2b8245f | 1980 | "name", |
03c05291 | 1981 | "name = UPPER('%s')", |
d33e787c | 1982 | 1, |
d33e787c | 1983 | 0, |
03c05291 | 1984 | access_service, |
1985 | 0, | |
1986 | set_uppercase_modtime, | |
d33e787c | 1987 | }; |
1988 | ||
03c05291 | 1989 | static char *ssif_fields[] = { |
e2b8245f | 1990 | "service", "dfgen", "dfcheck", "inprogress", "harderror", "errmsg", |
d33e787c | 1991 | }; |
1992 | ||
03c05291 | 1993 | static struct valobj ssif_valobj[] = { |
d1b3a4bf | 1994 | {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE}, |
f802fd0d | 1995 | {V_NUM, 1}, |
1996 | {V_NUM, 2}, | |
1997 | {V_NUM, 3}, | |
1998 | {V_NUM, 4}, | |
03c05291 | 1999 | {V_LEN, 5, SERVERS_TABLE, "errmsg"}, |
d33e787c | 2000 | }; |
2001 | ||
03c05291 | 2002 | static struct validate ssif_validate = { |
2003 | ssif_valobj, | |
d1b3a4bf | 2004 | 6, |
e2b8245f | 2005 | "name", |
03c05291 | 2006 | "name = UPPER('%s')", |
d33e787c | 2007 | 1, |
2008 | 0, | |
2009 | 0, | |
03c05291 | 2010 | 0, |
d33e787c | 2011 | 0, |
2012 | }; | |
2013 | ||
03c05291 | 2014 | static char *dsin_fields[] = { |
e2b8245f | 2015 | "service", |
95127ba8 | 2016 | }; |
2017 | ||
03c05291 | 2018 | static struct validate dsin_validate = { |
2019 | asin_valobj, | |
d1b3a4bf | 2020 | 1, |
e2b8245f | 2021 | "name", |
03c05291 | 2022 | "name = UPPER('%s')", |
2023 | 1, | |
0c345c78 | 2024 | 0, |
2025 | 0, | |
03c05291 | 2026 | setup_dsin, |
0c345c78 | 2027 | 0, |
95127ba8 | 2028 | }; |
2029 | ||
03c05291 | 2030 | static char *gshi_fields[] = { |
e2b8245f | 2031 | "service", "machine", |
2032 | "service", "machine", "enable", "override", "success", "inprogress", | |
03c05291 | 2033 | "hosterror", "hosterrormsg", "ltt", "lts", "value1", "value2", |
8db06f75 | 2034 | "value3", "modtime", "modby", "modwith", |
95127ba8 | 2035 | }; |
2036 | ||
03c05291 | 2037 | static struct validate gshi_validate = { |
263a36d4 | 2038 | 0, |
2039 | 0, | |
0c345c78 | 2040 | 0, |
2041 | 0, | |
2042 | 0, | |
2043 | 0, | |
03c05291 | 2044 | access_service, |
2045 | 0, | |
2046 | followup_fix_modby, | |
95127ba8 | 2047 | }; |
2048 | ||
03c05291 | 2049 | static char *qgsh_fields[] = { |
2050 | "service", "enable", "override", "success", "inprogress", "hosterror", | |
e2b8245f | 2051 | "service", "machine", |
d33e787c | 2052 | }; |
2053 | ||
03c05291 | 2054 | static struct valobj qgsh_valobj[] = { |
2055 | {V_TYPE, 1, 0, "boolean", 0, MR_TYPE}, | |
2056 | {V_TYPE, 2, 0, "boolean", 0, MR_TYPE}, | |
2057 | {V_TYPE, 3, 0, "boolean", 0, MR_TYPE}, | |
2058 | {V_TYPE, 4, 0, "boolean", 0, MR_TYPE}, | |
2059 | {V_TYPE, 5, 0, "boolean", 0, MR_TYPE}, | |
99e09b48 | 2060 | }; |
2061 | ||
03c05291 | 2062 | static struct validate qgsh_validate = { |
2063 | qgsh_valobj, | |
2064 | 5, | |
d33e787c | 2065 | 0, |
2066 | 0, | |
2067 | 0, | |
2068 | 0, | |
2069 | 0, | |
2070 | 0, | |
03c05291 | 2071 | qualified_get_serverhost, |
d33e787c | 2072 | }; |
2073 | ||
03c05291 | 2074 | static char *ashi_fields[] = { |
e2b8245f | 2075 | "service", "machine", "enable", "value1", "value2", "value3", |
d33e787c | 2076 | }; |
2077 | ||
03c05291 | 2078 | static struct valobj ashi_valobj[] = { |
e2b8245f | 2079 | {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE}, |
e2b8245f | 2080 | {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
f802fd0d | 2081 | {V_NUM, 2}, |
2082 | {V_NUM, 3}, | |
2083 | {V_NUM, 4}, | |
03c05291 | 2084 | {V_LEN, 5, SERVERHOSTS_TABLE, "value3"}, |
45bf7573 | 2085 | }; |
2086 | ||
03c05291 | 2087 | static struct validate ashi_validate = /* ashi & ushi */ |
2088 | { | |
2089 | ashi_valobj, | |
d1b3a4bf | 2090 | 6, |
e2b8245f | 2091 | "service", |
03c05291 | 2092 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 2093 | 2, |
d33e787c | 2094 | 0, |
03c05291 | 2095 | access_service, |
d33e787c | 2096 | 0, |
03c05291 | 2097 | set_serverhost_modtime, |
99e09b48 | 2098 | }; |
2099 | ||
5eaef520 | 2100 | static struct validate rshe_validate = |
03c05291 | 2101 | { |
2102 | ashi_valobj, | |
d1b3a4bf | 2103 | 2, |
e2b8245f | 2104 | "service", |
03c05291 | 2105 | "service = UPPER('%s') AND mach_id = %d", |
2106 | 2, | |
2107 | 0, | |
2108 | access_service, | |
2109 | 0, | |
2110 | set_serverhost_modtime, | |
d33e787c | 2111 | }; |
2112 | ||
5eaef520 | 2113 | static struct validate ssho_validate = |
03c05291 | 2114 | { |
2115 | ashi_valobj, | |
d1b3a4bf | 2116 | 2, |
e2b8245f | 2117 | "service", |
03c05291 | 2118 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 2119 | 2, |
d33e787c | 2120 | 0, |
03c05291 | 2121 | access_service, |
2122 | 0, | |
2123 | trigger_dcm, | |
d33e787c | 2124 | }; |
2125 | ||
03c05291 | 2126 | static char *sshi_fields[] = { |
e2b8245f | 2127 | "service", "machine", "override", "success", "inprogress", |
03c05291 | 2128 | "hosterror", "errmsg", "ltt", "lts", |
368be132 | 2129 | }; |
2130 | ||
03c05291 | 2131 | static struct valobj sshi_valobj[] = { |
e2b8245f | 2132 | {V_NAME, 0, SERVERS_TABLE, "name", 0, MR_SERVICE}, |
f802fd0d | 2133 | {V_ID, 1, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
2134 | {V_NUM, 2}, | |
2135 | {V_NUM, 3}, | |
2136 | {V_NUM, 4}, | |
2137 | {V_NUM, 5}, | |
2138 | {V_LEN, 6, SERVERHOSTS_TABLE, "hosterrmsg"}, | |
2139 | {V_NUM, 7}, | |
2140 | {V_NUM, 8}, | |
368be132 | 2141 | }; |
2142 | ||
5eaef520 | 2143 | static struct validate sshi_validate = |
03c05291 | 2144 | { |
2145 | sshi_valobj, | |
d1b3a4bf | 2146 | 9, |
368be132 | 2147 | 0, |
2148 | 0, | |
2149 | 0, | |
2150 | 0, | |
2151 | 0, | |
2152 | 0, | |
03c05291 | 2153 | 0, |
368be132 | 2154 | }; |
2155 | ||
03c05291 | 2156 | static char *dshi_fields[] = { |
e2b8245f | 2157 | "service", "machine", |
368be132 | 2158 | }; |
2159 | ||
5eaef520 | 2160 | static struct validate dshi_validate = |
03c05291 | 2161 | { |
2162 | ashi_valobj, | |
d1b3a4bf | 2163 | 2, |
e2b8245f | 2164 | "service", |
03c05291 | 2165 | "service = UPPER('%s') AND mach_id = %d", |
135dcb80 | 2166 | 2, |
368be132 | 2167 | 0, |
03c05291 | 2168 | access_service, |
2169 | setup_dshi, | |
368be132 | 2170 | 0, |
03c05291 | 2171 | }; |
2172 | ||
2173 | static char *gslo_fields[] = { | |
2174 | "server", | |
e2b8245f | 2175 | "server", "machine", |
03c05291 | 2176 | }; |
2177 | ||
2178 | static char *gfsl_fields[] = { | |
e2b8245f | 2179 | "label", |
8db06f75 | 2180 | "label", "type", "machine", "name", "mount", "access", "comments", |
2181 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
03c05291 | 2182 | }; |
2183 | ||
5a8887d8 | 2184 | static struct validate gfsl_validate = { |
2185 | 0, | |
2186 | 0, | |
2187 | 0, | |
2188 | 0, | |
2189 | 0, | |
2190 | 0, | |
2191 | access_filesys, | |
2192 | 0, | |
2193 | followup_fix_modby, | |
2194 | }; | |
2195 | ||
03c05291 | 2196 | static char *gfsm_fields[] = { |
e2b8245f | 2197 | "machine", |
8db06f75 | 2198 | "label", "type", "machine", "name", "mount", "access", "comments", |
2199 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
03c05291 | 2200 | }; |
2201 | ||
03c05291 | 2202 | static struct validate gfsm_validate = { |
d1b3a4bf | 2203 | VOmach0, |
2204 | 1, | |
368be132 | 2205 | 0, |
2206 | 0, | |
368be132 | 2207 | 0, |
03c05291 | 2208 | 0, |
2209 | 0, | |
2210 | 0, | |
2211 | followup_fix_modby, | |
368be132 | 2212 | }; |
2213 | ||
03c05291 | 2214 | static char *gfsn_fields[] = { |
cc1bca5c | 2215 | "machine", "partition", |
8db06f75 | 2216 | "label", "type", "machine", "name", "mount", "access", "comments", |
2217 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
368be132 | 2218 | }; |
2219 | ||
03c05291 | 2220 | static struct validate gfsn_validate = { |
263a36d4 | 2221 | VOmach0, |
2222 | 1, | |
368be132 | 2223 | 0, |
2224 | 0, | |
368be132 | 2225 | 0, |
2226 | 0, | |
368be132 | 2227 | 0, |
2228 | 0, | |
03c05291 | 2229 | followup_fix_modby, |
368be132 | 2230 | }; |
2231 | ||
03c05291 | 2232 | static char *gfsp_fields[] = { |
2233 | "path", | |
8db06f75 | 2234 | "label", "type", "machine", "name", "mount", "access", "comments", |
2235 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
d33e787c | 2236 | }; |
2237 | ||
03c05291 | 2238 | static char *gfsg_fields[] = { |
e2b8245f | 2239 | "list", |
8db06f75 | 2240 | "label", "type", "machine", "name", "mount", "access", "comments", |
2241 | "owner", "owners", "create", "lockertype", "modtime", "modby", "modwith", | |
03c05291 | 2242 | }; |
2243 | ||
03c05291 | 2244 | static struct validate gfsg_validate = { |
d1b3a4bf | 2245 | VOlist0, |
2246 | 1, | |
d33e787c | 2247 | 0, |
2248 | 0, | |
2249 | 0, | |
2250 | 0, | |
03c05291 | 2251 | access_list, |
d33e787c | 2252 | 0, |
03c05291 | 2253 | followup_fix_modby, |
d33e787c | 2254 | }; |
2255 | ||
03c05291 | 2256 | static char *afil_fields[] = { |
8db06f75 | 2257 | "label", "type", "machine", "name", "mount", "access", "comments", |
2258 | "owner", "owners", "create", "lockertype", | |
d33e787c | 2259 | }; |
2260 | ||
03c05291 | 2261 | static struct valobj afil_valobj[] = { |
e2b8245f | 2262 | {V_CHAR, 0, FILESYS_TABLE, "label"}, |
03c05291 | 2263 | {V_TYPE, 1, 0, "filesys", 0, MR_FSTYPE}, |
e2b8245f | 2264 | {V_ID, 2, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
2265 | {V_CHAR, 3, FILESYS_TABLE, "name"}, | |
03c05291 | 2266 | {V_LEN, 4, FILESYS_TABLE, "mount"}, |
f802fd0d | 2267 | {V_LEN, 5, FILESYS_TABLE, "rwaccess"}, |
e2b8245f | 2268 | {V_LEN, 6, FILESYS_TABLE, "comments"}, |
2269 | {V_ID, 7, USERS_TABLE, "login", "users_id", MR_USER}, | |
2270 | {V_ID, 8, LIST_TABLE, "name", "list_id", MR_LIST}, | |
f802fd0d | 2271 | {V_NUM, 9}, |
03c05291 | 2272 | {V_TYPE, 10, 0, "lockertype", 0, MR_TYPE}, |
99e09b48 | 2273 | }; |
2274 | ||
03c05291 | 2275 | static struct validate afil_validate = { |
2276 | afil_valobj, | |
d1b3a4bf | 2277 | 11, |
e2b8245f | 2278 | "label", |
03c05291 | 2279 | "label = '%s'", |
2280 | 1, | |
e2b8245f | 2281 | "filsys_id", |
03c05291 | 2282 | 0, |
2283 | setup_afil, | |
2284 | set_filesys_modtime, | |
2285 | }; | |
99e09b48 | 2286 | |
03c05291 | 2287 | static char *ufil_fields[] = { |
8db06f75 | 2288 | "label", "newlabel", "type", "machine", "name", "mount", "access", |
2289 | "comments", "owner", "owners", "create", "lockertype", | |
d33e787c | 2290 | }; |
2291 | ||
03c05291 | 2292 | static struct valobj ufil_valobj[] = { |
e2b8245f | 2293 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, |
2294 | {V_RENAME, 1, FILESYS_TABLE, "label", "filsys_id", MR_NOT_UNIQUE}, | |
03c05291 | 2295 | {V_TYPE, 2, 0, "filesys", 0, MR_FSTYPE}, |
e2b8245f | 2296 | {V_ID, 3, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
2297 | {V_CHAR, 4, FILESYS_TABLE, "name"}, | |
03c05291 | 2298 | {V_LEN, 5, FILESYS_TABLE, "mount"}, |
f802fd0d | 2299 | {V_LEN, 6, FILESYS_TABLE, "rwaccess"}, |
e2b8245f | 2300 | {V_LEN, 7, FILESYS_TABLE, "comments"}, |
2301 | {V_ID, 8, USERS_TABLE, "login", "users_id", MR_USER}, | |
2302 | {V_ID, 9, LIST_TABLE, "name", "list_id", MR_LIST}, | |
f802fd0d | 2303 | {V_NUM, 10}, |
03c05291 | 2304 | {V_TYPE, 11, 0, "lockertype", 0, MR_TYPE}, |
d33e787c | 2305 | }; |
2306 | ||
03c05291 | 2307 | static struct validate ufil_validate = { |
2308 | ufil_valobj, | |
d1b3a4bf | 2309 | 12, |
e2b8245f | 2310 | "label", |
03c05291 | 2311 | "filsys_id = %d", |
2312 | 1, | |
e2b8245f | 2313 | "filsys_id", |
d33e787c | 2314 | 0, |
03c05291 | 2315 | setup_ufil, |
2316 | set_filesys_modtime, | |
d33e787c | 2317 | }; |
2318 | ||
03c05291 | 2319 | static char *dfil_fields[] = { |
e2b8245f | 2320 | "label", |
03c05291 | 2321 | }; |
2322 | ||
03c05291 | 2323 | static struct validate dfil_validate = { |
d1b3a4bf | 2324 | VOfilesys0, |
2325 | 1, | |
03c05291 | 2326 | "label", |
2327 | "filsys_id = %d", | |
2328 | 1, | |
d33e787c | 2329 | 0, |
2330 | 0, | |
03c05291 | 2331 | setup_dfil, |
2332 | 0, | |
d33e787c | 2333 | }; |
2334 | ||
03c05291 | 2335 | static char *gfgm_fields[] = { |
e2b8245f | 2336 | "fsgroup", "filesys", "sortkey" |
5eaef520 | 2337 | }; |
03c05291 | 2338 | |
03c05291 | 2339 | static struct validate gfgm_validate = { |
d1b3a4bf | 2340 | VOfilesys0, |
29028043 | 2341 | 1, |
d33e787c | 2342 | 0, |
2343 | 0, | |
2344 | 0, | |
2345 | 0, | |
2346 | 0, | |
2347 | 0, | |
d33e787c | 2348 | 0, |
d33e787c | 2349 | }; |
2350 | ||
03c05291 | 2351 | static struct valobj aftg_valobj[] = { |
e2b8245f | 2352 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, |
2353 | {V_ID, 1, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, | |
d33e787c | 2354 | }; |
2355 | ||
03c05291 | 2356 | static struct validate aftg_validate = { |
2357 | aftg_valobj, | |
d1b3a4bf | 2358 | 2, |
03c05291 | 2359 | "group_id", |
2360 | "group_id = %d and filsys_id = %d", | |
2361 | 2, | |
2362 | 0, | |
2363 | 0, | |
2364 | 0, | |
d33e787c | 2365 | 0, |
d33e787c | 2366 | }; |
2367 | ||
03c05291 | 2368 | static char *ganf_fields[] = { |
8db06f75 | 2369 | "machine", "dir", "device", "status", "allocated", "size", |
2370 | "modtime", "modby", "modwith", | |
d33e787c | 2371 | }; |
2372 | ||
03c05291 | 2373 | static char *gnfp_fields[] = { |
e2b8245f | 2374 | "machine", "dir", |
8db06f75 | 2375 | "machine", "dir", "device", "status", "allocated", "size", |
2376 | "modtime", "modby", "modwith", | |
d33e787c | 2377 | }; |
2378 | ||
03c05291 | 2379 | static struct validate gnfp_validate = { |
263a36d4 | 2380 | VOmach0, |
2381 | 1, | |
03c05291 | 2382 | 0, |
2383 | 0, | |
2384 | 0, | |
2385 | 0, | |
2386 | 0, | |
2387 | 0, | |
2388 | followup_fix_modby, | |
d33e787c | 2389 | }; |
2390 | ||
03c05291 | 2391 | static struct valobj anfp_valobj[] = { |
e2b8245f | 2392 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
03c05291 | 2393 | {V_CHAR, 1, NFSPHYS_TABLE, "dir"}, |
2394 | {V_LEN, 2, NFSPHYS_TABLE, "device"}, | |
f802fd0d | 2395 | {V_NUM, 3}, |
2396 | {V_NUM, 4}, | |
2397 | {V_NUM, 5}, | |
03c05291 | 2398 | }; |
2399 | ||
2400 | static struct validate anfp_validate = { | |
2401 | anfp_valobj, | |
d1b3a4bf | 2402 | 6, |
e2b8245f | 2403 | "dir", |
03c05291 | 2404 | "mach_id = %d and dir = '%s'", |
2405 | 2, | |
2406 | "nfsphys_id", | |
d33e787c | 2407 | 0, |
03c05291 | 2408 | prefetch_value, |
2409 | set_nfsphys_modtime, | |
2410 | }; | |
2411 | ||
2412 | static struct validate unfp_validate = { | |
2413 | anfp_valobj, | |
d1b3a4bf | 2414 | 6, |
e2b8245f | 2415 | "dir", |
03c05291 | 2416 | "mach_id = %d and dir = '%s'", |
2417 | 2, | |
2418 | "nfsphys_id", | |
d33e787c | 2419 | 0, |
03c05291 | 2420 | 0, |
2421 | set_nfsphys_modtime, | |
d33e787c | 2422 | }; |
2423 | ||
03c05291 | 2424 | static char *ajnf_fields[] = { |
e2b8245f | 2425 | "machine", "dir", "adjustment", |
d33e787c | 2426 | }; |
2427 | ||
f802fd0d | 2428 | static struct valobj ajnf_valobj[] = { |
f802fd0d | 2429 | {V_ID, 0, MACHINE_TABLE, NAME, "mach_id", MR_MACHINE}, |
2430 | {V_CHAR, 1, NFSPHYS_TABLE, "dir"}, | |
2431 | {V_NUM, 2}, | |
2432 | }; | |
2433 | ||
2434 | static struct validate ajnf_validate = { | |
2435 | ajnf_valobj, | |
d1b3a4bf | 2436 | 3, |
f802fd0d | 2437 | "dir", |
2438 | "mach_id = %d and dir = '%s'", | |
2439 | 2, | |
2440 | "nfsphys_id", | |
2441 | 0, | |
2442 | 0, | |
2443 | set_nfsphys_modtime, | |
2444 | }; | |
2445 | ||
03c05291 | 2446 | static char *dnfp_fields[] = { |
e2b8245f | 2447 | "machine", "dir", |
d33e787c | 2448 | }; |
2449 | ||
03c05291 | 2450 | static struct validate dnfp_validate = { |
d1b3a4bf | 2451 | anfp_valobj, |
2452 | 2, | |
e2b8245f | 2453 | "dir", |
03c05291 | 2454 | "mach_id = %d and dir = '%s'", |
2455 | 2, | |
2456 | "nfsphys_id", | |
66f4a35b | 2457 | 0, |
03c05291 | 2458 | setup_dnfp, |
2459 | set_nfsphys_modtime, | |
2460 | }; | |
2461 | ||
2462 | static char *gqot_fields[] = { | |
e2b8245f | 2463 | "filesys", "type", "name", |
8db06f75 | 2464 | "filesys", "type", "name", "quota", "dir", "machine", |
2465 | "modtime", "modby", "modwith", | |
66f4a35b | 2466 | }; |
2467 | ||
03c05291 | 2468 | static struct valobj gqot_valobj[] = { |
e2b8245f | 2469 | {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE}, |
03c05291 | 2470 | {V_TYPEDATA, 2, 0, 0, 0, MR_ACE}, |
03c05291 | 2471 | }; |
2472 | ||
2473 | static struct validate gqot_validate = { | |
2474 | gqot_valobj, | |
263a36d4 | 2475 | 2, |
66f4a35b | 2476 | 0, |
2477 | 0, | |
2478 | 0, | |
d33e787c | 2479 | 0, |
d33e787c | 2480 | 0, |
03c05291 | 2481 | 0, |
2482 | followup_gqot, | |
d33e787c | 2483 | }; |
2484 | ||
03c05291 | 2485 | static char *gqbf_fields[] = { |
e2b8245f | 2486 | "filesys", |
8db06f75 | 2487 | "filesys", "type", "name", "quota", "dir", "machine", |
2488 | "modtime", "modby", "modwith", | |
d33e787c | 2489 | }; |
2490 | ||
03c05291 | 2491 | static struct validate gqbf_validate = { |
263a36d4 | 2492 | 0, |
2493 | 0, | |
0c345c78 | 2494 | 0, |
2495 | 0, | |
2496 | 0, | |
2497 | 0, | |
03c05291 | 2498 | access_filesys, |
0c345c78 | 2499 | 0, |
03c05291 | 2500 | followup_gqot, |
d33e787c | 2501 | }; |
2502 | ||
03c05291 | 2503 | static char *aqot_fields[] = { |
e2b8245f | 2504 | "filesys", "type", "name", "quota", |
d33e787c | 2505 | }; |
2506 | ||
03c05291 | 2507 | static struct valobj aqot_valobj[] = { |
e2b8245f | 2508 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, |
2509 | {V_TYPE, 1, 0, "quota_type", 0, MR_TYPE}, | |
03c05291 | 2510 | {V_TYPEDATA, 2, 0, 0, 0, MR_ACE}, |
f802fd0d | 2511 | {V_NUM, 3}, |
d33e787c | 2512 | }; |
2513 | ||
03c05291 | 2514 | static struct validate aqot_validate = { |
2515 | aqot_valobj, | |
d1b3a4bf | 2516 | 4, |
e2b8245f | 2517 | "filsys_id", |
03c05291 | 2518 | "filsys_id = %d and type = '%s' and entity_id = %d", |
2519 | 3, | |
0c345c78 | 2520 | 0, |
2521 | 0, | |
03c05291 | 2522 | prefetch_filesys, |
2523 | followup_aqot, | |
2524 | }; | |
2525 | ||
2526 | static struct validate uqot_validate = { | |
2527 | aqot_valobj, | |
d1b3a4bf | 2528 | 4, |
e2b8245f | 2529 | "filsys_id", |
03c05291 | 2530 | "filsys_id = %d AND type = '%s' AND entity_id = %d", |
2531 | 3, | |
2532 | 0, | |
0c345c78 | 2533 | 0, |
03c05291 | 2534 | setup_dqot, |
2535 | followup_aqot, | |
2536 | }; | |
2537 | ||
2538 | static struct validate dqot_validate = { | |
2539 | aqot_valobj, | |
d1b3a4bf | 2540 | 3, |
e2b8245f | 2541 | "filsys_id", |
03c05291 | 2542 | "filsys_id = %d AND type = '%s' AND entity_id = %d", |
2543 | 3, | |
0c345c78 | 2544 | 0, |
0c345c78 | 2545 | 0, |
03c05291 | 2546 | setup_dqot, |
2547 | followup_dqot, | |
d33e787c | 2548 | }; |
2549 | ||
03c05291 | 2550 | static char *gnfq_fields[] = { |
e2b8245f | 2551 | "filesys", "login", |
8db06f75 | 2552 | "filesys", "login", "quota", "dir", "machine", |
2553 | "modtime", "modby", "modwith", | |
d33e787c | 2554 | }; |
2555 | ||
03c05291 | 2556 | static struct validate gnfq_validate = { |
263a36d4 | 2557 | 0, |
2558 | 0, | |
d33e787c | 2559 | 0, |
2560 | 0, | |
2561 | 0, | |
2562 | 0, | |
03c05291 | 2563 | access_filesys, |
d33e787c | 2564 | 0, |
03c05291 | 2565 | followup_gqot, |
d33e787c | 2566 | }; |
2567 | ||
03c05291 | 2568 | static char *gnqp_fields[] = { |
e2b8245f | 2569 | "machine", "dir", |
8db06f75 | 2570 | "filesys", "login", "quota", "dir", "machine", |
2571 | "modtime", "modby", "modwith", | |
4ffa124a | 2572 | }; |
0c345c78 | 2573 | |
03c05291 | 2574 | static char *anfq_fields[] = { |
e2b8245f | 2575 | "filesys", "login", "quota", |
d33e787c | 2576 | }; |
2577 | ||
f802fd0d | 2578 | static struct valobj anfq_valobj[] = { |
f802fd0d | 2579 | {V_ID, 0, FILESYS_TABLE, "label", "filsys_id", MR_FILESYS}, |
2580 | {V_ID, 1, USERS_TABLE, "login", "users_id", MR_USER}, | |
2581 | {V_NUM, 2}, | |
2582 | }; | |
2583 | ||
03c05291 | 2584 | static struct validate anfq_validate = { |
f802fd0d | 2585 | anfq_valobj, |
d1b3a4bf | 2586 | 3, |
e2b8245f | 2587 | "filsys_id", |
03c05291 | 2588 | "filsys_id = %d AND type = 'USER' AND entity_id = %d", |
2589 | 2, | |
2590 | 0, /* object ? */ | |
d33e787c | 2591 | 0, |
03c05291 | 2592 | prefetch_filesys, |
2593 | followup_aqot, | |
d33e787c | 2594 | }; |
2595 | ||
03c05291 | 2596 | static struct validate unfq_validate = { |
f802fd0d | 2597 | anfq_valobj, |
d1b3a4bf | 2598 | 3, |
e2b8245f | 2599 | "filsys_id", |
03c05291 | 2600 | "filsys_id = %d AND type = 'USER' AND entity_id = %d", |
2601 | 2, | |
d33e787c | 2602 | 0, |
2603 | 0, | |
03c05291 | 2604 | setup_dqot, |
2605 | followup_aqot, | |
2606 | }; | |
2607 | ||
2608 | static struct validate dnfq_validate = { | |
f802fd0d | 2609 | anfq_valobj, |
d1b3a4bf | 2610 | 3, |
e2b8245f | 2611 | "filsys_id", |
03c05291 | 2612 | "filsys_id = %d AND entity_id = %d", |
2613 | 2, | |
d33e787c | 2614 | 0, |
d33e787c | 2615 | 0, |
03c05291 | 2616 | setup_dqot, |
2617 | followup_dqot, | |
d33e787c | 2618 | }; |
2619 | ||
d7ddc011 | 2620 | static char *gzcl2_fields[] = { |
e2b8245f | 2621 | "class", |
2622 | "class", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
8db06f75 | 2623 | "iws_type", "iws_name", "iui_type", "iui_name", |
2624 | "modtime", "modby", "modwith", | |
d33e787c | 2625 | }; |
2626 | ||
d7ddc011 | 2627 | static char *gzcl_fields[] = { |
2628 | "class", | |
2629 | "class", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
2630 | "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", | |
2631 | "owner_id", "modtime", "modby", "modwith", | |
2632 | }; | |
2633 | ||
d33e787c | 2634 | static struct validate gzcl_validate = { |
263a36d4 | 2635 | 0, |
2636 | 0, | |
d33e787c | 2637 | 0, |
2638 | 0, | |
2639 | 0, | |
2640 | 0, | |
d7ddc011 | 2641 | access_zephyr, |
d33e787c | 2642 | 0, |
2643 | followup_gzcl, | |
2644 | }; | |
2645 | ||
d7ddc011 | 2646 | static char *azcl2_fields[] = { |
e2b8245f | 2647 | "class", "xmt_type", "xmt_name", "sub_type", "sub_name", |
0c345c78 | 2648 | "iws_type", "iws_name", "iui_type", "iui_name", |
d7ddc011 | 2649 | }; |
2650 | ||
2651 | static struct valobj azcl2_valobj[] = { | |
2652 | {V_CHAR, 0, ZEPHYR_TABLE, "class"}, | |
2653 | {V_TYPE, 1, 0, "zace_type", 0, MR_ACE}, | |
2654 | {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE}, | |
2655 | {V_TYPE, 3, 0, "zace_type", 0, MR_ACE}, | |
2656 | {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE}, | |
2657 | {V_TYPE, 5, 0, "zace_type", 0, MR_ACE}, | |
2658 | {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE}, | |
2659 | {V_TYPE, 7, 0, "zace_type", 0, MR_ACE}, | |
2660 | {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE}, | |
2661 | }; | |
2662 | ||
2663 | static struct validate azcl2_validate = { | |
2664 | azcl2_valobj, | |
2665 | 9, | |
2666 | "class", | |
2667 | "class = '%s'", | |
2668 | 1, | |
2669 | 0, | |
2670 | 0, | |
2671 | 0, | |
2672 | set_zephyr_modtime, | |
2673 | }; | |
2674 | ||
2675 | static char *azcl_fields[] = { | |
2676 | "class", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
2677 | "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", | |
2678 | "owner_id", | |
d33e787c | 2679 | }; |
2680 | ||
2681 | static struct valobj azcl_valobj[] = { | |
e2b8245f | 2682 | {V_CHAR, 0, ZEPHYR_TABLE, "class"}, |
46b6f1f6 | 2683 | {V_TYPE, 1, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2684 | {V_TYPEDATA, 2, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2685 | {V_TYPE, 3, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2686 | {V_TYPEDATA, 4, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2687 | {V_TYPE, 5, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2688 | {V_TYPEDATA, 6, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2689 | {V_TYPE, 7, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2690 | {V_TYPEDATA, 8, 0, 0, "list_id", MR_ACE}, |
d7ddc011 | 2691 | {V_TYPE, 9, 0, "ace_type", 0, MR_ACE}, |
2692 | {V_TYPEDATA, 10, 0, 0, "list_id", MR_ACE}, | |
d33e787c | 2693 | }; |
2694 | ||
2695 | static struct validate azcl_validate = { | |
2696 | azcl_valobj, | |
d7ddc011 | 2697 | 11, |
e2b8245f | 2698 | "class", |
03c05291 | 2699 | "class = '%s'", |
d33e787c | 2700 | 1, |
2701 | 0, | |
2702 | 0, | |
2703 | 0, | |
2704 | set_zephyr_modtime, | |
2705 | }; | |
2706 | ||
d7ddc011 | 2707 | static char *uzcl2_fields[] = { |
e2b8245f | 2708 | "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name", |
0c345c78 | 2709 | "iws_type", "iws_name", "iui_type", "iui_name", |
d33e787c | 2710 | }; |
2711 | ||
d7ddc011 | 2712 | static struct valobj uzcl2_valobj[] = { |
2713 | {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS}, | |
2714 | {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE}, | |
2715 | {V_TYPE, 2, 0, "zace_type", 0, MR_ACE}, | |
2716 | {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE}, | |
2717 | {V_TYPE, 4, 0, "zace_type", 0, MR_ACE}, | |
2718 | {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE}, | |
2719 | {V_TYPE, 6, 0, "zace_type", 0, MR_ACE}, | |
2720 | {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE}, | |
2721 | {V_TYPE, 8, 0, "zace_type", 0, MR_ACE}, | |
2722 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, | |
2723 | }; | |
2724 | ||
2725 | static struct validate uzcl2_validate = { | |
2726 | uzcl2_valobj, | |
2727 | 10, | |
2728 | "class", | |
2729 | "class = '%s'", | |
2730 | 1, | |
2731 | 0, | |
2732 | access_zephyr, | |
2733 | 0, | |
2734 | set_zephyr_modtime, | |
2735 | }; | |
2736 | ||
2737 | static char *uzcl_fields[] = { | |
2738 | "class", "newclass", "xmt_type", "xmt_name", "sub_type", "sub_name", | |
2739 | "iws_type", "iws_name", "iui_type", "iui_name", "owner_type", "owner_id", | |
2740 | }; | |
2741 | ||
d33e787c | 2742 | static struct valobj uzcl_valobj[] = { |
d1b3a4bf | 2743 | {V_NAME, 0, ZEPHYR_TABLE, "class", 0, MR_BAD_CLASS}, |
e2b8245f | 2744 | {V_RENAME, 1, ZEPHYR_TABLE, "class", 0, MR_NOT_UNIQUE}, |
46b6f1f6 | 2745 | {V_TYPE, 2, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2746 | {V_TYPEDATA, 3, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2747 | {V_TYPE, 4, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2748 | {V_TYPEDATA, 5, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2749 | {V_TYPE, 6, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2750 | {V_TYPEDATA, 7, 0, 0, "list_id", MR_ACE}, |
46b6f1f6 | 2751 | {V_TYPE, 8, 0, "zace_type", 0, MR_ACE}, |
e2b8245f | 2752 | {V_TYPEDATA, 9, 0, 0, "list_id", MR_ACE}, |
d7ddc011 | 2753 | {V_TYPE, 10, 0, "ace_type", 0, MR_ACE}, |
2754 | {V_TYPEDATA, 11, 0, 0, "list_id", MR_ACE}, | |
d33e787c | 2755 | }; |
2756 | ||
2757 | static struct validate uzcl_validate = { | |
2758 | uzcl_valobj, | |
d7ddc011 | 2759 | 12, |
e2b8245f | 2760 | "class", |
3e8c655c | 2761 | "class = '%s'", |
d33e787c | 2762 | 1, |
2763 | 0, | |
d7ddc011 | 2764 | access_zephyr, |
d33e787c | 2765 | 0, |
2766 | set_zephyr_modtime, | |
2767 | }; | |
2768 | ||
2769 | static struct validate dzcl_validate = { | |
2770 | 0, | |
2771 | 0, | |
e2b8245f | 2772 | "class", |
73043086 | 2773 | "class = '%s'", |
d33e787c | 2774 | 1, |
2775 | 0, | |
2776 | 0, | |
2777 | 0, | |
2778 | 0, | |
2779 | }; | |
2780 | ||
03c05291 | 2781 | static char *gsha_fields[] = { |
e2b8245f | 2782 | "machine", |
8db06f75 | 2783 | "machine", "ace_type", "ace_name", "modtime", "modby", "modwith", |
03c05291 | 2784 | }; |
2785 | ||
5eaef520 | 2786 | static struct validate gsha_validate = |
03c05291 | 2787 | { |
263a36d4 | 2788 | 0, |
2789 | 0, | |
03c05291 | 2790 | 0, |
2791 | 0, | |
2792 | 0, | |
2793 | 0, | |
2794 | 0, | |
2795 | 0, | |
2796 | followup_gsha, | |
2797 | }; | |
2798 | ||
2799 | static char *asha_fields[] = { | |
e2b8245f | 2800 | "machine", "ace_type", "ace_name", |
03c05291 | 2801 | }; |
2802 | ||
2803 | static struct valobj asha_valobj[] = { | |
e2b8245f | 2804 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, |
e2b8245f | 2805 | {V_TYPE, 1, 0, "ace_type", 0, MR_ACE}, |
03c05291 | 2806 | {V_TYPEDATA, 2, 0, 0, 0, MR_ACE}, |
2807 | }; | |
2808 | ||
5eaef520 | 2809 | static struct validate asha_validate = |
03c05291 | 2810 | { |
2811 | asha_valobj, | |
d1b3a4bf | 2812 | 3, |
e2b8245f | 2813 | "mach_id", |
03c05291 | 2814 | "mach_id = %d", |
2815 | 1, | |
e2b8245f | 2816 | "mach_id", |
03c05291 | 2817 | 0, |
2818 | 0, | |
2819 | set_modtime_by_id, | |
2820 | }; | |
2821 | ||
46b6f1f6 | 2822 | static char *gacl_fields[] = { |
2823 | "machine", "target", | |
2824 | "machine", "target", "kind", "list", | |
2825 | }; | |
2826 | ||
2827 | static char *aacl_fields[] = { | |
2828 | "machine", "target", "kind", "list", | |
2829 | }; | |
2830 | ||
2831 | static char *dacl_fields[] = { | |
2832 | "machine", "target", | |
2833 | }; | |
2834 | ||
2835 | static struct valobj aacl_valobj[] = { | |
2836 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
2837 | {V_CHAR, 1, ACL_TABLE, "target"}, | |
2838 | {V_TYPE, 2, 0, "acl_kind", 0, MR_TYPE}, | |
2839 | {V_ID, 3, LIST_TABLE, "name", "list_id", MR_LIST}, | |
2840 | }; | |
2841 | ||
2842 | static struct validate gacl_validate = | |
2843 | { | |
2844 | aacl_valobj, | |
2845 | 1, | |
2846 | NULL, | |
2847 | NULL, | |
2848 | 0, | |
2849 | "mach_id", | |
2850 | /* access_acl */ 0, | |
2851 | 0, | |
2852 | 0, | |
2853 | }; | |
2854 | ||
2855 | static struct validate aacl_validate = | |
2856 | { | |
2857 | aacl_valobj, | |
2858 | 4, | |
2859 | "mach_id", | |
2860 | "mach_id = %d AND target = '%s'", | |
2861 | 2, | |
2862 | "mach_id", | |
2863 | /* access_acl */ 0, | |
2864 | 0, | |
2865 | 0, | |
2866 | }; | |
2867 | ||
fd5b2340 | 2868 | static char *gsvc_fields[] = { |
69eb9470 | 2869 | "service", "protocol", |
8db06f75 | 2870 | "service", "protocol", "port", "description", "modtime", "modby", "modwith", |
d33e787c | 2871 | }; |
2872 | ||
fd5b2340 | 2873 | static char *asvc_fields[] = { |
e2b8245f | 2874 | "service", "protocol", "port", "description", |
fd5b2340 | 2875 | }; |
2876 | ||
69eb9470 | 2877 | static char *dsvc_fields[] = { |
2878 | "service", "protocol", | |
2879 | }; | |
2880 | ||
03c05291 | 2881 | static struct valobj asvc_valobj[] = { |
e2b8245f | 2882 | {V_CHAR, 0, SERVICES_TABLE, "name"}, |
03c05291 | 2883 | {V_CHAR, 1, SERVICES_TABLE, "protocol"}, |
f802fd0d | 2884 | {V_NUM, 2}, |
e2b8245f | 2885 | {V_CHAR, 3, SERVICES_TABLE, "description"}, |
03c05291 | 2886 | }; |
2887 | ||
fd5b2340 | 2888 | static struct validate asvc_validate = { |
03c05291 | 2889 | asvc_valobj, |
f802fd0d | 2890 | 4, |
e2b8245f | 2891 | "name", |
69eb9470 | 2892 | "name = '%s' AND protocol = '%s'", |
2893 | 2, | |
2894 | 0, | |
2895 | 0, | |
2896 | 0, | |
2897 | set_service_modtime, | |
2898 | }; | |
2899 | ||
2900 | static struct validate dsvc_validate = { | |
2901 | asvc_valobj, | |
2902 | 2, | |
2903 | "name", | |
2904 | "name = '%s' AND protocol = '%s'", | |
2905 | 2, | |
2906 | 0, | |
fd5b2340 | 2907 | 0, |
2908 | 0, | |
2909 | 0, | |
fd5b2340 | 2910 | }; |
2911 | ||
2884200f | 2912 | static char *gprn_fields[] = { |
2913 | "name", | |
2914 | "name", "type", "hwtype", "duplexname", "hostname", | |
2915 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 2916 | "banner", "location", "contact", "modtime", "modby", "modwith" |
d33e787c | 2917 | }; |
2918 | ||
2884200f | 2919 | static char *gpbd_fields[] = { |
2920 | "duplexname", | |
2921 | "name", "type", "hwtype", "duplexname", "hostname", | |
2922 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 2923 | "banner", "location", "contact", "modtime", "modby", "modwith" |
d4462d4f | 2924 | }; |
2925 | ||
2884200f | 2926 | static char *gpbe_fields[] = { |
2927 | "hwaddr", | |
2928 | "name", "type", "hwtype", "duplexname", "hostname", | |
2929 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 2930 | "banner", "location", "contact", "modtime", "modby", "modwith" |
fad88070 | 2931 | }; |
2932 | ||
2884200f | 2933 | static char *gpbh_fields[] = { |
2934 | "hostname", | |
2935 | "name", "type", "hwtype", "duplexname", "hostname", | |
2936 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 2937 | "banner", "location", "contact", "modtime", "modby", "modwith" |
d33e787c | 2938 | }; |
2939 | ||
2884200f | 2940 | static char *gpbr_fields[] = { |
2941 | "rm", | |
2942 | "name", "type", "hwtype", "duplexname", "hostname", | |
2943 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 2944 | "banner", "location", "contact", "modtime", "modby", "modwith" |
d33e787c | 2945 | }; |
2946 | ||
2884200f | 2947 | static char *gpbl_fields[] = { |
2948 | "location", | |
2949 | "name", "type", "hwtype", "duplexname", "hostname", | |
2950 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 2951 | "banner", "location", "contact", "modtime", "modby", "modwith" |
fd5b2340 | 2952 | }; |
2953 | ||
2884200f | 2954 | static char *gpbc_fields[] = { |
2955 | "contact", | |
2956 | "name", "type", "hwtype", "duplexname", "hostname", | |
2957 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 2958 | "banner", "location", "contact", "modtime", "modby", "modwith" |
012fc215 | 2959 | }; |
2960 | ||
2884200f | 2961 | static char *aprn_fields[] = { |
2962 | "printer", "type", "hwtype", "duplexname", "hostname", | |
2963 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
e5a63571 | 2964 | "banner", "location", "contact", |
03c05291 | 2965 | }; |
012fc215 | 2966 | |
2884200f | 2967 | static struct valobj aprn_valobj[] = { |
2968 | {V_CHAR, 0, PRINTERS_TABLE, "name"}, | |
2969 | {V_TYPE, 1, 0, "printertype", 0, MR_TYPE}, | |
2970 | {V_TYPE, 2, 0, "printerhwtype", 0, MR_TYPE}, | |
2971 | {V_CHAR, 3, PRINTERS_TABLE, "duplexname"}, | |
2972 | {V_ID, 4, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
2973 | {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
2974 | {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
2975 | {V_CHAR, 7, PRINTERS_TABLE, "rp"}, | |
2976 | {V_ID, 8, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
2977 | {V_NUM, 9}, | |
2978 | {V_NUM, 10}, | |
2979 | {V_ID, 11, LIST_TABLE, "name", "list_id", MR_LIST}, | |
2980 | {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST}, | |
e5a63571 | 2981 | {V_NUM, 13}, |
2982 | {V_CHAR, 14, PRINTERS_TABLE, "location"}, | |
2983 | {V_CHAR, 15, PRINTERS_TABLE, "contact"}, | |
012fc215 | 2984 | }; |
2985 | ||
2884200f | 2986 | static struct validate aprn_validate = { |
2987 | aprn_valobj, | |
e5a63571 | 2988 | 16, |
e2b8245f | 2989 | "name", |
03c05291 | 2990 | "name = '%s'", |
012fc215 | 2991 | 1, |
2992 | 0, | |
1a9a0a59 | 2993 | access_printer, |
2994 | setup_aprn, | |
2995 | set_modtime, | |
2996 | }; | |
2997 | ||
2998 | static char *uprn_fields[] = { | |
2999 | "printer", | |
3000 | "printer", "type", "hwtype", "duplexname", "hostname", | |
3001 | "loghost", "rm", "rp", "rq", "ka", "pc", "ac", "lpc_acl", | |
3002 | "banner", "location", "contact", | |
3003 | }; | |
3004 | ||
3005 | static struct valobj uprn_valobj[] = { | |
3006 | {V_CHAR, 0, PRINTERS_TABLE, "name"}, | |
3007 | {V_CHAR, 1, PRINTERS_TABLE, "name"}, | |
3008 | {V_TYPE, 2, 0, "printertype", 0, MR_TYPE}, | |
3009 | {V_TYPE, 3, 0, "printerhwtype", 0, MR_TYPE}, | |
3010 | {V_CHAR, 4, PRINTERS_TABLE, "duplexname"}, | |
3011 | {V_ID, 5, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3012 | {V_ID, 6, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3013 | {V_ID, 7, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3014 | {V_CHAR, 8, PRINTERS_TABLE, "rp"}, | |
3015 | {V_ID, 9, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3016 | {V_NUM, 10}, | |
3017 | {V_NUM, 11}, | |
3018 | {V_ID, 12, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3019 | {V_ID, 13, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3020 | {V_NUM, 14}, | |
3021 | {V_CHAR, 15, PRINTERS_TABLE, "location"}, | |
3022 | {V_CHAR, 16, PRINTERS_TABLE, "contact"}, | |
3023 | }; | |
3024 | ||
3025 | static struct validate uprn_validate = { | |
3026 | uprn_valobj, | |
3027 | 16, | |
3028 | "name", | |
3029 | "name = '%s'", | |
3030 | 1, | |
012fc215 | 3031 | 0, |
1a9a0a59 | 3032 | access_printer, |
2884200f | 3033 | setup_aprn, |
1a9a0a59 | 3034 | set_modtime, |
012fc215 | 3035 | }; |
3036 | ||
2884200f | 3037 | static struct validate dprn_validate = { |
012fc215 | 3038 | 0, |
3039 | 0, | |
e2b8245f | 3040 | "name", |
3e8c655c | 3041 | "name = '%s'", |
012fc215 | 3042 | 1, |
3043 | 0, | |
1a9a0a59 | 3044 | access_printer, |
3045 | 0, | |
3046 | 0, | |
3047 | }; | |
3048 | ||
3049 | static char *gpsv_fields[] = { | |
3050 | "host", | |
3051 | "host", "kind", "printer_types", "owner_type", "owner_name", | |
3052 | "lpc_acl", "modtime", "modby", "modwith" | |
3053 | }; | |
3054 | ||
3055 | static struct valobj gpsv_valobj[] = { | |
3056 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3057 | }; | |
3058 | ||
3059 | static struct validate gpsv_validate = { | |
3060 | gpsv_valobj, | |
3061 | 1, | |
3062 | 0, | |
3063 | 0, | |
3064 | 0, | |
3065 | 0, | |
3066 | 0, | |
3067 | 0, | |
3068 | followup_gpsv, | |
3069 | }; | |
3070 | ||
3071 | static char *apsv_fields[] = { | |
3072 | "host", "kind", "printer_types", "owner_type", "owner_name", "lpc_acl" | |
3073 | }; | |
3074 | ||
3075 | static struct valobj apsv_valobj[] = { | |
3076 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3077 | {V_TYPE, 1, 0, "lpd_kind", 0, MR_TYPE}, | |
3078 | {V_ID, 2, STRINGS_TABLE, "string", "string_id", MR_STRING}, | |
3079 | {V_TYPE, 3, 0, "ace_type", 0, MR_ACE}, | |
3080 | {V_TYPEDATA, 4, 0, 0, 0, MR_ACE}, | |
3081 | {V_ID, 5, LIST_TABLE, "name", "list_id", MR_LIST}, | |
3082 | }; | |
3083 | ||
3084 | static struct validate apsv_validate = { | |
3085 | apsv_valobj, | |
3086 | 6, | |
3087 | "mach_id", | |
3088 | "mach_id = %d", | |
3089 | 1, | |
3090 | "mach_id", | |
012fc215 | 3091 | 0, |
3092 | 0, | |
1a9a0a59 | 3093 | set_modtime_by_id, |
012fc215 | 3094 | }; |
3095 | ||
1a9a0a59 | 3096 | static char *dpsv_fields[] = { |
3097 | "host", | |
3098 | }; | |
3099 | ||
3100 | static struct validate dpsv_validate = { | |
3101 | gpsv_valobj, | |
3102 | 1, | |
3103 | "mach_id", | |
3104 | "mach_id = %d", | |
3105 | 1, | |
3106 | 0, | |
3107 | 0, | |
3108 | setup_dpsv, | |
3109 | 0, | |
3110 | }; | |
3111 | ||
d33e787c | 3112 | static char *gali_fields[] = { |
e2b8245f | 3113 | "name", "type", "trans", |
3114 | "name", "type", "trans", | |
d33e787c | 3115 | }; |
3116 | ||
3117 | static char *aali_fields[] = { | |
e2b8245f | 3118 | "name", "type", "trans", |
d33e787c | 3119 | }; |
3120 | ||
3121 | static struct valobj aali_valobj[] = { | |
e2b8245f | 3122 | {V_CHAR, 0, ALIAS_TABLE, "name"}, |
3123 | {V_TYPE, 1, 0, "alias", 0, MR_TYPE}, | |
03c05291 | 3124 | {V_CHAR, 2, ALIAS_TABLE, "trans"}, |
d33e787c | 3125 | }; |
3126 | ||
3127 | static struct validate aali_validate = { | |
3128 | aali_valobj, | |
3129 | 3, | |
3130 | "trans", | |
03c05291 | 3131 | "name = '%s' and type = '%s' and trans = '%s'", |
d33e787c | 3132 | 3, |
3133 | 0, | |
3134 | 0, | |
3135 | 0, | |
3136 | 0, | |
3137 | }; | |
3138 | ||
3139 | static struct validate dali_validate = /* DELETE_ALIAS */ | |
3140 | { | |
3141 | 0, | |
3142 | 0, | |
3143 | "trans", | |
73043086 | 3144 | "name = '%s' and type = '%s' and trans = '%s'", |
d33e787c | 3145 | 3, |
3146 | 0, | |
3147 | 0, | |
3148 | 0, | |
3149 | 0, | |
3150 | }; | |
3151 | ||
3152 | static char *gval_fields[] = { | |
e2b8245f | 3153 | "name", "value", |
d33e787c | 3154 | }; |
3155 | ||
3156 | static struct valobj gval_valobj[] = { | |
e2b8245f | 3157 | {V_NAME, 0, NUMVALUES_TABLE, "name", 0, MR_NO_MATCH}, |
d33e787c | 3158 | }; |
3159 | ||
3160 | static struct validate gval_validate = { | |
3161 | gval_valobj, | |
3162 | 1, | |
3163 | 0, | |
3164 | 0, | |
3165 | 0, | |
3166 | 0, | |
3167 | 0, | |
3168 | 0, | |
3169 | 0, | |
3170 | }; | |
3171 | ||
3172 | static char *aval_fields[] = { | |
e2b8245f | 3173 | "name", "value", |
d33e787c | 3174 | }; |
3175 | ||
03c05291 | 3176 | static struct valobj aval_valobj[] = { |
e2b8245f | 3177 | {V_CHAR, 0, NUMVALUES_TABLE, "name"}, |
f802fd0d | 3178 | {V_NUM, 1}, |
03c05291 | 3179 | }; |
3180 | ||
d33e787c | 3181 | static struct validate aval_validate = /* for aval, uval, and dval */ |
3182 | { | |
03c05291 | 3183 | aval_valobj, |
f802fd0d | 3184 | 2, |
e2b8245f | 3185 | "name", |
03c05291 | 3186 | "name = '%s'", |
d33e787c | 3187 | 1, |
3188 | 0, | |
3189 | 0, | |
3190 | 0, | |
3191 | 0, | |
3192 | }; | |
3193 | ||
3194 | static char *dval_fields[] = { | |
e2b8245f | 3195 | "name", |
d33e787c | 3196 | }; |
3197 | ||
3198 | static char *gats_fields[] = { | |
8db06f75 | 3199 | "table_name", "appends", "updates", "deletes", |
3200 | "modtime", "modby", "modwith", | |
d33e787c | 3201 | }; |
3202 | ||
2962e9ec | 3203 | static char *_sdl_fields[] = { |
5eaef520 | 3204 | "level", |
2962e9ec | 3205 | }; |
3206 | ||
5eaef520 | 3207 | static struct validate _sdl_validate = |
2962e9ec | 3208 | { |
f802fd0d | 3209 | VOnum0, |
3210 | 1, | |
7ac48069 | 3211 | NULL, |
3212 | NULL, | |
5eaef520 | 3213 | 0, |
3214 | 0, | |
3215 | 0, | |
3216 | 0, | |
3217 | _sdl_followup, | |
2962e9ec | 3218 | }; |
3219 | ||
ca3ca9c9 | 3220 | static char *gusl_fields[] = { |
77bf4a4d | 3221 | "login", "domain_sid", |
ca3ca9c9 | 3222 | "login", "sid", "created", |
3223 | }; | |
3224 | ||
3225 | static struct validate gusl_validate = | |
3226 | { | |
3227 | VOuser0, | |
3228 | 1, | |
3229 | NULL, | |
3230 | NULL, | |
3231 | 0, | |
3232 | 0, | |
3233 | 0, | |
3234 | 0, | |
3235 | 0, | |
3236 | }; | |
3237 | ||
3238 | static char *glsn_fields[] = { | |
77bf4a4d | 3239 | "name", "domain_sid", |
ca3ca9c9 | 3240 | "name", "sid", "created", |
3241 | }; | |
3242 | ||
3243 | static struct validate glsn_validate = | |
3244 | { | |
3245 | VOlist0, | |
3246 | 1, | |
3247 | NULL, | |
3248 | NULL, | |
3249 | 0, | |
3250 | 0, | |
3251 | 0, | |
3252 | 0, | |
3253 | 0, | |
3254 | }; | |
3255 | ||
3256 | static char *ausl_fields[] = { | |
3257 | "login", "sid", | |
3258 | }; | |
3259 | ||
3260 | static struct validate ausl_validate = | |
3261 | { | |
3262 | VOuser0, | |
3263 | 1, | |
3264 | "sid", | |
d08dccbf | 3265 | "users_id = %d AND sid = '%s'", |
3266 | 2, | |
ca3ca9c9 | 3267 | 0, |
3268 | 0, | |
3269 | 0, | |
3270 | 0, | |
3271 | }; | |
3272 | ||
3273 | static char *alsn_fields[] = { | |
3274 | "name", "sid", | |
3275 | }; | |
3276 | ||
3277 | static struct validate alsn_validate = | |
3278 | { | |
3279 | VOlist0, | |
3280 | 1, | |
3281 | "sid", | |
d08dccbf | 3282 | "list_id = %d AND sid = '%s'", |
3283 | 2, | |
ca3ca9c9 | 3284 | 0, |
3285 | 0, | |
3286 | 0, | |
3287 | 0, | |
3288 | }; | |
d33e787c | 3289 | |
77bf4a4d | 3290 | static char *gdds_fields[] = { |
3291 | "sid", | |
3292 | }; | |
3293 | ||
2fb668b0 | 3294 | static char *gcon_fields[] = { |
3295 | "name", | |
3296 | "name", "description", "location", "contact", | |
3297 | "ace_type", "ace_name", "memace_type", "memace_name", "modtime", "modby", "modwith", | |
3298 | }; | |
3299 | ||
3300 | static struct validate gcon_validate = { | |
3301 | 0, | |
3302 | 0, | |
3303 | 0, | |
3304 | 0, | |
3305 | 0, | |
3306 | 0, | |
3307 | 0, | |
3308 | 0, | |
3309 | followup_gcon, | |
3310 | }; | |
3311 | ||
3312 | static char *acon_fields[] = { | |
3313 | "name", "description", "location", "contact", | |
3314 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3315 | }; | |
3316 | ||
3317 | static struct valobj acon_valobj[] = { | |
3318 | {V_CHAR, 0, CONTAINERS_TABLE, "name"}, | |
3319 | {V_LEN, 1, CONTAINERS_TABLE, "description"}, | |
3320 | {V_CHAR, 2, CONTAINERS_TABLE, "location"}, | |
3321 | {V_CHAR, 3, CONTAINERS_TABLE, "contact"}, | |
3322 | {V_TYPE, 4, 0, "ace_type", 0, MR_ACE}, | |
3323 | {V_TYPEDATA, 5, 0, 0, 0, MR_ACE}, | |
3324 | {V_TYPE, 6, 0, "ace_type", 0, MR_ACE}, | |
3325 | {V_TYPEDATA, 7, 0, 0, 0, MR_ACE}, | |
3326 | }; | |
3327 | ||
3328 | static struct validate acon_validate = | |
3329 | { | |
3330 | acon_valobj, | |
3331 | 8, | |
3332 | "name", | |
3333 | "name = '%s'", | |
3334 | 1, | |
3335 | "cnt_id", | |
3336 | 0, | |
3337 | prefetch_value, | |
3338 | set_modtime, | |
3339 | }; | |
3340 | ||
3341 | static char *ucon_fields[] = { | |
3342 | "name", | |
3343 | "newname", "description", "location", "contact", | |
3344 | "ace_type", "ace_name", "memace_type", "memace_name", | |
3345 | }; | |
3346 | ||
3347 | static struct valobj ucon_valobj[] = { | |
3348 | {V_ID, 0, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
3349 | {V_RENAME, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_NOT_UNIQUE}, | |
3350 | {V_LEN, 2, CONTAINERS_TABLE, "description"}, | |
3351 | {V_CHAR, 3, CONTAINERS_TABLE, "location"}, | |
3352 | {V_CHAR, 4, CONTAINERS_TABLE, "contact"}, | |
3353 | {V_TYPE, 5, 0, "ace_type", 0, MR_ACE}, | |
3354 | {V_TYPEDATA, 6, 0, 0, 0, MR_ACE}, | |
3355 | {V_TYPE, 7, 0, "ace_type", 0, MR_ACE}, | |
3356 | {V_TYPEDATA, 8, 0, 0, 0, MR_ACE}, | |
3357 | }; | |
3358 | ||
3359 | static struct validate ucon_validate = | |
3360 | { | |
3361 | ucon_valobj, | |
3362 | 9, | |
3363 | 0, | |
3364 | 0, | |
3365 | 0, | |
3366 | 0, | |
3367 | access_container, | |
3368 | 0, | |
3369 | update_container, | |
3370 | }; | |
3371 | ||
3372 | static char *dcon_fields[] = { | |
3373 | "name", | |
3374 | }; | |
3375 | ||
3376 | static struct validate dcon_validate = | |
3377 | { | |
3378 | VOcon0, | |
3379 | 1, | |
3380 | 0, | |
3381 | 0, | |
3382 | 0, | |
3383 | 0, | |
3384 | 0, | |
3385 | setup_dcon, | |
3386 | 0, | |
3387 | }; | |
3388 | ||
3389 | static char *amcn_fields[] = { | |
3390 | "machine", "container", | |
3391 | }; | |
3392 | ||
3393 | static struct valobj amcn_valobj[] = /* ADD_MACHINE_TO_CONTAINER */ | |
3394 | { /* DELETE_MACHINE_FROM_CONTAINER */ | |
3395 | {V_ID, 0, MACHINE_TABLE, "name", "mach_id", MR_MACHINE}, | |
3396 | {V_ID, 1, CONTAINERS_TABLE, "name", "cnt_id", MR_CONTAINER}, | |
3397 | }; | |
3398 | ||
3399 | static struct validate amcn_validate = /* for amtn and dmfn */ | |
d16a0628 | 3400 | { |
3401 | amcn_valobj, | |
3402 | 2, | |
3403 | "mach_id", | |
3404 | "mach_id = %d", | |
3405 | 1, | |
3406 | 0, | |
3407 | access_container, | |
3408 | 0, | |
3409 | set_mach_modtime_by_id, | |
3410 | }; | |
3411 | ||
3412 | static struct validate dmcn_validate = /* for amtn and dmfn */ | |
2fb668b0 | 3413 | { |
3414 | amcn_valobj, | |
3415 | 2, | |
3416 | "mach_id", | |
3417 | "mach_id = %d and cnt_id = %d", | |
3418 | 2, | |
3419 | 0, | |
3420 | access_container, | |
3421 | 0, | |
3422 | set_mach_modtime_by_id, | |
3423 | }; | |
3424 | ||
7807f2e6 | 3425 | static char *gmnm_fields[] = { |
3426 | "machine", | |
3427 | "machine", "container", | |
3428 | }; | |
3429 | ||
2fb668b0 | 3430 | static char *gmoc_fields[] = { |
3431 | "container", | |
3432 | "isrecursive", | |
3433 | "machine", | |
3434 | "container", | |
3435 | }; | |
3436 | ||
3437 | static struct validate gmoc_validate = | |
3438 | { | |
3439 | VOcon0, | |
3440 | 1, | |
3441 | 0, | |
3442 | 0, | |
3443 | 0, | |
3444 | 0, | |
3445 | 0, | |
3446 | 0, | |
3447 | get_machines_of_container, | |
3448 | }; | |
3449 | ||
3450 | static char *gsoc_fields[] = { | |
3451 | "container", | |
3452 | "isrecursive", | |
3453 | "subcontainer", | |
3454 | }; | |
3455 | ||
3456 | static struct validate gsoc_validate = | |
3457 | { | |
3458 | VOcon0, | |
3459 | 1, | |
3460 | 0, | |
3461 | 0, | |
3462 | 0, | |
3463 | 0, | |
3464 | 0, | |
3465 | 0, | |
3466 | get_subcontainers_of_container, | |
3467 | }; | |
3468 | ||
0ef13dc2 | 3469 | static char *gtlc_fields[] = { |
3470 | "name", | |
3471 | }; | |
3472 | ||
3473 | ||
d33e787c | 3474 | /* Generalized Query Definitions */ |
3475 | ||
c44ddfa7 | 3476 | /* Multiple versions of the same query MUST be listed in ascending |
3477 | * order. | |
3478 | */ | |
3479 | ||
e41960ac | 3480 | /* Note: For any query which uses prefetch_value, the vcnt should be |
3481 | * one less than the number of %-format specifiers in the tlist. | |
3482 | */ | |
3483 | ||
c44ddfa7 | 3484 | struct query Queries[] = { |
d33e787c | 3485 | { |
186dd63b | 3486 | /* Q_GALO - GET_ALL_LOGINS, v2 */ |
d33e787c | 3487 | "get_all_logins", |
3488 | "galo", | |
c44ddfa7 | 3489 | 2, |
d33e787c | 3490 | RETRIEVE, |
3491 | "u", | |
03c05291 | 3492 | USERS_TABLE, |
3493 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u", | |
186dd63b | 3494 | galo2_fields, |
d33e787c | 3495 | 6, |
0c345c78 | 3496 | "u.users_id != 0", |
d33e787c | 3497 | 0, |
29028043 | 3498 | "u.login", |
3499 | 0, | |
d33e787c | 3500 | }, |
5eaef520 | 3501 | |
d33e787c | 3502 | { |
186dd63b | 3503 | /* Q_GALO - GET_ALL_LOGINS, v3 */ |
3504 | "get_all_logins", | |
3505 | "galo", | |
3506 | 3, | |
3507 | RETRIEVE, | |
3508 | "u", | |
3509 | USERS_TABLE, | |
3510 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u", | |
3511 | galo_fields, | |
3512 | 7, | |
3513 | "u.users_id != 0", | |
3514 | 0, | |
3515 | "u.login", | |
3516 | 0, | |
3517 | }, | |
3518 | ||
3519 | { | |
3520 | /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v2 */ | |
d33e787c | 3521 | "get_all_active_logins", |
3522 | "gaal", | |
c44ddfa7 | 3523 | 2, |
d33e787c | 3524 | RETRIEVE, |
3525 | "u", | |
03c05291 | 3526 | USERS_TABLE, |
3527 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle FROM users u", | |
186dd63b | 3528 | galo2_fields, |
d33e787c | 3529 | 6, |
0c345c78 | 3530 | "u.status = 1", |
d33e787c | 3531 | 0, |
29028043 | 3532 | "u.login", |
3533 | 0, | |
d33e787c | 3534 | }, |
5eaef520 | 3535 | |
4ffa124a | 3536 | { |
186dd63b | 3537 | /* Q_GAAL - GET_ALL_ACTIVE_LOGINS, v3 */ |
3538 | "get_all_active_logins", | |
3539 | "gaal", | |
3540 | 3, | |
3541 | RETRIEVE, | |
3542 | "u", | |
3543 | USERS_TABLE, | |
3544 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle FROM users u", | |
3545 | galo_fields, | |
3546 | 7, | |
3547 | "u.status = 1", | |
3548 | 0, | |
3549 | "u.login", | |
3550 | 0, | |
3551 | }, | |
3552 | ||
3553 | { | |
3554 | /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v2 */ | |
0c345c78 | 3555 | "get_user_account_by_login", |
3556 | "gual", | |
c44ddfa7 | 3557 | 2, |
0c345c78 | 3558 | RETRIEVE, |
3559 | "u", | |
03c05291 | 3560 | USERS_TABLE, |
d55429b2 | 3561 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 3562 | gual2_fields, |
0c345c78 | 3563 | 15, |
263a36d4 | 3564 | "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 3565 | 1, |
29028043 | 3566 | "u.login", |
0c345c78 | 3567 | &gubl_validate, |
4ffa124a | 3568 | }, |
5eaef520 | 3569 | |
4ffa124a | 3570 | { |
186dd63b | 3571 | /* Q_GUAL - GET_USER_ACCOUNT_BY_LOGIN, v3 */ |
3572 | "get_user_account_by_login", | |
3573 | "gual", | |
3574 | 3, | |
3575 | RETRIEVE, | |
3576 | "u", | |
3577 | USERS_TABLE, | |
3b634eb3 | 3578 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
186dd63b | 3579 | gual_fields, |
3b634eb3 | 3580 | 18, |
186dd63b | 3581 | "u.login LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
3582 | 1, | |
3583 | "u.login", | |
3584 | &gubl_validate, | |
3585 | }, | |
3586 | ||
3587 | { | |
3588 | /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v2 */ | |
0c345c78 | 3589 | "get_user_account_by_uid", |
3590 | "guau", | |
c44ddfa7 | 3591 | 2, |
0c345c78 | 3592 | RETRIEVE, |
3593 | "u", | |
03c05291 | 3594 | USERS_TABLE, |
d55429b2 | 3595 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 3596 | guau2_fields, |
0c345c78 | 3597 | 15, |
03c05291 | 3598 | "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 3599 | 1, |
29028043 | 3600 | "u.login", |
0c345c78 | 3601 | &gubu_validate, |
4ffa124a | 3602 | }, |
5eaef520 | 3603 | |
4ffa124a | 3604 | { |
186dd63b | 3605 | /* Q_GUAU - GET_USER_ACCOUNT_BY_UID, v3 */ |
3606 | "get_user_account_by_uid", | |
3607 | "guau", | |
3608 | 3, | |
3609 | RETRIEVE, | |
3610 | "u", | |
3611 | USERS_TABLE, | |
3b634eb3 | 3612 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
186dd63b | 3613 | guau_fields, |
3b634eb3 | 3614 | 18, |
186dd63b | 3615 | "u.unix_uid = %s AND u.users_id != 0 AND u.comments = str.string_id", |
3616 | 1, | |
3617 | "u.login", | |
3618 | &gubu_validate, | |
3619 | }, | |
3620 | ||
3621 | { | |
3622 | /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v2 */ | |
0c345c78 | 3623 | "get_user_account_by_name", |
3624 | "guan", | |
c44ddfa7 | 3625 | 2, |
0c345c78 | 3626 | RETRIEVE, |
3627 | "u", | |
03c05291 | 3628 | USERS_TABLE, |
d55429b2 | 3629 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 3630 | guan2_fields, |
0c345c78 | 3631 | 15, |
263a36d4 | 3632 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id", |
0c345c78 | 3633 | 2, |
29028043 | 3634 | "u.login", |
60452f41 | 3635 | &guan_validate, |
4ffa124a | 3636 | }, |
5eaef520 | 3637 | |
4ffa124a | 3638 | { |
186dd63b | 3639 | /* Q_GUAN - GET_USER_ACCOUNT_BY_NAME, v3 */ |
3640 | "get_user_account_by_name", | |
3641 | "guan", | |
3642 | 3, | |
3643 | RETRIEVE, | |
3644 | "u", | |
3645 | USERS_TABLE, | |
3b634eb3 | 3646 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
186dd63b | 3647 | guan_fields, |
3b634eb3 | 3648 | 18, |
186dd63b | 3649 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0 and u.comments = str.string_id", |
3650 | 2, | |
3651 | "u.login", | |
3652 | &guan_validate, | |
3653 | }, | |
3654 | ||
3655 | { | |
3656 | /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v2 */ | |
0c345c78 | 3657 | "get_user_account_by_class", |
3658 | "guac", | |
c44ddfa7 | 3659 | 2, |
0c345c78 | 3660 | RETRIEVE, |
3661 | "u", | |
03c05291 | 3662 | USERS_TABLE, |
d55429b2 | 3663 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 3664 | guac2_fields, |
0c345c78 | 3665 | 15, |
03c05291 | 3666 | "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 3667 | 1, |
29028043 | 3668 | "u.login", |
3669 | &VDfix_modby, | |
4ffa124a | 3670 | }, |
5eaef520 | 3671 | |
4ffa124a | 3672 | { |
186dd63b | 3673 | /* Q_GUAC - GET_USER_ACCOUNT_BY_CLASS, v3 */ |
3674 | "get_user_account_by_class", | |
3675 | "guac", | |
3676 | 3, | |
3677 | RETRIEVE, | |
3678 | "u", | |
3679 | USERS_TABLE, | |
3b634eb3 | 3680 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
186dd63b | 3681 | guac_fields, |
3b634eb3 | 3682 | 18, |
186dd63b | 3683 | "u.type = UPPER('%s') AND u.users_id != 0 AND u.comments = str.string_id", |
3684 | 1, | |
3685 | "u.login", | |
3686 | &VDfix_modby, | |
3687 | }, | |
3688 | ||
3689 | { | |
3690 | /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v2 */ | |
0c345c78 | 3691 | "get_user_account_by_id", |
3692 | "guai", | |
c44ddfa7 | 3693 | 2, |
0c345c78 | 3694 | RETRIEVE, |
3695 | "u", | |
03c05291 | 3696 | USERS_TABLE, |
d55429b2 | 3697 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u, strings str", |
186dd63b | 3698 | guam2_fields, |
0c345c78 | 3699 | 15, |
263a36d4 | 3700 | "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
0c345c78 | 3701 | 1, |
29028043 | 3702 | "u.login", |
263a36d4 | 3703 | &VDfix_modby, |
4ffa124a | 3704 | }, |
5eaef520 | 3705 | |
d33e787c | 3706 | { |
186dd63b | 3707 | /* Q_GUAM - GET_USER_ACCOUNT_BY_MITID, v3 */ |
3708 | "get_user_account_by_id", | |
3709 | "guai", | |
3710 | 3, | |
3711 | RETRIEVE, | |
3712 | "u", | |
3713 | USERS_TABLE, | |
3b634eb3 | 3714 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, str.string, CHR(0), u.secure, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u, strings str", |
186dd63b | 3715 | guam_fields, |
3b634eb3 | 3716 | 18, |
186dd63b | 3717 | "u.clearid LIKE '%s' AND u.users_id != 0 AND u.comments = str.string_id", |
3718 | 1, | |
3719 | "u.login", | |
3720 | &VDfix_modby, | |
3721 | }, | |
3722 | ||
3723 | { | |
3724 | /* Q_GUBL - GET_USER_BY_LOGIN, v2 */ | |
d33e787c | 3725 | "get_user_by_login", |
3726 | "gubl", | |
c44ddfa7 | 3727 | 2, |
d33e787c | 3728 | RETRIEVE, |
3729 | "u", | |
5eaef520 | 3730 | USERS_TABLE, |
03c05291 | 3731 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", |
186dd63b | 3732 | gubl2_fields, |
d33e787c | 3733 | 12, |
263a36d4 | 3734 | "u.login LIKE '%s' AND u.users_id != 0", |
d33e787c | 3735 | 1, |
29028043 | 3736 | "u.login", |
f9f5c199 | 3737 | &gubl_validate, |
d33e787c | 3738 | }, |
5eaef520 | 3739 | |
d33e787c | 3740 | { |
186dd63b | 3741 | /* Q_GUBL - GET_USER_BY_LOGIN, v3 */ |
3742 | "get_user_by_login", | |
3743 | "gubl", | |
3744 | 3, | |
3745 | RETRIEVE, | |
3746 | "u", | |
3747 | USERS_TABLE, | |
3b634eb3 | 3748 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u", |
186dd63b | 3749 | gubl_fields, |
3b634eb3 | 3750 | 15, |
186dd63b | 3751 | "u.login LIKE '%s' AND u.users_id != 0", |
3752 | 1, | |
3753 | "u.login", | |
3754 | &gubl_validate, | |
3755 | }, | |
3756 | ||
3757 | { | |
3758 | /* Q_GUBU - GET_USER_BY_UID, v2 */ | |
d33e787c | 3759 | "get_user_by_uid", |
3760 | "gubu", | |
c44ddfa7 | 3761 | 2, |
d33e787c | 3762 | RETRIEVE, |
3763 | "u", | |
03c05291 | 3764 | USERS_TABLE, |
3765 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", | |
186dd63b | 3766 | gubu2_fields, |
d33e787c | 3767 | 12, |
03c05291 | 3768 | "u.unix_uid = %s AND u.users_id != 0", |
d33e787c | 3769 | 1, |
29028043 | 3770 | "u.login", |
f9f5c199 | 3771 | &gubu_validate, |
d33e787c | 3772 | }, |
5eaef520 | 3773 | |
d33e787c | 3774 | { |
186dd63b | 3775 | /* Q_GUBU - GET_USER_BY_UID, v3 */ |
3776 | "get_user_by_uid", | |
3777 | "gubu", | |
3778 | 3, | |
3779 | RETRIEVE, | |
3780 | "u", | |
3781 | USERS_TABLE, | |
3b634eb3 | 3782 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u", |
186dd63b | 3783 | gubu_fields, |
3b634eb3 | 3784 | 15, |
186dd63b | 3785 | "u.unix_uid = %s AND u.users_id != 0", |
3786 | 1, | |
3787 | "u.login", | |
3788 | &gubu_validate, | |
3789 | }, | |
3790 | ||
3791 | { | |
3792 | /* Q_GUBN - GET_USER_BY_NAME, v2 */ | |
d33e787c | 3793 | "get_user_by_name", |
3794 | "gubn", | |
c44ddfa7 | 3795 | 2, |
d33e787c | 3796 | RETRIEVE, |
3797 | "u", | |
03c05291 | 3798 | USERS_TABLE, |
3799 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", | |
186dd63b | 3800 | gubn2_fields, |
d33e787c | 3801 | 12, |
263a36d4 | 3802 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0", |
d33e787c | 3803 | 2, |
29028043 | 3804 | "u.login", |
99e09b48 | 3805 | &gubn_validate, |
d33e787c | 3806 | }, |
5eaef520 | 3807 | |
d33e787c | 3808 | { |
186dd63b | 3809 | /* Q_GUBN - GET_USER_BY_NAME, v3 */ |
3810 | "get_user_by_name", | |
3811 | "gubn", | |
3812 | 3, | |
3813 | RETRIEVE, | |
3814 | "u", | |
3815 | USERS_TABLE, | |
3b634eb3 | 3816 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u", |
186dd63b | 3817 | gubn_fields, |
3b634eb3 | 3818 | 15, |
186dd63b | 3819 | "u.first LIKE '%s' AND u.last LIKE '%s' AND u.users_id != 0", |
3820 | 2, | |
3821 | "u.login", | |
3822 | &gubn_validate, | |
3823 | }, | |
3824 | ||
3825 | { | |
3826 | /* Q_GUBC - GET_USER_BY_CLASS, v2 */ | |
d33e787c | 3827 | "get_user_by_class", |
3828 | "gubc", | |
c44ddfa7 | 3829 | 2, |
d33e787c | 3830 | RETRIEVE, |
3831 | "u", | |
03c05291 | 3832 | USERS_TABLE, |
3833 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", | |
186dd63b | 3834 | gubc2_fields, |
d33e787c | 3835 | 12, |
03c05291 | 3836 | "u.type = UPPER('%s') AND u.users_id != 0", |
d33e787c | 3837 | 1, |
29028043 | 3838 | "u.login", |
3839 | &VDfix_modby, | |
d33e787c | 3840 | }, |
5eaef520 | 3841 | |
d33e787c | 3842 | { |
186dd63b | 3843 | /* Q_GUBC - GET_USER_BY_CLASS, v3 */ |
3844 | "get_user_by_class", | |
3845 | "gubc", | |
3846 | 3, | |
3847 | RETRIEVE, | |
3848 | "u", | |
3849 | USERS_TABLE, | |
3b634eb3 | 3850 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS') FROM users u", |
186dd63b | 3851 | gubc_fields, |
3b634eb3 | 3852 | 15, |
186dd63b | 3853 | "u.type = UPPER('%s') AND u.users_id != 0", |
3854 | 1, | |
3855 | "u.login", | |
3856 | &VDfix_modby, | |
3857 | }, | |
3858 | ||
3859 | { | |
3860 | /* Q_GUBM - GET_USER_BY_MITID, v2 */ | |
d33e787c | 3861 | "get_user_by_mitid", |
3862 | "gubm", | |
c44ddfa7 | 3863 | 2, |
d33e787c | 3864 | RETRIEVE, |
3865 | "u", | |
03c05291 | 3866 | USERS_TABLE, |
3867 | "u.login, u.unix_uid, u.shell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith FROM users u", | |
186dd63b | 3868 | gubm2_fields, |
d33e787c | 3869 | 12, |
263a36d4 | 3870 | "u.clearid LIKE '%s' AND u.users_id != 0", |
d33e787c | 3871 | 1, |
29028043 | 3872 | "u.login", |
263a36d4 | 3873 | &VDfix_modby, |
d33e787c | 3874 | }, |
5eaef520 | 3875 | |
4ffa124a | 3876 | { |
186dd63b | 3877 | /* Q_GUBM - GET_USER_BY_MITID, v3 */ |
3878 | "get_user_by_mitid", | |
3879 | "gubm", | |
3880 | 3, | |
3881 | RETRIEVE, | |
3882 | "u", | |
3883 | USERS_TABLE, | |
3b634eb3 | 3884 | "u.login, u.unix_uid, u.shell, u.winconsoleshell, u.last, u.first, u.middle, u.status, u.clearid, u.type, TO_CHAR(u.modtime, 'DD-mon-YYYY HH24:MI:SS'), u.modby, u.modwith, TO_CHAR(u.created, 'DD-mon-YYYY HH24:MI:SS'), u.creator FROM users u", |
186dd63b | 3885 | gubm_fields, |
3b634eb3 | 3886 | 15, |
186dd63b | 3887 | "u.clearid LIKE '%s' AND u.users_id != 0", |
3888 | 1, | |
3889 | "u.login", | |
3890 | &VDfix_modby, | |
3891 | }, | |
3892 | ||
3893 | { | |
3894 | /* Q_AUAC - ADD_USER_ACCOUNT, v2 */ /* uses prefetch_value() for users_id */ | |
4ffa124a | 3895 | "add_user_account", |
3896 | "auac", | |
c44ddfa7 | 3897 | 2, |
4ffa124a | 3898 | APPEND, |
3899 | "u", | |
03c05291 | 3900 | USERS_TABLE, |
d55429b2 | 3901 | /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)", |
3902 | * but using up one argv element. | |
3903 | */ | |
3904 | "INTO users (login, unix_uid, shell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s)", | |
186dd63b | 3905 | auac2_fields, |
4ffa124a | 3906 | 12, |
7ac48069 | 3907 | NULL, |
4ffa124a | 3908 | 0, |
29028043 | 3909 | NULL, |
186dd63b | 3910 | &auac2_validate, |
3911 | }, | |
3912 | ||
3913 | { | |
3914 | /* Q_AUAC - ADD_USER_ACCOUNT, v3 */ /* uses prefetch_value() for users_id */ | |
3915 | "add_user_account", | |
3916 | "auac", | |
3917 | 3, | |
3918 | APPEND, | |
3919 | "u", | |
3920 | USERS_TABLE, | |
3921 | /* We set signature to "NVL(CHR(0), '%s')", which is to say, "CHR(0)", | |
3922 | * but using up one argv element. | |
3923 | */ | |
3b634eb3 | 3924 | "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', %d, NVL(CHR(0), '%s'), %s, %s, SYSDATE, %s)", |
186dd63b | 3925 | auac_fields, |
3926 | 13, | |
3927 | NULL, | |
3928 | 0, | |
3929 | NULL, | |
4ffa124a | 3930 | &auac_validate, |
3931 | }, | |
5eaef520 | 3932 | |
d33e787c | 3933 | { |
186dd63b | 3934 | /* Q_AUSR - ADD_USER, v2 */ /* uses prefetch_value() for users_id */ |
d33e787c | 3935 | "add_user", |
3936 | "ausr", | |
c44ddfa7 | 3937 | 2, |
d33e787c | 3938 | APPEND, |
3939 | "u", | |
03c05291 | 3940 | USERS_TABLE, |
5eaef520 | 3941 | "INTO users (login, unix_uid, shell, last, first, middle, status, clearid, type, comments, signature, secure, users_id) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s)", |
186dd63b | 3942 | auac2_fields, |
d33e787c | 3943 | 9, |
45bf7573 | 3944 | 0, |
d33e787c | 3945 | 0, |
29028043 | 3946 | NULL, |
186dd63b | 3947 | &ausr2_validate, |
3948 | }, | |
3949 | ||
3950 | { | |
3951 | /* Q_AUSR - ADD_USER, v3 */ /* uses prefetch_value() for users_id */ | |
3952 | "add_user", | |
3953 | "ausr", | |
3954 | 3, | |
3955 | APPEND, | |
3956 | "u", | |
3957 | USERS_TABLE, | |
3b634eb3 | 3958 | "INTO users (login, unix_uid, shell, winconsoleshell, last, first, middle, status, clearid, type, comments, signature, secure, users_id, created, creator) VALUES ('%s', %s, '%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), '%s', 0, CHR(0), 0, %s, SYSDATE, %s)", |
186dd63b | 3959 | auac_fields, |
3960 | 10, | |
3961 | 0, | |
3962 | 0, | |
3963 | NULL, | |
d33e787c | 3964 | &ausr_validate, |
3965 | }, | |
5eaef520 | 3966 | |
d33e787c | 3967 | { |
3968 | /* Q_RUSR - REGISTER_USER */ | |
3969 | "register_user", | |
3970 | "rusr", | |
c44ddfa7 | 3971 | 2, |
d33e787c | 3972 | APPEND, |
3973 | 0, | |
3974 | 0, | |
3975 | 0, | |
3976 | rusr_fields, | |
3977 | 3, | |
3978 | 0, | |
3979 | 0, | |
29028043 | 3980 | NULL, |
d33e787c | 3981 | &rusr_validate, |
3982 | }, | |
5eaef520 | 3983 | |
4ffa124a | 3984 | { |
186dd63b | 3985 | /* Q_UUAC - UPDATE_USER_ACCOUNT, v2 */ |
4ffa124a | 3986 | "update_user_account", |
3987 | "uuac", | |
c44ddfa7 | 3988 | 2, |
4ffa124a | 3989 | UPDATE, |
3990 | "u", | |
03c05291 | 3991 | USERS_TABLE, |
d55429b2 | 3992 | /* See comment in auac about signature. */ |
3993 | "users SET login = '%s', unix_uid = %s, shell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d, signature = NVL(CHR(0), '%s'), secure = %s", | |
186dd63b | 3994 | uuac2_fields, |
4ffa124a | 3995 | 12, |
3996 | "users_id = %d", | |
3997 | 1, | |
29028043 | 3998 | NULL, |
186dd63b | 3999 | &uuac2_validate, |
4000 | }, | |
4001 | ||
4002 | { | |
4003 | /* Q_UUAC - UPDATE_USER_ACCOUNT, v3 */ | |
4004 | "update_user_account", | |
4005 | "uuac", | |
4006 | 3, | |
4007 | UPDATE, | |
4008 | "u", | |
4009 | USERS_TABLE, | |
4010 | /* See comment in auac about signature. */ | |
4011 | "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s', comments = %d, signature = NVL(CHR(0), '%s'), secure = %s", | |
4012 | uuac_fields, | |
4013 | 13, | |
4014 | "users_id = %d", | |
4015 | 1, | |
4016 | NULL, | |
4ffa124a | 4017 | &uuac_validate, |
4018 | }, | |
5eaef520 | 4019 | |
d33e787c | 4020 | { |
186dd63b | 4021 | /* Q_UUSR - UPDATE_USER, v2 */ |
d33e787c | 4022 | "update_user", |
4023 | "uusr", | |
c44ddfa7 | 4024 | 2, |
d33e787c | 4025 | UPDATE, |
4026 | "u", | |
03c05291 | 4027 | USERS_TABLE, |
5eaef520 | 4028 | "users SET login = '%s', unix_uid = %s, shell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s'", |
186dd63b | 4029 | uuac2_fields, |
d33e787c | 4030 | 9, |
4e5ec77f | 4031 | "users_id = %d", |
d33e787c | 4032 | 1, |
29028043 | 4033 | NULL, |
186dd63b | 4034 | &uusr2_validate, |
4035 | }, | |
4036 | ||
4037 | { | |
4038 | /* Q_UUSR - UPDATE_USER, v3 */ | |
4039 | "update_user", | |
4040 | "uusr", | |
4041 | 3, | |
4042 | UPDATE, | |
4043 | "u", | |
4044 | USERS_TABLE, | |
4045 | "users SET login = '%s', unix_uid = %s, shell = '%s', winconsoleshell = '%s', last = NVL('%s', CHR(0)), first = NVL('%s', CHR(0)), middle = NVL('%s', CHR(0)), status = %s, clearid = NVL('%s', CHR(0)), type = '%s'", | |
4046 | uuac_fields, | |
4047 | 10, | |
4048 | "users_id = %d", | |
4049 | 1, | |
4050 | NULL, | |
d33e787c | 4051 | &uusr_validate, |
4052 | }, | |
4053 | ||
4054 | { | |
4055 | /* Q_UUSH - UPDATE_USER_SHELL */ | |
4056 | "update_user_shell", | |
4057 | "uush", | |
c44ddfa7 | 4058 | 2, |
d33e787c | 4059 | UPDATE, |
4060 | "u", | |
03c05291 | 4061 | USERS_TABLE, |
5eaef520 | 4062 | "users SET shell = '%s'", |
d33e787c | 4063 | uush_fields, |
4064 | 1, | |
4e5ec77f | 4065 | "users_id = %d", |
d33e787c | 4066 | 1, |
29028043 | 4067 | NULL, |
d33e787c | 4068 | &uush_validate, |
4069 | }, | |
4070 | ||
29dbfca4 | 4071 | { |
4072 | /* Q_UUWS - UPDATE_USER_WINDOWS_SHELL */ | |
4073 | "update_user_windows_shell", | |
4074 | "uuws", | |
4075 | 2, | |
4076 | UPDATE, | |
4077 | "u", | |
4078 | USERS_TABLE, | |
4079 | "users SET winconsoleshell = '%s'", | |
4080 | uuws_fields, | |
4081 | 1, | |
4082 | "users_id = %d", | |
4083 | 1, | |
4084 | NULL, | |
4085 | &uuws_validate, | |
4086 | }, | |
4087 | ||
d33e787c | 4088 | { |
4089 | /* Q_UUST - UPDATE_USER_STATUS */ | |
4090 | "update_user_status", | |
4091 | "uust", | |
c44ddfa7 | 4092 | 2, |
d33e787c | 4093 | UPDATE, |
4094 | "u", | |
03c05291 | 4095 | USERS_TABLE, |
4e5ec77f | 4096 | "users SET status = %s", |
d33e787c | 4097 | uust_fields, |
4098 | 1, | |
4e5ec77f | 4099 | "users_id = %d", |
d33e787c | 4100 | 1, |
29028043 | 4101 | NULL, |
d33e787c | 4102 | &uust_validate, |
4103 | }, | |
4104 | ||
4ffa124a | 4105 | { |
4106 | /* Q_UUSS - UPDATE_USER_SECURITY_STATUS */ | |
4107 | "update_user_security_status", | |
4108 | "uuss", | |
c44ddfa7 | 4109 | 2, |
4ffa124a | 4110 | UPDATE, |
4111 | "u", | |
03c05291 | 4112 | USERS_TABLE, |
135dcb80 | 4113 | "users SET secure = %s", |
4ffa124a | 4114 | uuss_fields, |
4115 | 1, | |
4116 | "users_id = %d", | |
4117 | 1, | |
29028043 | 4118 | NULL, |
4ffa124a | 4119 | &uust_validate, |
4120 | }, | |
5eaef520 | 4121 | |
d33e787c | 4122 | { |
5eaef520 | 4123 | /* Q_DUSR - DELETE_USER */ |
d33e787c | 4124 | "delete_user", |
4125 | "dusr", | |
c44ddfa7 | 4126 | 2, |
d33e787c | 4127 | DELETE, |
4128 | "u", | |
03c05291 | 4129 | USERS_TABLE, |
7ac48069 | 4130 | NULL, |
d33e787c | 4131 | dusr_fields, |
4132 | 0, | |
4e5ec77f | 4133 | "users_id = %d", |
d33e787c | 4134 | 1, |
29028043 | 4135 | NULL, |
d33e787c | 4136 | &dusr_validate, |
4137 | }, | |
4138 | ||
77eb4bdf | 4139 | { |
4140 | /* Q_AURV - ADD_USER_RESERVATION */ | |
4141 | "add_user_reservation", | |
4142 | "aurv", | |
4143 | 2, | |
4144 | UPDATE, | |
4145 | 0, | |
4146 | USERS_TABLE, | |
4147 | 0, | |
4148 | aurv_fields, | |
4149 | 2, | |
4150 | 0, | |
4151 | 0, | |
4152 | NULL, | |
4153 | &aurv_validate, | |
4154 | }, | |
4155 | ||
4156 | { | |
4157 | /* Q_GURV - GET_USER_RESERVATIONS */ | |
4158 | "get_user_reservations", | |
4159 | "gurv", | |
4160 | 2, | |
4161 | RETRIEVE, | |
4162 | 0, | |
4163 | USERS_TABLE, | |
4164 | 0, | |
4165 | gurv_fields, | |
4166 | 2, | |
4167 | 0, | |
4168 | 1, | |
4169 | NULL, | |
4170 | &gurv_validate, | |
4171 | }, | |
4172 | ||
4173 | { | |
4174 | /* Q_GUBR - GET_USER_BY_RESERVATION */ | |
4175 | "get_user_by_reservation", | |
4176 | "gubr", | |
4177 | 2, | |
4178 | RETRIEVE, | |
4179 | 0, | |
4180 | USERS_TABLE, | |
4181 | 0, | |
4182 | gubr_fields, | |
4183 | 1, | |
4184 | 0, | |
4185 | 1, | |
4186 | NULL, | |
4187 | &gubr_validate, | |
4188 | }, | |
4189 | ||
4190 | { | |
4191 | /* Q_DURV - DELETE_USER_RESERVATION */ | |
4192 | "delete_user_reservation", | |
4193 | "durv", | |
4194 | 2, | |
4195 | UPDATE, | |
4196 | 0, | |
4197 | USERS_TABLE, | |
4198 | 0, | |
4199 | aurv_fields, | |
4200 | 2, | |
4201 | 0, | |
4202 | 0, | |
4203 | NULL, | |
4204 | &aurv_validate, | |
4205 | }, | |
4206 | ||
012fc215 | 4207 | { |
5eaef520 | 4208 | /* Q_GKUM - GET_KERBEROS_USER_MAP */ |
012fc215 | 4209 | "get_kerberos_user_map", |
4210 | "gkum", | |
c44ddfa7 | 4211 | 2, |
012fc215 | 4212 | RETRIEVE, |
4213 | "k", | |
03c05291 | 4214 | KRBMAP_TABLE, |
4215 | "u.login, str.string FROM krbmap km, users u, strings str", | |
012fc215 | 4216 | gkum_fields, |
4217 | 2, | |
263a36d4 | 4218 | "u.login LIKE '%s' AND str.string LIKE '%s' AND km.users_id = u.users_id AND km.string_id = str.string_id", |
012fc215 | 4219 | 2, |
29028043 | 4220 | "u.login, str.string", |
263a36d4 | 4221 | NULL, |
012fc215 | 4222 | }, |
4223 | ||
4224 | { | |
4225 | /* Q_AKUM - ADD_KERBEROS_USER_MAP */ | |
4226 | "add_kerberos_user_map", | |
4227 | "akum", | |
c44ddfa7 | 4228 | 2, |
012fc215 | 4229 | APPEND, |
4230 | "k", | |
03c05291 | 4231 | KRBMAP_TABLE, |
99e09b48 | 4232 | "INTO krbmap (users_id, string_id) VALUES (%d, %d)", |
012fc215 | 4233 | akum_fields, |
4234 | 2, | |
4235 | 0, | |
4236 | 0, | |
29028043 | 4237 | NULL, |
012fc215 | 4238 | &akum_validate, |
4239 | }, | |
4240 | ||
4241 | { | |
4242 | /* Q_DKUM - DELETE_KERBEROS_USER_MAP */ | |
4243 | "delete_kerberos_user_map", | |
4244 | "dkum", | |
c44ddfa7 | 4245 | 2, |
012fc215 | 4246 | DELETE, |
4247 | "k", | |
03c05291 | 4248 | KRBMAP_TABLE, |
012fc215 | 4249 | 0, |
4250 | akum_fields, | |
4251 | 0, | |
99e09b48 | 4252 | "users_id = %d AND string_id = %d", |
012fc215 | 4253 | 2, |
29028043 | 4254 | NULL, |
012fc215 | 4255 | &dkum_validate, |
4256 | }, | |
4257 | ||
d33e787c | 4258 | { |
4259 | /* Q_GFBL - GET_FINGER_BY_LOGIN */ | |
4260 | "get_finger_by_login", | |
4261 | "gfbl", | |
c44ddfa7 | 4262 | 2, |
d33e787c | 4263 | RETRIEVE, |
4264 | "u", | |
03c05291 | 4265 | USERS_TABLE, |
4266 | "login, fullname, nickname, home_addr, home_phone, office_addr, office_phone, department, affiliation, TO_CHAR(fmodtime, 'DD-mon-YYYY HH24:MI:SS'), fmodby, fmodwith FROM users", | |
d33e787c | 4267 | gfbl_fields, |
4268 | 12, | |
03c05291 | 4269 | "users_id = %d", |
d33e787c | 4270 | 1, |
29028043 | 4271 | "login", |
d33e787c | 4272 | &gfbl_validate, |
4273 | }, | |
4274 | ||
4275 | { | |
4276 | /* Q_UFBL - UPDATE_FINGER_BY_LOGIN */ | |
4277 | "update_finger_by_login", | |
4278 | "ufbl", | |
c44ddfa7 | 4279 | 2, |
d33e787c | 4280 | UPDATE, |
4281 | "u", | |
03c05291 | 4282 | USERS_TABLE, |
5eaef520 | 4283 | "users SET fullname= NVL('%s', CHR(0)), nickname= NVL('%s', CHR(0)), home_addr= NVL('%s', CHR(0)), home_phone= NVL('%s', CHR(0)), office_addr= NVL('%s', CHR(0)), office_phone= NVL('%s', CHR(0)), department= NVL('%s', CHR(0)), affiliation= NVL('%s', CHR(0))", |
d33e787c | 4284 | ufbl_fields, |
4285 | 8, | |
4e5ec77f | 4286 | "users_id = %d", |
d33e787c | 4287 | 1, |
29028043 | 4288 | NULL, |
d33e787c | 4289 | &ufbl_validate, |
4290 | }, | |
4291 | ||
4292 | { | |
4293 | /* Q_GPOB - GET_POBOX */ | |
4294 | "get_pobox", | |
4295 | "gpob", | |
c44ddfa7 | 4296 | 2, |
d33e787c | 4297 | RETRIEVE, |
4298 | "u", | |
03c05291 | 4299 | USERS_TABLE, |
d6d830a1 | 4300 | "login, potype, users_id, CHR(0), TO_CHAR(pmodtime, 'DD-mon-YYYY HH24:MI:SS'), pmodby, pmodwith FROM users", |
d33e787c | 4301 | gpob_fields, |
d6d830a1 | 4302 | 7, |
03c05291 | 4303 | "users_id = %d", |
d33e787c | 4304 | 1, |
29028043 | 4305 | "login", |
d33e787c | 4306 | &gpob_validate, |
4307 | }, | |
4308 | ||
4309 | { | |
4310 | /* Q_GAPO - GET_ALL_POBOXES */ | |
4311 | "get_all_poboxes", | |
4312 | "gapo", | |
c44ddfa7 | 4313 | 2, |
d33e787c | 4314 | RETRIEVE, |
4315 | "u", | |
03c05291 | 4316 | USERS_TABLE, |
4317 | "login, potype, pop_id || ':' || box_id FROM users", | |
d33e787c | 4318 | gpox_fields, |
4319 | 3, | |
03c05291 | 4320 | "potype != 'NONE'", |
d33e787c | 4321 | 0, |
29028043 | 4322 | "login", |
d33e787c | 4323 | &gpox_validate, |
4324 | }, | |
5eaef520 | 4325 | |
d33e787c | 4326 | { |
4327 | /* Q_GPOP - GET_POBOXES_POP */ | |
4328 | "get_poboxes_pop", | |
4329 | "gpop", | |
c44ddfa7 | 4330 | 2, |
d33e787c | 4331 | RETRIEVE, |
4332 | "u", | |
03c05291 | 4333 | USERS_TABLE, |
17cb3de8 | 4334 | "login, potype, users_id FROM users", |
d33e787c | 4335 | gpox_fields, |
4336 | 3, | |
03c05291 | 4337 | "potype = 'POP'", |
d33e787c | 4338 | 0, |
29028043 | 4339 | "login", |
d33e787c | 4340 | &gpox_validate |
4341 | }, | |
4342 | ||
4343 | { | |
4344 | /* Q_GPOF - GET_POBOXES_SMTP */ | |
4345 | "get_poboxes_smtp", | |
4346 | "gpos", | |
c44ddfa7 | 4347 | 2, |
d33e787c | 4348 | RETRIEVE, |
4349 | "u", | |
03c05291 | 4350 | USERS_TABLE, |
17cb3de8 | 4351 | "login, potype, users_id FROM users", |
d33e787c | 4352 | gpox_fields, |
4353 | 3, | |
03c05291 | 4354 | "potype = 'SMTP'", |
d33e787c | 4355 | 0, |
29028043 | 4356 | "login", |
d33e787c | 4357 | &gpox_validate |
4358 | }, | |
4359 | ||
4360 | { | |
4361 | /* Q_SPOB - SET_POBOX */ | |
4362 | "set_pobox", | |
4363 | "spob", | |
c44ddfa7 | 4364 | 2, |
d33e787c | 4365 | UPDATE, |
4366 | 0, | |
03c05291 | 4367 | USERS_TABLE, |
d33e787c | 4368 | 0, |
4369 | spob_fields, | |
4370 | 3, | |
7ac48069 | 4371 | NULL, |
d33e787c | 4372 | 0, |
29028043 | 4373 | NULL, |
d33e787c | 4374 | &spob_validate, |
4375 | }, | |
4376 | ||
4377 | { | |
4378 | /* Q_SPOP - SET_POBOX_POP */ | |
4379 | "set_pobox_pop", | |
4380 | "spop", | |
c44ddfa7 | 4381 | 2, |
d33e787c | 4382 | UPDATE, |
8b0fdf05 | 4383 | 0, |
03c05291 | 4384 | USERS_TABLE, |
17cb3de8 | 4385 | 0, |
d33e787c | 4386 | spob_fields, |
8b0fdf05 | 4387 | 1, |
17cb3de8 | 4388 | NULL, |
4389 | 0, | |
29028043 | 4390 | NULL, |
d33e787c | 4391 | &spop_validate, |
4392 | }, | |
4393 | ||
4394 | { | |
4395 | /* Q_DPOB - DELETE_POBOX */ | |
4396 | "delete_pobox", | |
4397 | "dpob", | |
c44ddfa7 | 4398 | 2, |
d33e787c | 4399 | UPDATE, |
4400 | "u", | |
03c05291 | 4401 | USERS_TABLE, |
4402 | "users SET potype = 'NONE'", | |
4403 | spob_fields, | |
4404 | 0, | |
4405 | "users_id = %d", | |
d33e787c | 4406 | 1, |
29028043 | 4407 | NULL, |
03c05291 | 4408 | &dpob_validate, |
d33e787c | 4409 | }, |
4410 | ||
4411 | { | |
e4ae0190 | 4412 | /* Q_GHST - GET_HOST, v2 */ |
a66a2204 | 4413 | "get_host", |
4414 | "ghst", | |
c44ddfa7 | 4415 | 2, |
a66a2204 | 4416 | RETRIEVE, |
4417 | "m", | |
03c05291 | 4418 | MACHINE_TABLE, |
4419 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
e4ae0190 | 4420 | ghst2_fields, |
a66a2204 | 4421 | 21, |
1fa08fc4 | 4422 | "m.name LIKE UPPER('%s') AND m.address LIKE '%s' AND m.location LIKE UPPER('%s') AND s.name LIKE UPPER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", |
a66a2204 | 4423 | 4, |
29028043 | 4424 | "m.name", |
a66a2204 | 4425 | &ghst_validate, |
4426 | }, | |
4427 | ||
9333756a | 4428 | { |
e4ae0190 | 4429 | /* Q_GHST - GET_HOST, v6 */ |
4430 | "get_host", | |
4431 | "ghst", | |
4432 | 6, | |
4433 | RETRIEVE, | |
4434 | "m", | |
4435 | MACHINE_TABLE, | |
4436 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
4f6b1a05 | 4437 | ghst6_fields, |
e4ae0190 | 4438 | 22, |
4439 | "m.name LIKE UPPER('%s') AND m.address LIKE '%s' AND m.location LIKE UPPER('%s') AND s.name LIKE UPPER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4440 | 4, | |
4441 | "m.name", | |
4442 | &ghst_validate, | |
4443 | }, | |
4444 | ||
4f6b1a05 | 4445 | { |
4446 | /* Q_GHST - GET_HOST, v8 */ | |
4447 | "get_host", | |
4448 | "ghst", | |
4449 | 8, | |
4450 | RETRIEVE, | |
4451 | "m", | |
4452 | MACHINE_TABLE, | |
4453 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
4454 | ghst_fields, | |
4455 | 23, | |
4456 | "m.name LIKE UPPER('%s') AND m.address LIKE '%s' AND m.location LIKE UPPER('%s') AND s.name LIKE UPPER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4457 | 4, | |
4458 | "m.name", | |
4459 | &ghst_validate, | |
4460 | }, | |
4461 | ||
e4ae0190 | 4462 | { |
4463 | /* Q_GHBH - GET_HOST_BY_HWADDR, v2 */ | |
9333756a | 4464 | "get_host_by_hwaddr", |
4465 | "ghbh", | |
c44ddfa7 | 4466 | 2, |
9333756a | 4467 | RETRIEVE, |
4468 | "m", | |
4469 | MACHINE_TABLE, | |
4470 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
e4ae0190 | 4471 | ghbh2_fields, |
9333756a | 4472 | 21, |
4473 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4474 | 1, | |
4475 | "m.name", | |
012e079f | 4476 | &ghst_validate, |
9333756a | 4477 | }, |
4478 | ||
e4ae0190 | 4479 | { |
4480 | /* Q_GHBH - GET_HOST_BY_HWADDR, v6 */ | |
4481 | "get_host_by_hwaddr", | |
4482 | "ghbh", | |
4483 | 6, | |
4484 | RETRIEVE, | |
4485 | "m", | |
4486 | MACHINE_TABLE, | |
4487 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
4f6b1a05 | 4488 | ghbh6_fields, |
e4ae0190 | 4489 | 22, |
4490 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4491 | 1, | |
4492 | "m.name", | |
4493 | &ghst_validate, | |
4494 | }, | |
4495 | ||
4f6b1a05 | 4496 | { |
4497 | /* Q_GHBH - GET_HOST_BY_HWADDR, v8 */ | |
4498 | "get_host_by_hwaddr", | |
4499 | "ghbh", | |
4500 | 8, | |
4501 | RETRIEVE, | |
4502 | "m", | |
4503 | MACHINE_TABLE, | |
4504 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
4505 | ghbh_fields, | |
4506 | 23, | |
4507 | "m.hwaddr LIKE LOWER('%s') AND m.mach_id != 0 AND s.snet_id = m.snet_id", | |
4508 | 1, | |
4509 | "m.name", | |
4510 | &ghst_validate, | |
4511 | }, | |
4512 | ||
4513 | { | |
4514 | /* Q_GHBA - GET_HOST_BY_ACCOUNT_NUMBER, v8 */ | |
4515 | "get_host_by_account_number", | |
4516 | "ghba", | |
4517 | 8, | |
4518 | RETRIEVE, | |
4519 | "m", | |
4520 | MACHINE_TABLE, | |
4521 | "m.name, m.vendor, m.model, m.os, m.location, m.contact, m.billing_contact, m.account_number, m.use, m.status, TO_CHAR(m.statuschange, 'DD-mon-YYYY HH24:MI:SS'), s.name, m.address, m.owner_type, m.owner_id, m.acomment, m.ocomment, TO_CHAR(m.created, 'DD-mon-YYYY HH24:MI:SS'), m.creator, TO_CHAR(m.inuse, 'DD-mon-YYYY HH24:MI:SS'), TO_CHAR(m.modtime, 'DD-mon-YYYY HH24:MI:SS'), m.modby, m.modwith FROM machine m, subnet s", | |
4522 | ghba_fields, | |
4523 | 23, | |
4524 | "m.account_number LIKE '%s' AND m.mach_id != 0 and s.snet_id = m.snet_id", | |
4525 | 1, | |
4526 | "m.name", | |
4527 | &ghst_validate, | |
4528 | }, | |
4529 | ||
2884200f | 4530 | { |
4531 | /* Q_GHHA - GET_HOST_HWADDR */ | |
4532 | "get_host_hwaddr", | |
4533 | "ghha", | |
c44ddfa7 | 4534 | 2, |
2884200f | 4535 | RETRIEVE, |
4536 | "m", | |
4537 | MACHINE_TABLE, | |
4538 | "m.hwaddr FROM machine m", | |
4539 | ghha_fields, | |
4540 | 1, | |
4541 | "m.name LIKE UPPER('%s')", | |
4542 | 1, | |
4543 | NULL, | |
4544 | NULL, | |
4545 | }, | |
4546 | ||
a66a2204 | 4547 | { |
e4ae0190 | 4548 | /* Q_AHST - ADD_HOST, v2 */ /* uses prefetch_value() for mach_id */ |
a66a2204 | 4549 | "add_host", |
4550 | "ahst", | |
c44ddfa7 | 4551 | 2, |
d33e787c | 4552 | APPEND, |
4553 | "m", | |
03c05291 | 4554 | MACHINE_TABLE, |
5eaef520 | 4555 | "INTO machine (name, vendor, model, os, location, contact, use, status, statuschange, snet_id, address, owner_type, owner_id, acomment, ocomment, created, inuse, mach_id, creator) VALUES (UPPER('%s'), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL('%s', CHR(0)), %s, %s, SYSDATE, %d, '%s', '%s', %d, %d, %d, SYSDATE, SYSDATE, %s, %s)", |
e4ae0190 | 4556 | ahst2_fields, |
a66a2204 | 4557 | 14, |
45bf7573 | 4558 | 0, |
d33e787c | 4559 | 0, |
29028043 | 4560 | NULL, |
e4ae0190 | 4561 | &ahst2_validate, |
4562 | }, | |
4563 | ||
4564 | { | |
4565 | /* Q_AHST - ADD_HOST, v6 */ /* uses prefetch_value() for mach_id */ | |
4566 | "add_host", | |
4567 | "ahst", | |
4568 | 6, | |
4569 | APPEND, | |
4570 | "m", | |
4571 | MACHINE_TABLE, | |
4572 | "INTO machine (name, vendor, model, os, location, contact, billing_contact, use, status, statuschange, snet_id, address, owner_type, owner_id, acomment, ocomment, created, inuse, mach_id, creator) VALUES (UPPER('%s'), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, SYSDATE, %d, '%s', '%s', %d, %d, %d, SYSDATE, SYSDATE, %s, %s)", | |
4f6b1a05 | 4573 | ahst6_fields, |
2c593a9e | 4574 | 15, |
751f43da | 4575 | 0, |
4576 | 0, | |
4577 | NULL, | |
4f6b1a05 | 4578 | &ahst6_validate, |
4579 | }, | |
4580 | ||
4581 | { | |
4582 | /* Q_AHST - ADD_HOST, v8 */ /* Uses prefetch_value() for mach_id */ | |
4583 | "add_host", | |
4584 | "ahst", | |
4585 | 8, | |
4586 | APPEND, | |
4587 | "m", | |
4588 | MACHINE_TABLE, | |
4589 | "INTO machine (name, vendor, model, os, location, contact, billing_contact, account_number, use, status, statuschange, snet_id, address, owner_type, owner_id, acomment, ocomment, created, inuse, mach_id, creator) VALUES (UPPER('%s'), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL(UPPER('%s'), CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, SYSDATE, %d, '%s', '%s', %d, %d, %d, SYSDATE, SYSDATE, %s, %s)", | |
4590 | ahst_fields, | |
4591 | 16, | |
4592 | 0, | |
4593 | 0, | |
4594 | NULL, | |
a66a2204 | 4595 | &ahst_validate, |
d33e787c | 4596 | }, |
4597 | ||
4598 | { | |
e4ae0190 | 4599 | /* Q_UHST - UPDATE_HOST, v2 */ |
a66a2204 | 4600 | "update_host", |
4601 | "uhst", | |
c44ddfa7 | 4602 | 2, |
d33e787c | 4603 | UPDATE, |
4604 | "m", | |
03c05291 | 4605 | MACHINE_TABLE, |
5eaef520 | 4606 | "machine SET name = NVL(UPPER('%s'), CHR(0)), vendor = NVL(UPPER('%s'), CHR(0)), model = NVL(UPPER('%s'), CHR(0)), os = NVL(UPPER('%s'), CHR(0)), location = NVL(UPPER('%s'), CHR(0)), contact = NVL('%s', CHR(0)), use = %s, status = %s, snet_id = %d, address = '%s', owner_type = '%s', owner_id = %d, acomment = %d, ocomment = %d", |
e4ae0190 | 4607 | uhst2_fields, |
a66a2204 | 4608 | 14, |
4e5ec77f | 4609 | "mach_id = %d", |
d33e787c | 4610 | 1, |
29028043 | 4611 | NULL, |
e4ae0190 | 4612 | &uhst2_validate, |
4613 | }, | |
4614 | ||
4615 | { | |
4616 | /* Q_UHST - UPDATE_HOST, v6 */ | |
4617 | "update_host", | |
4618 | "uhst", | |
4619 | 6, | |
4620 | UPDATE, | |
4621 | "m", | |
4622 | MACHINE_TABLE, | |
4623 | "machine SET name = NVL(UPPER('%s'), CHR(0)), vendor = NVL(UPPER('%s'), CHR(0)), model = NVL(UPPER('%s'), CHR(0)), os = NVL(UPPER('%s'), CHR(0)), location = NVL(UPPER('%s'), CHR(0)), contact = NVL('%s', CHR(0)), billing_contact = NVL('%s', CHR(0)), use = %s, status = %s, snet_id = %d, address = '%s', owner_type = '%s', owner_id = %d, acomment = %d, ocomment = %d", | |
4f6b1a05 | 4624 | uhst6_fields, |
2c593a9e | 4625 | 15, |
751f43da | 4626 | "mach_id = %d", |
4627 | 1, | |
4628 | NULL, | |
4f6b1a05 | 4629 | &uhst6_validate, |
4630 | }, | |
4631 | ||
4632 | { | |
4633 | /* Q_UHST - UPDATE_HOST, v8 */ | |
4634 | "update_host", | |
4635 | "uhst", | |
4636 | 8, | |
4637 | UPDATE, | |
4638 | "m", | |
4639 | MACHINE_TABLE, | |
4640 | "machine SET name = NVL(UPPER('%s'), CHR(0)), vendor = NVL(UPPER('%s'), CHR(0)), model = NVL(UPPER('%s'), CHR(0)), os = NVL(UPPER('%s'), CHR(0)), location = NVL(UPPER('%s'), CHR(0)), contact = NVL('%s', CHR(0)), billing_contact = NVL('%s', CHR(0)), account_number = NVL('%s', CHR(0)), use = %s, status = %s, snet_id = %d, address = '%s', owner_type = '%s', owner_id = %d, acomment = %d, ocomment = %d", | |
4641 | uhst_fields, | |
4642 | 16, | |
4643 | "mach_id = %d", | |
4644 | 1, | |
4645 | NULL, | |
a66a2204 | 4646 | &uhst_validate, |
d33e787c | 4647 | }, |
4648 | ||
2884200f | 4649 | { |
4650 | /* Q_UHHA - UPDATE_HOST_HWADDR */ | |
4651 | "update_host_hwaddr", | |
4652 | "uhha", | |
c44ddfa7 | 4653 | 2, |
2884200f | 4654 | UPDATE, |
4655 | "m", | |
4656 | MACHINE_TABLE, | |
1fdf882a | 4657 | "machine SET hwaddr = NVL('%s', CHR(0))", |
2884200f | 4658 | uhha_fields, |
4659 | 1, | |
4660 | "mach_id = %d", | |
4661 | 1, | |
4662 | NULL, | |
4663 | &uhha_validate, | |
4664 | }, | |
4665 | ||
d33e787c | 4666 | { |
a66a2204 | 4667 | /* Q_DHST - DELETE_HOST */ |
4668 | "delete_host", | |
4669 | "dhst", | |
c44ddfa7 | 4670 | 2, |
d33e787c | 4671 | DELETE, |
4672 | "m", | |
03c05291 | 4673 | MACHINE_TABLE, |
7ac48069 | 4674 | NULL, |
a66a2204 | 4675 | dhst_fields, |
d33e787c | 4676 | 0, |
4e5ec77f | 4677 | "mach_id = %d", |
d33e787c | 4678 | 1, |
29028043 | 4679 | NULL, |
a66a2204 | 4680 | &dhst_validate, |
4681 | }, | |
4682 | ||
03c05291 | 4683 | { |
4684 | /* Q_GMAC - GET_MACHINE */ | |
4685 | "get_machine", | |
4686 | "gmac", | |
c44ddfa7 | 4687 | 2, |
03c05291 | 4688 | RETRIEVE, |
4689 | "m", | |
4690 | MACHINE_TABLE, | |
4691 | "name, vendor, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM machine", | |
4692 | gmac_fields, | |
4693 | 5, | |
263a36d4 | 4694 | "name LIKE UPPER('%s') AND mach_id != 0", |
03c05291 | 4695 | 1, |
29028043 | 4696 | "name", |
263a36d4 | 4697 | &VDfix_modby, |
03c05291 | 4698 | }, |
4699 | ||
a66a2204 | 4700 | { |
4701 | /* Q_GHAL - GET_HOSTALIAS */ | |
4702 | "get_hostalias", | |
4703 | "ghal", | |
c44ddfa7 | 4704 | 2, |
a66a2204 | 4705 | RETRIEVE, |
03c05291 | 4706 | "a", |
4707 | HOSTALIAS_TABLE, | |
4708 | "a.name, m.name FROM hostalias a, machine m", | |
a66a2204 | 4709 | ghal_fields, |
4710 | 2, | |
263a36d4 | 4711 | "m.mach_id = a.mach_id and a.name LIKE UPPER('%s') AND m.name LIKE UPPER('%s')", |
a66a2204 | 4712 | 2, |
29028043 | 4713 | "a.name", |
a66a2204 | 4714 | &ghal_validate, |
4715 | }, | |
4716 | ||
4717 | { | |
4718 | /* Q_AHAL - ADD_HOSTALIAS */ | |
4719 | "add_hostalias", | |
4720 | "ahal", | |
c44ddfa7 | 4721 | 2, |
a66a2204 | 4722 | APPEND, |
4723 | "a", | |
03c05291 | 4724 | HOSTALIAS_TABLE, |
5eaef520 | 4725 | "INTO hostalias (name, mach_id) VALUES (UPPER('%s'), %d)", |
a66a2204 | 4726 | ghal_fields, |
4727 | 2, | |
4728 | 0, | |
4729 | 0, | |
29028043 | 4730 | NULL, |
a66a2204 | 4731 | &ahal_validate, |
4732 | }, | |
4733 | ||
4734 | { | |
4735 | /* Q_DHAL - DELETE_HOSTALIAS */ | |
4736 | "delete_hostalias", | |
4737 | "dhal", | |
c44ddfa7 | 4738 | 2, |
a66a2204 | 4739 | DELETE, |
4740 | "a", | |
03c05291 | 4741 | HOSTALIAS_TABLE, |
7ac48069 | 4742 | NULL, |
a66a2204 | 4743 | ghal_fields, |
4744 | 0, | |
03c05291 | 4745 | "name = UPPER('%s') AND mach_id = %d", |
a66a2204 | 4746 | 2, |
29028043 | 4747 | NULL, |
a66a2204 | 4748 | &dhal_validate, |
d33e787c | 4749 | }, |
4750 | ||
3c1d412c | 4751 | { |
4f6b1a05 | 4752 | /* Q_GSNT - GET_SUBNET, v2 */ |
3c1d412c | 4753 | "get_subnet", |
4754 | "gsnt", | |
c44ddfa7 | 4755 | 2, |
3c1d412c | 4756 | RETRIEVE, |
4757 | "s", | |
03c05291 | 4758 | SUBNET_TABLE, |
4759 | "name, description, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet", | |
4f6b1a05 | 4760 | gsnt2_fields, |
bd8c26ff | 4761 | 12, |
5e8fdad1 | 4762 | "name LIKE UPPER('%s')", |
3c1d412c | 4763 | 1, |
29028043 | 4764 | "name", |
3c1d412c | 4765 | &gsnt_validate, |
4766 | }, | |
4767 | ||
4768 | { | |
4f6b1a05 | 4769 | /* Q_GSNT - GET_SUBNET, v8 */ |
4770 | "get_subnet", | |
4771 | "gsnt", | |
4772 | 8, | |
4773 | RETRIEVE, | |
4774 | "s", | |
4775 | SUBNET_TABLE, | |
4776 | "name, description, status, contact, account_number, saddr, mask, low, high, prefix, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM subnet", | |
4777 | gsnt_fields, | |
4778 | 15, | |
4779 | "name LIKE UPPER('%s')", | |
4780 | 1, | |
4781 | "name", | |
4782 | &gsnt_validate, | |
4783 | }, | |
4784 | ||
4785 | { | |
4786 | /* Q_ASNT - ADD_SUBNET, v2 */ | |
3c1d412c | 4787 | "add_subnet", |
4788 | "asnt", | |
c44ddfa7 | 4789 | 2, |
3c1d412c | 4790 | APPEND, |
4791 | "s", | |
03c05291 | 4792 | SUBNET_TABLE, |
5eaef520 | 4793 | "INTO subnet (name, description, saddr, mask, low, high, prefix, owner_type, owner_id, snet_id) VALUES (UPPER('%s'), NVL('%s', CHR(0)), %s, %s, %s, %s, NVL('%s', CHR(0)), '%s', %d, %s)", |
4f6b1a05 | 4794 | asnt2_fields, |
bd8c26ff | 4795 | 9, |
3c1d412c | 4796 | 0, |
4797 | 0, | |
29028043 | 4798 | NULL, |
4f6b1a05 | 4799 | &asnt2_validate, |
4800 | }, | |
4801 | ||
4802 | { | |
4803 | /* Q_ASNT - ADD_SUBNET, v8 */ | |
4804 | "add_subnet", | |
4805 | "asnt", | |
4806 | 8, | |
4807 | APPEND, | |
4808 | "s", | |
4809 | SUBNET_TABLE, | |
8dc7d749 | 4810 | "INTO subnet (name, description, status, contact, account_number, saddr, mask, low, high, prefix, owner_type, owner_id, snet_id) VALUES (UPPER('%s'), NVL('%s', CHR(0)), %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s, %s, %s, %s, NVL('%s', CHR(0)), '%s', %d, %s)", |
4f6b1a05 | 4811 | asnt_fields, |
4812 | 12, | |
4813 | 0, | |
4814 | 0, | |
4815 | NULL, | |
3c1d412c | 4816 | &asnt_validate, |
4817 | }, | |
4818 | ||
4819 | { | |
4f6b1a05 | 4820 | /* Q_USNT - UPDATE_SUBNET, v2 */ |
3c1d412c | 4821 | "update_subnet", |
4822 | "usnt", | |
c44ddfa7 | 4823 | 2, |
3c1d412c | 4824 | UPDATE, |
4825 | "s", | |
03c05291 | 4826 | SUBNET_TABLE, |
5eaef520 | 4827 | "subnet SET name = UPPER('%s'), description = NVL('%s', CHR(0)), saddr = %s, mask = %s, low = %s, high = %s, prefix = NVL('%s', CHR(0)), owner_type = '%s', owner_id = %d", |
4f6b1a05 | 4828 | usnt2_fields, |
bd8c26ff | 4829 | 9, |
3c1d412c | 4830 | "snet_id = %d", |
4831 | 1, | |
29028043 | 4832 | NULL, |
4f6b1a05 | 4833 | &usnt2_validate, |
4834 | }, | |
4835 | ||
4836 | { | |
4837 | /* Q_USNT - UPDATE_SUBNET, v8 */ | |
4838 | "update_subnet", | |
4839 | "usnt", | |
4840 | 8, | |
4841 | UPDATE, | |
4842 | "s", | |
4843 | SUBNET_TABLE, | |
4844 | "subnet SET name = UPPER('%s'), description = NVL('%s', CHR(0)), status = %s, contact = NVL('%s', CHR(0)), account_number = NVL('%s', CHR(0)), saddr = %s, mask = %s, low = %s, high = %s, prefix = NVL('%s', CHR(0)), owner_type = '%s', owner_id = %d", | |
4845 | usnt_fields, | |
4846 | 12, | |
4847 | "snet_id = %d", | |
4848 | 1, | |
4849 | NULL, | |
3c1d412c | 4850 | &usnt_validate, |
4851 | }, | |
4852 | ||
4853 | { | |
4854 | /* Q_DSNT - DELETE_SUBNET */ | |
4855 | "delete_subnet", | |
4856 | "dsnt", | |
c44ddfa7 | 4857 | 2, |
3c1d412c | 4858 | DELETE, |
4859 | "s", | |
03c05291 | 4860 | SUBNET_TABLE, |
7ac48069 | 4861 | NULL, |
3c1d412c | 4862 | dsnt_fields, |
4863 | 0, | |
4864 | "snet_id = %d", | |
4865 | 1, | |
29028043 | 4866 | NULL, |
3c1d412c | 4867 | &dsnt_validate, |
4868 | }, | |
4869 | ||
d33e787c | 4870 | { |
4871 | /* Q_GCLU - GET_CLUSTER */ | |
4872 | "get_cluster", | |
4873 | "gclu", | |
c44ddfa7 | 4874 | 2, |
d33e787c | 4875 | RETRIEVE, |
4876 | "c", | |
e688520a | 4877 | CLUSTERS_TABLE, |
03c05291 | 4878 | "name, description, location, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM clusters", |
d33e787c | 4879 | gclu_fields, |
4880 | 6, | |
263a36d4 | 4881 | "name LIKE '%s' AND clu_id != 0", |
d33e787c | 4882 | 1, |
29028043 | 4883 | "name", |
263a36d4 | 4884 | &VDfix_modby, |
d33e787c | 4885 | }, |
4886 | ||
4887 | { | |
45bf7573 | 4888 | /* Q_ACLU - ADD_CLUSTER */ /* uses prefetch_value() for clu_id */ |
d33e787c | 4889 | "add_cluster", |
4890 | "aclu", | |
c44ddfa7 | 4891 | 2, |
d33e787c | 4892 | APPEND, |
4893 | "c", | |
e688520a | 4894 | CLUSTERS_TABLE, |
5eaef520 | 4895 | "INTO clusters (name, description, location, clu_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), %s)", |
d33e787c | 4896 | aclu_fields, |
4897 | 3, | |
45bf7573 | 4898 | 0, |
d33e787c | 4899 | 0, |
29028043 | 4900 | NULL, |
d33e787c | 4901 | &aclu_validate, |
4902 | }, | |
4903 | ||
4904 | { | |
4905 | /* Q_UCLU - UPDATE_CLUSTER */ | |
4906 | "update_cluster", | |
4907 | "uclu", | |
c44ddfa7 | 4908 | 2, |
d33e787c | 4909 | UPDATE, |
4910 | "c", | |
e688520a | 4911 | CLUSTERS_TABLE, |
5eaef520 | 4912 | "clusters SET name = '%s', description = NVL('%s', CHR(0)), location = NVL('%s', CHR(0))", |
d33e787c | 4913 | uclu_fields, |
4914 | 3, | |
4e5ec77f | 4915 | "clu_id = %d", |
d33e787c | 4916 | 1, |
29028043 | 4917 | NULL, |
d33e787c | 4918 | &uclu_validate, |
4919 | }, | |
4920 | ||
4921 | { | |
4922 | /* Q_DCLU - DELETE_CLUSTER */ | |
4923 | "delete_cluster", | |
4924 | "dclu", | |
c44ddfa7 | 4925 | 2, |
d33e787c | 4926 | DELETE, |
4927 | "c", | |
e688520a | 4928 | CLUSTERS_TABLE, |
7ac48069 | 4929 | NULL, |
d33e787c | 4930 | dclu_fields, |
4931 | 0, | |
4e5ec77f | 4932 | "clu_id = %d", |
d33e787c | 4933 | 1, |
29028043 | 4934 | NULL, |
d33e787c | 4935 | &dclu_validate, |
4936 | }, | |
4937 | ||
4938 | { | |
5eaef520 | 4939 | /* Q_GMCM - GET_MACHINE_TO_CLUSTER_MAP */ |
d33e787c | 4940 | "get_machine_to_cluster_map", |
4941 | "gmcm", | |
c44ddfa7 | 4942 | 2, |
d33e787c | 4943 | RETRIEVE, |
0c345c78 | 4944 | "mcm", |
03c05291 | 4945 | MCMAP_TABLE, |
4946 | "m.name, c.name FROM machine m, clusters c, mcmap mcm", | |
d33e787c | 4947 | gmcm_fields, |
4948 | 2, | |
263a36d4 | 4949 | "m.name LIKE UPPER('%s') AND c.name LIKE '%s' AND mcm.clu_id = c.clu_id AND mcm.mach_id = m.mach_id", |
d33e787c | 4950 | 2, |
29028043 | 4951 | "m.name", |
263a36d4 | 4952 | NULL, |
d33e787c | 4953 | }, |
5eaef520 | 4954 | |
d33e787c | 4955 | { |
4956 | /* Q_AMTC - ADD_MACHINE_TO_CLUSTER */ | |
4957 | "add_machine_to_cluster", | |
4958 | "amtc", | |
c44ddfa7 | 4959 | 2, |
d33e787c | 4960 | APPEND, |
0c345c78 | 4961 | "mcm", |
03c05291 | 4962 | MCMAP_TABLE, |
4e5ec77f | 4963 | "INTO mcmap (mach_id, clu_id) VALUES (%d, %d)", |
d33e787c | 4964 | gmcm_fields, |
4965 | 2, | |
4966 | 0, | |
4967 | 0, | |
29028043 | 4968 | NULL, |
d33e787c | 4969 | &amtc_validate, |
4970 | }, | |
4971 | ||
4972 | { | |
4973 | /* Q_DMFC - DELETE_MACHINE_FROM_CLUSTER */ | |
4974 | "delete_machine_from_cluster", | |
4975 | "dmfc", | |
c44ddfa7 | 4976 | 2, |
d33e787c | 4977 | DELETE, |
0c345c78 | 4978 | "mcm", |
03c05291 | 4979 | MCMAP_TABLE, |
d33e787c | 4980 | 0, |
4981 | gmcm_fields, | |
4982 | 0, | |
4e5ec77f | 4983 | "mach_id = %d AND clu_id = %d", |
d33e787c | 4984 | 2, |
29028043 | 4985 | NULL, |
d33e787c | 4986 | &amtc_validate, |
4987 | }, | |
4988 | ||
4989 | { | |
68dd808d | 4990 | /* Q_GCLD - GET_CLUSTER_DATA */ |
d33e787c | 4991 | "get_cluster_data", |
4992 | "gcld", | |
c44ddfa7 | 4993 | 2, |
d33e787c | 4994 | RETRIEVE, |
d33e787c | 4995 | "svc", |
03c05291 | 4996 | SVC_TABLE, |
4997 | "c.name, svc.serv_label, svc.serv_cluster FROM svc svc, clusters c", | |
d33e787c | 4998 | gcld_fields, |
4999 | 3, | |
263a36d4 | 5000 | "c.clu_id = svc.clu_id AND c.name LIKE '%s' AND svc.serv_label LIKE '%s'", |
d33e787c | 5001 | 2, |
29028043 | 5002 | "c.name, svc.serv_label", |
263a36d4 | 5003 | NULL, |
d33e787c | 5004 | }, |
5005 | ||
5006 | { | |
5007 | /* Q_ACLD - ADD_CLUSTER_DATA */ | |
5008 | "add_cluster_data", | |
5009 | "acld", | |
c44ddfa7 | 5010 | 2, |
d33e787c | 5011 | APPEND, |
0c345c78 | 5012 | "svc", |
03c05291 | 5013 | SVC_TABLE, |
5eaef520 | 5014 | "INTO svc (clu_id, serv_label, serv_cluster) VALUES (%d, '%s', '%s')", |
88343c5e | 5015 | acld_fields, |
d33e787c | 5016 | 3, |
7ac48069 | 5017 | NULL, |
d33e787c | 5018 | 0, |
29028043 | 5019 | NULL, |
d33e787c | 5020 | &acld_validate, |
5021 | }, | |
5022 | ||
5023 | { | |
5024 | /* Q_DCLD - DELETE_CLUSTER_DATA */ | |
5025 | "delete_cluster_data", | |
5026 | "dcld", | |
c44ddfa7 | 5027 | 2, |
d33e787c | 5028 | DELETE, |
0c345c78 | 5029 | "svc", |
03c05291 | 5030 | SVC_TABLE, |
7ac48069 | 5031 | NULL, |
88343c5e | 5032 | acld_fields, |
d33e787c | 5033 | 0, |
5eaef520 | 5034 | "clu_id = %d AND serv_label = '%s' AND serv_cluster = '%s'", |
d33e787c | 5035 | 3, |
29028043 | 5036 | NULL, |
99e09b48 | 5037 | &dcld_validate, |
d33e787c | 5038 | }, |
5039 | ||
03c05291 | 5040 | { |
44da57b2 | 5041 | /* Q_GLIN - GET_LIST_INFO, v2 */ |
03c05291 | 5042 | "get_list_info", |
5043 | "glin", | |
c44ddfa7 | 5044 | 2, |
03c05291 | 5045 | RETRIEVE, |
263a36d4 | 5046 | "l", |
03c05291 | 5047 | LIST_TABLE, |
ccdbc974 | 5048 | "name, active, publicflg, hidden, maillist, grouplist, gid, acl_type, acl_id, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM list", |
44da57b2 | 5049 | glin2_fields, |
03c05291 | 5050 | 13, |
263a36d4 | 5051 | "name LIKE '%s'", |
5eaef520 | 5052 | 1, |
263a36d4 | 5053 | "name", |
5eaef520 | 5054 | &glin_validate, |
03c05291 | 5055 | }, |
5eaef520 | 5056 | |
44da57b2 | 5057 | { |
5058 | /* Q_GLIN - GET_LIST_INFO, v3 */ | |
5059 | "get_list_info", | |
5060 | "glin", | |
5061 | 3, | |
5062 | RETRIEVE, | |
5063 | "l", | |
5064 | LIST_TABLE, | |
5065 | "name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM list", | |
59c3208b | 5066 | glin3_fields, |
44da57b2 | 5067 | 14, |
5068 | "name LIKE '%s'", | |
5069 | 1, | |
5070 | "name", | |
5071 | &glin_validate, | |
5072 | }, | |
5073 | ||
59c3208b | 5074 | { |
5075 | /* Q_GLIN - GET_LIST_INFO, v4 */ | |
5076 | "get_list_info", | |
5077 | "glin", | |
5078 | 4, | |
5079 | RETRIEVE, | |
5080 | "l", | |
5081 | LIST_TABLE, | |
5082 | "name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, memacl_type, memacl_id, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM list", | |
5083 | glin_fields, | |
5084 | 16, | |
5085 | "name LIKE '%s'", | |
5086 | 1, | |
5087 | "name", | |
5088 | &glin_validate, | |
5089 | }, | |
5090 | ||
03c05291 | 5091 | { |
5092 | /* Q_EXLN - EXPAND_LIST_NAMES */ | |
5093 | "expand_list_names", | |
5094 | "exln", | |
c44ddfa7 | 5095 | 2, |
03c05291 | 5096 | RETRIEVE, |
5097 | "l", | |
5098 | LIST_TABLE, | |
5099 | "name FROM list", | |
5100 | glin_fields, | |
5101 | 1, | |
263a36d4 | 5102 | "name LIKE '%s' AND list_id != 0", |
03c05291 | 5103 | 1, |
29028043 | 5104 | "name", |
263a36d4 | 5105 | NULL, |
03c05291 | 5106 | }, |
5eaef520 | 5107 | |
03c05291 | 5108 | { |
44da57b2 | 5109 | /* Q_ALIS - ADD_LIST, v2 */ /* uses prefetch_value() for list_id */ |
03c05291 | 5110 | "add_list", |
5111 | "alis", | |
c44ddfa7 | 5112 | 2, |
03c05291 | 5113 | APPEND, |
5114 | "l", | |
5eaef520 | 5115 | LIST_TABLE, |
5116 | "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, acl_type, acl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, '%s', %d, NVL('%s', CHR(0)), %s)", | |
44da57b2 | 5117 | alis2_fields, |
03c05291 | 5118 | 10, |
5119 | 0, | |
5120 | 0, | |
29028043 | 5121 | NULL, |
44da57b2 | 5122 | &alis2_validate, |
5123 | }, | |
5124 | ||
5125 | { | |
5126 | /* Q_ALIS - ADD_LIST, v3 */ /* uses prefetch_value() for list_id */ | |
5127 | "add_list", | |
5128 | "alis", | |
5129 | 3, | |
5130 | APPEND, | |
5131 | "l", | |
5132 | LIST_TABLE, | |
5133 | "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, '%s', %d, NVL('%s', CHR(0)), %s)", | |
59c3208b | 5134 | alis3_fields, |
44da57b2 | 5135 | 11, |
5136 | 0, | |
5137 | 0, | |
5138 | NULL, | |
59c3208b | 5139 | &alis3_validate, |
5140 | }, | |
5141 | ||
5142 | { | |
5143 | /* Q_ALIS - ADD_LIST, v4 */ /* uses prefetch_value() for list_id */ | |
5144 | "add_list", | |
5145 | "alis", | |
5146 | 4, | |
5147 | APPEND, | |
5148 | "l", | |
5149 | LIST_TABLE, | |
5150 | "INTO list (name, active, publicflg, hidden, maillist, grouplist, gid, nfsgroup, acl_type, acl_id, memacl_type, memacl_id, description, list_id) VALUES ('%s', %s, %s, %s, %s, %s, %s, %s, '%s', %d, '%s', %d, NVL('%s', CHR(0)), %s)", | |
5151 | alis_fields, | |
5152 | 13, | |
5153 | 0, | |
5154 | 0, | |
5155 | NULL, | |
03c05291 | 5156 | &alis_validate, |
5157 | }, | |
5158 | ||
5159 | { | |
44da57b2 | 5160 | /* Q_ULIS - UPDATE_LIST, v2 */ |
03c05291 | 5161 | "update_list", |
5162 | "ulis", | |
c44ddfa7 | 5163 | 2, |
03c05291 | 5164 | UPDATE, |
5165 | "l", | |
5166 | LIST_TABLE, | |
5eaef520 | 5167 | "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, acl_type = '%s', acl_id = %d, description = NVL('%s', CHR(0))", |
44da57b2 | 5168 | ulis2_fields, |
03c05291 | 5169 | 10, |
5170 | "list_id = %d", | |
5171 | 1, | |
29028043 | 5172 | NULL, |
44da57b2 | 5173 | &ulis2_validate, |
5174 | }, | |
5175 | ||
5176 | { | |
5177 | /* Q_ULIS - UPDATE_LIST, v3 */ | |
5178 | "update_list", | |
5179 | "ulis", | |
5180 | 3, | |
5181 | UPDATE, | |
5182 | "l", | |
5183 | LIST_TABLE, | |
5184 | "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, acl_type = '%s', acl_id = %d, description = NVL('%s', CHR(0))", | |
59c3208b | 5185 | ulis3_fields, |
44da57b2 | 5186 | 11, |
5187 | "list_id = %d", | |
5188 | 1, | |
5189 | NULL, | |
59c3208b | 5190 | &ulis3_validate, |
5191 | }, | |
5192 | ||
5193 | { | |
5194 | /* Q_ULIS, UPDATE_LIST, v4 */ | |
5195 | "update_list", | |
5196 | "ulis", | |
5197 | 4, | |
5198 | UPDATE, | |
5199 | "l", | |
5200 | LIST_TABLE, | |
5201 | "list SET name = '%s', active = %s, publicflg = %s, hidden = %s, maillist = %s, grouplist = %s, gid = %s, nfsgroup = %s, acl_type = '%s', acl_id = %d, memacl_type = '%s', memacl_id = %d, description = NVL('%s', CHR(0))", | |
5202 | ulis_fields, | |
5203 | 13, | |
5204 | "list_id = %d", | |
5205 | 1, | |
5206 | NULL, | |
03c05291 | 5207 | &ulis_validate, |
5208 | }, | |
5209 | ||
5210 | { | |
5211 | /* Q_DLIS - DELETE_LIST */ | |
5212 | "delete_list", | |
5213 | "dlis", | |
c44ddfa7 | 5214 | 2, |
03c05291 | 5215 | DELETE, |
5216 | "l", | |
5217 | LIST_TABLE, | |
7ac48069 | 5218 | NULL, |
03c05291 | 5219 | dlis_fields, |
5220 | 0, | |
5221 | "list_id = %d", | |
5222 | 1, | |
29028043 | 5223 | NULL, |
03c05291 | 5224 | &dlis_validate, |
5225 | }, | |
5226 | ||
5227 | { | |
5228 | /* Q_AMTL - ADD_MEMBER_TO_LIST */ | |
5229 | "add_member_to_list", | |
5230 | "amtl", | |
c44ddfa7 | 5231 | 2, |
03c05291 | 5232 | APPEND, |
5233 | 0, | |
5234 | IMEMBERS_TABLE, | |
5235 | 0, | |
5236 | amtl_fields, | |
5237 | 3, | |
7ac48069 | 5238 | NULL, |
03c05291 | 5239 | 0, |
29028043 | 5240 | NULL, |
03c05291 | 5241 | &amtl_validate, |
5242 | }, | |
5243 | ||
46b6f1f6 | 5244 | { |
5245 | /* Q_ATML - ADD_TAGGED_MEMBER_TO_LIST */ | |
5246 | "add_tagged_member_to_list", | |
5247 | "atml", | |
c44ddfa7 | 5248 | 2, |
46b6f1f6 | 5249 | APPEND, |
5250 | 0, | |
5251 | IMEMBERS_TABLE, | |
5252 | 0, | |
5253 | atml_fields, | |
5254 | 4, | |
5255 | NULL, | |
5256 | 0, | |
5257 | NULL, | |
5258 | &atml_validate, | |
5259 | }, | |
5260 | ||
5261 | { | |
5262 | /* Q_TMOL - TAG_MEMBER_OF_LIST */ | |
5263 | "tag_member_of_list", | |
5264 | "tmol", | |
c44ddfa7 | 5265 | 2, |
46b6f1f6 | 5266 | UPDATE, |
20541c25 | 5267 | 0, |
46b6f1f6 | 5268 | IMEMBERS_TABLE, |
20541c25 | 5269 | 0, |
46b6f1f6 | 5270 | atml_fields, |
5271 | 1, | |
20541c25 | 5272 | 0, |
46b6f1f6 | 5273 | 3, |
5274 | NULL, | |
5275 | &tmol_validate, | |
5276 | }, | |
5277 | ||
03c05291 | 5278 | { |
5279 | /* Q_DMFL - DELETE_MEMBER_FROM_LIST */ | |
5280 | "delete_member_from_list", | |
5281 | "dmfl", | |
c44ddfa7 | 5282 | 2, |
03c05291 | 5283 | DELETE, |
5284 | 0, | |
5285 | IMEMBERS_TABLE, | |
7ac48069 | 5286 | NULL, |
03c05291 | 5287 | amtl_fields, |
5288 | 0, | |
5289 | 0, | |
5290 | 3, | |
29028043 | 5291 | NULL, |
03c05291 | 5292 | &dmfl_validate, |
5293 | }, | |
5294 | ||
5295 | { | |
5296 | /* Q_GAUS - GET_ACE_USE */ | |
5297 | "get_ace_use", | |
5298 | "gaus", | |
c44ddfa7 | 5299 | 2, |
03c05291 | 5300 | RETRIEVE, |
5301 | 0, | |
5302 | 0, | |
5303 | 0, | |
5304 | gaus_fields, | |
5305 | 2, | |
5306 | 0, | |
5307 | 2, | |
29028043 | 5308 | NULL, |
03c05291 | 5309 | &gaus_validate, |
5310 | }, | |
5311 | ||
d3051625 | 5312 | { |
5313 | /* Q_GHBO - GET_HOST_BY_OWNER */ | |
5314 | "get_host_by_owner", | |
5315 | "ghbo", | |
5316 | 2, | |
5317 | RETRIEVE, | |
5318 | 0, | |
5319 | 0, | |
5320 | 0, | |
5321 | ghbo_fields, | |
5322 | 1, | |
5323 | 0, | |
5324 | 2, | |
5325 | NULL, | |
5326 | &ghbo_validate, | |
5327 | }, | |
5328 | ||
03c05291 | 5329 | { |
5330 | /* Q_QGLI - QUALIFIED_GET_LISTS */ | |
5331 | "qualified_get_lists", | |
5332 | "qgli", | |
c44ddfa7 | 5333 | 2, |
03c05291 | 5334 | RETRIEVE, |
5335 | 0, | |
5336 | LIST_TABLE, | |
5337 | 0, | |
5338 | qgli_fields, | |
5339 | 1, | |
5340 | 0, | |
5341 | 5, | |
29028043 | 5342 | NULL, |
03c05291 | 5343 | &qgli_validate, |
5344 | }, | |
5345 | ||
5346 | { | |
5347 | /* Q_GMOL - GET_MEMBERS_OF_LIST */ | |
5348 | "get_members_of_list", | |
5349 | "gmol", | |
c44ddfa7 | 5350 | 2, |
03c05291 | 5351 | RETRIEVE, |
7ac48069 | 5352 | NULL, |
03c05291 | 5353 | IMEMBERS_TABLE, |
7ac48069 | 5354 | NULL, |
03c05291 | 5355 | gmol_fields, |
5356 | 2, | |
7ac48069 | 5357 | NULL, |
03c05291 | 5358 | 1, |
29028043 | 5359 | NULL, |
03c05291 | 5360 | &gmol_validate, |
5361 | }, | |
5362 | ||
5363 | { | |
5364 | /* Q_GEML - GET_END_MEMBERS_OF_LIST */ | |
5365 | "get_end_members_of_list", | |
5366 | "geml", | |
c44ddfa7 | 5367 | 2, |
03c05291 | 5368 | RETRIEVE, |
7ac48069 | 5369 | NULL, |
03c05291 | 5370 | IMEMBERS_TABLE, |
7ac48069 | 5371 | NULL, |
03c05291 | 5372 | gmol_fields, |
fd8d2149 | 5373 | 2, |
7ac48069 | 5374 | NULL, |
03c05291 | 5375 | 1, |
29028043 | 5376 | NULL, |
46b6f1f6 | 5377 | &gmol_validate, |
5378 | }, | |
5379 | ||
5380 | { | |
5381 | /* Q_GTML - GET_TAGGED_MEMBERS_OF_LIST */ | |
5382 | "get_tagged_members_of_list", | |
5383 | "gtml", | |
c44ddfa7 | 5384 | 2, |
46b6f1f6 | 5385 | RETRIEVE, |
5386 | NULL, | |
5387 | IMEMBERS_TABLE, | |
5388 | NULL, | |
5389 | gtml_fields, | |
5390 | 3, | |
5391 | NULL, | |
5392 | 1, | |
5393 | NULL, | |
5394 | &gmol_validate, | |
03c05291 | 5395 | }, |
5eaef520 | 5396 | |
03c05291 | 5397 | { |
5398 | /* Q_GLOM - GET_LISTS_OF_MEMBER */ | |
5399 | "get_lists_of_member", | |
5400 | "glom", | |
c44ddfa7 | 5401 | 2, |
03c05291 | 5402 | RETRIEVE, |
5403 | 0, | |
5404 | IMEMBERS_TABLE, | |
5405 | 0, | |
5406 | glom_fields, | |
5407 | 6, | |
5408 | 0, | |
5409 | 2, | |
29028043 | 5410 | NULL, |
03c05291 | 5411 | &glom_validate, |
5412 | }, | |
5413 | ||
5414 | { | |
5415 | /* Q_CMOL - COUNT_MEMBERS_OF_LIST */ | |
5416 | "count_members_of_list", | |
5417 | "cmol", | |
c44ddfa7 | 5418 | 2, |
03c05291 | 5419 | RETRIEVE, |
5420 | 0, | |
5421 | IMEMBERS_TABLE, | |
5422 | 0, | |
5423 | cmol_fields, | |
5424 | 1, | |
5425 | 0, | |
5426 | 1, | |
29028043 | 5427 | NULL, |
03c05291 | 5428 | &cmol_validate, |
5429 | }, | |
5430 | ||
d33e787c | 5431 | { |
5432 | /* Q_GSIN - GET_SERVER_INFO */ | |
5433 | "get_server_info", | |
5434 | "gsin", | |
c44ddfa7 | 5435 | 2, |
d33e787c | 5436 | RETRIEVE, |
5437 | "s", | |
03c05291 | 5438 | SERVERS_TABLE, |
5439 | "name, update_int, target_file, script, dfgen, dfcheck, type, enable, inprogress, harderror, errmsg, acl_type, acl_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM servers", | |
d33e787c | 5440 | gsin_fields, |
7ac4c1b1 | 5441 | 16, |
263a36d4 | 5442 | "name LIKE UPPER('%s')", |
d33e787c | 5443 | 1, |
29028043 | 5444 | "name", |
d33e787c | 5445 | &gsin_validate, |
5446 | }, | |
5447 | ||
5448 | { | |
5449 | /* Q_QGSV - QUALIFIED_GET_SERVER */ | |
5450 | "qualified_get_server", | |
5451 | "qgsv", | |
c44ddfa7 | 5452 | 2, |
d33e787c | 5453 | RETRIEVE, |
5454 | 0, | |
03c05291 | 5455 | SERVERS_TABLE, |
d33e787c | 5456 | 0, |
5457 | qgsv_fields, | |
5458 | 1, | |
5459 | 0, | |
5460 | 3, | |
29028043 | 5461 | NULL, |
d33e787c | 5462 | &qgsv_validate, |
5463 | }, | |
5464 | ||
5465 | { | |
5466 | /* Q_ASIN - ADD_SERVER_INFO */ | |
5467 | "add_server_info", | |
5468 | "asin", | |
c44ddfa7 | 5469 | 2, |
d33e787c | 5470 | APPEND, |
5471 | "s", | |
03c05291 | 5472 | SERVERS_TABLE, |
5eaef520 | 5473 | "INTO servers (name, update_int, target_file, script, type, enable, acl_type, acl_id) VALUES (UPPER('%s'), %s, '%s', '%s', '%s', %s, '%s', %d)", |
d33e787c | 5474 | asin_fields, |
5475 | 8, | |
7ac48069 | 5476 | NULL, |
d33e787c | 5477 | 0, |
29028043 | 5478 | NULL, |
d33e787c | 5479 | &asin_validate, |
5480 | }, | |
5481 | ||
5482 | { | |
5483 | /* Q_USIN - UPDATE_SERVER_INFO */ | |
5484 | "update_server_info", | |
5485 | "usin", | |
c44ddfa7 | 5486 | 2, |
d33e787c | 5487 | UPDATE, |
5488 | "s", | |
03c05291 | 5489 | SERVERS_TABLE, |
4e5ec77f | 5490 | "servers SET update_int = %s, target_file = '%s', script = '%s', type = '%s', enable = %s, acl_type = '%s', acl_id = %d", |
d33e787c | 5491 | asin_fields, |
5492 | 7, | |
03c05291 | 5493 | "name = UPPER('%s')", |
d33e787c | 5494 | 1, |
29028043 | 5495 | NULL, |
d33e787c | 5496 | &asin_validate, |
5497 | }, | |
5498 | ||
5499 | { | |
5500 | /* Q_RSVE - RESET_SERVER_ERROR */ | |
5501 | "reset_server_error", | |
5502 | "rsve", | |
c44ddfa7 | 5503 | 2, |
d33e787c | 5504 | UPDATE, |
5505 | "s", | |
03c05291 | 5506 | SERVERS_TABLE, |
4e5ec77f | 5507 | "servers SET harderror = 0, dfcheck = dfgen", |
d33e787c | 5508 | dsin_fields, |
5509 | 0, | |
03c05291 | 5510 | "name = UPPER('%s')", |
d33e787c | 5511 | 1, |
29028043 | 5512 | NULL, |
d33e787c | 5513 | &rsve_validate, |
5514 | }, | |
5515 | ||
5516 | { | |
5517 | /* Q_SSIF - SET_SERVER_INTERNAL_FLAGS */ | |
5518 | "set_server_internal_flags", | |
5519 | "ssif", | |
c44ddfa7 | 5520 | 2, |
d33e787c | 5521 | UPDATE, |
5522 | "s", | |
03c05291 | 5523 | SERVERS_TABLE, |
5eaef520 | 5524 | "servers SET dfgen = %s, dfcheck = %s, inprogress = %s, harderror = %s, errmsg = NVL('%s', CHR(0))", |
d33e787c | 5525 | ssif_fields, |
7ac4c1b1 | 5526 | 5, |
03c05291 | 5527 | "name = UPPER('%s')", |
d33e787c | 5528 | 1, |
29028043 | 5529 | NULL, |
d33e787c | 5530 | &ssif_validate, |
5531 | }, | |
5532 | ||
5533 | { | |
5534 | /* Q_DSIN - DELETE_SERVER_INFO */ | |
5535 | "delete_server_info", | |
5536 | "dsin", | |
c44ddfa7 | 5537 | 2, |
d33e787c | 5538 | DELETE, |
5539 | "s", | |
03c05291 | 5540 | SERVERS_TABLE, |
7ac48069 | 5541 | NULL, |
d33e787c | 5542 | dsin_fields, |
5543 | 0, | |
03c05291 | 5544 | "name = UPPER('%s')", |
d33e787c | 5545 | 1, |
29028043 | 5546 | NULL, |
d33e787c | 5547 | &dsin_validate, |
5548 | }, | |
5549 | ||
5550 | { | |
5eaef520 | 5551 | /* Q_GSHI - GET_SERVER_HOST_INFO */ |
d33e787c | 5552 | "get_server_host_info", |
5553 | "gshi", | |
c44ddfa7 | 5554 | 2, |
d33e787c | 5555 | RETRIEVE, |
5556 | "sh", | |
03c05291 | 5557 | SERVERHOSTS_TABLE, |
5558 | "sh.service, m.name, sh.enable, sh.override, sh.success, sh.inprogress, sh.hosterror, sh.hosterrmsg, sh.ltt, sh.lts, sh.value1, sh.value2, sh.value3, TO_CHAR(sh.modtime, 'DD-mon-YYYY HH24:MI:SS'), sh.modby, sh.modwith FROM serverhosts sh, machine m", | |
d33e787c | 5559 | gshi_fields, |
5560 | 16, | |
263a36d4 | 5561 | "sh.service LIKE UPPER('%s') AND m.name LIKE UPPER('%s') AND m.mach_id = sh.mach_id", |
d33e787c | 5562 | 2, |
29028043 | 5563 | "sh.service, m.name", |
d33e787c | 5564 | &gshi_validate, |
5565 | }, | |
5566 | ||
5567 | { | |
135dcb80 | 5568 | /* Q_QGSH - QUALIFIED_GET_SERVER_HOST */ |
d33e787c | 5569 | "qualified_get_server_host", |
5570 | "qgsh", | |
c44ddfa7 | 5571 | 2, |
d33e787c | 5572 | RETRIEVE, |
135dcb80 | 5573 | 0, |
03c05291 | 5574 | SERVERHOSTS_TABLE, |
d33e787c | 5575 | 0, |
5576 | qgsh_fields, | |
5577 | 2, | |
5578 | 0, | |
5579 | 6, | |
29028043 | 5580 | NULL, |
d33e787c | 5581 | &qgsh_validate, |
5582 | }, | |
5583 | ||
5584 | { | |
5585 | /* Q_ASHI - ADD_SERVER_HOST_INFO */ | |
5586 | "add_server_host_info", | |
5587 | "ashi", | |
c44ddfa7 | 5588 | 2, |
d33e787c | 5589 | APPEND, |
5590 | "sh", | |
03c05291 | 5591 | SERVERHOSTS_TABLE, |
5eaef520 | 5592 | "INTO serverhosts (service, mach_id, enable, value1, value2, value3) VALUES (UPPER('%s'), %d, %s, %s, %s, NVL('%s', CHR(0)))", |
d33e787c | 5593 | ashi_fields, |
5594 | 6, | |
7ac48069 | 5595 | NULL, |
d33e787c | 5596 | 0, |
29028043 | 5597 | NULL, |
d33e787c | 5598 | &ashi_validate, |
5599 | }, | |
5600 | ||
5601 | { | |
5602 | /* Q_USHI - UPDATE_SERVER_HOST_INFO */ | |
5603 | "update_server_host_info", | |
5604 | "ushi", | |
c44ddfa7 | 5605 | 2, |
d33e787c | 5606 | UPDATE, |
5607 | "sh", | |
03c05291 | 5608 | SERVERHOSTS_TABLE, |
5eaef520 | 5609 | "serverhosts SET enable = %s, value1 = %s, value2 = %s, value3 = NVL('%s', CHR(0))", |
d33e787c | 5610 | ashi_fields, |
5611 | 4, | |
03c05291 | 5612 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 5613 | 2, |
29028043 | 5614 | NULL, |
d33e787c | 5615 | &ashi_validate, |
5616 | }, | |
5617 | ||
5618 | { | |
5619 | /* Q_RSHE - RESET_SERVER_HOST_ERROR */ | |
5620 | "reset_server_host_error", | |
5621 | "rshe", | |
c44ddfa7 | 5622 | 2, |
d33e787c | 5623 | UPDATE, |
5624 | "sh", | |
03c05291 | 5625 | SERVERHOSTS_TABLE, |
4e5ec77f | 5626 | "serverhosts SET hosterror = 0", |
d33e787c | 5627 | dshi_fields, |
5628 | 0, | |
03c05291 | 5629 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 5630 | 2, |
29028043 | 5631 | NULL, |
d33e787c | 5632 | &rshe_validate, |
5633 | }, | |
5634 | ||
5635 | { | |
5636 | /* Q_SSHO - SET_SERVER_HOST_OVERRIDE */ | |
5637 | "set_server_host_override", | |
5638 | "ssho", | |
c44ddfa7 | 5639 | 2, |
d33e787c | 5640 | UPDATE, |
5641 | "sh", | |
03c05291 | 5642 | SERVERHOSTS_TABLE, |
4e5ec77f | 5643 | "serverhosts SET override = 1", |
d33e787c | 5644 | dshi_fields, |
5645 | 0, | |
03c05291 | 5646 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 5647 | 2, |
29028043 | 5648 | NULL, |
d33e787c | 5649 | &ssho_validate, |
5650 | }, | |
5651 | ||
5652 | { | |
e41960ac | 5653 | /* Q_SSHI - SET_SERVER_HOST_INTERNAL */ |
d33e787c | 5654 | "set_server_host_internal", |
5655 | "sshi", | |
c44ddfa7 | 5656 | 2, |
d33e787c | 5657 | UPDATE, |
7ac4c1b1 | 5658 | "s", |
03c05291 | 5659 | SERVERHOSTS_TABLE, |
5eaef520 | 5660 | "serverhosts SET override = %s, success = %s, inprogress = %s, hosterror = %s, hosterrmsg = NVL('%s', CHR(0)), ltt = %s, lts = %s", |
d33e787c | 5661 | sshi_fields, |
5662 | 7, | |
5eaef520 | 5663 | "service = UPPER('%s') AND mach_id = %d", |
d33e787c | 5664 | 2, |
29028043 | 5665 | NULL, |
d33e787c | 5666 | &sshi_validate, |
5667 | }, | |
5668 | ||
5669 | { | |
03c05291 | 5670 | /* Q_DSHI - DELETE_SERVER_HOST_INFO */ |
5671 | "delete_server_host_info", | |
5672 | "dshi", | |
c44ddfa7 | 5673 | 2, |
d33e787c | 5674 | DELETE, |
03c05291 | 5675 | "sh", |
5676 | SERVERHOSTS_TABLE, | |
7ac48069 | 5677 | NULL, |
03c05291 | 5678 | dshi_fields, |
d33e787c | 5679 | 0, |
03c05291 | 5680 | "service = UPPER('%s') AND mach_id = %d", |
5681 | 2, | |
29028043 | 5682 | NULL, |
03c05291 | 5683 | &dshi_validate, |
d33e787c | 5684 | }, |
5685 | ||
5686 | { | |
5eaef520 | 5687 | /* Q_GSLO - GET_SERVER_LOCATIONS */ |
d33e787c | 5688 | "get_server_locations", |
5689 | "gslo", | |
c44ddfa7 | 5690 | 2, |
d33e787c | 5691 | RETRIEVE, |
5692 | "sh", | |
03c05291 | 5693 | SERVERHOSTS_TABLE, |
5694 | "sh.service, m.name FROM serverhosts sh, machine m", | |
d33e787c | 5695 | gslo_fields, |
5696 | 2, | |
263a36d4 | 5697 | "sh.service LIKE UPPER('%s') AND sh.mach_id = m.mach_id", |
d33e787c | 5698 | 1, |
29028043 | 5699 | "sh.service, m.name", |
263a36d4 | 5700 | NULL, |
d33e787c | 5701 | }, |
5702 | ||
5703 | { | |
5eaef520 | 5704 | /* Q_GFSL - GET_FILESYS_BY_LABEL */ |
d33e787c | 5705 | "get_filesys_by_label", |
5706 | "gfsl", | |
c44ddfa7 | 5707 | 2, |
d33e787c | 5708 | RETRIEVE, |
5709 | "fs", | |
03c05291 | 5710 | FILESYS_TABLE, |
5711 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l", | |
d33e787c | 5712 | gfsl_fields, |
5713 | 14, | |
263a36d4 | 5714 | "fs.label LIKE '%s' AND fs.mach_id = m.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 5715 | 1, |
29028043 | 5716 | "fs.label", |
5a8887d8 | 5717 | &gfsl_validate, |
d33e787c | 5718 | }, |
5719 | ||
5720 | { | |
5eaef520 | 5721 | /* Q_GFSM - GET_FILESYS_BY_MACHINE */ |
d33e787c | 5722 | "get_filesys_by_machine", |
5723 | "gfsm", | |
c44ddfa7 | 5724 | 2, |
d33e787c | 5725 | RETRIEVE, |
5726 | "fs", | |
03c05291 | 5727 | FILESYS_TABLE, |
5728 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l", | |
d33e787c | 5729 | gfsm_fields, |
5730 | 14, | |
4e5ec77f | 5731 | "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 5732 | 1, |
29028043 | 5733 | "fs.label", |
d33e787c | 5734 | &gfsm_validate, |
5735 | }, | |
5736 | ||
88343c5e | 5737 | { |
5eaef520 | 5738 | /* Q_GFSN - GET_FILESYS_BY_NFSPHYS */ |
88343c5e | 5739 | "get_filesys_by_nfsphys", |
5740 | "gfsn", | |
c44ddfa7 | 5741 | 2, |
88343c5e | 5742 | RETRIEVE, |
5743 | "fs", | |
03c05291 | 5744 | FILESYS_TABLE, |
5745 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l, nfsphys np", | |
88343c5e | 5746 | gfsn_fields, |
5747 | 14, | |
cc1bca5c | 5748 | "fs.mach_id = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id AND np.nfsphys_id = fs.phys_id AND np.dir LIKE '%s'", |
88343c5e | 5749 | 2, |
29028043 | 5750 | "fs.label", |
99e09b48 | 5751 | &gfsn_validate, |
88343c5e | 5752 | }, |
5753 | ||
d33e787c | 5754 | { |
5eaef520 | 5755 | /* Q_GFSG - GET_FILESYS_BY_GROUP */ |
d33e787c | 5756 | "get_filesys_by_group", |
5757 | "gfsg", | |
c44ddfa7 | 5758 | 2, |
d33e787c | 5759 | RETRIEVE, |
5760 | "fs", | |
03c05291 | 5761 | FILESYS_TABLE, |
5762 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l", | |
d33e787c | 5763 | gfsg_fields, |
5764 | 14, | |
4e5ec77f | 5765 | "fs.owners = %d AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = l.list_id", |
d33e787c | 5766 | 1, |
29028043 | 5767 | "fs.label", |
d33e787c | 5768 | &gfsg_validate, |
5769 | }, | |
5770 | ||
4ffa124a | 5771 | { |
76f86976 | 5772 | /* Q_GFSP - GET_FILESYS_BY_PATH */ |
4ffa124a | 5773 | "get_filesys_by_path", |
5774 | "gfsp", | |
c44ddfa7 | 5775 | 2, |
4ffa124a | 5776 | RETRIEVE, |
5777 | "fs", | |
03c05291 | 5778 | FILESYS_TABLE, |
5779 | "fs.label, fs.type, m.name, fs.name, fs.mount, fs.rwaccess, fs.comments, u.login, l.name, fs.createflg, fs.lockertype, TO_CHAR(fs.modtime, 'DD-mon-YYYY HH24:MI:SS'), fs.modby, fs.modwith FROM filesys fs, machine m, users u, list l", | |
4ffa124a | 5780 | gfsp_fields, |
5781 | 14, | |
263a36d4 | 5782 | "fs.name LIKE '%s' AND m.mach_id = fs.mach_id AND fs.owner = u.users_id AND fs.owners = list_id", |
4ffa124a | 5783 | 1, |
29028043 | 5784 | "fs.label", |
263a36d4 | 5785 | &VDfix_modby, |
4ffa124a | 5786 | }, |
5eaef520 | 5787 | |
d33e787c | 5788 | { |
45bf7573 | 5789 | /* Q_AFIL - ADD_FILESYS */ /* uses prefetch_value() for filsys_id */ |
d33e787c | 5790 | "add_filesys", |
5791 | "afil", | |
c44ddfa7 | 5792 | 2, |
d33e787c | 5793 | APPEND, |
5794 | "fs", | |
03c05291 | 5795 | FILESYS_TABLE, |
d4296047 | 5796 | "INTO filesys (label, type, mach_id, name, mount, rwaccess, comments, owner, owners, createflg, lockertype, filsys_id) VALUES ('%s', '%s', %d, NVL('%s', CHR(0)), NVL('%s', CHR(0)), '%s', NVL('%s', CHR(0)), %d, %d, %s, '%s', %s)", |
d33e787c | 5797 | afil_fields, |
5798 | 11, | |
45bf7573 | 5799 | 0, |
d33e787c | 5800 | 0, |
29028043 | 5801 | NULL, |
d33e787c | 5802 | &afil_validate, |
5803 | }, | |
5804 | ||
5805 | { | |
5806 | /* Q_UFIL - UPDATE_FILESYS */ | |
5807 | "update_filesys", | |
5808 | "ufil", | |
c44ddfa7 | 5809 | 2, |
d33e787c | 5810 | UPDATE, |
5811 | "fs", | |
03c05291 | 5812 | FILESYS_TABLE, |
d4296047 | 5813 | "filesys SET label = '%s', type = '%s', mach_id = %d, name = NVL('%s', CHR(0)), mount = NVL('%s', CHR(0)), rwaccess = '%s', comments = NVL('%s', CHR(0)), owner = %d, owners = %d, createflg = %s, lockertype = '%s'", |
d33e787c | 5814 | ufil_fields, |
5815 | 11, | |
4e5ec77f | 5816 | "filsys_id = %d", |
d33e787c | 5817 | 1, |
29028043 | 5818 | NULL, |
5eaef520 | 5819 | &ufil_validate, |
d33e787c | 5820 | }, |
5821 | ||
5822 | { | |
5823 | /* Q_DFIL - DELETE_FILESYS */ | |
5824 | "delete_filesys", | |
5825 | "dfil", | |
c44ddfa7 | 5826 | 2, |
d33e787c | 5827 | DELETE, |
5828 | "fs", | |
03c05291 | 5829 | FILESYS_TABLE, |
7ac48069 | 5830 | NULL, |
d33e787c | 5831 | dfil_fields, |
5832 | 0, | |
4e5ec77f | 5833 | "filsys_id = %d", |
d33e787c | 5834 | 1, |
29028043 | 5835 | NULL, |
d33e787c | 5836 | &dfil_validate, |
5837 | }, | |
5838 | ||
95127ba8 | 5839 | { |
5eaef520 | 5840 | /* Q_GFGM - GET_FSGROUP_MEMBERS */ |
95127ba8 | 5841 | "get_fsgroup_members", |
5842 | "gfgm", | |
c44ddfa7 | 5843 | 2, |
95127ba8 | 5844 | RETRIEVE, |
5845 | "fg", | |
03c05291 | 5846 | FSGROUP_TABLE, |
5847 | "fs.label, fg.key FROM fsgroup fg, filesys fs", | |
95127ba8 | 5848 | gfgm_fields, |
5849 | 2, | |
4e5ec77f | 5850 | "fg.group_id = %d AND fs.filsys_id = fg.filsys_id", |
95127ba8 | 5851 | 1, |
29028043 | 5852 | "fs.label, fg.key", |
95127ba8 | 5853 | &gfgm_validate, |
5854 | }, | |
5855 | ||
5856 | { | |
76f86976 | 5857 | /* Q_AFTG - ADD_FILESYS_TO_FSGROUP */ |
95127ba8 | 5858 | "add_filesys_to_fsgroup", |
5859 | "aftg", | |
c44ddfa7 | 5860 | 2, |
95127ba8 | 5861 | APPEND, |
5862 | "fg", | |
03c05291 | 5863 | FSGROUP_TABLE, |
5eaef520 | 5864 | "INTO fsgroup (group_id, filsys_id, key) VALUES (%d, %d, '%s')", |
95127ba8 | 5865 | gfgm_fields, |
76f86976 | 5866 | 3, |
7ac48069 | 5867 | NULL, |
76f86976 | 5868 | 0, |
29028043 | 5869 | NULL, |
95127ba8 | 5870 | &aftg_validate, |
5871 | }, | |
5872 | ||
5873 | { | |
5874 | /* Q_RFFG - REMOVE_FILESYS_FROM_FSGROUP */ | |
5875 | "remove_filesys_from_fsgroup", | |
5876 | "rffg", | |
c44ddfa7 | 5877 | 2, |
95127ba8 | 5878 | DELETE, |
5879 | "fg", | |
03c05291 | 5880 | FSGROUP_TABLE, |
7ac48069 | 5881 | NULL, |
95127ba8 | 5882 | gfgm_fields, |
5883 | 0, | |
4e5ec77f | 5884 | "group_id = %d AND filsys_id = %d", |
95127ba8 | 5885 | 2, |
29028043 | 5886 | NULL, |
95127ba8 | 5887 | &aftg_validate, |
5888 | }, | |
5889 | ||
d33e787c | 5890 | { |
5eaef520 | 5891 | /* Q_GANF - GET_ALL_NFSPHYS */ |
d33e787c | 5892 | "get_all_nfsphys", |
5893 | "ganf", | |
c44ddfa7 | 5894 | 2, |
d33e787c | 5895 | RETRIEVE, |
5896 | "np", | |
03c05291 | 5897 | NFSPHYS_TABLE, |
5898 | "m.name, np.dir, np.device, np.status, np.allocated, np.partsize, TO_CHAR(np.modtime, 'DD-mon-YYYY HH24:MI:SS'), np.modby, np.modwith FROM nfsphys np, machine m", | |
d33e787c | 5899 | ganf_fields, |
5900 | 9, | |
4e5ec77f | 5901 | "m.mach_id = np.mach_id", |
d33e787c | 5902 | 0, |
29028043 | 5903 | "m.name, np.dir", |
5904 | &VDfix_modby, | |
d33e787c | 5905 | }, |
5906 | ||
5907 | { | |
5eaef520 | 5908 | /* Q_GNFP - GET_NFSPHYS */ |
d33e787c | 5909 | "get_nfsphys", |
5910 | "gnfp", | |
c44ddfa7 | 5911 | 2, |
d33e787c | 5912 | RETRIEVE, |
5913 | "np", | |
03c05291 | 5914 | NFSPHYS_TABLE, |
5915 | "m.name, np.dir, np.device, np.status, np.allocated, np.partsize, TO_CHAR(np.modtime, 'DD-mon-YYYY HH24:MI:SS'), np.modby, np.modwith FROM nfsphys np, machine m", | |
d33e787c | 5916 | gnfp_fields, |
5917 | 9, | |
263a36d4 | 5918 | "np.mach_id = %d AND np.dir LIKE '%s' AND m.mach_id = np.mach_id", |
d33e787c | 5919 | 2, |
29028043 | 5920 | "m.name, np.dir", |
d33e787c | 5921 | &gnfp_validate, |
5922 | }, | |
5923 | ||
5924 | { | |
45bf7573 | 5925 | /* Q_ANFP - ADD_NFSPHYS */ /* uses prefetch_value() for nfsphys_id */ |
d33e787c | 5926 | "add_nfsphys", |
5927 | "anfp", | |
c44ddfa7 | 5928 | 2, |
d33e787c | 5929 | APPEND, |
5930 | "np", | |
03c05291 | 5931 | NFSPHYS_TABLE, |
5eaef520 | 5932 | "INTO nfsphys (mach_id, dir, device, status, allocated, partsize, nfsphys_id) VALUES (%d, '%s', NVL('%s', CHR(0)), %s, %s, %s, %s)", |
d33e787c | 5933 | ganf_fields, |
5934 | 6, | |
45bf7573 | 5935 | 0, |
d33e787c | 5936 | 0, |
29028043 | 5937 | NULL, |
d33e787c | 5938 | &anfp_validate, |
5939 | }, | |
5940 | ||
5941 | { | |
5942 | /* Q_UNFP - UPDATE_NFSPHYS */ | |
5943 | "update_nfsphys", | |
5944 | "unfp", | |
c44ddfa7 | 5945 | 2, |
d33e787c | 5946 | UPDATE, |
5947 | "np", | |
03c05291 | 5948 | NFSPHYS_TABLE, |
5eaef520 | 5949 | "nfsphys SET device = NVL('%s', CHR(0)), status = %s, allocated = %s, partsize = %s", |
135dcb80 | 5950 | ganf_fields, |
d33e787c | 5951 | 4, |
5eaef520 | 5952 | "mach_id = %d AND dir = '%s'", |
d33e787c | 5953 | 2, |
29028043 | 5954 | NULL, |
45bf7573 | 5955 | &unfp_validate, |
d33e787c | 5956 | }, |
5957 | ||
5958 | { | |
5959 | /* Q_AJNF - ADJUST_NFSPHYS_ALLOCATION */ | |
5960 | "adjust_nfsphys_allocation", | |
5961 | "ajnf", | |
c44ddfa7 | 5962 | 2, |
d33e787c | 5963 | UPDATE, |
5964 | "np", | |
03c05291 | 5965 | NFSPHYS_TABLE, |
4e5ec77f | 5966 | "nfsphys SET allocated = allocated + %s", |
99e09b48 | 5967 | ajnf_fields, |
d33e787c | 5968 | 1, |
4e5ec77f | 5969 | "mach_id = %d AND dir = '%s'", |
d33e787c | 5970 | 2, |
29028043 | 5971 | NULL, |
f802fd0d | 5972 | &ajnf_validate, |
d33e787c | 5973 | }, |
5974 | ||
5975 | { | |
5976 | /* Q_DNFP - DELETE_NFSPHYS */ | |
5977 | "delete_nfsphys", | |
5978 | "dnfp", | |
c44ddfa7 | 5979 | 2, |
d33e787c | 5980 | DELETE, |
5981 | "np", | |
03c05291 | 5982 | NFSPHYS_TABLE, |
7ac48069 | 5983 | NULL, |
d33e787c | 5984 | dnfp_fields, |
5985 | 0, | |
4e5ec77f | 5986 | "mach_id = %d AND dir = '%s'", |
d33e787c | 5987 | 2, |
29028043 | 5988 | NULL, |
d33e787c | 5989 | &dnfp_validate, |
5990 | }, | |
5991 | ||
368be132 | 5992 | { |
5eaef520 | 5993 | /* Q_GQOT - GET_QUOTA */ |
368be132 | 5994 | "get_quota", |
5995 | "gqot", | |
c44ddfa7 | 5996 | 2, |
368be132 | 5997 | RETRIEVE, |
5998 | "q", | |
03c05291 | 5999 | QUOTA_TABLE, |
6000 | "fs.label, q.type, q.entity_id, q.quota, q.phys_id, m.name, TO_CHAR(q.modtime, 'DD-mon-YYYY HH24:MI:SS'), q.modby, q.modwith FROM quota q, filesys fs, machine m", | |
368be132 | 6001 | gqot_fields, |
6002 | 9, | |
263a36d4 | 6003 | "fs.label LIKE '%s' AND q.type = '%s' AND q.entity_id = %d AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id", |
368be132 | 6004 | 3, |
29028043 | 6005 | NULL, |
368be132 | 6006 | &gqot_validate, |
6007 | }, | |
6008 | ||
6009 | { | |
5eaef520 | 6010 | /* Q_GQBF - GET_QUOTA_BY_FILESYS */ |
368be132 | 6011 | "get_quota_by_filesys", |
6012 | "gqbf", | |
c44ddfa7 | 6013 | 2, |
368be132 | 6014 | RETRIEVE, |
6015 | "q", | |
03c05291 | 6016 | QUOTA_TABLE, |
6017 | "fs.label, q.type, q.entity_id, q.quota, q.phys_id, m.name, TO_CHAR(q.modtime, 'DD-mon-YYYY HH24:MI:SS'), q.modby, q.modwith FROM quota q, filesys fs, machine m", | |
368be132 | 6018 | gqbf_fields, |
6019 | 9, | |
263a36d4 | 6020 | "fs.label LIKE '%s' AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id", |
368be132 | 6021 | 1, |
29028043 | 6022 | "fs.label, q.type", |
368be132 | 6023 | &gqbf_validate, |
6024 | }, | |
6025 | ||
6026 | { | |
135dcb80 | 6027 | /* Q_AQOT - ADD_QUOTA */ /* prefetch_filsys() gets last 1 value */ |
368be132 | 6028 | "add_quota", |
6029 | "aqot", | |
c44ddfa7 | 6030 | 2, |
368be132 | 6031 | APPEND, |
135dcb80 | 6032 | 0, |
03c05291 | 6033 | QUOTA_TABLE, |
135dcb80 | 6034 | "INTO quota (filsys_id, type, entity_id, quota, phys_id) VALUES ('%s', %d, %d, %s, %s)", |
368be132 | 6035 | aqot_fields, |
135dcb80 | 6036 | 4, |
7ac48069 | 6037 | NULL, |
76f86976 | 6038 | 0, |
29028043 | 6039 | NULL, |
368be132 | 6040 | &aqot_validate, |
6041 | }, | |
6042 | ||
6043 | { | |
6044 | /* Q_UQOT - UPDATE_QUOTA */ | |
6045 | "update_quota", | |
6046 | "uqot", | |
c44ddfa7 | 6047 | 2, |
368be132 | 6048 | UPDATE, |
135dcb80 | 6049 | 0, |
03c05291 | 6050 | QUOTA_TABLE, |
4e5ec77f | 6051 | "quota SET quota = %s", |
368be132 | 6052 | aqot_fields, |
6053 | 1, | |
135dcb80 | 6054 | 0, |
368be132 | 6055 | 3, |
29028043 | 6056 | NULL, |
368be132 | 6057 | &uqot_validate, |
6058 | }, | |
6059 | ||
6060 | { | |
6061 | /* Q_DQOT - DELETE_QUOTA */ | |
6062 | "delete_quota", | |
6063 | "dqot", | |
c44ddfa7 | 6064 | 2, |
368be132 | 6065 | DELETE, |
135dcb80 | 6066 | 0, |
03c05291 | 6067 | QUOTA_TABLE, |
7ac48069 | 6068 | NULL, |
368be132 | 6069 | aqot_fields, |
6070 | 0, | |
135dcb80 | 6071 | 0, |
368be132 | 6072 | 3, |
29028043 | 6073 | NULL, |
368be132 | 6074 | &dqot_validate, |
6075 | }, | |
6076 | ||
d33e787c | 6077 | { |
5eaef520 | 6078 | /* Q_GNFQ - GET_NFS_QUOTAS */ |
88343c5e | 6079 | "get_nfs_quota", |
d33e787c | 6080 | "gnfq", |
c44ddfa7 | 6081 | 2, |
d33e787c | 6082 | RETRIEVE, |
368be132 | 6083 | "q", |
03c05291 | 6084 | QUOTA_TABLE, |
6085 | "fs.label, u.login, q.quota, q.phys_id, m.name, TO_CHAR(q.modtime, 'DD-mon-YYYY HH24:MI:SS'), q.modby, q.modwith FROM quota q, filesys fs, users u, machine m", | |
d33e787c | 6086 | gnfq_fields, |
6087 | 8, | |
263a36d4 | 6088 | "fs.label LIKE '%s' AND q.type = 'USER' AND q.entity_id = u.users_id AND fs.filsys_id = q.filsys_id AND m.mach_id = fs.mach_id AND u.login = '%s'", |
88343c5e | 6089 | 2, |
29028043 | 6090 | "fs.label, u.login", |
d33e787c | 6091 | &gnfq_validate, |
6092 | }, | |
6093 | ||
6094 | { | |
5eaef520 | 6095 | /* Q_GNQP - GET_NFS_QUOTAS_BY_PARTITION */ |
d33e787c | 6096 | "get_nfs_quotas_by_partition", |
6097 | "gnqp", | |
c44ddfa7 | 6098 | 2, |
d33e787c | 6099 | RETRIEVE, |
368be132 | 6100 | "q", |
03c05291 | 6101 | QUOTA_TABLE, |
6102 | "fs.label, u.login, q.quota, np.dir, m.name FROM quota q, filesys fs, users u, nfsphys np, machine m", | |
d33e787c | 6103 | gnqp_fields, |
6104 | 5, | |
263a36d4 | 6105 | "np.mach_id = %d AND np.dir LIKE '%s' AND q.phys_id = np.nfsphys_id AND fs.filsys_id = q.filsys_id AND q.type = 'USER' AND u.users_id = q.entity_id AND m.mach_id = np.mach_id", |
d33e787c | 6106 | 2, |
29028043 | 6107 | "fs.label", |
263a36d4 | 6108 | NULL, |
d33e787c | 6109 | }, |
6110 | ||
d33e787c | 6111 | { |
135dcb80 | 6112 | /* Q_ANFQ - ADD_NFS_QUOTA */ /* prefetch_filsys() gets last 1 value */ |
d33e787c | 6113 | "add_nfs_quota", |
6114 | "anfq", | |
c44ddfa7 | 6115 | 2, |
d33e787c | 6116 | APPEND, |
135dcb80 | 6117 | 0, |
03c05291 | 6118 | QUOTA_TABLE, |
135dcb80 | 6119 | "INTO quota (type, filsys_id, entity_id, quota, phys_id ) VALUES ('USER', %d, %d, %s, %s)", |
d33e787c | 6120 | anfq_fields, |
135dcb80 | 6121 | 3, |
7ac48069 | 6122 | NULL, |
76f86976 | 6123 | 0, |
29028043 | 6124 | NULL, |
d33e787c | 6125 | &anfq_validate, |
6126 | }, | |
6127 | ||
6128 | { | |
5eaef520 | 6129 | /* Q_UNFQ - UPDATE_NFS_QUOTA */ |
d33e787c | 6130 | "update_nfs_quota", |
6131 | "unfq", | |
c44ddfa7 | 6132 | 2, |
d33e787c | 6133 | UPDATE, |
135dcb80 | 6134 | 0, |
03c05291 | 6135 | QUOTA_TABLE, |
4e5ec77f | 6136 | "quota SET quota = %s", |
d33e787c | 6137 | anfq_fields, |
6138 | 1, | |
135dcb80 | 6139 | 0, |
d33e787c | 6140 | 2, |
29028043 | 6141 | NULL, |
d33e787c | 6142 | &unfq_validate, |
6143 | }, | |
6144 | ||
6145 | { | |
6146 | /* Q_DNFQ - DELETE_NFS_QUOTA */ | |
6147 | "delete_nfs_quota", | |
6148 | "dnfq", | |
c44ddfa7 | 6149 | 2, |
d33e787c | 6150 | DELETE, |
135dcb80 | 6151 | 0, |
03c05291 | 6152 | QUOTA_TABLE, |
7ac48069 | 6153 | NULL, |
d33e787c | 6154 | anfq_fields, |
6155 | 0, | |
135dcb80 | 6156 | 0, |
d33e787c | 6157 | 2, |
29028043 | 6158 | NULL, |
d33e787c | 6159 | &dnfq_validate, |
6160 | }, | |
6161 | ||
d33e787c | 6162 | { |
d7ddc011 | 6163 | /* Q_GZCL - GET_ZEPHYR_CLASS, v2 */ |
d33e787c | 6164 | "get_zephyr_class", |
6165 | "gzcl", | |
c44ddfa7 | 6166 | 2, |
d33e787c | 6167 | RETRIEVE, |
6168 | "z", | |
03c05291 | 6169 | ZEPHYR_TABLE, |
6170 | "class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM zephyr", | |
d7ddc011 | 6171 | gzcl2_fields, |
d33e787c | 6172 | 12, |
263a36d4 | 6173 | "class LIKE '%s'", |
d33e787c | 6174 | 1, |
29028043 | 6175 | "class", |
d33e787c | 6176 | &gzcl_validate, |
03c05291 | 6177 | }, |
d33e787c | 6178 | |
6179 | { | |
d7ddc011 | 6180 | /* Q_GZCL - GET_ZEPHYR_CLASS, v5 */ |
6181 | "get_zephyr_class", | |
6182 | "gzcl", | |
6183 | 5, | |
6184 | RETRIEVE, | |
6185 | "z", | |
6186 | ZEPHYR_TABLE, | |
6187 | "class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, owner_type, owner_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM zephyr", | |
6188 | gzcl_fields, | |
6189 | 14, | |
6190 | "class LIKE '%s'", | |
6191 | 1, | |
6192 | "class", | |
6193 | &gzcl_validate, | |
6194 | }, | |
6195 | ||
6196 | { | |
6197 | /* Q_AZCL - ADD_ZEPHYR_CLASS, v2 */ | |
d33e787c | 6198 | "add_zephyr_class", |
6199 | "azcl", | |
c44ddfa7 | 6200 | 2, |
d33e787c | 6201 | APPEND, |
6202 | "z", | |
03c05291 | 6203 | ZEPHYR_TABLE, |
5eaef520 | 6204 | "INTO zephyr (class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id) VALUES ('%s', '%s', %d, '%s', %d, '%s', %d, '%s', %d)", |
d7ddc011 | 6205 | azcl2_fields, |
d33e787c | 6206 | 9, |
6207 | 0, | |
6208 | 0, | |
29028043 | 6209 | NULL, |
d7ddc011 | 6210 | &azcl2_validate, |
6211 | }, | |
6212 | ||
6213 | { | |
6214 | /* Q_AZCL - ADD_ZEPHYR_CLASS, v5 */ | |
6215 | "add_zephyr_class", | |
6216 | "azcl", | |
6217 | 5, | |
6218 | APPEND, | |
6219 | "z", | |
6220 | ZEPHYR_TABLE, | |
6221 | "INTO zephyr (class, xmt_type, xmt_id, sub_type, sub_id, iws_type, iws_id, iui_type, iui_id, owner_type, owner_id) VALUES ('%s', '%s', %d, '%s', %d, '%s', %d, '%s', %d, '%s', %d)", | |
6222 | azcl_fields, | |
6223 | 11, | |
6224 | 0, | |
6225 | 0, | |
6226 | NULL, | |
d33e787c | 6227 | &azcl_validate, |
5eaef520 | 6228 | }, |
d33e787c | 6229 | |
6230 | { | |
d7ddc011 | 6231 | /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v2 */ |
d33e787c | 6232 | "update_zephyr_class", |
6233 | "uzcl", | |
c44ddfa7 | 6234 | 2, |
d33e787c | 6235 | UPDATE, |
6236 | "z", | |
03c05291 | 6237 | ZEPHYR_TABLE, |
135dcb80 | 6238 | "zephyr SET class = '%s', xmt_type = '%s', xmt_id = %d, sub_type = '%s', sub_id = %d, iws_type = '%s', iws_id = %d, iui_type = '%s', iui_id = %d", |
d7ddc011 | 6239 | uzcl2_fields, |
d33e787c | 6240 | 9, |
99e09b48 | 6241 | "class = '%s'", |
d33e787c | 6242 | 1, |
29028043 | 6243 | NULL, |
d7ddc011 | 6244 | &uzcl2_validate, |
6245 | }, | |
6246 | ||
6247 | { | |
6248 | /* Q_UZCL - UPDATE_ZEPHYR_CLASS, v5 */ | |
6249 | "update_zephyr_class", | |
6250 | "uzcl", | |
6251 | 5, | |
6252 | UPDATE, | |
6253 | "z", | |
6254 | ZEPHYR_TABLE, | |
6255 | "zephyr SET class = '%s', xmt_type = '%s', xmt_id = %d, sub_type = '%s', sub_id = %d, iws_type = '%s', iws_id = %d, iui_type = '%s', iui_id = %d, owner_type = '%s', owner_id = %d", | |
6256 | uzcl_fields, | |
6257 | 11, | |
6258 | "class = '%s'", | |
6259 | 1, | |
6260 | NULL, | |
d33e787c | 6261 | &uzcl_validate, |
5eaef520 | 6262 | }, |
d33e787c | 6263 | |
6264 | { | |
6265 | /* Q_DZCL - DELETE_ZEPHYR_CLASS */ | |
6266 | "delete_zephyr_class", | |
6267 | "dzcl", | |
c44ddfa7 | 6268 | 2, |
d33e787c | 6269 | DELETE, |
6270 | "z", | |
03c05291 | 6271 | ZEPHYR_TABLE, |
d33e787c | 6272 | 0, |
6273 | uzcl_fields, | |
6274 | 0, | |
99e09b48 | 6275 | "class = '%s'", |
d33e787c | 6276 | 1, |
29028043 | 6277 | NULL, |
d33e787c | 6278 | &dzcl_validate, |
5eaef520 | 6279 | }, |
fd5b2340 | 6280 | |
03c05291 | 6281 | { |
5eaef520 | 6282 | /* Q_GSHA - GET_SERVER_HOST_ACCESS */ |
03c05291 | 6283 | "get_server_host_access", |
6284 | "gsha", | |
c44ddfa7 | 6285 | 2, |
03c05291 | 6286 | RETRIEVE, |
6287 | "ha", | |
6288 | HOSTACCESS_TABLE, | |
6289 | "m.name, ha.acl_type, ha.acl_id, TO_CHAR(ha.modtime, 'DD-mon-YYYY HH24:MI:SS'), ha.modby, ha.modwith FROM hostaccess ha, machine m", | |
6290 | gsha_fields, | |
6291 | 6, | |
263a36d4 | 6292 | "m.name LIKE UPPER('%s') AND ha.mach_id = m.mach_id", |
03c05291 | 6293 | 1, |
29028043 | 6294 | "m.name", |
03c05291 | 6295 | &gsha_validate, |
6296 | }, | |
6297 | ||
6298 | { | |
6299 | /* Q_ASHA - ADD_SERVER_HOST_ACCESS */ | |
6300 | "add_server_host_access", | |
6301 | "asha", | |
c44ddfa7 | 6302 | 2, |
03c05291 | 6303 | APPEND, |
6304 | "ha", | |
6305 | HOSTACCESS_TABLE, | |
5eaef520 | 6306 | "INTO hostaccess (mach_id, acl_type, acl_id) VALUES (%d, '%s', %d)", |
03c05291 | 6307 | asha_fields, |
6308 | 3, | |
6309 | 0, | |
6310 | 0, | |
29028043 | 6311 | NULL, |
03c05291 | 6312 | &asha_validate, |
6313 | }, | |
6314 | ||
6315 | { | |
6316 | /* Q_USHA - UPDATE_SERVER_HOST_ACCESS */ | |
6317 | "update_server_host_access", | |
6318 | "usha", | |
c44ddfa7 | 6319 | 2, |
03c05291 | 6320 | UPDATE, |
6321 | "ha", | |
6322 | HOSTACCESS_TABLE, | |
6323 | "hostaccess SET acl_type = '%s', acl_id = %d", | |
6324 | asha_fields, | |
6325 | 2, | |
6326 | "mach_id = %d", | |
6327 | 1, | |
29028043 | 6328 | NULL, |
03c05291 | 6329 | &asha_validate, |
6330 | }, | |
6331 | ||
6332 | { | |
6333 | /* Q_DSHA - DELETE_SERVER_HOST_ACCESS */ | |
6334 | "delete_server_host_access", | |
6335 | "dsha", | |
c44ddfa7 | 6336 | 2, |
03c05291 | 6337 | DELETE, |
6338 | "ha", | |
6339 | HOSTACCESS_TABLE, | |
6340 | 0, | |
6341 | asha_fields, | |
6342 | 0, | |
6343 | "mach_id = %d", | |
6344 | 1, | |
29028043 | 6345 | NULL, |
03c05291 | 6346 | &VDmach, |
6347 | }, | |
6348 | ||
46b6f1f6 | 6349 | { |
6350 | /* Q_GACL - GET_ACL */ | |
6351 | "get_acl", | |
6352 | "gacl", | |
c44ddfa7 | 6353 | 2, |
46b6f1f6 | 6354 | RETRIEVE, |
6355 | "ac", | |
6356 | ACL_TABLE, | |
6357 | "m.name, ac.target, ac.kind, l.name FROM acl ac, machine m, list l", | |
6358 | gacl_fields, | |
6359 | 4, | |
6360 | "m.mach_id = %d AND m.mach_id = ac.mach_id AND ac.target LIKE '%s' AND l.list_id = ac.list_id", | |
6361 | 2, | |
6362 | "m.name, ac.target, ac.kind", | |
6363 | &gacl_validate, | |
6364 | }, | |
6365 | ||
6366 | { | |
6367 | /* Q_AACL - ADD_ACL */ | |
6368 | "add_acl", | |
6369 | "aacl", | |
c44ddfa7 | 6370 | 2, |
46b6f1f6 | 6371 | APPEND, |
6372 | "ac", | |
6373 | ACL_TABLE, | |
6374 | "INTO acl (mach_id, target, kind, list_id) VALUES (%d, '%s', '%s', %d)", | |
6375 | aacl_fields, | |
6376 | 4, | |
6377 | 0, | |
6378 | 0, | |
6379 | NULL, | |
6380 | &aacl_validate, | |
6381 | }, | |
6382 | ||
6383 | { | |
6384 | /* Q_DACL - DELETE_ACL */ | |
6385 | "delete_acl", | |
6386 | "dacl", | |
c44ddfa7 | 6387 | 2, |
46b6f1f6 | 6388 | DELETE, |
6389 | "ac", | |
6390 | ACL_TABLE, | |
6391 | 0, | |
6392 | dacl_fields, | |
6393 | 0, | |
6394 | "mach_id = %d AND target = '%s'", | |
6395 | 2, | |
6396 | NULL, | |
6397 | &gacl_validate, | |
6398 | }, | |
6399 | ||
d33e787c | 6400 | { |
6401 | /* Q_GSVC - GET_SERVICE */ | |
6402 | "get_service", | |
6403 | "gsvc", | |
c44ddfa7 | 6404 | 2, |
d33e787c | 6405 | RETRIEVE, |
0c345c78 | 6406 | "ss", |
03c05291 | 6407 | SERVICES_TABLE, |
6408 | "name, protocol, port, description, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM services", | |
fd5b2340 | 6409 | gsvc_fields, |
d33e787c | 6410 | 7, |
69eb9470 | 6411 | "name LIKE '%s' AND protocol LIKE '%s'", |
6412 | 2, | |
29028043 | 6413 | "name", |
263a36d4 | 6414 | &VDfix_modby, |
d33e787c | 6415 | }, |
6416 | ||
6417 | { | |
6418 | /* Q_ASVC - ADD_SERVICE */ | |
6419 | "add_service", | |
6420 | "asvc", | |
c44ddfa7 | 6421 | 2, |
d33e787c | 6422 | APPEND, |
0c345c78 | 6423 | "ss", |
03c05291 | 6424 | SERVICES_TABLE, |
5eaef520 | 6425 | "INTO services (name, protocol, port, description) VALUES ('%s', '%s', %s, NVL('%s', CHR(0)))", |
fd5b2340 | 6426 | asvc_fields, |
d33e787c | 6427 | 4, |
7ac48069 | 6428 | NULL, |
d33e787c | 6429 | 0, |
29028043 | 6430 | NULL, |
d33e787c | 6431 | &asvc_validate, |
6432 | }, | |
6433 | ||
6434 | { | |
6435 | /* Q_DSVC - DELETE_SERVICE */ | |
6436 | "delete_service", | |
6437 | "dsvc", | |
c44ddfa7 | 6438 | 2, |
d33e787c | 6439 | DELETE, |
0c345c78 | 6440 | "ss", |
03c05291 | 6441 | SERVICES_TABLE, |
d33e787c | 6442 | 0, |
69eb9470 | 6443 | dsvc_fields, |
d33e787c | 6444 | 0, |
69eb9470 | 6445 | "name = '%s' AND protocol = '%s'", |
6446 | 2, | |
29028043 | 6447 | NULL, |
69eb9470 | 6448 | &dsvc_validate, |
d33e787c | 6449 | }, |
fd5b2340 | 6450 | |
d33e787c | 6451 | { |
2884200f | 6452 | /* Q_GPRN - GET_PRINTER */ |
6453 | "get_printer", | |
6454 | "gprn", | |
c44ddfa7 | 6455 | 2, |
d33e787c | 6456 | RETRIEVE, |
2884200f | 6457 | "pr", |
6458 | PRINTERS_TABLE, | |
e5a63571 | 6459 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 6460 | gprn_fields, |
e5a63571 | 6461 | 19, |
2884200f | 6462 | "pr.name LIKE '%s' AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
d33e787c | 6463 | 1, |
2884200f | 6464 | "pr.name", |
6465 | &VDfix_modby, | |
d33e787c | 6466 | }, |
6467 | ||
6468 | { | |
2884200f | 6469 | /* Q_GPBD - GET_PRINTER_BY_DUPLEXNAME */ |
6470 | "get_printer_by_duplexname", | |
6471 | "gpbd", | |
c44ddfa7 | 6472 | 2, |
2884200f | 6473 | RETRIEVE, |
6474 | "pr", | |
6475 | PRINTERS_TABLE, | |
e5a63571 | 6476 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 6477 | gpbd_fields, |
e5a63571 | 6478 | 19, |
2884200f | 6479 | "pr.duplexname LIKE '%s' AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
6480 | 1, | |
6481 | "pr.name", | |
6482 | &VDfix_modby, | |
fd5b2340 | 6483 | }, |
6484 | ||
6485 | { | |
2884200f | 6486 | /* Q_GPBE - GET_PRINTER_BY_ETHERNET */ |
6487 | "get_printer_by_ethernet", | |
6488 | "gpbe", | |
c44ddfa7 | 6489 | 2, |
2884200f | 6490 | RETRIEVE, |
6491 | "pr", | |
6492 | PRINTERS_TABLE, | |
e5a63571 | 6493 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 6494 | gpbd_fields, |
e5a63571 | 6495 | 19, |
59841cdb | 6496 | "m1.hwaddr LIKE LOWER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
fd5b2340 | 6497 | 1, |
2884200f | 6498 | "pr.name", |
6499 | &VDfix_modby, | |
fd5b2340 | 6500 | }, |
6501 | ||
6502 | { | |
2884200f | 6503 | /* Q_GPBH - GET_PRINTER_BY_HOSTNAME */ |
6504 | "get_printer_by_hostname", | |
6505 | "gpbh", | |
c44ddfa7 | 6506 | 2, |
fd5b2340 | 6507 | RETRIEVE, |
2884200f | 6508 | "pr", |
6509 | PRINTERS_TABLE, | |
e5a63571 | 6510 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 6511 | gpbh_fields, |
e5a63571 | 6512 | 19, |
2884200f | 6513 | "m1.name LIKE UPPER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
fd5b2340 | 6514 | 1, |
2884200f | 6515 | "pr.name", |
263a36d4 | 6516 | &VDfix_modby, |
d33e787c | 6517 | }, |
6518 | ||
6519 | { | |
2884200f | 6520 | /* Q_GPBR - GET_PRINTER_BY_RM */ |
6521 | "get_printer_by_rm", | |
6522 | "gpbr", | |
c44ddfa7 | 6523 | 2, |
2884200f | 6524 | RETRIEVE, |
6525 | "pr", | |
6526 | PRINTERS_TABLE, | |
e5a63571 | 6527 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 6528 | gpbr_fields, |
e5a63571 | 6529 | 19, |
2884200f | 6530 | "m3.name LIKE UPPER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
d33e787c | 6531 | 1, |
2884200f | 6532 | "pr.name", |
6533 | &VDfix_modby, | |
d33e787c | 6534 | }, |
6535 | ||
012fc215 | 6536 | { |
2884200f | 6537 | /* Q_GPBL - GET_PRINTER_BY_LOCATION */ |
6538 | "get_printer_by_location", | |
6539 | "gpbl", | |
c44ddfa7 | 6540 | 2, |
012fc215 | 6541 | RETRIEVE, |
2884200f | 6542 | "pr", |
6543 | PRINTERS_TABLE, | |
e5a63571 | 6544 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 6545 | gpbl_fields, |
e5a63571 | 6546 | 19, |
2884200f | 6547 | "UPPER(pr.location) LIKE UPPER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
6548 | 1, | |
6549 | "pr.name", | |
6550 | &VDfix_modby, | |
6551 | }, | |
6552 | ||
6553 | { | |
6554 | /* Q_GPBC - GET_PRINTER_BY_CONTACT */ | |
6555 | "get_printer_by_contact", | |
6556 | "gpbc", | |
c44ddfa7 | 6557 | 2, |
2884200f | 6558 | RETRIEVE, |
6559 | "pr", | |
6560 | PRINTERS_TABLE, | |
e5a63571 | 6561 | "pr.name, pr.type, pr.hwtype, pr.duplexname, m1.name, m2.name, m3.name, pr.rp, m4.name, pr.ka, pr.pc, l1.name, l2.name, pr.banner, pr.location, pr.contact, TO_CHAR(pr.modtime, 'DD-mon-YYYY HH24:MI:SS'), pr.modby, pr.modwith FROM printers pr, machine m1, machine m2, machine m3, machine m4, list l1, list l2", |
2884200f | 6562 | gpbc_fields, |
e5a63571 | 6563 | 19, |
2884200f | 6564 | "UPPER(pr.contact) LIKE UPPER('%s') AND m1.mach_id = pr.mach_id AND m2.mach_id = pr.loghost AND m3.mach_id = pr.rm AND m4.mach_id = pr.rq AND l1.list_id = pr.ac AND l2.list_id = pr.lpc_acl", |
012fc215 | 6565 | 1, |
2884200f | 6566 | "pr.name", |
263a36d4 | 6567 | &VDfix_modby, |
012fc215 | 6568 | }, |
6569 | ||
6570 | { | |
2884200f | 6571 | /* Q_APRN - ADD_PRINTER */ |
6572 | "add_printer", | |
6573 | "aprn", | |
c44ddfa7 | 6574 | 2, |
012fc215 | 6575 | APPEND, |
2884200f | 6576 | "pr", |
6577 | PRINTERS_TABLE, | |
e5a63571 | 6578 | "INTO printers (name, type, hwtype, duplexname, mach_id, loghost, rm, rp, rq, ka, pc, ac, lpc_acl, banner, location, contact) VALUES ('%s', '%s', '%s', NVL('%s', CHR(0)), %d, %d, %d, NVL('%s', CHR(0)), %d, %s, %s, %d, %d, %s, NVL('%s', CHR(0)), NVL('%s', CHR(0)))", |
2884200f | 6579 | aprn_fields, |
e5a63571 | 6580 | 16, |
012fc215 | 6581 | 0, |
6582 | 0, | |
29028043 | 6583 | NULL, |
2884200f | 6584 | &aprn_validate, |
012fc215 | 6585 | }, |
6586 | ||
1a9a0a59 | 6587 | { |
6588 | /* Q_UPRN - UPDATE_PRINTER */ | |
6589 | "update_printer", | |
6590 | "uprn", | |
c44ddfa7 | 6591 | 2, |
1a9a0a59 | 6592 | UPDATE, |
6593 | "pr", | |
6594 | PRINTERS_TABLE, | |
6595 | "printers SET name = '%s', type = '%s', hwtype = '%s', duplexname = NVL('%s', CHR(0)), mach_id = %d, loghost = %d, rm = %d, rp = NVL('%s', CHR(0)), rq = %d, ka = %d, pc = %d, ac = %d, lpc_acl = %d, banner = %d, location = NVL('%s', CHR(0)), contact = NVL('%s', CHR(0))", | |
6596 | uprn_fields, | |
6597 | 16, | |
6598 | 0, | |
6599 | 0, | |
6600 | NULL, | |
6601 | &uprn_validate, | |
6602 | }, | |
6603 | ||
012fc215 | 6604 | { |
2884200f | 6605 | /* Q_DPRN - DELETE_PRINTER */ |
6606 | "delete_printer", | |
6607 | "dprn", | |
c44ddfa7 | 6608 | 2, |
012fc215 | 6609 | DELETE, |
2884200f | 6610 | "pr", |
6611 | PRINTERS_TABLE, | |
012fc215 | 6612 | 0, |
2884200f | 6613 | aprn_fields, |
012fc215 | 6614 | 0, |
99e09b48 | 6615 | "name = '%s'", |
012fc215 | 6616 | 1, |
29028043 | 6617 | NULL, |
2884200f | 6618 | &dprn_validate, |
012fc215 | 6619 | }, |
6620 | ||
1a9a0a59 | 6621 | { |
6622 | /* Q_GPSV - GET_PRINT_SERVER */ | |
6623 | "get_print_server", | |
6624 | "gpsv", | |
c44ddfa7 | 6625 | 2, |
1a9a0a59 | 6626 | RETRIEVE, |
6627 | "ps", | |
6628 | PRINTSERVERS_TABLE, | |
6629 | "m.name, ps.kind, s.string, ps.owner_type, ps.owner_id, l.name, TO_CHAR(ps.modtime, 'DD-mon-YYYY HH24:MI:SS'), ps.modby, ps.modwith FROM printservers ps, machine m, strings s, list l", | |
6630 | gpsv_fields, | |
6631 | 9, | |
6632 | "ps.mach_id = %d AND m.mach_id = ps.mach_id AND s.string_id = ps.printer_types AND l.list_id = ps.lpc_acl", | |
6633 | 1, | |
6634 | NULL, | |
6635 | &gpsv_validate, | |
6636 | }, | |
6637 | ||
6638 | { | |
6639 | /* Q_APSV - ADD_PRINT_SERVER */ | |
6640 | "add_print_server", | |
6641 | "apsv", | |
c44ddfa7 | 6642 | 2, |
1a9a0a59 | 6643 | APPEND, |
6644 | "ps", | |
6645 | PRINTSERVERS_TABLE, | |
6646 | "INTO printservers (mach_id, kind, printer_types, owner_type, owner_id, lpc_acl) VALUES (%d, '%s', %d, '%s', %d, %d)", | |
6647 | apsv_fields, | |
6648 | 6, | |
6649 | 0, | |
6650 | 0, | |
6651 | NULL, | |
6652 | &apsv_validate, | |
6653 | }, | |
6654 | ||
6655 | { | |
6656 | /* Q_UPSV - UPDATE_PRINT_SERVER */ | |
6657 | "update_print_server", | |
6658 | "upsv", | |
c44ddfa7 | 6659 | 2, |
1a9a0a59 | 6660 | UPDATE, |
6661 | "ps", | |
6662 | PRINTSERVERS_TABLE, | |
6663 | "printservers SET kind = '%s', printer_types = %d, owner_type = '%s', owner_id = %d, lpc_acl = %d", | |
6664 | apsv_fields, | |
6665 | 5, | |
6666 | "mach_id = %d", | |
6667 | 1, | |
6668 | NULL, | |
6669 | &apsv_validate, | |
6670 | }, | |
6671 | ||
6672 | { | |
6673 | /* Q_DPSV - DELETE_PRINT_SERVER */ | |
6674 | "delete_print_server", | |
6675 | "dpsv", | |
c44ddfa7 | 6676 | 2, |
1a9a0a59 | 6677 | DELETE, |
6678 | "ps", | |
6679 | PRINTSERVERS_TABLE, | |
6680 | 0, | |
6681 | dpsv_fields, | |
6682 | 0, | |
6683 | "mach_id = %d", | |
6684 | 1, | |
6685 | NULL, | |
6686 | &dpsv_validate, | |
6687 | }, | |
6688 | ||
d33e787c | 6689 | { |
6690 | /* Q_GALI - GET_ALIAS */ | |
6691 | "get_alias", | |
6692 | "gali", | |
c44ddfa7 | 6693 | 2, |
d33e787c | 6694 | RETRIEVE, |
6695 | "a", | |
03c05291 | 6696 | ALIAS_TABLE, |
6697 | "name, type, trans FROM alias", | |
d33e787c | 6698 | gali_fields, |
6699 | 3, | |
263a36d4 | 6700 | "name LIKE '%s' AND type LIKE '%s' AND trans LIKE '%s'", |
d33e787c | 6701 | 3, |
29028043 | 6702 | "type, name, trans", |
263a36d4 | 6703 | NULL, |
d33e787c | 6704 | }, |
6705 | ||
6706 | { | |
6707 | /* Q_AALI - ADD_ALIAS */ | |
6708 | "add_alias", | |
6709 | "aali", | |
c44ddfa7 | 6710 | 2, |
d33e787c | 6711 | APPEND, |
6712 | "a", | |
03c05291 | 6713 | ALIAS_TABLE, |
4e5ec77f | 6714 | "INTO alias (name, type, trans) VALUES ('%s', '%s', '%s')", |
d33e787c | 6715 | aali_fields, |
6716 | 3, | |
7ac48069 | 6717 | NULL, |
d33e787c | 6718 | 0, |
29028043 | 6719 | NULL, |
d33e787c | 6720 | &aali_validate, |
6721 | }, | |
6722 | ||
6723 | { | |
6724 | /* Q_DALI - DELETE_ALIAS */ | |
6725 | "delete_alias", | |
6726 | "dali", | |
c44ddfa7 | 6727 | 2, |
d33e787c | 6728 | DELETE, |
6729 | "a", | |
03c05291 | 6730 | ALIAS_TABLE, |
7ac48069 | 6731 | NULL, |
d33e787c | 6732 | aali_fields, |
6733 | 0, | |
5eaef520 | 6734 | "name = '%s' AND type = '%s' AND trans = '%s'", |
d33e787c | 6735 | 3, |
29028043 | 6736 | NULL, |
d33e787c | 6737 | &dali_validate, |
6738 | }, | |
6739 | ||
6740 | { | |
6741 | /* Q_GVAL - GET_VALUE */ | |
6742 | "get_value", | |
6743 | "gval", | |
c44ddfa7 | 6744 | 2, |
d33e787c | 6745 | RETRIEVE, |
0c345c78 | 6746 | "val", |
03c05291 | 6747 | NUMVALUES_TABLE, |
6748 | "value FROM numvalues", | |
d33e787c | 6749 | gval_fields, |
6750 | 1, | |
03c05291 | 6751 | "name = '%s'", |
d33e787c | 6752 | 1, |
29028043 | 6753 | NULL, |
d33e787c | 6754 | &gval_validate, |
6755 | }, | |
6756 | ||
6757 | { | |
6758 | /* Q_AVAL - ADD_VALUE */ | |
6759 | "add_value", | |
6760 | "aval", | |
c44ddfa7 | 6761 | 2, |
d33e787c | 6762 | APPEND, |
0c345c78 | 6763 | "val", |
03c05291 | 6764 | NUMVALUES_TABLE, |
4e5ec77f | 6765 | "INTO numvalues (name, value) VALUES ('%s', %s)", |
d33e787c | 6766 | aval_fields, |
6767 | 2, | |
7ac48069 | 6768 | NULL, |
d33e787c | 6769 | 0, |
29028043 | 6770 | NULL, |
d33e787c | 6771 | &aval_validate, |
6772 | }, | |
6773 | ||
6774 | { | |
6775 | /* Q_UVAL - UPDATE_VALUE */ | |
6776 | "update_value", | |
6777 | "uval", | |
c44ddfa7 | 6778 | 2, |
d33e787c | 6779 | UPDATE, |
0c345c78 | 6780 | "val", |
03c05291 | 6781 | NUMVALUES_TABLE, |
4e5ec77f | 6782 | "numvalues SET value = %s", |
d33e787c | 6783 | aval_fields, |
6784 | 1, | |
99e09b48 | 6785 | "name = '%s'", |
d33e787c | 6786 | 1, |
29028043 | 6787 | NULL, |
d33e787c | 6788 | &aval_validate, |
6789 | }, | |
6790 | ||
6791 | { | |
6792 | /* Q_DVAL - DELETE_VALUE */ | |
6793 | "delete_value", | |
6794 | "dval", | |
c44ddfa7 | 6795 | 2, |
d33e787c | 6796 | DELETE, |
0c345c78 | 6797 | "val", |
03c05291 | 6798 | NUMVALUES_TABLE, |
7ac48069 | 6799 | NULL, |
d33e787c | 6800 | dval_fields, |
6801 | 0, | |
99e09b48 | 6802 | "name = '%s'", |
d33e787c | 6803 | 1, |
29028043 | 6804 | NULL, |
d33e787c | 6805 | &aval_validate, |
6806 | }, | |
6807 | ||
6808 | { | |
6809 | /* Q_GATS - GET_ALL_TABLE_STATS */ | |
6810 | "get_all_table_stats", | |
6811 | "gats", | |
c44ddfa7 | 6812 | 2, |
d33e787c | 6813 | RETRIEVE, |
6814 | "tbs", | |
03c05291 | 6815 | TBLSTATS_TABLE, |
6816 | "table_name, appends, updates, deletes, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS') FROM tblstats", | |
d33e787c | 6817 | gats_fields, |
45bf7573 | 6818 | 5, |
7ac48069 | 6819 | NULL, |
d33e787c | 6820 | 0, |
29028043 | 6821 | "table_name", |
d33e787c | 6822 | 0, |
6823 | }, | |
6824 | ||
2962e9ec | 6825 | { |
6826 | /* Q__SDL - _SET_DEBUG_LEVEL */ | |
6827 | "_set_debug_level", | |
6828 | "_sdl", | |
c44ddfa7 | 6829 | 2, |
2962e9ec | 6830 | UPDATE, |
7ac48069 | 6831 | NULL, |
03c05291 | 6832 | 0, |
7ac48069 | 6833 | NULL, |
2962e9ec | 6834 | _sdl_fields, |
6835 | 1, | |
7ac48069 | 6836 | NULL, |
2962e9ec | 6837 | 0, |
29028043 | 6838 | NULL, |
2962e9ec | 6839 | &_sdl_validate, |
6840 | }, | |
6841 | ||
ca3ca9c9 | 6842 | { |
6843 | /* Q_GUSL - GET_USER_SIDS_BY_LOGIN, v4 */ | |
6844 | "get_user_sids_by_login", | |
6845 | "gusl", | |
6846 | 4, | |
6847 | RETRIEVE, | |
6848 | "s", | |
6849 | USERSIDS_TABLE, | |
6850 | "u.login, us.sid, TO_CHAR(us.created, 'YYYY-MM-DD HH24:MI:SS') FROM users u, usersids us", | |
6851 | gusl_fields, | |
6852 | 3, | |
77bf4a4d | 6853 | "us.users_id = %d AND u.users_id = us.users_id AND SUBSTR(us.sid, 1, LENGTH(us.sid)-8) = '%s'", |
6854 | 2, | |
6855 | NULL, | |
ca3ca9c9 | 6856 | &gusl_validate, |
6857 | }, | |
6858 | ||
6859 | { | |
6860 | /* Q_AUSL - ADD_USER_SID_BY_LOGIN, v4 */ | |
6861 | "add_user_sid_by_login", | |
6862 | "ausl", | |
6863 | 4, | |
6864 | APPEND, | |
6865 | "s", | |
6866 | USERSIDS_TABLE, | |
6867 | "INTO usersids (users_id, sid) VALUES (%d, '%s')", | |
6868 | ausl_fields, | |
6869 | 2, | |
6870 | NULL, | |
6871 | 0, | |
6872 | NULL, | |
6873 | &ausl_validate, | |
6874 | }, | |
6875 | ||
6876 | { | |
6877 | /* Q_GLSN - GET_LIST_SIDS_BY_NAME, v4 */ | |
6878 | "get_list_sids_by_name", | |
6879 | "glsn", | |
6880 | 4, | |
6881 | RETRIEVE, | |
6882 | "s", | |
6883 | LISTSIDS_TABLE, | |
6884 | "l.name, ls.sid, TO_CHAR(ls.created, 'YYYY-MM-DD HH24:MI:SS') FROM list l, listsids ls", | |
6885 | glsn_fields, | |
6886 | 3, | |
77bf4a4d | 6887 | "ls.list_id = %d AND l.list_id = ls.list_id AND SUBSTR(ls.sid, 1, LENGTH(ls.sid)-8) = '%s'", |
6888 | 2, | |
6889 | NULL, | |
ca3ca9c9 | 6890 | &glsn_validate, |
6891 | }, | |
6892 | ||
6893 | { | |
6894 | /* Q_ALSN - ADD_LIST_SID_BY_NAME, v4 */ | |
6895 | "add_list_sid_by_name", | |
6896 | "alsn", | |
6897 | 4, | |
6898 | APPEND, | |
6899 | "s", | |
6900 | LISTSIDS_TABLE, | |
6901 | "INTO listsids (list_id, sid) VALUES (%d, '%s')", | |
6902 | alsn_fields, | |
6903 | 2, | |
6904 | NULL, | |
6905 | 0, | |
6906 | NULL, | |
6907 | &alsn_validate, | |
6908 | }, | |
6909 | ||
77bf4a4d | 6910 | { |
6911 | /* Q_GDDS - GET_DISTINCT_DOMAIN_SIDS, v4 */ | |
6912 | "get_distinct_domain_sids", | |
6913 | "gdds", | |
6914 | 4, | |
6915 | RETRIEVE, | |
6916 | "s", | |
6917 | USERSIDS_TABLE, | |
6918 | "DISTINCT SUBSTR(sid, 1, LENGTH(sid)-8) FROM usersids", | |
6919 | gdds_fields, | |
6920 | 1, | |
6921 | NULL, | |
6922 | 0, | |
6923 | NULL, | |
6924 | NULL, | |
6925 | }, | |
6926 | ||
2fb668b0 | 6927 | { |
6928 | /* Q_GCON - GET_CONTAINER, v7 */ | |
6929 | "get_container", | |
6930 | "gcon", | |
6931 | 7, | |
6932 | RETRIEVE, | |
6933 | "c", | |
6934 | CONTAINERS_TABLE, | |
6935 | "name, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, TO_CHAR(modtime, 'DD-mon-YYYY HH24:MI:SS'), modby, modwith FROM containers", | |
6936 | gcon_fields, | |
6937 | 11, | |
6938 | "name = '%s' AND cnt_id != 0", | |
6939 | 1, | |
6940 | NULL, | |
6941 | &gcon_validate, | |
6942 | }, | |
6943 | ||
6944 | { | |
6945 | /* Q_ACON - ADD_CONTAINER, v7 */ /* uses prefetch_value() for cnt_id */ | |
6946 | "add_container", | |
6947 | "acon", | |
6948 | 7, | |
6949 | APPEND, | |
6950 | "c", | |
6951 | CONTAINERS_TABLE, | |
6952 | "INTO containers (name, description, location, contact, acl_type, acl_id, memacl_type, memacl_id, cnt_id) VALUES ('%s', NVL('%s', CHR(0)), NVL('%s', CHR(0)), NVL('%s', CHR(0)), '%s', %d, '%s', %d, %s)", | |
6953 | acon_fields, | |
6954 | 8, | |
6955 | 0, | |
6956 | 0, | |
6957 | NULL, | |
6958 | &acon_validate, | |
6959 | }, | |
6960 | ||
6961 | { | |
6962 | /* Q_UCON - UPDATE_CONTAINER, v7 */ | |
6963 | "update_container", | |
6964 | "ucon", | |
6965 | 7, | |
6966 | UPDATE, | |
6967 | 0, | |
6968 | CONTAINERS_TABLE, | |
6969 | 0, | |
6970 | ucon_fields, | |
6971 | 8, | |
6972 | 0, | |
6973 | 1, | |
6974 | NULL, | |
6975 | &ucon_validate, | |
6976 | }, | |
6977 | ||
6978 | { | |
6979 | /* Q_DCON - DELETE_CONTAINER, v7 */ | |
6980 | "delete_container", | |
6981 | "dcon", | |
6982 | 7, | |
6983 | DELETE, | |
6984 | "c", | |
6985 | CONTAINERS_TABLE, | |
6986 | NULL, | |
6987 | dcon_fields, | |
6988 | 0, | |
6989 | "cnt_id = %d", | |
6990 | 1, | |
6991 | NULL, | |
6992 | &dcon_validate, | |
6993 | }, | |
6994 | ||
6995 | { | |
6996 | /* Q_AMCN - ADD_MACHINE_TO_CONTAINER, v7 */ | |
6997 | "add_machine_to_container", | |
6998 | "amcn", | |
6999 | 7, | |
7000 | APPEND, | |
7001 | "mcn", | |
7002 | MCNTMAP_TABLE, | |
7003 | "INTO mcntmap (mach_id, cnt_id) VALUES (%d, %d)", | |
7004 | amcn_fields, | |
7005 | 2, | |
7006 | 0, | |
7007 | 0, | |
7008 | NULL, | |
7009 | &amcn_validate, | |
7010 | }, | |
7011 | ||
7012 | { | |
7013 | /* Q_DMCN - DELETE_MACHINE_FROM_CONTAINER, v7 */ | |
7014 | "delete_machine_from_container", | |
7015 | "dmcn", | |
7016 | 7, | |
7017 | DELETE, | |
7018 | "mcn", | |
7019 | MCNTMAP_TABLE, | |
7020 | 0, | |
7021 | amcn_fields, | |
7022 | 0, | |
7023 | "mach_id = %d AND cnt_id = %d", | |
7024 | 2, | |
7025 | NULL, | |
d16a0628 | 7026 | &dmcn_validate, |
2fb668b0 | 7027 | }, |
7028 | ||
7029 | { | |
7030 | /* Q_GMNM - GET_MACHINE_TO_CONTAINER_MAP, v7 */ | |
7031 | "get_machine_to_container_map", | |
7032 | "gmnm", | |
7033 | 7, | |
7034 | RETRIEVE, | |
7035 | "mcn", | |
7036 | MCNTMAP_TABLE, | |
7807f2e6 | 7037 | "m.name, c.name FROM machine m, containers c, mcntmap mcn", |
7038 | gmnm_fields, | |
7039 | 2, | |
2fb668b0 | 7040 | "m.name = UPPER('%s') AND mcn.cnt_id = c.cnt_id AND mcn.mach_id = m.mach_id", |
7041 | 1, | |
7042 | NULL, | |
7043 | NULL, | |
7044 | }, | |
7045 | ||
7046 | { | |
7047 | /* Q_GMOC - GET_MACHINES_OF_CONTAINER, v7 */ | |
7048 | "get_machines_of_container", | |
7049 | "gmoc", | |
7050 | 7, | |
7051 | RETRIEVE, | |
7052 | NULL, | |
7053 | MCNTMAP_TABLE, | |
7054 | NULL, | |
7055 | gmoc_fields, | |
7056 | 2, | |
7057 | NULL, | |
7058 | 2, | |
7059 | NULL, | |
7060 | &gmoc_validate, | |
7061 | }, | |
7062 | ||
7063 | { | |
7064 | /* Q_GSOC - GET_SUBCONTAINERS_OF_CONTAINER, v7 */ | |
7065 | "get_subcontainers_of_container", | |
7066 | "gsoc", | |
7067 | 7, | |
7068 | RETRIEVE, | |
7069 | NULL, | |
7070 | CONTAINERS_TABLE, | |
7071 | NULL, | |
7072 | gsoc_fields, | |
7073 | 1, | |
7074 | NULL, | |
7075 | 2, | |
7076 | NULL, | |
7077 | &gsoc_validate, | |
7078 | }, | |
7079 | ||
0ef13dc2 | 7080 | { |
52581841 | 7081 | /* Q_GTLC - GET_TOPLEVEL_CONTAINERS, v7 */ |
0ef13dc2 | 7082 | "get_toplevel_containers", |
7083 | "gtlc", | |
52581841 | 7084 | 7, |
0ef13dc2 | 7085 | RETRIEVE, |
7086 | "c", | |
7087 | CONTAINERS_TABLE, | |
7088 | "name FROM containers", | |
7089 | gtlc_fields, | |
7090 | 1, | |
7091 | "name NOT LIKE '%%/%%'", | |
7092 | 0, | |
7093 | "name", | |
7094 | NULL, | |
7095 | }, | |
7096 | ||
d33e787c | 7097 | }; |
7098 | ||
c44ddfa7 | 7099 | int QueryCount = (sizeof(Queries) / sizeof(struct query)); |