]> granicus.if.org Git - sudo/commitdiff
Do not reject sudoers file just because it is root-writable.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 24 Jan 2011 19:25:57 +0000 (14:25 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 24 Jan 2011 19:25:57 +0000 (14:25 -0500)
--HG--
branch : 1.7

sudo.c

diff --git a/sudo.c b/sudo.c
index f65946be6acb13a15fba8c67798052f466f5ee88..0dc263bc746545051bad19177565763463e8da23 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -1011,7 +1011,7 @@ open_sudoers(sudoers, doedit, keepopen)
        log_error(USE_ERRNO|NO_EXIT, "can't stat %s", sudoers);
     else if (!S_ISREG(statbuf.st_mode))
        log_error(NO_EXIT, "%s is not a regular file", sudoers);
-    else if ((statbuf.st_mode & 07777) != SUDOERS_MODE)
+    else if ((statbuf.st_mode & 07577) != SUDOERS_MODE)
        log_error(NO_EXIT, "%s is mode 0%o, should be 0%o", sudoers,
            (unsigned int) (statbuf.st_mode & 07777),
            (unsigned int) SUDOERS_MODE);