Auto sync2gitlab import of nfs4-acl-tools-0.3.5-3.el8.src.rpm

This commit is contained in:
James Antill 2022-05-26 11:59:45 -04:00
parent 60a99dc296
commit a47407dc3a
6 changed files with 376 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/nfs4-acl-tools-0.3.5.tar.gz

1
EMPTY
View File

@ -1 +0,0 @@

View File

@ -0,0 +1,76 @@
diff -up nfs4-acl-tools-0.3.5/man/man1/nfs4_getfacl.1.orig nfs4-acl-tools-0.3.5/man/man1/nfs4_getfacl.1
--- nfs4-acl-tools-0.3.5/man/man1/nfs4_getfacl.1.orig 2018-08-21 12:07:51.000000000 -0400
+++ nfs4-acl-tools-0.3.5/man/man1/nfs4_getfacl.1 2019-07-17 13:21:14.920774997 -0400
@@ -28,6 +28,12 @@ flag is specified,
.B nfs4_getfacl
will list the NFSv4 ACLs of all files and directories recursively.
+If the
+.BR -c / --omit-header
+flag is specified,
+.B nfs4_getfacl
+will not display the comment header (Do not print filename).
+
The output format for an NFSv4 file ACL, e.g., is:
.RS
.nf
diff -up nfs4-acl-tools-0.3.5/nfs4_getfacl/nfs4_getfacl.c.orig nfs4-acl-tools-0.3.5/nfs4_getfacl/nfs4_getfacl.c
--- nfs4-acl-tools-0.3.5/nfs4_getfacl/nfs4_getfacl.c.orig 2019-07-17 13:23:47.030033107 -0400
+++ nfs4-acl-tools-0.3.5/nfs4_getfacl/nfs4_getfacl.c 2019-07-17 13:23:12.818750147 -0400
@@ -46,6 +46,7 @@ static void usage(int);
static void more_help();
static char *execname;
static void print_acl_from_path();
+static int ignore_comment = 0;
static int recursive(const char *fpath, const struct stat *sb, int tflag, struct FTW *ftwbuf)
{
@@ -57,6 +58,7 @@ static struct option long_options[] = {
{"more-help", 0, 0, 'H' },
{"help", 0, 0, 'h' },
{"recursive", 0, 0, 'R' },
+ {"omit-header", 0, 0, 'c'},
{ NULL, 0, 0, 0, },
};
@@ -73,7 +75,7 @@ int main(int argc, char **argv)
goto out;
}
- while ((opt = getopt_long(argc, argv, "HR?h", long_options, NULL)) != -1) {
+ while ((opt = getopt_long(argc, argv, "HR?hc", long_options, NULL)) != -1) {
switch(opt) {
case 'H':
more_help();
@@ -83,7 +85,9 @@ int main(int argc, char **argv)
case 'R':
do_recursive = 1;
break;
-
+ case 'c':
+ ignore_comment = 1;
+ break;
default:
usage(1);
res = 0;
@@ -115,8 +119,10 @@ static void print_acl_from_path(const ch
struct nfs4_acl *acl;
acl = nfs4_acl_for_path(fpath);
if (acl != NULL) {
- printf("\n# file: %s\n", fpath);
+ if (ignore_comment == 0)
+ printf("# file: %s\n", fpath);
nfs4_print_acl(stdout, acl);
+ printf("\n");
nfs4_free_acl(acl);
}
}
@@ -125,7 +131,7 @@ static void usage(int label)
{
if (label)
fprintf(stderr, "%s %s -- get NFSv4 file or directory access control lists.\n", execname, VERSION);
- fprintf(stderr, "Usage: %s [-R] file ...\n -H, --more-help\tdisplay ACL format information\n -?, -h, --help\tdisplay this help text\n -R --recursive\trecurse into subdirectories\n", execname);
+ fprintf(stderr, "Usage: %s [-R] file ...\n -H, --more-help\tdisplay ACL format information\n -?, -h, --help\tdisplay this help text\n -R --recursive\trecurse into subdirectories\n -c, --omit-header\tDo not display the comment header (Do not print filename)\n", execname);
}
static void more_help()

View File

@ -0,0 +1,135 @@
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;

163
nfs4-acl-tools.spec Normal file
View File

@ -0,0 +1,163 @@
Name: nfs4-acl-tools
Version: 0.3.5
Release: 3%{?dist}
Summary: The nfs4 ACL tools
Group: Applications/System
License: BSD
URL: http://git.linux-nfs.org/?p=bfields/nfs4-acl-tools.git;a=summary
Source0: http://linux-nfs.org/~bfields/nfs4-acl-tools/%{name}-%{version}.tar.gz
BuildRequires: libtool
BuildRequires: libattr-devel
Patch001: nfs4-acl-tools-0.3.5-c-option.patch
Patch002: nfs4-acl-tools-0.3.5-setfacl-skip-comment.patch
%description
This package contains commandline ACL utilities for the Linux
NFSv4 client.
%prep
%autosetup -p1
%build
%configure \
CFLAGS="%{build_cflags} -D_FILE_OFFSET_BITS=64" \
LDFLAGS="%{build_ldflags}"
%make_build
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING INSTALL README TODO VERSION
%{_bindir}/nfs4_editfacl
%{_bindir}/nfs4_getfacl
%{_bindir}/nfs4_setfacl
%{_mandir}/man1/*
%{_mandir}/man5/*
%changelog
* Thu Jul 18 2019 Steve Dickson <steved@redhat.com> 0.3.5-2
Gating tests: add gating.yaml (bz 1681966)
* Wed Jul 17 2019 Steve Dickson <steved@redhat.com> 0.3.5-2
- nfs4_getfacl: Add new option -c/--omit-header (bz 1698281)
- nfs4_setfacl: Skip comment field while reading ACE(s) (bz 1687299)
* Wed Jul 17 2019 Steve Dickson <steved@redhat.com> 0.3.5-1
- Gating tests: run tests from tests namespace (bz 1681966)
* Sat Oct 6 2018 Steve Dickson <steved@redhat.com> 0.3.5-0
- Updated to the latest upstream release: 0.3.5 (bz 1630606)
* Tue Sep 18 2018 Troy Dawson <tdawson@redhat.com> - 0.3.4-1
- Remove gui which was still a proof of concept
- Resolves: bug#1542228
* Tue Aug 14 2018 Steve Dickson <steved@redhat.com> 0.3.4-0
- Updated to the latest upstream release: 0.3.4 (bz 1602029)
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Feb 02 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.3.3-18
- use %%qmake_qt4 macro to ensure proper build flags
* Fri Jul 31 2015 Steve Dickson <steved@redhat.com> 0.3.3-17
- Handle the setting of DENY ace for DELETE, WRITE_OWNER (bz 1249103)
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.3.3-15
- Rebuilt for GCC 5 C++11 ABI change
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Tue Jul 15 2014 Nahum Shalman <nshalman-rpm@elys.com> 0.3.3-13
- Add patch to allow GUI tool to build correctly
- Package GUI tool in a child package
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Nov 16 2009 Steve Dickson <steved@redhat.com> - 0.3.3-6
- Fix a memory leak in nfs4_getfacl
* 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)
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Feb 18 2009 Steve Dickson <steved@redhat.com> - 0.3.3-1
- Updated to latest upstream version: 0.3.3
* Wed Oct 29 2008 Steve Dickson <steved@redhat.com> - 0.3.2-3
- Removed fuzzness from the compile.patch (bz 321745)
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.3.2-2
- Autorebuild for GCC 4.3
* Fri Oct 26 2007 Steve Dickson <steved@redhat.com> - 0.3.2-1
- Updated to latest upstream version 0.3.2
* Tue Mar 27 2007 Steve Dickson <steved@redhat.com> - 0.3.1-1.2
- Checked in to Fedora CVS
* Thu Mar 8 2007 Steve Dickson <steved@redhat.com> - 0.3.1-1.1
- Updated to latest upstream version 0.3.1 which eliminated the
need for the patches introduced in the previous commit.
* Tue Mar 6 2007 Tom "spot" Callaway <tcallawa@redhat.com> 0.3.0-1.1
- lose the BR for autotools
- Patch in support for destdir
- use %%configure macro, make DESTDIR= install
- add sparc to -fPIE (trivial, but correct)
- destdir revealed missing/poorly created symlink, patch fixes it, add nfs4_editfacl to files
- LDFLAGS passed to configure/exported were being blindly overwritten, patch fixes
* Fri Mar 2 2007 Steve Dickson <steved@redhat.com> - 0.3.0-1
- Updated to latest upstream version 0.3.0
- Fixed minor issues in spec file from the package review
* Fri Feb 16 2007 Steve Dickson <steved@redhat.com> - 0.2.0-1
- Initial commit

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (nfs4-acl-tools-0.3.5.tar.gz) = c23d5c5c676c03cbb8016de32e384086525df6f181c85b36331f42b9bab023ab5158c4e01096f837da5d59c64d8a247cc7e92c9d37bd6bb38fc2aed960705618