136 lines
4.7 KiB
Diff
136 lines
4.7 KiB
Diff
commit c9335db249eac09306a1432ebb2c4424bb30eb6f
|
|
Author: Paul B. Henson <henson@acm.org>
|
|
Date: Thu Aug 23 00:25:58 2018 +0000
|
|
|
|
Remove OWNER_AT, GROUP_AT, EVERYONE_AT flags
|
|
|
|
It's possible to set these bits using the "O", "G", and "E" in the flag
|
|
field on the commandline. The bits are not part of the protocol and
|
|
should not be sent or recieved. They have never been documented, and we
|
|
don't know why they were added in the first place.
|
|
|
|
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
|
|
|
|
diff --git a/include/libacl_nfs4.h b/include/libacl_nfs4.h
|
|
index 654061c..d3786c3 100644
|
|
--- a/include/libacl_nfs4.h
|
|
+++ b/include/libacl_nfs4.h
|
|
@@ -54,9 +54,6 @@
|
|
#define FLAG_SUCCESSFUL_ACCESS 'S'
|
|
#define FLAG_FAILED_ACCESS 'F'
|
|
#define FLAG_GROUP 'g'
|
|
-#define FLAG_OWNER_AT 'O'
|
|
-#define FLAG_GROUP_AT 'G'
|
|
-#define FLAG_EVERYONE_AT 'E'
|
|
|
|
#define PERM_READ_DATA 'r'
|
|
#define PERM_WRITE_DATA 'w'
|
|
diff --git a/include/nfs4.h b/include/nfs4.h
|
|
index c6d5b62..da6eefb 100644
|
|
--- a/include/nfs4.h
|
|
+++ b/include/nfs4.h
|
|
@@ -62,9 +62,6 @@
|
|
#define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010
|
|
#define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020
|
|
#define NFS4_ACE_IDENTIFIER_GROUP 0x00000040
|
|
-#define NFS4_ACE_OWNER 0x00000080
|
|
-#define NFS4_ACE_GROUP 0x00000100
|
|
-#define NFS4_ACE_EVERYONE 0x00000200
|
|
|
|
#define NFS4_ACE_READ_DATA 0x00000001
|
|
#define NFS4_ACE_LIST_DIRECTORY 0x00000001
|
|
diff --git a/libnfs4acl/nfs4_ace_from_string.c b/libnfs4acl/nfs4_ace_from_string.c
|
|
index a7a3036..ab8401a 100644
|
|
--- a/libnfs4acl/nfs4_ace_from_string.c
|
|
+++ b/libnfs4acl/nfs4_ace_from_string.c
|
|
@@ -209,15 +209,6 @@ struct nfs4_ace * nfs4_ace_from_string(char *ace_buf, int is_dir)
|
|
case FLAG_GROUP:
|
|
flags |= NFS4_ACE_IDENTIFIER_GROUP;
|
|
break;
|
|
- case FLAG_OWNER_AT:
|
|
- flags |= NFS4_ACE_OWNER;
|
|
- break;
|
|
- case FLAG_GROUP_AT:
|
|
- flags |= NFS4_ACE_GROUP;
|
|
- break;
|
|
- case FLAG_EVERYONE_AT:
|
|
- flags |= NFS4_ACE_EVERYONE;
|
|
- break;
|
|
default:
|
|
fprintf(stderr,"Bad Ace Flag:%c\n", *field);
|
|
goto out_free;
|
|
diff --git a/libnfs4acl/nfs4_get_ace_flags.c b/libnfs4acl/nfs4_get_ace_flags.c
|
|
index 339a838..1d28ed4 100644
|
|
--- a/libnfs4acl/nfs4_get_ace_flags.c
|
|
+++ b/libnfs4acl/nfs4_get_ace_flags.c
|
|
@@ -53,12 +53,6 @@ char* nfs4_get_ace_flags(struct nfs4_ace *ace, char *buf)
|
|
*buf++ = FLAG_FAILED_ACCESS;;
|
|
if (flags & NFS4_ACE_IDENTIFIER_GROUP)
|
|
*buf++ = FLAG_GROUP;
|
|
- if (flags & NFS4_ACE_OWNER)
|
|
- *buf++ = FLAG_OWNER_AT;
|
|
- if (flags & NFS4_ACE_GROUP)
|
|
- *buf++ = FLAG_GROUP_AT;
|
|
- if (flags & NFS4_ACE_EVERYONE)
|
|
- *buf++ = FLAG_EVERYONE_AT;
|
|
*buf = '\0';
|
|
|
|
return bp;
|
|
diff --git a/libnfs4acl/nfs4_print_ace_verbose.c b/libnfs4acl/nfs4_print_ace_verbose.c
|
|
index de9b424..96a6573 100644
|
|
--- a/libnfs4acl/nfs4_print_ace_verbose.c
|
|
+++ b/libnfs4acl/nfs4_print_ace_verbose.c
|
|
@@ -131,12 +131,6 @@ int nfs4_print_ace_verbose(struct nfs4_ace * ace, u32 is_dir)
|
|
printf("\t\tNFS4_ACE_FAILED_ACCESS_ACE_FLAG\n");
|
|
if (flag & NFS4_ACE_IDENTIFIER_GROUP)
|
|
printf("\t\tNFS4_ACE_IDENTIFIER_GROUP\n");
|
|
- if (flag & NFS4_ACE_OWNER)
|
|
- printf("\t\tNFS4_ACE_OWNER\n");
|
|
- if (flag & NFS4_ACE_GROUP)
|
|
- printf("\t\tNFS4_ACE_GROUP\n");
|
|
- if (flag & NFS4_ACE_EVERYONE)
|
|
- printf("\t\tNFS4_ACE_EVERYONE\n");
|
|
|
|
|
|
mask = ace->access_mask;
|
|
commit 5236e718f0d5dfb9008d3afed64aa642ea38d32e
|
|
Author: Kenneth D'souza <kdsouza@redhat.com>
|
|
Date: Tue Mar 26 19:41:09 2019 +0530
|
|
|
|
nfs4_setfacl: Skip comment field while reading ACE(s).
|
|
|
|
With commit 6630629bb661a7f48fb9856f7fd9616ce1499efa an additional field for filename
|
|
was added due to which nfs4_setfacl failed to handle comments while reading ACE(s)
|
|
from nfs4_getfacl output.
|
|
This patch resolves the issue by skipping comment header.
|
|
|
|
With fix:
|
|
|
|
$ nfs4_setfacl --test -s "$(nfs4_getfacl file1)" file2
|
|
## Test mode only - the resulting ACL for "/test/file2":
|
|
A::OWNER@:rwatTcCy
|
|
A:g:GROUP@:rtcy
|
|
A::EVERYONE@:rtcy
|
|
|
|
Without fix:
|
|
|
|
$ nfs4_setfacl --test -s "$(nfs4_getfacl file1)" file2
|
|
Failed while inserting ACE(s).
|
|
|
|
Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
|
|
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
|
|
|
|
diff --git a/libnfs4acl/nfs4_insert_string_aces.c b/libnfs4acl/nfs4_insert_string_aces.c
|
|
index 5a482d5..f93c3e9 100644
|
|
--- a/libnfs4acl/nfs4_insert_string_aces.c
|
|
+++ b/libnfs4acl/nfs4_insert_string_aces.c
|
|
@@ -48,6 +48,8 @@ int nfs4_insert_string_aces(struct nfs4_acl *acl, const char *acl_spec, unsigned
|
|
while ((ssp = strsep(&sp, ",\t\n\r")) != NULL) {
|
|
if (!strlen(ssp))
|
|
continue;
|
|
+ if (*ssp == '#')
|
|
+ continue;
|
|
|
|
if ((ace = nfs4_ace_from_string(ssp, acl->is_directory)) == NULL)
|
|
goto out_failed;
|