]> granicus.if.org Git - sudo/commitdiff
If LDAP_OPT_SUCCESS is not defined, use LDAP_SUCCESS instead.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 25 Oct 2004 17:38:24 +0000 (17:38 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 25 Oct 2004 17:38:24 +0000 (17:38 +0000)
Fixes a compilation problem with Solaris 9's native LDAP.

Set FLAG_MONITOR when needed.

ldap.c

diff --git a/ldap.c b/ldap.c
index e3c40020b0b91e65c4a2e00666bb2e4c34863bf8..84401260c7553b059370d78ae215763c6c7826a5 100644 (file)
--- 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;