summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-09-30 15:53:44 +0000
committerGreg Hudson <ghudson@mit.edu>2010-09-30 15:53:44 +0000
commit5fac4b5b3c63d64c0e9b463d6ea01f6b494f5822 (patch)
tree01548a8e5e53ac400df7048aaf6be5bd7390423d /src
parent681d4c4cf70f98b7f140bfa79042d65db1f389c1 (diff)
downloadkrb5-5fac4b5b3c63d64c0e9b463d6ea01f6b494f5822.tar.gz
krb5-5fac4b5b3c63d64c0e9b463d6ea01f6b494f5822.tar.xz
krb5-5fac4b5b3c63d64c0e9b463d6ea01f6b494f5822.zip
Whitespace and minor style changes
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24390 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/clients/kpasswd/kpasswd.c15
-rw-r--r--src/include/krb5/krb5.hin19
-rw-r--r--src/lib/krb5/krb/gic_opt.c17
3 files changed, 28 insertions, 23 deletions
diff --git a/src/clients/kpasswd/kpasswd.c b/src/clients/kpasswd/kpasswd.c
index fc91bddef3..3a50aba31e 100644
--- a/src/clients/kpasswd/kpasswd.c
+++ b/src/clients/kpasswd/kpasswd.c
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
- the name corresponding to the ruid of the process
otherwise, it's an error.
- We always attempt to open the default ccache in order to use FAST if
+ We always attempt to open the default ccache in order to use FAST if
possible.
*/
ret = krb5_cc_default(context, &ccache);
@@ -94,12 +94,13 @@ int main(int argc, char *argv[])
com_err(argv[0], ret, "getting principal from ccache");
exit(1);
} else {
- if (princ != NULL)
- ret = krb5_get_init_creds_opt_set_fast_ccache(context, opts, ccache);
- else ret = 0;
- if (ret) {
- com_err(argv[0], ret, "while setting default ccache name");
- exit(1);
+ if (princ != NULL) {
+ ret = krb5_get_init_creds_opt_set_fast_ccache(context, opts,
+ ccache);
+ if (ret) {
+ com_err(argv[0], ret, "while setting FAST ccache");
+ exit(1);
+ }
}
}
ret = krb5_cc_close(context, ccache);
diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin
index c81a0f21eb..1b60dac837 100644
--- a/src/include/krb5/krb5.hin
+++ b/src/include/krb5/krb5.hin
@@ -1434,10 +1434,11 @@ typedef struct _krb5_cccol_cursor *krb5_cccol_cursor;
#define KRB5_TC_OPENCLOSE 0x00000001
#define KRB5_TC_NOTICKET 0x00000002
-/** Retrieve the name but not type of a credential cache @returns The name of
- * the credential cache as an alias that should not be freed or modified by the
- * caller. This name does not include the type portion, so cannot be used as
- * input to krb5_cc_resolve().
+/** Retrieve the name but not type of a credential cache.
+ *
+ * @return The name of the credential cache as an alias that should not be
+ * freed or modified by the caller. This name does not include the type
+ * portion, so cannot be used as input to krb5_cc_resolve().
*/
const char * KRB5_CALLCONV
krb5_cc_get_name(krb5_context context, krb5_ccache cache);
@@ -1489,8 +1490,10 @@ krb5_cc_set_flags(krb5_context context, krb5_ccache cache, krb5_flags flags);
krb5_error_code KRB5_CALLCONV
krb5_cc_get_flags(krb5_context context, krb5_ccache cache, krb5_flags *flags);
-/** Retrive the type of a credential cache @returns The type of a credential
- * cache as an alias that should not be modified or freed by the caller.
+/** Retrieve the type of a credential cache.
+ *
+ * @return The type of a credential cache as an alias that should not be
+ * modified or freed by the caller.
*/
const char * KRB5_CALLCONV
krb5_cc_get_type(krb5_context context, krb5_ccache cache);
@@ -2339,11 +2342,11 @@ krb5_get_init_creds_opt_set_fast_ccache_name(krb5_context context,
/** Set the FAST ccache name as in
* krb5_get_init_creds_opt_set_fast_ccache_name() but using a krb5_ccache
- * rather than a name
+ * rather than a name.
*/
krb5_error_code KRB5_CALLCONV
krb5_get_init_creds_opt_set_fast_ccache(krb5_context context,
- krb5_get_init_creds_opt *opt,
+ krb5_get_init_creds_opt *opt,
krb5_ccache fast_ccache_name);
/**
diff --git a/src/lib/krb5/krb/gic_opt.c b/src/lib/krb5/krb/gic_opt.c
index dc7095bdc3..062659b9bf 100644
--- a/src/lib/krb5/krb/gic_opt.c
+++ b/src/lib/krb5/krb/gic_opt.c
@@ -1,7 +1,6 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#include "k5-int.h"
#include "int-proto.h"
-#include "k5-buf.h"
static void
init_common(krb5_get_init_creds_opt *opt)
@@ -432,23 +431,25 @@ krb5_get_init_creds_opt_set_fast_ccache_name(krb5_context context,
}
krb5_error_code KRB5_CALLCONV
-krb5_get_init_creds_opt_set_fast_ccache(
- krb5_context context,
- krb5_get_init_creds_opt *opt,
- krb5_ccache ccache)
+krb5_get_init_creds_opt_set_fast_ccache(krb5_context context,
+ krb5_get_init_creds_opt *opt,
+ krb5_ccache ccache)
{
krb5_error_code retval = 0;
struct k5buf buf;
char *cc_name;
+
krb5int_buf_init_dynamic(&buf);
krb5int_buf_add(&buf, krb5_cc_get_type(context, ccache));
krb5int_buf_add(&buf, ":");
krb5int_buf_add(&buf, krb5_cc_get_name(context, ccache));
cc_name = krb5int_buf_data(&buf);
if (cc_name)
- retval = krb5_get_init_creds_opt_set_fast_ccache_name(context, opt, cc_name);
- else retval = ENOMEM;
- krb5int_free_buf(&buf);
+ retval = krb5_get_init_creds_opt_set_fast_ccache_name(context, opt,
+ cc_name);
+ else
+ retval = ENOMEM;
+ krb5int_free_buf(&buf);
return retval;
}