FreeBSD Bugzilla – Attachment 88774 Details for
Bug 125613
[ufs] [patch] ACL problems with special files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.27 KB, created by
Jaakko Heinonen
on 2008-07-14 20:40:05 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Jaakko Heinonen
Created:
2008-07-14 20:40:05 UTC
Size:
1.27 KB
patch
obsolete
>Index: bin/ls/print.c >=================================================================== >--- bin/ls/print.c (revision 180487) >+++ bin/ls/print.c (working copy) >@@ -629,23 +629,30 @@ aclmode(char *buf, const FTSENT *p, int > else > snprintf(name, sizeof(name), "%s/%s", > p->fts_parent->fts_accpath, p->fts_name); >+ >+ *haveacls = 1; >+ > /* > * We have no way to tell whether a symbolic link has an ACL since > * pathconf() and acl_get_file() both follow them. They also don't > * support whiteouts. > */ >- if (S_ISLNK(p->fts_statp->st_mode) || S_ISWHT(p->fts_statp->st_mode)) { >- *haveacls = 1; >+ if (S_ISLNK(p->fts_statp->st_mode) || S_ISWHT(p->fts_statp->st_mode)) > return; >- } >+ > if ((ret = pathconf(name, _PC_ACL_EXTENDED)) <= 0) { >+ /* >+ * Only make assumptions about file system supporting ACLs on >+ * regular files or directories. UFS doesn't support ACLs for >+ * device files. >+ */ > if (ret < 0 && errno != EINVAL) > warn("%s", name); >- else >+ else if (S_ISREG(p->fts_statp->st_mode) || >+ S_ISDIR(p->fts_statp->st_mode)) > *haveacls = 0; > return; > } >- *haveacls = 1; > if ((facl = acl_get_file(name, ACL_TYPE_ACCESS)) != NULL) { > if (acl_get_entry(facl, ACL_FIRST_ENTRY, &ae) == 1) { > entries = 1; >--- ls-haveacls-only-regular-files.diff ends here ---
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 125613
:
88773
| 88774