diff options
author | John Sonnenschein <John.Sonnenschein@Sun.COM> | 2008-09-09 17:44:53 -0700 |
---|---|---|
committer | John Sonnenschein <John.Sonnenschein@Sun.COM> | 2008-09-09 17:44:53 -0700 |
commit | f467e6fb55e715a0da64a29d216372cfaf9d4943 (patch) | |
tree | c82807f1392ddfabeede42b3be92f9527657d4c4 | |
parent | 7b1f684a14f99a2b9b1b2561f484ff648eff6d9b (diff) | |
download | illumos-gate-f467e6fb55e715a0da64a29d216372cfaf9d4943.tar.gz |
6746142 find(1) fails to correctly strip path names when given the -acl flag
6395580 find(1): -xattr and -acl confused when -exec is present
-rw-r--r-- | usr/src/cmd/find/find.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/src/cmd/find/find.c b/usr/src/cmd/find/find.c index df319b5a6e..d8449c85a4 100644 --- a/usr/src/cmd/find/find.c +++ b/usr/src/cmd/find/find.c @@ -23,7 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -974,7 +973,8 @@ struct FTW *state; val = 1; break; case XATTR: - filename = gettail(name); + filename = (walkflags & FTW_CHDIR) ? + gettail(name) : name; val = (pathconf(filename, _PC_XATTR_EXISTS) == 1); break; case ACL: @@ -983,8 +983,9 @@ struct FTW *state; * already chdir()ed into the directory (performed in * nftw()) of the file */ - filename = gettail(name); - val = acl_trivial(name); + filename = (walkflags & FTW_CHDIR) ? + gettail(name) : name; + val = acl_trivial(filename); break; } /* |