diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-09-29 08:43:12 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-10-01 17:02:53 -0600 |
commit | 4ddeb0bd1e5b79360b1850ea454c08d9c2706ffa (patch) | |
tree | e3d689227bd5fac30792916e389c93246eef92d6 /ldap/servers/plugins | |
parent | 5f01b7913cc0c19bf8757351506f73adb1c9e58b (diff) | |
download | ds-4ddeb0bd1e5b79360b1850ea454c08d9c2706ffa.tar.gz ds-4ddeb0bd1e5b79360b1850ea454c08d9c2706ffa.tar.xz ds-4ddeb0bd1e5b79360b1850ea454c08d9c2706ffa.zip |
do not register pre/post op plugins if disabled
the main init function is responsible for looking to see if it is enabled
and should not do any further processing, including registering the
pre/post op plugins, if it is disabled
Diffstat (limited to 'ldap/servers/plugins')
-rw-r--r-- | ldap/servers/plugins/acctpolicy/acct_init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ldap/servers/plugins/acctpolicy/acct_init.c b/ldap/servers/plugins/acctpolicy/acct_init.c index 6f33434c..af291403 100644 --- a/ldap/servers/plugins/acctpolicy/acct_init.c +++ b/ldap/servers/plugins/acctpolicy/acct_init.c @@ -69,6 +69,14 @@ int acct_policy_init( Slapi_PBlock *pb ) { void *plugin_id; + int enabled; + + slapi_pblock_get(pb, SLAPI_PLUGIN_ENABLED, &enabled); + + if (!enabled) { + /* not enabled */ + return( CALLBACK_OK ); + } if ( slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_VERSION_01 ) != 0 || |