From e5df86bd6e1bb1ee5b14ddde8c0cbf14c47753e8 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 15 Sep 2010 20:07:39 +0000 Subject: [PATCH] Whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24322 dc483132-0cff-0310-8789-dd5450dbe970 --- src/clients/kinit/kinit.M | 6 +++-- src/clients/kinit/kinit.c | 5 ++-- src/clients/kinit/kinit_kdb.c | 43 ++++++++++++++++++----------------- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/clients/kinit/kinit.M b/src/clients/kinit/kinit.M index 80af95bbd..3d95a62b3 100644 --- a/src/clients/kinit/kinit.M +++ b/src/clients/kinit/kinit.M @@ -137,10 +137,12 @@ file. The name and location of the keytab file may be specified with the .B \-t .I keytab_file -option; otherwise the default name and location will be used. By default a host ticket is requested but any principal may be specified. On a KDC, the special keytab location +option; otherwise the default name and location will be used. By +default a host ticket is requested but any principal may be +specified. On a KDC, the special keytab location .B KDB: can be used to indicate that kinit should open the KDC database and -look up the key directly. This permits an administrator to obtain +look up the key directly. This permits an administrator to obtain tickets as any principal that supports password-based authentication. .TP \fB-n\fP diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c index dca911aaa..26641e8d1 100644 --- a/src/clients/kinit/kinit.c +++ b/src/clients/kinit/kinit.c @@ -448,7 +448,7 @@ k5_begin(opts, k5) com_err(progname, code, "while initializing Kerberos 5 library"); return 0; } -errctx = k5->ctx; + errctx = k5->ctx; if (opts->k5_cache_name) { code = krb5_cc_resolve(k5->ctx, opts->k5_cache_name, &k5->cc); @@ -654,7 +654,8 @@ k5_kinit(opts, k5) code = kinit_kdb_init(&k5->ctx, krb5_princ_realm(k5->ctx, k5->me)->data); if (code != 0) { - com_err(progname, code, "while setting up KDB keytab for realm %s", + com_err(progname, code, + "while setting up KDB keytab for realm %s", krb5_princ_realm(k5->ctx, k5->me)->data); goto cleanup; } diff --git a/src/clients/kinit/kinit_kdb.c b/src/clients/kinit/kinit_kdb.c index 972983a16..f2011a6bf 100644 --- a/src/clients/kinit/kinit_kdb.c +++ b/src/clients/kinit/kinit_kdb.c @@ -38,33 +38,34 @@ #include #include "extern.h" -/**Server handle*/ -static void * server_handle; +/** Server handle */ +static void *server_handle; /** - *@internal Initialize KDB for given realm + * @internal Initialize KDB for given realm * @param context pointer to context that will be re-initialized * @@param realm name of realm to initialize */ krb5_error_code -kinit_kdb_init (krb5_context *pcontext, char *realm) +kinit_kdb_init(krb5_context *pcontext, char *realm) { - kadm5_config_params config; - krb5_error_code retval = 0; - if (*pcontext) - krb5_free_context(*pcontext); - memset(&config, 0, sizeof config); - retval = kadm5_init_krb5_context(pcontext); - if (retval) + kadm5_config_params config; + krb5_error_code retval = 0; + + if (*pcontext) + krb5_free_context(*pcontext); + memset(&config, 0, sizeof config); + retval = kadm5_init_krb5_context(pcontext); + if (retval) + return retval; + config.mask = KADM5_CONFIG_REALM; + config.realm = realm; + retval = kadm5_init(*pcontext, "kinit", NULL /*pass*/, + "kinit", &config, + KADM5_STRUCT_VERSION, KADM5_API_VERSION_3, NULL, + &server_handle); + if (retval) + return retval; + retval = krb5_kt_register(*pcontext, &krb5_kt_kdb_ops); return retval; - config.mask = KADM5_CONFIG_REALM; - config.realm = realm; - retval = kadm5_init(*pcontext, "kinit", NULL /*pass*/, - "kinit", &config, - KADM5_STRUCT_VERSION, KADM5_API_VERSION_3, NULL, - &server_handle); - if (retval) - return retval; - retval = krb5_kt_register(*pcontext, &krb5_kt_kdb_ops); - return retval; } -- 2.26.2