8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / krb5 / kadmin / cli / kadmin_loc.c
blob6946a45c5bfe656d2d7c4f888a6bb0f327950ff1
1 /*
2 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
4 */
6 #pragma ident "%Z%%M% %I% %E% SMI"
8 /*
9 * Contains kadmin.local specific code.
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <libintl.h>
15 #include <db.h>
16 #include <krb5.h>
19 void
20 usage(char *whoami)
22 fprintf(stderr,
23 "%s: %s [-r realm] [-p principal] [-q query] "
24 "[-d dbname] [-e \"enc:salt ...\"] [-m] [-D]\n",
25 gettext("Usage"), whoami);
26 exit(1);
31 * Debugging function
32 * Turns on low level debugging in db module
33 * Requires that db library be compiled with -DDEBUG_DB flag
35 /* ARGSUSED */
36 void
37 debugEnable(int displayMsgs)
40 #if DEBUG_DB
41 debugDisplayDB(displayMsgs);
42 #endif
44 #if DEBUG
45 /* Solaris Kerberos: not supported */
46 /* debugDisplaySS(displayMsgs); */
47 #endif
51 void
52 kadmin_getprivs(argc, argv)
53 int argc;
54 char *argv[];
56 static char *privs[] = {"GET", "ADD", "MODIFY", "DELETE", "LIST",
57 "CHANGEPW"};
58 krb5_error_code retval;
59 int i;
60 long plist;
62 /* for kadmin.local return all privilages */
64 printf(gettext("current privileges:"));
65 for (i = 0; i < sizeof (privs) / 4; i++) {
66 printf(" %s", gettext(privs[i]));
68 printf("\n");