Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
nfs4-acl-tools
0001-nfs4_ace_from_string-ignore-inheritance-AC...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-nfs4_ace_from_string-ignore-inheritance-ACEs-on-non-.patch of Package nfs4-acl-tools
From 6780a930a3303d1c29ba627502b83aea8bc05d8e Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@suse.com> Date: Wed, 24 Feb 2016 14:45:19 +1100 Subject: [PATCH] nfs4_ace_from_string: ignore inheritance ACEs on non-directories. References: bnc#967251 If you try to use nfs4_setfacl -R -a A:d:........ directory to recursively set an inheritance ACE on all directories in a tree, it will fail on the first non-directory as setting an inheritance ACE there is not permitted (and as it aborts on the first sign of an error). So use the is_dir flag to avoid doing that, just as is done with the DELETE_CHILD permission. Signed-off-by: NeilBrown <neilb@suse.com> --- libnfs4acl/nfs4_ace_from_string.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libnfs4acl/nfs4_ace_from_string.c b/libnfs4acl/nfs4_ace_from_string.c index 510ffee35d32..a7a30360d860 100644 --- a/libnfs4acl/nfs4_ace_from_string.c +++ b/libnfs4acl/nfs4_ace_from_string.c @@ -185,16 +185,20 @@ struct nfs4_ace * nfs4_ace_from_string(char *ace_buf, int is_dir) for (buflen = strlen(field); buflen > 0; buflen--) { switch (*field) { case FLAG_FILE_INHERIT: - flags |= NFS4_ACE_FILE_INHERIT_ACE; + if (is_dir) + flags |= NFS4_ACE_FILE_INHERIT_ACE; break; case FLAG_DIR_INHERIT: - flags |= NFS4_ACE_DIRECTORY_INHERIT_ACE; + if (is_dir) + flags |= NFS4_ACE_DIRECTORY_INHERIT_ACE; break; case FLAG_NO_PROPAGATE_INHERIT: - flags |= NFS4_ACE_NO_PROPAGATE_INHERIT_ACE; + if (is_dir) + flags |= NFS4_ACE_NO_PROPAGATE_INHERIT_ACE; break; case FLAG_INHERIT_ONLY: - flags |= NFS4_ACE_INHERIT_ONLY_ACE; + if (is_dir) + flags |= NFS4_ACE_INHERIT_ONLY_ACE; break; case FLAG_SUCCESSFUL_ACCESS: flags |= NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG; -- 2.7.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor