summaryrefslogtreecommitdiff
path: root/getfattr/getfattr.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2003-03-05 20:45:47 +0000
committerNathan Scott <nathans@sgi.com>2003-03-05 20:45:47 +0000
commitc5c4765ccd677bd07bc7f19e577ae1d019dfa728 (patch)
treeb6352c3ceff29a5cb4e004389ba5ae3692962d10 /getfattr/getfattr.c
parentb4fd5e464bf440ba8058528a9619710c413e53fc (diff)
downloadattr-c5c4765ccd677bd07bc7f19e577ae1d019dfa728.tar.gz
Same nftw permissions handing fix that recently went into acl (from AG).
Diffstat (limited to 'getfattr/getfattr.c')
-rw-r--r--getfattr/getfattr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/getfattr/getfattr.c b/getfattr/getfattr.c
index d923251..30c751c 100644
--- a/getfattr/getfattr.c
+++ b/getfattr/getfattr.c
@@ -353,6 +353,13 @@ int do_print(const char *path, const struct stat *stat,
{
int header_printed = 0;
+ if (flag & FTW_DNR) {
+ /* Item is a directory which can't be read. */
+ fprintf(stderr, "%s: %s: %s\n",
+ progname, path, strerror(errno));
+ return 0;
+ }
+
/*
* Process the target of a symbolic link, and traverse the
* link, only if doing a logical walk, or if the symbolic link