From: Todd C. Miller Date: Mon, 25 Oct 2004 17:38:24 +0000 (+0000) Subject: If LDAP_OPT_SUCCESS is not defined, use LDAP_SUCCESS instead. X-Git-Tag: SUDO_1_7_0~877 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66992e10ef476526fe1a2928479b47627df22065;p=sudo If LDAP_OPT_SUCCESS is not defined, use LDAP_SUCCESS instead. Fixes a compilation problem with Solaris 9's native LDAP. Set FLAG_MONITOR when needed. --- diff --git a/ldap.c b/ldap.c index e3c40020b..84401260c 100644 --- a/ldap.c +++ b/ldap.c @@ -66,6 +66,10 @@ static const char rcsid[] = "$Sudo$"; #define BUF_SIZ 1024 #endif +#ifndef LDAP_OPT_SUCCESS +#define LDAP_OPT_SUCCESS LDAP_SUCCESS +#endif + extern int printmatches; /* ldap configuration structure */ @@ -946,8 +950,9 @@ int pwflag; /* We have a match. Should we check the password? */ /* Note: This could be the global or a rule specific option */ if (!def_authenticate) SET(ret,FLAG_NOPASS); - /* Same logic with noexec */ + /* Same logic with noexec and monitor */ if (def_noexec) SET(ret,FLAG_NOEXEC); + if (def_monitor) SET(ret,FLAG_MONITOR); } else { /* we do not have a match */ ret=VALIDATE_NOT_OK;