]> granicus.if.org Git - sudo/commitdiff
Take a stab at ldap sudoers support here.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 5 Oct 2004 20:53:29 +0000 (20:53 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 5 Oct 2004 20:53:29 +0000 (20:53 +0000)
mon_systrace.c

index 55ea73e8312ed91b1ff1c3e3c4ffd87a46937485..105f34f5b4a587dffc0ffcaee5a413f0f8caa9d6 100644 (file)
@@ -872,8 +872,14 @@ check_execv(fd, pid, seqnr, askp, cookie, policyp, errorp)
     def_authenticate = FALSE;
     runas_pw = info->pw;
     user_runas = &info->pw->pw_name;
-    rewind(sudoers_fp);
-    validated = sudoers_lookup(0);
+#ifdef HAVE_LDAP
+    validated = sudo_ldap_check(pwflag);
+    if (!def_ignore_local_sudoers && !ISSET(validated, VALIDATE_OK))
+#endif
+    {
+       rewind(sudoers_fp);
+       validated = sudoers_lookup(0);
+    }
     if (ISSET(validated, VALIDATE_OK)) {
        *policyp = SYSTR_POLICY_PERMIT;
     } else {