From: Todd C. Miller Date: Fri, 24 Oct 2008 13:49:10 +0000 (+0000) Subject: Don't error out on a zero-length sudoers file. With the advent of X-Git-Tag: SUDO_1_7_0~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18e764403279df1333199741e5a112d3c159d064;p=sudo Don't error out on a zero-length sudoers file. With the advent of #include the user could create a situation where sudo is unusable. --- diff --git a/sudo.c b/sudo.c index 5be5cbc48..5d97fc0eb 100644 --- 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),