svn rev #24392: trunk/src/ include/krb5/ lib/kadm5/ lib/kadm5/srv/

ghudson@MIT.EDU ghudson at MIT.EDU
Thu Sep 30 13:02:29 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24392
Commit By: ghudson
Log Message:
Whitespace.


Changed Files:
U   trunk/src/include/krb5/kadm5_hook_plugin.h
U   trunk/src/lib/kadm5/server_internal.h
U   trunk/src/lib/kadm5/srv/kadm5_hook.c
Modified: trunk/src/include/krb5/kadm5_hook_plugin.h
===================================================================
--- trunk/src/include/krb5/kadm5_hook_plugin.h	2010-09-30 17:01:30 UTC (rev 24391)
+++ trunk/src/include/krb5/kadm5_hook_plugin.h	2010-09-30 17:02:29 UTC (rev 24392)
@@ -56,7 +56,7 @@
 
 /**
  * Whether the operation is being run before or after the database
- * update
+ * update.
  */
 enum kadm5_hook_stage {
     /** In this stage, any plugin failure prevents following plugins from
@@ -66,31 +66,31 @@
     KADM5_HOOK_STAGE_POSTCOMMIT
 };
 
-/** Opaque module data pointer*/
+/** Opaque module data pointer. */
 typedef struct kadm5_hook_modinfo_st kadm5_hook_modinfo;
 
 /**
- * Interface for the v1 virtual table for the kadm5_hook plugin
+ * Interface for the v1 virtual table for the kadm5_hook plugin.
  * All entry points are optional. The name field must be provided.
  */
 typedef struct kadm5_hook_vtable_1_st {
 
-    /** A text string identifying the plugin for logging messages*/
+    /** A text string identifying the plugin for logging messages. */
     char *name;
 
-    /** Initialize a plugin module
+    /** Initialize a plugin module.
      * @param modinfo returns newly allocated module info for future
-     * calls. Cleaned up by the fini() function.
+     * calls.  Cleaned up by the fini() function.
      */
     kadm5_ret_t (*init)(krb5_context, kadm5_hook_modinfo **modinfo);
 
-    /** Clean up a module and free @a modinfo*/
+    /** Clean up a module and free @a modinfo. */
     void (*fini)(krb5_context, kadm5_hook_modinfo *modinfo);
 
     /** Indicates that the password is being changed.
      * @param stage is an integer from #kadm5_hook_stage enumeration
      * @param keepold is true if existing keys are being kept.
-     * */
+     */
     kadm5_ret_t (*chpass)(krb5_context,
                           kadm5_hook_modinfo *modinfo,
                           int stage,
@@ -99,7 +99,7 @@
                           krb5_key_salt_tuple *ks_tuple,
                           const char *newpass);
 
-    /** Indicate a principal is created*/
+    /** Indicate a principal is created. */
     kadm5_ret_t (*create)(krb5_context,
                           kadm5_hook_modinfo *,
                           int stage,
@@ -107,20 +107,19 @@
                           int n_ks_tuple,
                           krb5_key_salt_tuple *ks_tuple,
                           const char *password);
-    /** Modify a principal*/
+
+    /** Modify a principal. */
     kadm5_ret_t (*modify)(krb5_context,
                           kadm5_hook_modinfo *,
                           int stage,
                           kadm5_principal_ent_t, long mask);
 
+    /** Indicate a principal is deleted. */
+    kadm5_ret_t (*remove)(krb5_context,
+                          kadm5_hook_modinfo *modinfo,
+                          int stage, krb5_principal);
 
-    /** Indicate a principal is deleted*/
-    kadm5_ret_t (* remove) (krb5_context,
-                            kadm5_hook_modinfo *modinfo,
-                            int stage, krb5_principal
-    );
+    /* End of minor version 1. */
+} kadm5_hook_vftable_1;
 
-    /*End of minor version 1*/
-}kadm5_hook_vftable_1;
-
 #endif /*H_KRB5_KADM5_HOOK_PLUGIN*/

Modified: trunk/src/lib/kadm5/server_internal.h
===================================================================
--- trunk/src/lib/kadm5/server_internal.h	2010-09-30 17:01:30 UTC (rev 24391)
+++ trunk/src/lib/kadm5/server_internal.h	2010-09-30 17:02:29 UTC (rev 24392)
@@ -205,16 +205,16 @@
  * @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 @@
                       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 @@
                       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 @@
 
 /** @}*/
 
-
-
-
 #endif /* __KADM5_SERVER_INTERNAL_H__ */

Modified: trunk/src/lib/kadm5/srv/kadm5_hook.c
===================================================================
--- trunk/src/lib/kadm5/srv/kadm5_hook.c	2010-09-30 17:01:30 UTC (rev 24391)
+++ trunk/src/lib/kadm5/srv/kadm5_hook.c	2010-09-30 17:02:29 UTC (rev 24392)
@@ -24,9 +24,8 @@
  * 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"
 #include <krb5/kadm5_hook_plugin.h>
@@ -59,7 +58,8 @@
     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 @@
         }
         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 @@
             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 @@
         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 @@
 }
 
 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 @@
 }
 
 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;
 }




More information about the cvs-krb5 mailing list