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