]> granicus.if.org Git - sudo/commitdiff
Use stat_sudoers macro so --with-stow can work
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 15 Mar 2003 18:02:02 +0000 (18:02 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 15 Mar 2003 18:02:02 +0000 (18:02 +0000)
sudo.c

diff --git a/sudo.c b/sudo.c
index ac8152659dd290673268bf0f45fe4c9ee901173d..2d599a048d98e15dc0e1ad0b7e2f952367dc83d1 100644 (file)
--- 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);