]> granicus.if.org Git - sudo/commitdiff
no longer return VALIDATE_NOT_OK if there was a runas that didn't
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 26 Jul 1996 17:23:40 +0000 (17:23 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 26 Jul 1996 17:23:40 +0000 (17:23 +0000)
match.  Now we can have runas stuff on more than one line.

parse.c

diff --git a/parse.c b/parse.c
index beb7fa59ddf80af894705247e4329d4f76f5e700..f9030e13ec2eaa2c03901fb74f668b0fd9f18f64 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -159,9 +159,9 @@ int validate(check_cmnd)
        }
     else
        while (top) {
-           if (host_matches == TRUE)
-               if (cmnd_matches == TRUE)
-                  if (runas_matches == TRUE)
+           if (host_matches == TRUE) {
+               if (cmnd_matches == TRUE) {
+                  if (runas_matches == TRUE) {
                        /*
                         * User was granted access to cmnd on host.
                         * If no passwd required return as such.
@@ -170,11 +170,12 @@ int validate(check_cmnd)
                            return(VALIDATE_OK_NOPASS);
                        else
                            return(VALIDATE_OK);
-                  else
-                       return(VALIDATE_NOT_OK);
-               else if (cmnd_matches == FALSE)
+                   }
+               } else if (cmnd_matches == FALSE) {
                    /* User was explicitly denied acces to cmnd on host. */
                    return(VALIDATE_NOT_OK);
+               }
+           }
            top--;
        }