File handle-spaces.patch of Package nfs4-acl-tools.2134
commit ae0916617f38c6e2a90793364c1f4e4b54673254
Author: Liam Gretton <liam.gretton@leicester.ac.uk>
Date: Wed Jul 18 17:32:43 2012 -0600
Subject: [PATCH] allow spaces in principal names
Change the behaviour of nfs4_setfacl slightly to allow it to add, remove
and modify ACLs which act on principals containing space characters.
The rationale behind this is to allow us to use nfs4_setfacl on a file
system which is shared via CIFS to Windows clients and NFSv4. Though
very rare in a Unix environment, Windows commonly uses user names (and
hence principals derived from them) which contain spaces. A
particularly common one is 'Domain Admins', the handling of which
prompted me to look at modifying the nfs4_setfacl command.
As of 0.3.3 of nfs4-acl-tools, nfs4_setfacl fails to handle ACLs
containing a space character no matter what attempts to quote the ACE
or escape the space character:
bnc#784551
Signed-off-by: NeilBrown <neilb@suse.de>
---
libnfs4acl/nfs4_insert_string_aces.c | 2 +-
man/man1/nfs4_setfacl.1 | 2 +-
man/man5/nfs4_acl.5 | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--- nfs4-acl-tools-0.3.3-git4cb4187e83/libnfs4acl/nfs4_insert_string_aces.c
+++ nfs4-acl-tools-0.3.3-git4cb4187e83/libnfs4acl/nfs4_insert_string_aces.c
@@ -45,7 +45,7 @@ int nfs4_insert_string_aces(struct nfs4_
if ((s = sp = strdup(acl_spec)) == NULL)
goto out_failed;
- while ((ssp = strsep(&sp, " ,\t\n\r")) != NULL) {
+ while ((ssp = strsep(&sp, ",\t\n\r")) != NULL) {
if (!strlen(ssp))
continue;
--- nfs4-acl-tools-0.3.3-git4cb4187e83/man/man1/nfs4_setfacl.1
+++ nfs4-acl-tools-0.3.3-git4cb4187e83/man/man1/nfs4_setfacl.1
@@ -204,7 +204,7 @@ delete the first ACE, but only print the
.IP - 2
delete the last two ACEs above:
.br
- $ nfs4_setfacl -x "A::EVERYONE@rtncy, D::EVERYONE@:waxTC" foo
+ $ nfs4_setfacl -x A::EVERYONE@rtncy,D::EVERYONE@:waxTC foo
.IP - 2
modify (in-place) the second ACE above:
.br
--- nfs4-acl-tools-0.3.3-git4cb4187e83/man/man5/nfs4_acl.5
+++ nfs4-acl-tools-0.3.3-git4cb4187e83/man/man5/nfs4_acl.5
@@ -56,7 +56,7 @@ more permissive than the ones you set.
.SH ACL FORMAT
An NFSv4 ACL is written as an
.IR acl_spec ,
-which is a comma- or whitespace-delimited string consisting of one or more
+which is a comma- or tab-delimited string consisting of one or more
.IR ace_specs .
A single NFSv4 ACE is written as an
.IR ace_spec ,