diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-07-09 18:01:50 +0000 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-07-09 18:01:50 +0000 |
commit | 729e225ee1b5ce8c9f56ac211453420aeee4858a (patch) | |
tree | a30e11add5decb15f967b11af353a7cde8ffc42a /acl-updater | |
parent | 253f6abaf56ce0008b11aa4db03f09d024efc7ab (diff) | |
download | kcmldapcontroller-729e225ee1b5ce8c9f56ac211453420aeee4858a.tar.gz kcmldapcontroller-729e225ee1b5ce8c9f56ac211453420aeee4858a.zip |
Clean up acl-updater plugin code
Diffstat (limited to 'acl-updater')
-rw-r--r-- | acl-updater/plugin/interface.c | 2 | ||||
-rw-r--r-- | acl-updater/plugin/plugin.cpp | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/acl-updater/plugin/interface.c b/acl-updater/plugin/interface.c index d3ca381..da85863 100644 --- a/acl-updater/plugin/interface.c +++ b/acl-updater/plugin/interface.c @@ -28,5 +28,5 @@ int plugin_init (Slapi_PBlock *pb); int internal_plugin_init (Slapi_PBlock *pb); __attribute__ ((visibility ("default"))) int plugin_init (Slapi_PBlock *pb) { - internal_plugin_init(pb); + return internal_plugin_init(pb); }
\ No newline at end of file diff --git a/acl-updater/plugin/plugin.cpp b/acl-updater/plugin/plugin.cpp index f67fe0b..38ef221 100644 --- a/acl-updater/plugin/plugin.cpp +++ b/acl-updater/plugin/plugin.cpp @@ -65,8 +65,9 @@ post_modify (Slapi_PBlock *pb) /* Make sure it was successful, don't process errors */ rc = slapi_pblock_get (pb, SLAPI_RESULT_CODE, &code); return_val_if_fail (rc >= 0, -1); - if (code != LDAP_SUCCESS) + if (code != LDAP_SUCCESS) { return 0; + } /* Get out the DN and normalize it */ rc = slapi_pblock_get (pb, SLAPI_MODIFY_TARGET, &dn); @@ -134,7 +135,7 @@ plugin_destroy (Slapi_PBlock *pb) extern "C" int internal_plugin_init (Slapi_PBlock *pb) { - char **argv = NULL, *arg, *value; + char **argv = NULL; int argc = 0; int rc, i; @@ -174,19 +175,19 @@ extern "C" int internal_plugin_init (Slapi_PBlock *pb) if (slapi_pblock_set (pb, SLAPI_PLUGIN_VERSION, (void*)plugin_compat_ver) != 0 || slapi_pblock_set (pb, SLAPI_PLUGIN_DESCRIPTION, (void*)(&plugin_description)) != 0 || slapi_pblock_set (pb, SLAPI_PLUGIN_DESTROY_FN, (void*)plugin_destroy)) { - log_plugin ("error registering plugin"); + log_plugin ("error registering plugin %s\n", PLUGIN_NAME); return -1; } ldapManagerObject = new LDAPManager(realmname, "ldapi://"); - /* Setup the entry add/mobify functions */ + /* Setup the entry add/modify functions */ if (slapi_pblock_set (pb, SLAPI_PLUGIN_POST_MODIFY_FN, (void*)post_modify) != 0) { - log_plugin ("error registering plugin hooks"); + log_plugin ("error registering plugin hooks for %s\n", PLUGIN_NAME); return -1; } - log_plugin ("%s initialized", PLUGIN_NAME); + log_plugin ("%s initialized\n", PLUGIN_NAME); return 0; } |