summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2004-01-06 01:25:47 +0000
committerNathan Scott <nathans@sgi.com>2004-01-06 01:25:47 +0000
commitaf582de39f09f7dfa9ee8a0c4a5e14034e1b9428 (patch)
treed8e955d2f6837316a6d3e8442ed99db7a4e19851
parentd2c574fa6fda516a5051bc45fbb02e81bf53e44d (diff)
downloadattr-af582de39f09f7dfa9ee8a0c4a5e14034e1b9428.tar.gz
Merge acl/attr nftw walk bug fix from Andreas.
-rw-r--r--VERSION2
-rw-r--r--debian/changelog6
-rw-r--r--doc/CHANGES3
-rw-r--r--getfattr/getfattr.c15
4 files changed, 18 insertions, 8 deletions
diff --git a/VERSION b/VERSION
index 0800779..6697223 100644
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
#
PKG_MAJOR=2
PKG_MINOR=4
-PKG_REVISION=12
+PKG_REVISION=13
PKG_BUILD=1
diff --git a/debian/changelog b/debian/changelog
index 0e2f735..952746d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+attr (2.4.13-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Nathan Scott <nathans@debian.org> Tue, 06 Jan 2004 12:08:38 +1100
+
attr (2.4.12-1) unstable; urgency=low
* New upstream release
diff --git a/doc/CHANGES b/doc/CHANGES
index 7b2c46e..a7f0a3e 100644
--- a/doc/CHANGES
+++ b/doc/CHANGES
@@ -1,3 +1,6 @@
+attr-2.4.13 (06 January 2004)
+ - Fix a permission bug in directory tree walking code.
+
attr-2.4.12 (13 October 2003)
- Fix build on the GNU/Hurd platform for some Debian folks.
diff --git a/getfattr/getfattr.c b/getfattr/getfattr.c
index 94d3653..09115ec 100644
--- a/getfattr/getfattr.c
+++ b/getfattr/getfattr.c
@@ -347,15 +347,9 @@ int list_attributes(const char *path, int *header_printed)
int do_print(const char *path, const struct stat *stat,
int flag, struct FTW *ftw)
{
+ int saved_errno = errno;
int header_printed = 0;
- if (flag == FTW_DNR) {
- /* Item is a directory which can't be read. */
- fprintf(stderr, "%s: %s: %s\n", progname, xquote(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
@@ -375,6 +369,13 @@ int do_print(const char *path, const struct stat *stat,
if (header_printed)
puts("");
+ if (flag == FTW_DNR && opt_recursive) {
+ /* Item is a directory which can't be read. */
+ fprintf(stderr, "%s: %s: %s\n", progname, xquote(path),
+ strerror(saved_errno));
+ return 0;
+ }
+
/*
* We also get here in non-recursive mode. In that case,
* return something != 0 to abort nftw.