[kernel/f19] Fix NFSv3 ACL regression (rhbz 1132786)

Josh Boyer jwboyer at fedoraproject.org
Thu Aug 28 19:00:31 UTC 2014


commit d386152526c4170cdfcb08a67e7c6e7fe970fe22
Author: Josh Boyer <jwboyer at fedoraproject.org>
Date:   Thu Aug 28 14:56:54 2014 -0400

    Fix NFSv3 ACL regression (rhbz 1132786)

 NFSv3-Fix-another-acl-regression.patch |   37 ++++++++++++++++++++++++++++++++
 kernel.spec                            |    9 +++++++
 2 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/NFSv3-Fix-another-acl-regression.patch b/NFSv3-Fix-another-acl-regression.patch
new file mode 100644
index 0000000..af3af2a
--- /dev/null
+++ b/NFSv3-Fix-another-acl-regression.patch
@@ -0,0 +1,37 @@
+From 498a0fb58f119bfa222065fc4f2932e81e1510ed Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <trond.myklebust at primarydata.com>
+Date: Sun, 24 Aug 2014 14:46:48 -0400
+Subject: [PATCH] NFSv3: Fix another acl regression
+
+When creating a new object on the NFS server, we should not be sending
+posix setacl requests unless the preceding posix_acl_create returned a
+non-trivial acl. Doing so, causes Solaris servers in particular to
+return an EINVAL.
+
+Fixes: 013cdf1088d72 (nfs: use generic posix ACL infrastructure,,,)
+Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1132786
+Cc: stable at vger.kernel.org # 3.14+
+Signed-off-by: Trond Myklebust <trond.myklebust at primarydata.com>
+---
+ fs/nfs/nfs3acl.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
+index d0fec260132a..24c6898159cc 100644
+--- a/fs/nfs/nfs3acl.c
++++ b/fs/nfs/nfs3acl.c
+@@ -129,7 +129,10 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
+ 		.rpc_argp	= &args,
+ 		.rpc_resp	= &fattr,
+ 	};
+-	int status;
++	int status = 0;
++
++	if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL))
++		goto out;
+ 
+ 	status = -EOPNOTSUPP;
+ 	if (!nfs_server_capable(inode, NFS_CAP_ACLS))
+-- 
+1.9.3
+
diff --git a/kernel.spec b/kernel.spec
index 9f9447c..e5eb1f4 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -765,6 +765,9 @@ Patch25132: nfs3_list_one_acl-check-get_acl-result-with-IS_ERR_O.patch
 #CVE-2014-{5471,5472} rhbz 1134099 1134101
 Patch26017: isofs-Fix-unbounded-recursion-when-processing-relocated-directories.patch
 
+#rhbz 1132786
+Patch26018: NFSv3-Fix-another-acl-regression.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1472,6 +1475,9 @@ ApplyPatch nfs3_list_one_acl-check-get_acl-result-with-IS_ERR_O.patch
 #CVE-2014-{5471,5472} rhbz 1134099 1134101
 ApplyPatch isofs-Fix-unbounded-recursion-when-processing-relocated-directories.patch
 
+#rhbz 1132786
+ApplyPatch NFSv3-Fix-another-acl-regression.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2284,6 +2290,9 @@ fi
 # and build.
 
 %changelog
+* Thu Aug 28 2014 Josh Boyer <jwboyer at fedoraproject.org>
+- Fix NFSv3 ACL regression (rhbz 1132786)
+
 * Wed Aug 27 2014 Justin M. Forbes <jforbes at fedoraproject.org>
 - CVE-2014-{5471,5472} isofs: Fix unbounded recursion when processing relocated
   directories (rhbz 1134099 1134101)


More information about the scm-commits mailing list