Fixes segfaulting issues with ACEs that have empty mask fields
This commit is contained in:
parent
b49949a678
commit
7abefe1398
@ -1,6 +1,6 @@
|
||||
Name: nfs4-acl-tools
|
||||
Version: 0.3.3
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: The nfs4 ACL tools
|
||||
Group: Applications/System
|
||||
License: BSD
|
||||
@ -12,6 +12,8 @@ Source0: http://www.citi.umich.edu/projects/nfsv4/linux/nfs4-acl-tools/%{
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libattr-devel
|
||||
|
||||
Patch001: nfs4acl-0.3.3-ace.patch
|
||||
|
||||
Patch100: nfs4acl-0.2.0-compile.patch
|
||||
|
||||
%description
|
||||
@ -21,6 +23,8 @@ NFSv4 client.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch001 -p1
|
||||
|
||||
%patch100 -p1
|
||||
|
||||
%build
|
||||
@ -52,6 +56,9 @@ rm -rf %{buildroot}
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
* Mon Nov 16 2009 Steve Dickson <steved@redhat.com> - 0.3.3-5
|
||||
- Fixes segfaulting issues with ACEs that have empty mask fields
|
||||
|
||||
* Thu Jul 30 2009 Steve Dickson <steved@redhat.com> - 0.3.3-4
|
||||
- Change Group in spec file (bz 512580)
|
||||
|
||||
|
34
nfs4acl-0.3.3-ace.patch
Normal file
34
nfs4acl-0.3.3-ace.patch
Normal file
@ -0,0 +1,34 @@
|
||||
commit 75053cc0be7c4d78ef0c6b5e9954ee30b85705bc
|
||||
Author: Brian De Wolf <bldewolf@csupomona.edu>
|
||||
Date: Tue Sep 15 14:33:55 2009 -0700
|
||||
|
||||
allow parsing ACEs with empty masks
|
||||
|
||||
After upgrading from 0.3.2 to 0.3.3 to fix some segfaulting issues we
|
||||
had, 0.3.3 now rejects ACEs that have empty mask fields. This is
|
||||
because the function parse_alloc_fields checks whether the three strings
|
||||
are zero length. Having a zero length "type" or "who" definitely
|
||||
doesn't make sense, but having an empty mask is entirely possible. It's
|
||||
allowed in the old versions and the ZFS back-end in our setup allows
|
||||
them too. Even nfs4_getfacl prints them out, producing the frustrating
|
||||
situation where nfs4_getfacl can produce ACLs that you can't apply with
|
||||
nfs4_setfacl.
|
||||
|
||||
This patch modifies the function to not check if the mask is an empty
|
||||
string.
|
||||
|
||||
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
|
||||
|
||||
diff --git a/libnfs4acl/nfs4_ace_from_string.c b/libnfs4acl/nfs4_ace_from_string.c
|
||||
index 036d9b8..9d877fb 100644
|
||||
--- a/libnfs4acl/nfs4_ace_from_string.c
|
||||
+++ b/libnfs4acl/nfs4_ace_from_string.c
|
||||
@@ -120,7 +120,7 @@ parse_alloc_fields(char *buf, char *fields[NUMFIELDS])
|
||||
fields[i][len] = 0;
|
||||
}
|
||||
|
||||
- if (!fields[TYPE_INDEX][0] || !fields[WHO_INDEX][0] || !fields[MASK_INDEX][0])
|
||||
+ if (!fields[TYPE_INDEX][0] || !fields[WHO_INDEX][0])
|
||||
goto out_free;
|
||||
|
||||
return 0;
|
Loading…
Reference in New Issue
Block a user