From: Todd C. Miller Date: Sat, 15 Mar 2003 18:02:02 +0000 (+0000) Subject: Use stat_sudoers macro so --with-stow can work X-Git-Tag: SUDO_1_6_7~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b7b3c7f59460d4919c116d1819b3bf5f393fae9;p=sudo Use stat_sudoers macro so --with-stow can work --- diff --git a/sudo.c b/sudo.c index ac8152659..2d599a048 100644 --- a/sudo.c +++ b/sudo.c @@ -803,7 +803,7 @@ check_sudoers() * Fix the mode and group on sudoers file from old default. * Only works if filesystem is readable/writable by root. */ - if ((rootstat = lstat(_PATH_SUDOERS, &statbuf)) == 0 && + if ((rootstat = stat_sudoers(_PATH_SUDOERS, &statbuf)) == 0 && SUDOERS_UID == statbuf.st_uid && SUDOERS_MODE != 0400 && (statbuf.st_mode & 0007777) == 0400) { @@ -834,7 +834,7 @@ check_sudoers() */ set_perms(PERM_SUDOERS); - if (rootstat != 0 && lstat(_PATH_SUDOERS, &statbuf) != 0) + if (rootstat != 0 && stat_sudoers(_PATH_SUDOERS, &statbuf) != 0) log_error(USE_ERRNO, "can't stat %s", _PATH_SUDOERS); else if (!S_ISREG(statbuf.st_mode)) log_error(0, "%s is not a regular file", _PATH_SUDOERS);