mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Fixed reporting an error when setxattr is rejected
When permissions are enabled and setxattr() is rejected, an error must be returned even though the option silent is set. This is needed for "cp -p" to know it has to try setting the permissions again and use chmod().
This commit is contained in:
parent
85c1634a26
commit
da39fbf24a
@ -3152,7 +3152,7 @@ static ntfs_inode *ntfs_check_access_xattr(fuse_req_t req,
|
||||
|| !(ctx->secure_flags & (1 << SECURITY_ACL))
|
||||
|| (setting && ctx->inherit))
|
||||
&& foracl) {
|
||||
if (ctx->silent)
|
||||
if (ctx->silent && !ctx->security.mapping[MAPUSERS])
|
||||
errno = 0;
|
||||
else
|
||||
errno = EOPNOTSUPP;
|
||||
|
@ -2879,7 +2879,7 @@ static ntfs_inode *ntfs_check_access_xattr(struct SECURITY_CONTEXT *security,
|
||||
|| !(ctx->secure_flags & (1 << SECURITY_ACL))
|
||||
|| (setting && ctx->inherit))
|
||||
&& foracl) {
|
||||
if (ctx->silent)
|
||||
if (ctx->silent && !ctx->security.mapping[MAPUSERS])
|
||||
errno = 0;
|
||||
else
|
||||
errno = EOPNOTSUPP;
|
||||
|
Loading…
Reference in New Issue
Block a user