No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / kadmin / kadmin-commands.c
blob038f6597a64b2e1acd118c84a0c8d3cbb94f3b2a
1 #include <stdio.h>
2 #include <getarg.h>
3 #include <sl.h>
4 #include "kadmin-commands.h"
6 static int
7 stash_wrap(int argc, char **argv)
9 struct stash_options opt;
10 int ret;
11 int optidx = 0;
12 struct getargs args[] = {
13 { "enctype", 'e', arg_string, NULL, "encryption type", NULL },
14 { "key-file", 'k', arg_string, NULL, "master key file", "file" },
15 { "convert-file", 0, arg_flag, NULL, "just convert keyfile to new format", NULL },
16 { "master-key-fd", 0, arg_integer, NULL, "filedescriptor to read passphrase from", "fd" },
17 { "help", 'h', arg_flag, NULL, NULL, NULL }
19 int help_flag = 0;
20 opt.enctype_string = "des3-cbc-sha1";
21 opt.key_file_string = NULL;
22 opt.convert_file_flag = 0;
23 opt.master_key_fd_integer = -1;
24 args[0].value = &opt.enctype_string;
25 args[1].value = &opt.key_file_string;
26 args[2].value = &opt.convert_file_flag;
27 args[3].value = &opt.master_key_fd_integer;
28 args[4].value = &help_flag;
29 if(getarg(args, 5, argc, argv, &optidx))
30 goto usage;
31 if(argc - optidx > 0) {
32 fprintf(stderr, "Arguments given (%u) are more than expected (0).\n\n", argc - optidx);
33 goto usage;
35 if(help_flag)
36 goto usage;
37 ret = stash(&opt, argc - optidx, argv + optidx);
38 return ret;
39 usage:
40 arg_printusage (args, 5, "stash", "");
41 return 0;
44 static int
45 dump_wrap(int argc, char **argv)
47 struct dump_options opt;
48 int ret;
49 int optidx = 0;
50 struct getargs args[] = {
51 { "decrypt", 'd', arg_flag, NULL, "decrypt keys", NULL },
52 { "help", 'h', arg_flag, NULL, NULL, NULL }
54 int help_flag = 0;
55 opt.decrypt_flag = 0;
56 args[0].value = &opt.decrypt_flag;
57 args[1].value = &help_flag;
58 if(getarg(args, 2, argc, argv, &optidx))
59 goto usage;
60 if(argc - optidx > 1) {
61 fprintf(stderr, "Arguments given (%u) are more than expected (1).\n\n", argc - optidx);
62 goto usage;
64 if(argc - optidx < 0) {
65 fprintf(stderr, "Arguments given (%u) are less than expected (0).\n\n", argc - optidx);
66 goto usage;
68 if(help_flag)
69 goto usage;
70 ret = dump(&opt, argc - optidx, argv + optidx);
71 return ret;
72 usage:
73 arg_printusage (args, 2, "dump", "[dump-file]");
74 return 0;
77 static int
78 init_wrap(int argc, char **argv)
80 struct init_options opt;
81 int ret;
82 int optidx = 0;
83 struct getargs args[] = {
84 { "realm-max-ticket-life", 0, arg_string, NULL, "realm max ticket lifetime", NULL },
85 { "realm-max-renewable-life", 0, arg_string, NULL, "realm max renewable lifetime", NULL },
86 { "help", 'h', arg_flag, NULL, NULL, NULL }
88 int help_flag = 0;
89 opt.realm_max_ticket_life_string = NULL;
90 opt.realm_max_renewable_life_string = NULL;
91 args[0].value = &opt.realm_max_ticket_life_string;
92 args[1].value = &opt.realm_max_renewable_life_string;
93 args[2].value = &help_flag;
94 if(getarg(args, 3, argc, argv, &optidx))
95 goto usage;
96 if(argc - optidx < 1) {
97 fprintf(stderr, "Arguments given (%u) are less than expected (1).\n\n", argc - optidx);
98 goto usage;
100 if(help_flag)
101 goto usage;
102 ret = init(&opt, argc - optidx, argv + optidx);
103 return ret;
104 usage:
105 arg_printusage (args, 3, "init", "realm...");
106 return 0;
109 static int
110 load_wrap(int argc, char **argv)
112 int ret;
113 int optidx = 0;
114 struct getargs args[] = {
115 { "help", 'h', arg_flag, NULL, NULL, NULL }
117 int help_flag = 0;
118 args[0].value = &help_flag;
119 if(getarg(args, 1, argc, argv, &optidx))
120 goto usage;
121 if(argc - optidx != 1) {
122 fprintf(stderr, "Need exactly 1 parameters (%u given).\n\n", argc - optidx);
123 goto usage;
125 if(help_flag)
126 goto usage;
127 ret = load(NULL, argc - optidx, argv + optidx);
128 return ret;
129 usage:
130 arg_printusage (args, 1, "load", "file");
131 return 0;
134 static int
135 merge_wrap(int argc, char **argv)
137 int ret;
138 int optidx = 0;
139 struct getargs args[] = {
140 { "help", 'h', arg_flag, NULL, NULL, NULL }
142 int help_flag = 0;
143 args[0].value = &help_flag;
144 if(getarg(args, 1, argc, argv, &optidx))
145 goto usage;
146 if(argc - optidx != 1) {
147 fprintf(stderr, "Need exactly 1 parameters (%u given).\n\n", argc - optidx);
148 goto usage;
150 if(help_flag)
151 goto usage;
152 ret = merge(NULL, argc - optidx, argv + optidx);
153 return ret;
154 usage:
155 arg_printusage (args, 1, "merge", "file");
156 return 0;
159 static int
160 add_wrap(int argc, char **argv)
162 struct add_options opt;
163 int ret;
164 int optidx = 0;
165 struct getargs args[] = {
166 { "random-key", 'r', arg_flag, NULL, "set random key", NULL },
167 { "random-password", 0, arg_flag, NULL, "set random password", NULL },
168 { "password", 'p', arg_string, NULL, "principal's password", NULL },
169 { "key", 0, arg_string, NULL, "DES-key in hex", NULL },
170 { "max-ticket-life", 0, arg_string, NULL, "max ticket lifetime", "lifetime" },
171 { "max-renewable-life", 0, arg_string, NULL, "max renewable life", "lifetime" },
172 { "attributes", 0, arg_string, NULL, "principal attributes", "attributes" },
173 { "expiration-time", 0, arg_string, NULL, "principal expiration time", "time" },
174 { "pw-expiration-time", 0, arg_string, NULL, "password expiration time", "time" },
175 { "use-defaults", 0, arg_flag, NULL, "use default values", NULL },
176 { "help", 'h', arg_flag, NULL, NULL, NULL }
178 int help_flag = 0;
179 opt.random_key_flag = 0;
180 opt.random_password_flag = 0;
181 opt.password_string = NULL;
182 opt.key_string = NULL;
183 opt.max_ticket_life_string = NULL;
184 opt.max_renewable_life_string = NULL;
185 opt.attributes_string = NULL;
186 opt.expiration_time_string = NULL;
187 opt.pw_expiration_time_string = NULL;
188 opt.use_defaults_flag = 0;
189 args[0].value = &opt.random_key_flag;
190 args[1].value = &opt.random_password_flag;
191 args[2].value = &opt.password_string;
192 args[3].value = &opt.key_string;
193 args[4].value = &opt.max_ticket_life_string;
194 args[5].value = &opt.max_renewable_life_string;
195 args[6].value = &opt.attributes_string;
196 args[7].value = &opt.expiration_time_string;
197 args[8].value = &opt.pw_expiration_time_string;
198 args[9].value = &opt.use_defaults_flag;
199 args[10].value = &help_flag;
200 if(getarg(args, 11, argc, argv, &optidx))
201 goto usage;
202 if(argc - optidx < 1) {
203 fprintf(stderr, "Arguments given (%u) are less than expected (1).\n\n", argc - optidx);
204 goto usage;
206 if(help_flag)
207 goto usage;
208 ret = add_new_key(&opt, argc - optidx, argv + optidx);
209 return ret;
210 usage:
211 arg_printusage (args, 11, "add", "principal...");
212 return 0;
215 static int
216 passwd_wrap(int argc, char **argv)
218 struct passwd_options opt;
219 int ret;
220 int optidx = 0;
221 struct getargs args[] = {
222 { "random-key", 'r', arg_flag, NULL, "set random key", NULL },
223 { "random-password", 0, arg_flag, NULL, "set random password", NULL },
224 { "password", 'p', arg_string, NULL, "princial's password", NULL },
225 { "key", 0, arg_string, NULL, "DES key in hex", NULL },
226 { "help", 'h', arg_flag, NULL, NULL, NULL }
228 int help_flag = 0;
229 opt.random_key_flag = 0;
230 opt.random_password_flag = 0;
231 opt.password_string = NULL;
232 opt.key_string = NULL;
233 args[0].value = &opt.random_key_flag;
234 args[1].value = &opt.random_password_flag;
235 args[2].value = &opt.password_string;
236 args[3].value = &opt.key_string;
237 args[4].value = &help_flag;
238 if(getarg(args, 5, argc, argv, &optidx))
239 goto usage;
240 if(argc - optidx < 1) {
241 fprintf(stderr, "Arguments given (%u) are less than expected (1).\n\n", argc - optidx);
242 goto usage;
244 if(help_flag)
245 goto usage;
246 ret = cpw_entry(&opt, argc - optidx, argv + optidx);
247 return ret;
248 usage:
249 arg_printusage (args, 5, "passwd", "principal...");
250 return 0;
253 static int
254 delete_wrap(int argc, char **argv)
256 int ret;
257 int optidx = 0;
258 struct getargs args[] = {
259 { "help", 'h', arg_flag, NULL, NULL, NULL }
261 int help_flag = 0;
262 args[0].value = &help_flag;
263 if(getarg(args, 1, argc, argv, &optidx))
264 goto usage;
265 if(argc - optidx < 1) {
266 fprintf(stderr, "Arguments given (%u) are less than expected (1).\n\n", argc - optidx);
267 goto usage;
269 if(help_flag)
270 goto usage;
271 ret = del_entry(NULL, argc - optidx, argv + optidx);
272 return ret;
273 usage:
274 arg_printusage (args, 1, "delete", "principal...");
275 return 0;
278 static int
279 del_enctype_wrap(int argc, char **argv)
281 int ret;
282 int optidx = 0;
283 struct getargs args[] = {
284 { "help", 'h', arg_flag, NULL, NULL, NULL }
286 int help_flag = 0;
287 args[0].value = &help_flag;
288 if(getarg(args, 1, argc, argv, &optidx))
289 goto usage;
290 if(argc - optidx < 2) {
291 fprintf(stderr, "Arguments given (%u) are less than expected (2).\n\n", argc - optidx);
292 goto usage;
294 if(help_flag)
295 goto usage;
296 ret = del_enctype(NULL, argc - optidx, argv + optidx);
297 return ret;
298 usage:
299 arg_printusage (args, 1, "del_enctype", "principal enctype...");
300 return 0;
303 static int
304 add_enctype_wrap(int argc, char **argv)
306 struct add_enctype_options opt;
307 int ret;
308 int optidx = 0;
309 struct getargs args[] = {
310 { "random-key", 'r', arg_flag, NULL, "set random key", NULL },
311 { "help", 'h', arg_flag, NULL, NULL, NULL }
313 int help_flag = 0;
314 opt.random_key_flag = 0;
315 args[0].value = &opt.random_key_flag;
316 args[1].value = &help_flag;
317 if(getarg(args, 2, argc, argv, &optidx))
318 goto usage;
319 if(argc - optidx < 2) {
320 fprintf(stderr, "Arguments given (%u) are less than expected (2).\n\n", argc - optidx);
321 goto usage;
323 if(help_flag)
324 goto usage;
325 ret = add_enctype(&opt, argc - optidx, argv + optidx);
326 return ret;
327 usage:
328 arg_printusage (args, 2, "add_enctype", "principal enctype...");
329 return 0;
332 static int
333 ext_keytab_wrap(int argc, char **argv)
335 struct ext_keytab_options opt;
336 int ret;
337 int optidx = 0;
338 struct getargs args[] = {
339 { "keytab", 'k', arg_string, NULL, "keytab to use", NULL },
340 { "help", 'h', arg_flag, NULL, NULL, NULL }
342 int help_flag = 0;
343 opt.keytab_string = NULL;
344 args[0].value = &opt.keytab_string;
345 args[1].value = &help_flag;
346 if(getarg(args, 2, argc, argv, &optidx))
347 goto usage;
348 if(argc - optidx < 1) {
349 fprintf(stderr, "Arguments given (%u) are less than expected (1).\n\n", argc - optidx);
350 goto usage;
352 if(help_flag)
353 goto usage;
354 ret = ext_keytab(&opt, argc - optidx, argv + optidx);
355 return ret;
356 usage:
357 arg_printusage (args, 2, "ext_keytab", "principal...");
358 return 0;
361 static int
362 get_wrap(int argc, char **argv)
364 struct get_options opt;
365 int ret;
366 int optidx = 0;
367 struct getargs args[] = {
368 { "long", 'l', arg_flag, NULL, "long format", NULL },
369 { "short", 's', arg_flag, NULL, "short format", NULL },
370 { "terse", 't', arg_flag, NULL, "terse format", NULL },
371 { "column-info", 'o', arg_string, NULL, "columns to print for short output", NULL },
372 { "help", 'h', arg_flag, NULL, NULL, NULL }
374 int help_flag = 0;
375 opt.long_flag = -1;
376 opt.short_flag = 0;
377 opt.terse_flag = 0;
378 opt.column_info_string = NULL;
379 args[0].value = &opt.long_flag;
380 args[1].value = &opt.short_flag;
381 args[2].value = &opt.terse_flag;
382 args[3].value = &opt.column_info_string;
383 args[4].value = &help_flag;
384 if(getarg(args, 5, argc, argv, &optidx))
385 goto usage;
386 if(argc - optidx < 1) {
387 fprintf(stderr, "Arguments given (%u) are less than expected (1).\n\n", argc - optidx);
388 goto usage;
390 if(help_flag)
391 goto usage;
392 ret = get_entry(&opt, argc - optidx, argv + optidx);
393 return ret;
394 usage:
395 arg_printusage (args, 5, "get", "principal...");
396 return 0;
399 static int
400 rename_wrap(int argc, char **argv)
402 int ret;
403 int optidx = 0;
404 struct getargs args[] = {
405 { "help", 'h', arg_flag, NULL, NULL, NULL }
407 int help_flag = 0;
408 args[0].value = &help_flag;
409 if(getarg(args, 1, argc, argv, &optidx))
410 goto usage;
411 if(argc - optidx != 2) {
412 fprintf(stderr, "Need exactly 2 parameters (%u given).\n\n", argc - optidx);
413 goto usage;
415 if(help_flag)
416 goto usage;
417 ret = rename_entry(NULL, argc - optidx, argv + optidx);
418 return ret;
419 usage:
420 arg_printusage (args, 1, "rename", "from to");
421 return 0;
424 static int
425 modify_wrap(int argc, char **argv)
427 struct modify_options opt;
428 int ret;
429 int optidx = 0;
430 struct getargs args[] = {
431 { "max-ticket-life", 0, arg_string, NULL, "max ticket lifetime", "lifetime" },
432 { "max-renewable-life", 0, arg_string, NULL, "max renewable life", "lifetime" },
433 { "attributes", 'a', arg_string, NULL, "principal attributes", "attributes" },
434 { "expiration-time", 0, arg_string, NULL, "principal expiration time", "time" },
435 { "pw-expiration-time", 0, arg_string, NULL, "password expiration time", "time" },
436 { "kvno", 0, arg_integer, NULL, "key version number", NULL },
437 { "constrained-delegation", 0, arg_strings, NULL, "allowed target principals", "principal" },
438 { "alias", 0, arg_strings, NULL, "aliases", "principal" },
439 { "pkinit-acl", 0, arg_strings, NULL, "aliases", "subject dn" },
440 { "help", 'h', arg_flag, NULL, NULL, NULL }
442 int help_flag = 0;
443 opt.max_ticket_life_string = NULL;
444 opt.max_renewable_life_string = NULL;
445 opt.attributes_string = NULL;
446 opt.expiration_time_string = NULL;
447 opt.pw_expiration_time_string = NULL;
448 opt.kvno_integer = -1;
449 opt.constrained_delegation_strings.num_strings = 0;
450 opt.constrained_delegation_strings.strings = NULL;
451 opt.alias_strings.num_strings = 0;
452 opt.alias_strings.strings = NULL;
453 opt.pkinit_acl_strings.num_strings = 0;
454 opt.pkinit_acl_strings.strings = NULL;
455 args[0].value = &opt.max_ticket_life_string;
456 args[1].value = &opt.max_renewable_life_string;
457 args[2].value = &opt.attributes_string;
458 args[3].value = &opt.expiration_time_string;
459 args[4].value = &opt.pw_expiration_time_string;
460 args[5].value = &opt.kvno_integer;
461 args[6].value = &opt.constrained_delegation_strings;
462 args[7].value = &opt.alias_strings;
463 args[8].value = &opt.pkinit_acl_strings;
464 args[9].value = &help_flag;
465 if(getarg(args, 10, argc, argv, &optidx))
466 goto usage;
467 if(argc - optidx != 1) {
468 fprintf(stderr, "Need exactly 1 parameters (%u given).\n\n", argc - optidx);
469 goto usage;
471 if(help_flag)
472 goto usage;
473 ret = mod_entry(&opt, argc - optidx, argv + optidx);
474 free_getarg_strings (&opt.constrained_delegation_strings);
475 free_getarg_strings (&opt.alias_strings);
476 free_getarg_strings (&opt.pkinit_acl_strings);
477 return ret;
478 usage:
479 arg_printusage (args, 10, "modify", "principal");
480 free_getarg_strings (&opt.constrained_delegation_strings);
481 free_getarg_strings (&opt.alias_strings);
482 free_getarg_strings (&opt.pkinit_acl_strings);
483 return 0;
486 static int
487 privileges_wrap(int argc, char **argv)
489 int ret;
490 int optidx = 0;
491 struct getargs args[] = {
492 { "help", 'h', arg_flag, NULL, NULL, NULL }
494 int help_flag = 0;
495 args[0].value = &help_flag;
496 if(getarg(args, 1, argc, argv, &optidx))
497 goto usage;
498 if(argc - optidx > 0) {
499 fprintf(stderr, "Arguments given (%u) are more than expected (0).\n\n", argc - optidx);
500 goto usage;
502 if(help_flag)
503 goto usage;
504 ret = get_privs(NULL, argc - optidx, argv + optidx);
505 return ret;
506 usage:
507 arg_printusage (args, 1, "privileges", "");
508 return 0;
511 static int
512 list_wrap(int argc, char **argv)
514 struct list_options opt;
515 int ret;
516 int optidx = 0;
517 struct getargs args[] = {
518 { "long", 'l', arg_flag, NULL, "long format", NULL },
519 { "short", 's', arg_flag, NULL, "short format", NULL },
520 { "terse", 't', arg_flag, NULL, "terse format", NULL },
521 { "column-info", 'o', arg_string, NULL, "columns to print for short output", NULL },
522 { "help", 'h', arg_flag, NULL, NULL, NULL }
524 int help_flag = 0;
525 opt.long_flag = 0;
526 opt.short_flag = 0;
527 opt.terse_flag = -1;
528 opt.column_info_string = NULL;
529 args[0].value = &opt.long_flag;
530 args[1].value = &opt.short_flag;
531 args[2].value = &opt.terse_flag;
532 args[3].value = &opt.column_info_string;
533 args[4].value = &help_flag;
534 if(getarg(args, 5, argc, argv, &optidx))
535 goto usage;
536 if(argc - optidx < 1) {
537 fprintf(stderr, "Arguments given (%u) are less than expected (1).\n\n", argc - optidx);
538 goto usage;
540 if(help_flag)
541 goto usage;
542 ret = list_princs(&opt, argc - optidx, argv + optidx);
543 return ret;
544 usage:
545 arg_printusage (args, 5, "list", "principal...");
546 return 0;
549 static int
550 verify_password_quality_wrap(int argc, char **argv)
552 int ret;
553 int optidx = 0;
554 struct getargs args[] = {
555 { "help", 'h', arg_flag, NULL, NULL, NULL }
557 int help_flag = 0;
558 args[0].value = &help_flag;
559 if(getarg(args, 1, argc, argv, &optidx))
560 goto usage;
561 if(argc - optidx != 2) {
562 fprintf(stderr, "Need exactly 2 parameters (%u given).\n\n", argc - optidx);
563 goto usage;
565 if(help_flag)
566 goto usage;
567 ret = password_quality(NULL, argc - optidx, argv + optidx);
568 return ret;
569 usage:
570 arg_printusage (args, 1, "verify-password-quality", "principal password");
571 return 0;
574 static int
575 check_wrap(int argc, char **argv)
577 int ret;
578 int optidx = 0;
579 struct getargs args[] = {
580 { "help", 'h', arg_flag, NULL, NULL, NULL }
582 int help_flag = 0;
583 args[0].value = &help_flag;
584 if(getarg(args, 1, argc, argv, &optidx))
585 goto usage;
586 if(argc - optidx > 1) {
587 fprintf(stderr, "Arguments given (%u) are more than expected (1).\n\n", argc - optidx);
588 goto usage;
590 if(argc - optidx < 0) {
591 fprintf(stderr, "Arguments given (%u) are less than expected (0).\n\n", argc - optidx);
592 goto usage;
594 if(help_flag)
595 goto usage;
596 ret = check(NULL, argc - optidx, argv + optidx);
597 return ret;
598 usage:
599 arg_printusage (args, 1, "check", "[realm]");
600 return 0;
603 static int
604 help_wrap(int argc, char **argv)
606 int ret;
607 int optidx = 0;
608 struct getargs args[] = {
609 { "help", 'h', arg_flag, NULL, NULL, NULL }
611 int help_flag = 0;
612 args[0].value = &help_flag;
613 if(getarg(args, 1, argc, argv, &optidx))
614 goto usage;
615 if(argc - optidx > 1) {
616 fprintf(stderr, "Arguments given (%u) are more than expected (1).\n\n", argc - optidx);
617 goto usage;
619 if(argc - optidx < 0) {
620 fprintf(stderr, "Arguments given (%u) are less than expected (0).\n\n", argc - optidx);
621 goto usage;
623 if(help_flag)
624 goto usage;
625 ret = help(NULL, argc - optidx, argv + optidx);
626 return ret;
627 usage:
628 arg_printusage (args, 1, "help", "[command]");
629 return 0;
632 static int
633 exit_wrap(int argc, char **argv)
635 int ret;
636 int optidx = 0;
637 struct getargs args[] = {
638 { "help", 'h', arg_flag, NULL, NULL, NULL }
640 int help_flag = 0;
641 args[0].value = &help_flag;
642 if(getarg(args, 1, argc, argv, &optidx))
643 goto usage;
644 if(argc - optidx > 0) {
645 fprintf(stderr, "Arguments given (%u) are more than expected (0).\n\n", argc - optidx);
646 goto usage;
648 if(help_flag)
649 goto usage;
650 ret = exit_kadmin(NULL, argc - optidx, argv + optidx);
651 return ret;
652 usage:
653 arg_printusage (args, 1, "exit", "");
654 return 0;
657 SL_cmd commands[] = {
658 { "stash", stash_wrap, "stash", "Writes the Kerberos master key to a file used by the KDC. \nLocal (-l) mode only." },
659 { "kstash" },
661 { "dump", dump_wrap, "dump [dump-file]", "Dumps the database in a human readable format to the specified file, \nor the standard out. Local (-l) mode only." },
663 { "init", init_wrap, "init realm...", "Initializes the default principals for a realm. Creates the database\nif necessary. Local (-l) mode only." },
665 { "load", load_wrap, "load file", "Loads a previously dumped file. Local (-l) mode only." },
667 { "merge", merge_wrap, "merge file", "Merges the contents of a dump file into the database. Local (-l) mode only." },
669 { "add", add_wrap, "add principal...", "Adds a principal to the database." },
670 { "ank" },
671 { "add_new_key" },
673 { "passwd", passwd_wrap, "passwd principal...", "Changes the password of one or more principals matching the expressions." },
674 { "cpw" },
675 { "change_password" },
677 { "delete", delete_wrap, "delete principal...", "Deletes all principals matching the expressions." },
678 { "del" },
679 { "del_entry" },
681 { "del_enctype", del_enctype_wrap, "del_enctype principal enctype...", "Delete all the mentioned enctypes for principal." },
683 { "add_enctype", add_enctype_wrap, "add_enctype principal enctype...", "Add new enctypes for principal." },
685 { "ext_keytab", ext_keytab_wrap, "ext_keytab principal...", "Extracts the keys of all principals matching the expressions, and stores them in a keytab." },
687 { "get", get_wrap, "get principal...", "Shows information about principals matching the expressions." },
688 { "get_entry" },
690 { "rename", rename_wrap, "rename from to", "Renames a principal." },
692 { "modify", modify_wrap, "modify principal", "Modifies some attributes of the specified principal." },
694 { "privileges", privileges_wrap, "privileges", "Shows which operations you are allowed to perform." },
695 { "privs" },
697 { "list", list_wrap, "list principal...", "Lists principals in a terse format. Equivalent to \"get -t\"." },
699 { "verify-password-quality", verify_password_quality_wrap, "verify-password-quality principal password", "Try run the password quality function locally (not doing RPC out to server)." },
700 { "pwq" },
702 { "check", check_wrap, "check [realm]", "Check the realm (if not given, the default realm) for configuration errors." },
704 { "help", help_wrap, "help [command]", "Help! I need somebody." },
705 { "?" },
707 { "exit", exit_wrap, "exit", "Quits." },
708 { "quit" },
710 { NULL }