]> granicus.if.org Git - sudo/commitdiff
Don't error out on a zero-length sudoers file. With the advent of
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 24 Oct 2008 13:49:10 +0000 (13:49 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 24 Oct 2008 13:49:10 +0000 (13:49 +0000)
#include the user could create a situation where sudo is unusable.

sudo.c

diff --git a/sudo.c b/sudo.c
index 5be5cbc48d4cbd6137346f5ba20a191c310c7743..5d97fc0ebf2eb15f0d61f4aff0af89679103a976 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -1065,8 +1065,6 @@ open_sudoers(sudoers, 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_size == 0)
-       log_error(NO_EXIT, "%s is zero length", sudoers);
     else if ((statbuf.st_mode & 07777) != SUDOERS_MODE)
        log_error(NO_EXIT, "%s is mode 0%o, should be 0%o", sudoers,
            (unsigned int) (statbuf.st_mode & 07777),