From: Todd C. Miller Date: Fri, 26 Oct 2012 14:27:56 +0000 (-0400) Subject: Allow sudo to be build with sss support without also including ldap X-Git-Tag: SUDO_1_8_7~1^2~363 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68376c13805883c2243e4fd0f3337b2ada1ecc9d;p=sudo Allow sudo to be build with sss support without also including ldap support. From Stephane Graber. --- diff --git a/doc/CONTRIBUTORS b/doc/CONTRIBUTORS index 275446192..fe5db7cfa 100644 --- a/doc/CONTRIBUTORS +++ b/doc/CONTRIBUTORS @@ -45,6 +45,7 @@ you believe you should be listed, please send a note to sudo@sudo.ws. Marc Espie Ariel Faigon Brian Farrell + Stephane Graber Steve Fobes Mike Frysinger Jean-loup Gailly diff --git a/plugins/sudoers/sudo_nss.c b/plugins/sudoers/sudo_nss.c index da3333f10..83a3fe912 100644 --- a/plugins/sudoers/sudo_nss.c +++ b/plugins/sudoers/sudo_nss.c @@ -89,9 +89,11 @@ sudo_read_nss(void) if (strcasecmp(cp, "files") == 0 && !saw_files) { tq_append(&snl, &sudo_nss_file); got_match = true; +#ifdef HAVE_LDAP } else if (strcasecmp(cp, "ldap") == 0 && !saw_ldap) { tq_append(&snl, &sudo_nss_ldap); got_match = true; +#endif #ifdef HAVE_SSSD } else if (strcasecmp(cp, "sss") == 0 && !saw_sss) { tq_append(&snl, &sudo_nss_sss); @@ -171,11 +173,13 @@ sudo_read_nss(void) tq_append(&snl, &sudo_nss_file); got_match = true; ep = &cp[5]; +#ifdef HAVE_LDAP } else if (!saw_ldap && strncasecmp(cp, "ldap", 4) == 0 && (isspace((unsigned char)cp[4]) || cp[4] == '\0')) { tq_append(&snl, &sudo_nss_ldap); got_match = true; ep = &cp[4]; +#endif #ifdef HAVE_SSSD } else if (!saw_sss && strncasecmp(cp, "sss", 3) == 0 && (isspace((unsigned char)cp[3]) || cp[3] == '\0')) {