diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-12-19 01:13:23 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-12-19 01:13:23 +0000 |
| commit | 3fceb9fd5bbd9de85a6cf1bd7863aa89e938e274 (patch) | |
| tree | a7bcf931da461f61ac1339a7d05fb8624cecaa21 | |
| parent | 71ffa67746aec9c5da566ff4d48c0f807db6834a (diff) | |
Notes
| -rw-r--r-- | bin/ls/print.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 841270bbb2e9..2fab63a37de5 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -674,6 +674,14 @@ aclmode(char *buf, FTSENT *p, int *haveacls) else snprintf(name, sizeof(name), "%s/%s", p->fts_parent->fts_accpath, p->fts_name); + /* + * We have no way to tell whether a symbolic link has an ACL since + * pathconf() and acl_get_file() both follow them. + */ + if (S_ISLNK(p->fts_statp->st_mode)) { + *haveacls = 1; + return; + } if ((ret = pathconf(name, _PC_ACL_EXTENDED)) <= 0) { if (ret < 0 && errno != EINVAL) warn("%s", name); |
