svn rev #24154: branches/plugins/src/ lib/kadm5/srv/ lib/krb5/krb/ plugin_core/ ...

tsitkova@MIT.EDU tsitkova at MIT.EDU
Wed Jun 30 17:05:43 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24154
Commit By: tsitkova
Log Message:
Remove set_plugin_manager_instance API. Minor cleaning around plugin_id



Changed Files:
U   branches/plugins/src/lib/kadm5/srv/server_misc.c
U   branches/plugins/src/lib/krb5/krb/init_ctx.c
U   branches/plugins/src/plugin_core/libplugin_core.exports
U   branches/plugins/src/plugin_core/plugin_manager.c
U   branches/plugins/src/plugin_core/plugin_manager.h
U   branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty.h
U   branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_DYN/plugin_pwd_qlty_DYN_impl.c
U   branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_X/plugin_pwd_qlty_X_impl.c
U   branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_krb/plugin_pwd_qlty_krb_impl.c
Modified: branches/plugins/src/lib/kadm5/srv/server_misc.c
===================================================================
--- branches/plugins/src/lib/kadm5/srv/server_misc.c	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/lib/kadm5/srv/server_misc.c	2010-06-30 21:05:43 UTC (rev 24154)
@@ -43,6 +43,11 @@
 
 /* some of this is stolen from gatekeeper ... */
 /* passwd_check -  returns KADM5_OK if password passes the validation.*/
+
+#define PWD_QLTY_KRB 0
+#define PWD_QLTY_X 1
+#define PWD_QLTY_DYN 33
+
 kadm5_ret_t
 passwd_check(kadm5_server_handle_t srv_handle,
              char *password, int use_policy, kadm5_policy_ent_t pol,

Modified: branches/plugins/src/lib/krb5/krb/init_ctx.c
===================================================================
--- branches/plugins/src/lib/krb5/krb/init_ctx.c	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/lib/krb5/krb/init_ctx.c	2010-06-30 21:05:43 UTC (rev 24154)
@@ -178,8 +178,7 @@
 
 
     /* Plugin initialization */
-    plugin_default_manager_get_instance(&plugin_mngr_instance);
-    set_plugin_manager_instance(&ctx->pl_manager,  plugin_mngr_instance);
+    plugin_default_manager_get_instance(&ctx->pl_manager);
     plugin_manager_configure(ctx->pl_manager, conf_path);
     plugin_manager_start(ctx->pl_manager);
 

Modified: branches/plugins/src/plugin_core/libplugin_core.exports
===================================================================
--- branches/plugins/src/plugin_core/libplugin_core.exports	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/plugin_core/libplugin_core.exports	2010-06-30 21:05:43 UTC (rev 24154)
@@ -1,7 +1,6 @@
 get_factory_content
 plugin_manager_configure
 plugin_manager_get_service
-set_plugin_manager_instance
 plugin_manager_start
 plugin_manager_stop
 create_api

Modified: branches/plugins/src/plugin_core/plugin_manager.c
===================================================================
--- branches/plugins/src/plugin_core/plugin_manager.c	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/plugin_core/plugin_manager.c	2010-06-30 21:05:43 UTC (rev 24154)
@@ -5,41 +5,35 @@
 #include "plugin_manager.h"
 #include <k5-int.h>
 
-void
-set_plugin_manager_instance(plugin_manager **_instance, plugin_manager* manager)
-{
-    *_instance = manager;
-}
-
 int
-plugin_manager_configure(plugin_manager* _instance,const char* path)
+plugin_manager_configure(plugin_manager* instance,const char* path)
 {
-    if (_instance != NULL) {
-        _instance->configure(_instance->data, path);
+    if (instance != NULL) {
+        instance->configure(instance->data, path);
     }
     return 0;
 }
 
-void plugin_manager_start(plugin_manager* _instance)
+void plugin_manager_start(plugin_manager* instance)
 {
-    if (_instance != NULL) {
-        _instance->start(_instance->data);
+    if (instance != NULL) {
+        instance->start(instance->data);
     }
 }
 
-void plugin_manager_stop(plugin_manager* _instance)
+void plugin_manager_stop(plugin_manager* instance)
 {
-    if (_instance != NULL) {
-        _instance->stop(_instance->data);
+    if (instance != NULL) {
+        instance->stop(instance->data);
     }
 }
 
 plhandle
-plugin_manager_get_service(plugin_manager* _instance, const char* service_name, const int pl_id)
+plugin_manager_get_service(plugin_manager* instance, const char* service_name, const int pl_id)
 {
     plhandle handle;
-    if (_instance != NULL) {
-        handle = _instance->getService(_instance->data, service_name, pl_id);
+    if (instance != NULL) {
+        handle = instance->getService(instance->data, service_name, pl_id);
     } else {
         handle.api = NULL;
     }

Modified: branches/plugins/src/plugin_core/plugin_manager.h
===================================================================
--- branches/plugins/src/plugin_core/plugin_manager.h	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/plugin_core/plugin_manager.h	2010-06-30 21:05:43 UTC (rev 24154)
@@ -8,12 +8,9 @@
 
 #include <k5-int.h>
 
-void set_plugin_manager_instance(plugin_manager** _instance,plugin_manager*);
+plhandle plugin_manager_get_service(plugin_manager* instance,const char*, const int);
+int plugin_manager_configure(plugin_manager* instance,const char*);
+void plugin_manager_start(plugin_manager* instance);
+void plugin_manager_stop(plugin_manager* instance);
 
-/* Utility functions */
-int plugin_manager_configure(plugin_manager* _instance,const char*);
-void plugin_manager_start(plugin_manager* _instance);
-void plugin_manager_stop(plugin_manager* _instance);
-plhandle plugin_manager_get_service(plugin_manager* _instance,const char*, const int);
-
 #endif /* PLUGIN_MANAGER_H_ */

Modified: branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty.h
===================================================================
--- branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty.h	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty.h	2010-06-30 21:05:43 UTC (rev 24154)
@@ -11,14 +11,9 @@
 #include <admin.h>
 #include <server_internal.h>
 
-#define PWD_QLTY_KRB 0
-#define PWD_QLTY_X 1
-#define PWD_QLTY_DYN 33
-
 /* PWD_QLTY API */
 typedef struct {
 	int version;
-	int plugin_id;
 	kadm5_ret_t (*pwd_qlty_init)(kadm5_server_handle_t);
 	void (*pwd_qlty_cleanup)();
 	kadm5_ret_t (*pwd_qlty_check)(kadm5_server_handle_t, char*,

Modified: branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_DYN/plugin_pwd_qlty_DYN_impl.c
===================================================================
--- branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_DYN/plugin_pwd_qlty_DYN_impl.c	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_DYN/plugin_pwd_qlty_DYN_impl.c	2010-06-30 21:05:43 UTC (rev 24154)
@@ -16,9 +16,9 @@
 {
 
 
-#ifdef DEBUG_PLUGINS
+//#ifdef DEBUG_PLUGINS
     printf("Plugin pwd qlty DYNAMIC >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
-#endif
+// #endif
     return 0;
 
 }
@@ -43,7 +43,6 @@
 
         memset(api, 0, sizeof(plugin_pwd_qlty));
         api->version = 1;
-        api->plugin_id = PWD_QLTY_DYN;
         api->pwd_qlty_init    = _plugin_pwd_qlty_init;
         api->pwd_qlty_check   = _plugin_pwd_qlty_check;
         api->pwd_qlty_cleanup = _plugin_pwd_qlty_clean;

Modified: branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_X/plugin_pwd_qlty_X_impl.c
===================================================================
--- branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_X/plugin_pwd_qlty_X_impl.c	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_X/plugin_pwd_qlty_X_impl.c	2010-06-30 21:05:43 UTC (rev 24154)
@@ -162,7 +162,6 @@
 
         memset(api, 0, sizeof(plugin_pwd_qlty));
         api->version = 1;
-        api->plugin_id = PWD_QLTY_X;
         api->pwd_qlty_init    = _plugin_pwd_qlty_init;
         api->pwd_qlty_check   = _plugin_pwd_qlty_check;
         api->pwd_qlty_cleanup = _plugin_pwd_qlty_clean;

Modified: branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_krb/plugin_pwd_qlty_krb_impl.c
===================================================================
--- branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_krb/plugin_pwd_qlty_krb_impl.c	2010-06-30 16:45:47 UTC (rev 24153)
+++ branches/plugins/src/plugins/pwd_qlty/plugin_pwd_qlty_krb/plugin_pwd_qlty_krb_impl.c	2010-06-30 21:05:43 UTC (rev 24154)
@@ -162,7 +162,6 @@
 
         memset(api, 0, sizeof(plugin_pwd_qlty));
         api->version = 1;
-        api->plugin_id = PWD_QLTY_KRB;
         api->pwd_qlty_init    = _plugin_pwd_qlty_init;
         api->pwd_qlty_check   = _plugin_pwd_qlty_check;
         api->pwd_qlty_cleanup = _plugin_pwd_qlty_clean;




More information about the cvs-krb5 mailing list