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