]> 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:51 +0000 (14:25 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 24 Jan 2011 19:25:51 +0000 (14:25 -0500)
plugins/sudoers/sudoers.c

index fd6b249e11f21aedf8a94caed6551e12fbe92436..a98fc2a9ffd31b358a391671de2715076018ffbf 100644 (file)
@@ -902,7 +902,7 @@ open_sudoers(const char *sudoers, int doedit, int *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);