From 0209252570a396cf75cba0a1fc14f2fa38cb4158 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 24 Jan 2011 14:25:57 -0500 Subject: [PATCH] Do not reject sudoers file just because it is root-writable. --HG-- branch : 1.7 --- sudo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.40.0