summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-02-05 17:00:32 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-02-05 19:16:16 -0500
commit8a36504008872f03d1b1ca980adeceba28c331f5 (patch)
tree77e034483449f3548eb6ee5214c7ea322c2fb730 /src/providers
parentcc84fd46f356c4a36a721ab135a33ec77c93e34d (diff)
downloadsssd-8a36504008872f03d1b1ca980adeceba28c331f5.tar.gz
sssd-8a36504008872f03d1b1ca980adeceba28c331f5.tar.xz
sssd-8a36504008872f03d1b1ca980adeceba28c331f5.zip
Do not call sudo functions if built without-sudo
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/ldap_init.c8
-rw-r--r--src/providers/ldap/sdap_sudo.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
index 8c98c8eaa..f55e94b74 100644
--- a/src/providers/ldap/ldap_init.c
+++ b/src/providers/ldap/ldap_init.c
@@ -392,6 +392,7 @@ int sssm_ldap_sudo_init(struct be_ctx *be_ctx,
struct bet_ops **ops,
void **pvt_data)
{
+#ifdef BUILD_SUDO
struct sdap_id_ctx *id_ctx;
void *data;
int ret;
@@ -409,7 +410,12 @@ int sssm_ldap_sudo_init(struct be_ctx *be_ctx,
return EIO;
}
- return sdap_sudo_init(be_ctx, id_ctx, ops, &data);
+ return sdap_sudo_init(be_ctx, id_ctx, ops, pvt_data);
+#else
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Sudo init handler called but SSSD is "
+ "built without sudo support, ignoring\n"));
+ return EOK;
+#endif
}
int sssm_ldap_autofs_init(struct be_ctx *be_ctx,
diff --git a/src/providers/ldap/sdap_sudo.c b/src/providers/ldap/sdap_sudo.c
index 24425834a..5c7448f96 100644
--- a/src/providers/ldap/sdap_sudo.c
+++ b/src/providers/ldap/sdap_sudo.c
@@ -49,7 +49,6 @@ int sdap_sudo_init(struct be_ctx *be_ctx,
struct bet_ops **ops,
void **pvt_data)
{
-#ifdef BUILD_SUDO
int ret;
DEBUG(SSSDBG_TRACE_INTERNAL, ("Initializing sudo LDAP back end\n"));
@@ -73,11 +72,6 @@ int sdap_sudo_init(struct be_ctx *be_ctx,
}
return EOK;
-#else
- DEBUG(SSSDBG_MINOR_FAILURE, ("Sudo init handler called but SSSD is "
- "built without sudo support, ignoring\n"));
- return EOK;
-#endif
}
int sdap_sudo_setup_tasks(struct sdap_id_ctx *id_ctx)