diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-02-05 17:00:32 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-02-05 19:16:16 -0500 |
commit | 8a36504008872f03d1b1ca980adeceba28c331f5 (patch) | |
tree | 77e034483449f3548eb6ee5214c7ea322c2fb730 /src/providers/ldap/ldap_init.c | |
parent | cc84fd46f356c4a36a721ab135a33ec77c93e34d (diff) | |
download | sssd-8a36504008872f03d1b1ca980adeceba28c331f5.tar.gz sssd-8a36504008872f03d1b1ca980adeceba28c331f5.tar.xz sssd-8a36504008872f03d1b1ca980adeceba28c331f5.zip |
Do not call sudo functions if built without-sudo
Diffstat (limited to 'src/providers/ldap/ldap_init.c')
-rw-r--r-- | src/providers/ldap/ldap_init.c | 8 |
1 files changed, 7 insertions, 1 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, |