From: Todd C. Miller Date: Mon, 24 Jan 2011 19:25:57 +0000 (-0500) Subject: Do not reject sudoers file just because it is root-writable. X-Git-Tag: SUDO_1_7_5~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0209252570a396cf75cba0a1fc14f2fa38cb4158;p=sudo Do not reject sudoers file just because it is root-writable. --HG-- branch : 1.7 --- diff --git a/sudo.c b/sudo.c index f65946be6..0dc263bc7 100644 --- 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);