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