summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 8c98c8ea..f55e94b7 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 24425834..5c7448f9 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)