diff options
author | trasz <trasz@FreeBSD.org> | 2009-09-02 20:50:39 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2009-09-02 20:50:39 +0000 |
commit | 172921108be7aede073a58ba620b2e1734b4e701 (patch) | |
tree | 6d3bf02c412708868180b8e0938357d4a3e9436c /bin/ls | |
parent | ce3b4baf3c197905cedc13d17c7a220f68240510 (diff) | |
download | FreeBSD-src-172921108be7aede073a58ba620b2e1734b4e701.zip FreeBSD-src-172921108be7aede073a58ba620b2e1734b4e701.tar.gz |
Fix regression introduced in r196712 - the 'name' string needs
to be rewritten for each file we want to check ACL on. Without
this change, ls(1) would check only the ACL on the first file
to list.
Diffstat (limited to 'bin/ls')
-rw-r--r-- | bin/ls/print.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 2eb636e..3b80d93 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -623,15 +623,19 @@ aclmode(char *buf, const FTSENT *p) S_ISWHT(p->fts_statp->st_mode)) return; + if (previous_dev == p->fts_statp->st_dev && supports_acls == 0) + return; + + if (p->fts_level == FTS_ROOTLEVEL) + snprintf(name, sizeof(name), "%s", p->fts_name); + else + snprintf(name, sizeof(name), "%s/%s", + p->fts_parent->fts_accpath, p->fts_name); + if (previous_dev != p->fts_statp->st_dev) { previous_dev = p->fts_statp->st_dev; supports_acls = 0; - if (p->fts_level == FTS_ROOTLEVEL) - snprintf(name, sizeof(name), "%s", p->fts_name); - else - snprintf(name, sizeof(name), "%s/%s", - p->fts_parent->fts_accpath, p->fts_name); ret = lpathconf(name, _PC_ACL_NFS4); if (ret > 0) { type = ACL_TYPE_NFS4; |