mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
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.
This commit is contained in:
parent
8d3635c4db
commit
a34292623f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196773
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user