]> granicus.if.org Git - sudo/commitdiff
Working LDAP support; also remove a now-unneeded rewind().
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 26 Oct 2004 22:21:02 +0000 (22:21 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 26 Oct 2004 22:21:02 +0000 (22:21 +0000)
mon_systrace.c

index 485cc01821b4a90d41945bff95cb6807033340c1..f7b2384d149445a7aeeabfce2b691bc7194a67db 100644 (file)
@@ -823,8 +823,11 @@ check_execv(fd, pid, seqnr, askp, cookie, policyp, errorp)
     int *policyp;
     int *errorp;
 {
-    int error, validated;
+    int error, validated = VALIDATE_NOT_OK;
     struct childinfo *info;
+#ifdef HAVE_LDAP
+    void *ld;
+#endif
 
     /* If we have a cookie we take special action. */
     if (cookie != -1) {
@@ -875,11 +878,14 @@ check_execv(fd, pid, seqnr, askp, cookie, policyp, errorp)
     runas_pw = info->pw;
     user_runas = &info->pw->pw_name;
 #ifdef HAVE_LDAP
-    validated = sudo_ldap_check(pwflag);
+    if ((ld = sudo_ldap_open()) != NULL) {
+       sudo_ldap_update_defaults(ld);
+       validated = sudo_ldap_check(ld, 0);
+    }
     if (!def_ignore_local_sudoers && !ISSET(validated, VALIDATE_OK))
 #endif
     {
-       rewind(sudoers_fp);
+       (void) update_defaults();
        validated = sudoers_lookup(0);
     }
     if (ISSET(validated, VALIDATE_OK)) {