summaryrefslogtreecommitdiffstats
path: root/src/kadmin/cli
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
committerTom Yu <tlyu@mit.edu>2009-10-31 00:48:38 +0000
commit02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch)
tree61b9147863cd8be3eff63903dc36cae168254bd5 /src/kadmin/cli
parent162ab371748cba0cc6f172419bd6e71fa04bb878 (diff)
downloadkrb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.xz
krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip
make mark-cstyle
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/cli')
-rw-r--r--src/kadmin/cli/kadmin.c44
-rw-r--r--src/kadmin/cli/kadmin.h8
-rw-r--r--src/kadmin/cli/keytab.c12
-rw-r--r--src/kadmin/cli/keytab_local.c1
-rw-r--r--src/kadmin/cli/ss_wrapper.c18
5 files changed, 42 insertions, 41 deletions
diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c
index 22a67ab15..c8cb3fb58 100644
--- a/src/kadmin/cli/kadmin.c
+++ b/src/kadmin/cli/kadmin.c
@@ -1,4 +1,4 @@
-/* -*- mode: c; indent-tabs-mode: nil -*- */
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 1994, 2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
@@ -60,22 +60,22 @@ struct pflag {
};
static struct pflag flags[] = {
-{"allow_postdated", 15, KRB5_KDB_DISALLOW_POSTDATED, 1 },
-{"allow_forwardable", 17, KRB5_KDB_DISALLOW_FORWARDABLE, 1 },
-{"allow_tgs_req", 13, KRB5_KDB_DISALLOW_TGT_BASED, 1 },
-{"allow_renewable", 15, KRB5_KDB_DISALLOW_RENEWABLE, 1 },
-{"allow_proxiable", 15, KRB5_KDB_DISALLOW_PROXIABLE, 1 },
-{"allow_dup_skey", 14, KRB5_KDB_DISALLOW_DUP_SKEY, 1 },
-{"allow_tix", 9, KRB5_KDB_DISALLOW_ALL_TIX, 1 },
-{"requires_preauth", 16, KRB5_KDB_REQUIRES_PRE_AUTH, 0 },
-{"requires_hwauth", 15, KRB5_KDB_REQUIRES_HW_AUTH, 0 },
-{"needchange", 10, KRB5_KDB_REQUIRES_PWCHANGE, 0 },
-{"allow_svr", 9, KRB5_KDB_DISALLOW_SVR, 1 },
-{"password_changing_service", 25, KRB5_KDB_PWCHANGE_SERVICE, 0 },
-{"support_desmd5", 14, KRB5_KDB_SUPPORT_DESMD5, 0 },
-{"ok_as_delegate", 14, KRB5_KDB_OK_AS_DELEGATE, 0 },
-{"ok_to_auth_as_delegate", 22, KRB5_KDB_OK_TO_AUTH_AS_DELEGATE, 0 },
-{"no_auth_data_required", 21, KRB5_KDB_NO_AUTH_DATA_REQUIRED, 0 },
+ {"allow_postdated", 15, KRB5_KDB_DISALLOW_POSTDATED, 1 },
+ {"allow_forwardable", 17, KRB5_KDB_DISALLOW_FORWARDABLE, 1 },
+ {"allow_tgs_req", 13, KRB5_KDB_DISALLOW_TGT_BASED, 1 },
+ {"allow_renewable", 15, KRB5_KDB_DISALLOW_RENEWABLE, 1 },
+ {"allow_proxiable", 15, KRB5_KDB_DISALLOW_PROXIABLE, 1 },
+ {"allow_dup_skey", 14, KRB5_KDB_DISALLOW_DUP_SKEY, 1 },
+ {"allow_tix", 9, KRB5_KDB_DISALLOW_ALL_TIX, 1 },
+ {"requires_preauth", 16, KRB5_KDB_REQUIRES_PRE_AUTH, 0 },
+ {"requires_hwauth", 15, KRB5_KDB_REQUIRES_HW_AUTH, 0 },
+ {"needchange", 10, KRB5_KDB_REQUIRES_PWCHANGE, 0 },
+ {"allow_svr", 9, KRB5_KDB_DISALLOW_SVR, 1 },
+ {"password_changing_service", 25, KRB5_KDB_PWCHANGE_SERVICE, 0 },
+ {"support_desmd5", 14, KRB5_KDB_SUPPORT_DESMD5, 0 },
+ {"ok_as_delegate", 14, KRB5_KDB_OK_AS_DELEGATE, 0 },
+ {"ok_to_auth_as_delegate", 22, KRB5_KDB_OK_TO_AUTH_AS_DELEGATE, 0 },
+ {"no_auth_data_required", 21, KRB5_KDB_NO_AUTH_DATA_REQUIRED, 0 },
};
static char *prflags[] = {
@@ -1036,7 +1036,7 @@ kadmin_addprinc_usage()
#if APPLE_PKINIT
"\t\t[-certhash hash_string]\n"
#endif /* APPLE_PKINIT */
- );
+ );
fprintf(stderr, "\tattributes are:\n");
fprintf(stderr, "%s%s%s",
"\t\tallow_postdated allow_forwardable allow_tgs_req allow_renewable\n",
@@ -1061,7 +1061,7 @@ kadmin_modprinc_usage()
"\t\tok_as_delegate ok_to_auth_as_delegate no_auth_data_required\n"
"\nwhere,\n\t[-x db_princ_args]* - any number of database specific arguments.\n"
"\t\t\tLook at each database documentation for supported arguments\n"
- );
+ );
}
/* Create a dummy password for old-style (pre-1.8) randkey creation. */
@@ -1111,7 +1111,7 @@ kadmin_addprinc(int argc, char *argv[])
#if APPLE_PKINIT
if(cert_hash != NULL) {
fprintf(stderr,
- "add_principal: -certhash not allowed; use modify_principal\n");
+ "add_principal: -certhash not allowed; use modify_principal\n");
goto cleanup;
}
#endif /* APPLE_PKINIT */
@@ -1643,9 +1643,9 @@ kadmin_getpol(int argc, char *argv[])
printf("Maximum password failures before lockout: %lu\n",
(unsigned long)policy.pw_max_fail);
printf("Password failure count reset interval: %ld\n",
- (long)policy.pw_failcnt_interval);
+ (long)policy.pw_failcnt_interval);
printf("Password lockout duration: %ld\n",
- (long)policy.pw_lockout_duration);
+ (long)policy.pw_lockout_duration);
} else {
printf("\"%s\"\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%lu\t%ld\t%ld\n",
policy.policy, policy.pw_max_life, policy.pw_min_life,
diff --git a/src/kadmin/cli/kadmin.h b/src/kadmin/cli/kadmin.h
index 745ebcb2b..5c9decc7d 100644
--- a/src/kadmin/cli/kadmin.h
+++ b/src/kadmin/cli/kadmin.h
@@ -1,3 +1,4 @@
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* kadmin/cli/kadmin.h
*
@@ -8,7 +9,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -22,7 +23,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* Prototypes for kadmin functions called from SS library.
*/
@@ -67,9 +68,8 @@ extern time_t get_date(char *);
/* Yucky global variables */
extern krb5_context context;
-extern char *krb5_defkeyname;
+extern char *krb5_defkeyname;
extern char *whoami;
extern void *handle;
#endif /* __KADMIN_H__ */
-
diff --git a/src/kadmin/cli/keytab.c b/src/kadmin/cli/keytab.c
index fa2de42a8..8d14f860a 100644
--- a/src/kadmin/cli/keytab.c
+++ b/src/kadmin/cli/keytab.c
@@ -1,4 +1,4 @@
-/* -*- mode: c; indent-tabs-mode: nil -*- */
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
*
@@ -285,11 +285,11 @@ add_principal(void *lhandle, char *keytab_str, krb5_keytab keytab,
code = kadm5_get_principal_keys(handle, princ, &keys, &nkeys);
else
#endif
- if (keepold || ks_tuple != NULL) {
- code = kadm5_randkey_principal_3(lhandle, princ, keepold,
- n_ks_tuple, ks_tuple, &keys, &nkeys);
- } else
- code = kadm5_randkey_principal(lhandle, princ, &keys, &nkeys);
+ if (keepold || ks_tuple != NULL) {
+ code = kadm5_randkey_principal_3(lhandle, princ, keepold,
+ n_ks_tuple, ks_tuple, &keys, &nkeys);
+ } else
+ code = kadm5_randkey_principal(lhandle, princ, &keys, &nkeys);
if (code != 0) {
if (code == KADM5_UNK_PRINC) {
fprintf(stderr, "%s: Principal %s does not exist.\n",
diff --git a/src/kadmin/cli/keytab_local.c b/src/kadmin/cli/keytab_local.c
index 1f029a7a9..bb9cd88df 100644
--- a/src/kadmin/cli/keytab_local.c
+++ b/src/kadmin/cli/keytab_local.c
@@ -1,3 +1,4 @@
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* A wrapper around keytab.c used by kadmin.local to expose the -norandkey
* flag. This avoids building two object files from the same source file,
diff --git a/src/kadmin/cli/ss_wrapper.c b/src/kadmin/cli/ss_wrapper.c
index 93cf1dc7d..92ea16a54 100644
--- a/src/kadmin/cli/ss_wrapper.c
+++ b/src/kadmin/cli/ss_wrapper.c
@@ -1,4 +1,4 @@
-/* -*- mode: c; indent-tabs-mode: nil -*- */
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 1994 by the Massachusetts Institute of Technology.
* All Rights Reserved.
@@ -7,7 +7,7 @@
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
@@ -21,7 +21,7 @@
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
*
* ss wrapper for kadmin
*/
@@ -52,12 +52,12 @@ main(int argc, char *argv[])
exit(1);
}
if (request) {
- code = ss_execute_line(sci_idx, request);
- if (code != 0) {
- ss_perror(sci_idx, code, request);
- exit_status++;
- }
+ code = ss_execute_line(sci_idx, request);
+ if (code != 0) {
+ ss_perror(sci_idx, code, request);
+ exit_status++;
+ }
} else
- retval = ss_listen(sci_idx);
+ retval = ss_listen(sci_idx);
return quit() ? 1 : exit_status;
}