summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-09-30 17:02:29 +0000
committerGreg Hudson <ghudson@mit.edu>2010-09-30 17:02:29 +0000
commita3141561d86b73cee18fb1874aff0f662a8c378c (patch)
treeee1cde9963ed65204bf5beff85f5a7e835557518 /src/lib
parentbd69b602c7d76c5a8a8e6fde40bd3d93d007b7d9 (diff)
downloadkrb5-a3141561d86b73cee18fb1874aff0f662a8c378c.tar.gz
krb5-a3141561d86b73cee18fb1874aff0f662a8c378c.tar.xz
krb5-a3141561d86b73cee18fb1874aff0f662a8c378c.zip
Whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24392 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/kadm5/server_internal.h15
-rw-r--r--src/lib/kadm5/srv/kadm5_hook.c57
2 files changed, 30 insertions, 42 deletions
diff --git a/src/lib/kadm5/server_internal.h b/src/lib/kadm5/server_internal.h
index 59c7b0512..42b11c85e 100644
--- a/src/lib/kadm5/server_internal.h
+++ b/src/lib/kadm5/server_internal.h
@@ -205,16 +205,16 @@ pwqual_princ_initvt(krb5_context context, int maj_ver, int min_ver,
* @name kadm5_hook plugin support
*/
-/**Load all kadm5_hook plugins*/
+/** Load all kadm5_hook plugins. */
krb5_error_code
k5_kadm5_hook_load(krb5_context context,
kadm5_hook_handle **handles_out);
-/** Free handles allocated by k5_kadm5_hook_load()*/
+/** Free handles allocated by k5_kadm5_hook_load(). */
void
k5_kadm5_hook_free_handles(krb5_context context, kadm5_hook_handle *handles);
-/**Call the chpass entry point on every kadm5_hook in @a handles*/
+/** Call the chpass entry point on every kadm5_hook in @a handles. */
kadm5_ret_t
k5_kadm5_hook_chpass (krb5_context context,
kadm5_hook_handle *handles,
@@ -224,7 +224,7 @@ k5_kadm5_hook_chpass (krb5_context context,
krb5_key_salt_tuple *ks_tuple,
const char *newpass);
-/** Call the create entry point for kadm5_hook_plugins*/
+/** Call the create entry point for kadm5_hook_plugins. */
kadm5_ret_t
k5_kadm5_hook_create (krb5_context context,
kadm5_hook_handle *handles,
@@ -234,14 +234,14 @@ k5_kadm5_hook_create (krb5_context context,
krb5_key_salt_tuple *ks_tuple,
const char *newpass);
-/** Call modify kadm5_hook entry point*/
+/** Call modify kadm5_hook entry point. */
kadm5_ret_t
k5_kadm5_hook_modify (krb5_context context,
kadm5_hook_handle *handles,
int stage,
kadm5_principal_ent_t princ, long mask);
-/** call remove kadm5_hook entry point*/
+/** Call remove kadm5_hook entry point. */
kadm5_ret_t
k5_kadm5_hook_remove (krb5_context context,
kadm5_hook_handle *handles,
@@ -250,7 +250,4 @@ k5_kadm5_hook_remove (krb5_context context,
/** @}*/
-
-
-
#endif /* __KADM5_SERVER_INTERNAL_H__ */
diff --git a/src/lib/kadm5/srv/kadm5_hook.c b/src/lib/kadm5/srv/kadm5_hook.c
index b86ab4297..386715d72 100644
--- a/src/lib/kadm5/srv/kadm5_hook.c
+++ b/src/lib/kadm5/srv/kadm5_hook.c
@@ -24,8 +24,7 @@
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*/
-/* Consumer interface for kadm5_hook plugins*/
-
+/* Consumer interface for kadm5_hook plugins. */
#include "k5-int.h"
#include "server_internal.h"
@@ -59,7 +58,8 @@ k5_kadm5_hook_load(krb5_context context,
if (list == NULL)
goto cleanup;
- /* For each module, allocate a handle, initialize its vtable, and initialize the module*/
+ /* For each module, allocate a handle, initialize its vtable, and
+ * initialize the module. */
count = 0;
for (mod = modules; *mod != NULL; mod++) {
handle = k5alloc(sizeof(*handle), &ret);
@@ -73,8 +73,8 @@ k5_kadm5_hook_load(krb5_context context,
}
handle->data = NULL;
if (handle->vt.init != NULL) {
- ret = handle->vt.init(context, &handle->data);
- if (ret != 0) /* Failed dictionary binding is fatal. */
+ ret = handle->vt.init(context, &handle->data);
+ if (ret != 0) /* Failed initialization is fatal. */
goto cleanup;
}
list[count++] = handle;
@@ -116,9 +116,11 @@ log_failure(krb5_context context,
krb5_error_code ret)
{
const char *e = krb5_get_error_message(context, ret);
- if (e)
+
+ if (e) {
krb5_klog_syslog(LOG_ERR, "kadm5_hook %s failed postcommit %s: %s",
name, function, e);
+ }
krb5_free_error_message(context, e);
}
@@ -132,19 +134,17 @@ log_failure(krb5_context context,
if (ret) { \
if (stage == KADM5_HOOK_STAGE_PRECOMMIT) \
return ret; \
- else log_failure(context, h->vt.name, #operation, ret); \
+ else \
+ log_failure(context, h->vt.name, #operation, ret); \
} \
}
kadm5_ret_t
-k5_kadm5_hook_chpass (krb5_context context,
- kadm5_hook_handle *handles,
- int stage, krb5_principal princ,
- krb5_boolean keepold,
- int n_ks_tuple,
- krb5_key_salt_tuple *ks_tuple,
- const char *newpass)
+k5_kadm5_hook_chpass(krb5_context context, kadm5_hook_handle *handles,
+ int stage, krb5_principal princ, krb5_boolean keepold,
+ int n_ks_tuple, krb5_key_salt_tuple *ks_tuple,
+ const char *newpass)
{
ITERATE(chpass, (context, h->data,
stage, princ, keepold,
@@ -153,13 +153,10 @@ k5_kadm5_hook_chpass (krb5_context context,
}
kadm5_ret_t
-k5_kadm5_hook_create (krb5_context context,
- kadm5_hook_handle *handles,
- int stage,
- kadm5_principal_ent_t princ, long mask,
- int n_ks_tuple,
- krb5_key_salt_tuple *ks_tuple,
- const char *newpass)
+k5_kadm5_hook_create(krb5_context context, kadm5_hook_handle *handles,
+ int stage, kadm5_principal_ent_t princ, long mask,
+ int n_ks_tuple, krb5_key_salt_tuple *ks_tuple,
+ const char *newpass)
{
ITERATE(create, (context, h->data,
stage, princ, mask, n_ks_tuple, ks_tuple, newpass));
@@ -167,23 +164,17 @@ k5_kadm5_hook_create (krb5_context context,
}
kadm5_ret_t
-k5_kadm5_hook_modify (krb5_context context,
- kadm5_hook_handle *handles,
- int stage,
- kadm5_principal_ent_t princ, long mask)
+k5_kadm5_hook_modify(krb5_context context, kadm5_hook_handle *handles,
+ int stage, kadm5_principal_ent_t princ, long mask)
{
- ITERATE(modify, (context, h->data,
- stage, princ, mask));
+ ITERATE(modify, (context, h->data, stage, princ, mask));
return 0;
}
kadm5_ret_t
-k5_kadm5_hook_remove (krb5_context context,
- kadm5_hook_handle *handles,
- int stage,
- krb5_principal princ)
+k5_kadm5_hook_remove(krb5_context context, kadm5_hook_handle *handles,
+ int stage, krb5_principal princ)
{
- ITERATE(remove, (context, h->data,
- stage, princ));
+ ITERATE(remove, (context, h->data, stage, princ));
return 0;
}