diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-07-25 07:38:39 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-07-25 07:38:39 +0000 |
commit | b93109eedcf6a1cc27b06cf5a710c935b61a197b (patch) | |
tree | f89b094713bf33aec20cf9d7a5b81fac5afc5f0d /src/pathchk.c | |
parent | 34d19d25d56a76eb8a425e15be5f0ebb68fa409b (diff) | |
download | coreutils-b93109eedcf6a1cc27b06cf5a710c935b61a197b.tar.xz |
pathchk.c: Include euidaccess.h.
(dir_ok): Use euidaccess, not access.
Diffstat (limited to 'src/pathchk.c')
-rw-r--r-- | src/pathchk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pathchk.c b/src/pathchk.c index d382860a0..bba1010d0 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -45,6 +45,7 @@ #include "system.h" #include "error.h" +#include "euidaccess.h" #include "long-options.h" /* The official name of this program (e.g., no `g' prefix). */ @@ -255,9 +256,8 @@ dir_ok (const char *path) /* Use access to test for search permission because testing permission bits of st_mode can lose with new - access control mechanisms. Of course, access loses if you're - running setuid. */ - if (access (path, X_OK) != 0) + access control mechanisms. */ + if (euidaccess (path, X_OK) != 0) { if (errno == EACCES) error (0, 0, _("directory `%s' is not searchable"), path); |