Summary: | sys-apps/acl-2.2.39-r1 broken on jfs with nfs use-flag | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexander Zubkov <zubkov318> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bfields, charlie.page, eva, Fred, heath, jakub, wschlich |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | acl_set_file: Don't use XATTR_REPLACE on non-NFS files |
Description
Alexander Zubkov
2007-01-18 14:47:14 UTC
I got these problems too compiling acl with nfs flag on xfs FS. Torsten Created attachment 114019 [details, diff]
acl_set_file: Don't use XATTR_REPLACE on non-NFS files
This must be applied after acl-2.2.29-CITI_NFS4_ALL-3.dif
I ran into this issue as well, but in cp -Rp. The difference is in the USE=nfs build, the setxattr call has XATTR_REPLACE; where in the non-nfs build, it doesn't. (The NFS patch adds the XATTR_REPLACE). The breakage is because setxattr is supposed to fail (errno=ENOATTR) if XATTR_REPLACE is specified and the file doesn't have the attr to begin with; which means that acl_set_file() will never be able to add an acl to a file that lacks an acl to begin with. I see two ways to fix this: 1) only use XATTR_REPLACE if the target file is NFS 2) test the return value of setxattr(..., XATTR_REPLACE). If -1 and errno == ENOATTR, do the setxattr() again without XATTR_REPLACE. I prefer the first option, because the second adds the extra syscall. Attached is the patch I used on my system, which has fixed the problem for me. *** Bug 167290 has been marked as a duplicate of this bug. *** *** Bug 177083 has been marked as a duplicate of this bug. *** Upgrading to sys-libs/glibc-2.5-r2 failed on jfs: - applied recommended patch for "XATTR_REPLACE on non-NFS files" on sys-apps/acl - emerge upgrade of sys-libs/glibc completed without any error! sys-apps/acl-2.2.39-r1 USE="nfs nls" sys-fs/jfsutils-1.1.8 x86: 2.6.20-gentoo-r7 Please add patch to acl ebuild! I'm not sure how that XATTR_REPLACE crept in there in the first place--it looks like a mistake. Just remove it and make that argument a zero unconditionally. I've pushed out an updated version with that fix to git://linux-nfs.org/~bfields/acl.git Browsable version at http://www.linux-nfs.org/cgi-bin/gitweb.cgi?p=bfields-acl.git;a=summary (PS: Is there a way I could be cc:'d on any bugs related to the citi nfsv4 acl stuff?) acl-2.2.45 has latest NFS patch J. Bruce Fields: there is no way to filter specifically on the nfs patch, but i can add you as a cc when a new one comes up ... |