[cifs-utils/f16] Package getcifsacl and setcifsacl, add patch to install them in correct location.

Jeff Layton jlayton at fedoraproject.org
Sat Dec 10 02:03:51 UTC 2011


commit ca79fa9014c591071f0be7b65855443adebfb3fa
Author: Jeff Layton <jlayton at redhat.com>
Date:   Fri Dec 9 21:03:21 2011 -0500

    Package getcifsacl and setcifsacl, add patch to install them in
    correct location.

 cifs-utils-install-cifsacl-tools-in-usrbin.patch |  454 ++++++++++++++++++++++
 cifs-utils.spec                                  |    7 +
 2 files changed, 461 insertions(+), 0 deletions(-)
---
diff --git a/cifs-utils-install-cifsacl-tools-in-usrbin.patch b/cifs-utils-install-cifsacl-tools-in-usrbin.patch
new file mode 100644
index 0000000..f968a7f
--- /dev/null
+++ b/cifs-utils-install-cifsacl-tools-in-usrbin.patch
@@ -0,0 +1,454 @@
+From 92ad6e20505d4da95dfa75c499371d6be58b537d Mon Sep 17 00:00:00 2001
+From: Jeff Layton <jlayton at samba.org>
+Date: Fri, 23 Sep 2011 14:28:38 -0400
+Subject: [PATCH] acltools: install them in $bindir, not $sbindir
+
+...and get rid of the useless sed calls on the manpages. They don't have
+any explicit paths in them that need replacing.
+
+Signed-off-by: Jeff Layton <jlayton at samba.org>
+---
+ Makefile.am      |   15 +++-----
+ cifs.idmap.8.in  |    2 +-
+ cifs.upcall.8.in |    2 +-
+ getcifsacl.1     |   55 ++++++++++++++++++++++++++++
+ getcifsacl.8.in  |   55 ----------------------------
+ mount.cifs.8     |    2 +-
+ setcifsacl.1     |  104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ setcifsacl.8.in  |  104 ------------------------------------------------------
+ 8 files changed, 168 insertions(+), 171 deletions(-)
+ create mode 100644 getcifsacl.1
+ delete mode 100644 getcifsacl.8.in
+ create mode 100644 setcifsacl.1
+ delete mode 100644 setcifsacl.8.in
+
+diff --git a/Makefile.am b/Makefile.am
+index 7d4bdea..026be9f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -8,6 +8,7 @@ mount_cifs_LDADD = $(LIBCAP) $(CAPNG_LDADD)
+ 
+ man_MANS = mount.cifs.8
+ 
++bin_PROGRAMS =
+ sbin_PROGRAMS =
+ clean-local: clean-local-upcall clean-local-idmap clean-local-aclprogs
+ 
+@@ -31,7 +32,7 @@ if CONFIG_CIFSUPCALL
+ endif
+ 
+ if CONFIG_CIFSCREDS
+-bin_PROGRAMS = cifscreds
++bin_PROGRAMS += cifscreds
+ cifscreds_SOURCES = cifscreds.c resolve_host.c util.c
+ cifscreds_LDADD = -lkeyutils
+ endif
+@@ -52,20 +53,16 @@ if CONFIG_CIFSIDMAP
+ endif
+ 
+ if CONFIG_CIFSACL
+-sbin_PROGRAMS += getcifsacl
++bin_PROGRAMS += getcifsacl
+ getcifsacl_SOURCES = getcifsacl.c
+ getcifsacl_LDADD = -lkeyutils $(WINB_LDADD)
+-man_MANS += getcifsacl.8
++man_MANS += getcifsacl.1
+ 
+-sbin_PROGRAMS += setcifsacl
++bin_PROGRAMS += setcifsacl
+ setcifsacl_SOURCES = setcifsacl.c
+ setcifsacl_LDADD = -lkeyutils $(WINB_LDADD)
+-man_MANS += setcifsacl.8
++man_MANS += setcifsacl.1
+ 
+-getcifsacl.8: getcifsacl.8.in
+-	$(SED) 's,[@]sbindir@,$(sbindir),' $(srcdir)/$@.in > $@-t && mv $@-t $@
+-setcifsacl.8: setcifsacl.8.in
+-	$(SED) 's,[@]sbindir@,$(sbindir),' $(srcdir)/$@.in > $@-t && mv $@-t $@
+ endif
+ 
+ clean-local-aclprogs:
+diff --git a/cifs.idmap.8.in b/cifs.idmap.8.in
+index f2fa3b2..7e3ab1f 100644
+--- a/cifs.idmap.8.in
++++ b/cifs.idmap.8.in
+@@ -7,7 +7,7 @@
+ .\"    Source: cifs-utils 4.0
+ .\"  Language: English
+ .\"
+-.TH "CIFS\&.IDMAP" "8" "05/26/2011" "cifs-utils 4\&.0" "System Administration tools"
++.TH "CIFS\&.IDMAP" "8" "05/26/2011" "cifs-utils" "System Administration tools"
+ .\" -----------------------------------------------------------------
+ .\" * set default formatting
+ .\" -----------------------------------------------------------------
+diff --git a/cifs.upcall.8.in b/cifs.upcall.8.in
+index 03842b7..0d79a99 100644
+--- a/cifs.upcall.8.in
++++ b/cifs.upcall.8.in
+@@ -7,7 +7,7 @@
+ .\"    Source: cifs-utils 4.0
+ .\"  Language: English
+ .\"
+-.TH "CIFS\&.UPCALL" "8" "02/07/2010" "cifs-utils 4\&.0" "System Administration tools"
++.TH "CIFS\&.UPCALL" "8" "02/07/2010" "cifs-utils" "System Administration tools"
+ .\" -----------------------------------------------------------------
+ .\" * set default formatting
+ .\" -----------------------------------------------------------------
+diff --git a/getcifsacl.1 b/getcifsacl.1
+new file mode 100644
+index 0000000..cf009a1
+--- /dev/null
++++ b/getcifsacl.1
+@@ -0,0 +1,55 @@
++'\" t
++.\"     Title: cifs.idmap
++.\"    Author: [see the "AUTHOR" section]
++.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
++.\"      Date: 08/19/2011
++.\"    Manual: System Administration tools
++.\"    Source: cifs-utils 4.0
++.\"  Language: English
++.\"
++.TH "GETCIFSACL" "1" "08/19/2011" "cifs-utils" "System Administration tools"
++.\" -----------------------------------------------------------------
++.\" * set default formatting
++.\" -----------------------------------------------------------------
++.\" disable hyphenation
++.nh
++.\" disable justification (adjust text to left margin only)
++.ad l
++.\" -----------------------------------------------------------------
++.\" * MAIN CONTENT STARTS HERE *
++.\" -----------------------------------------------------------------
++.SH "NAME"
++getcifsacl \- Userspace helper to display an ACL in a security descriptor for Common Internet File System (CIFS)
++.SH "SYNOPSIS"
++.HP \w'\ 'u
++getcifsacl [\-v|\-r] {file system object}
++.SH "DESCRIPTION"
++.PP
++This tool is part of the cifs-utils suite\&.
++.PP
++getcifsacl is a userspace helper program for the Linux CIFS client file system.  It is intended to display a security descriptor including ACL for a file system object.  It is best utilized when an option of cifsacl is specified when mounting a cifs share in conjunction with winbind facility of Samba suite.
++.PP
++Fields of an ACE such as SID, type, flags, and mask are displayed separated by /.  Numeric values of type, flags, and mask are displayed in hexadecimal format.
++.SH "OPTIONS"
++.PP
++\-v
++.RS 4
++Print version number and exit\&.
++.RE
++\-r
++.RS 4
++Display a security descriptor in raw mode. Values such as type and flags are displayed in hexadecimal format, a SID is not mapped to a name.
++.RE
++.SH "SEE ALSO"
++.PP
++\fBmount.cifs\fR(8),
++\fBwinbindd\fR(8),
++\fBsetcifsacl\fR(1)
++.PP
++.SH "AUTHOR"
++.PP
++Shirish Pargaonkar wrote the getcifsacl program\&.
++.PP
++The
++Linux CIFS Mailing list
++is the preferred place to ask questions regarding these programs\&.
+diff --git a/getcifsacl.8.in b/getcifsacl.8.in
+deleted file mode 100644
+index 02e1355..0000000
+--- a/getcifsacl.8.in
++++ /dev/null
+@@ -1,55 +0,0 @@
+-'\" t
+-.\"     Title: cifs.idmap
+-.\"    Author: [see the "AUTHOR" section]
+-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+-.\"      Date: 08/19/2011
+-.\"    Manual: System Administration tools
+-.\"    Source: cifs-utils 4.0
+-.\"  Language: English
+-.\"
+-.TH "GETCIFSACL" "8" "08/19/2011" "cifs-utils 4\&.0" "System Administration tools"
+-.\" -----------------------------------------------------------------
+-.\" * set default formatting
+-.\" -----------------------------------------------------------------
+-.\" disable hyphenation
+-.nh
+-.\" disable justification (adjust text to left margin only)
+-.ad l
+-.\" -----------------------------------------------------------------
+-.\" * MAIN CONTENT STARTS HERE *
+-.\" -----------------------------------------------------------------
+-.SH "NAME"
+-getcifsacl \- Userspace helper to display an ACL in a security descriptor for Common Internet File System (CIFS)
+-.SH "SYNOPSIS"
+-.HP \w'\ 'u
+-getcifsacl [\-v|\-r] {file system object}
+-.SH "DESCRIPTION"
+-.PP
+-This tool is part of the cifs-utils suite\&.
+-.PP
+-getcifsacl is a userspace helper program for the Linux CIFS client file system.  It is intended to display a security descriptor including ACL for a file system object.  It is best utilized when an option of cifsacl is specified when mounting a cifs share in conjunction with winbind facility of Samba suite.
+-.PP
+-Fields of an ACE such as SID, type, flags, and mask are displayed separated by /.  Numeric values of type, flags, and mask are displayed in hexadecimal format.
+-.SH "OPTIONS"
+-.PP
+-\-v
+-.RS 4
+-Print version number and exit\&.
+-.RE
+-\-r
+-.RS 4
+-Display a security descriptor in raw mode. Values such as type and flags are displayed in hexadecimal format, a SID is not mapped to a name.
+-.RE
+-.SH "SEE ALSO"
+-.PP
+-\fBmount.cifs\fR(8),
+-\fBwinbindd\fR(8),
+-\fBsetcifsacl\fR(8)
+-.PP
+-.SH "AUTHOR"
+-.PP
+-Shirish Pargaonkar wrote the getcifsacl program\&.
+-.PP
+-The
+-Linux CIFS Mailing list
+-is the preferred place to ask questions regarding these programs\&.
+diff --git a/mount.cifs.8 b/mount.cifs.8
+index af49319..054e898 100644
+--- a/mount.cifs.8
++++ b/mount.cifs.8
+@@ -7,7 +7,7 @@
+ .\"    Source: cifs-utils 4.0
+ .\"  Language: English
+ .\"
+-.TH "MOUNT\&.CIFS" "8" "02/07/2010" "cifs-utils 4\&.0" "System Administration tools"
++.TH "MOUNT\&.CIFS" "8" "02/07/2010" "cifs-utils" "System Administration tools"
+ .\" -----------------------------------------------------------------
+ .\" * set default formatting
+ .\" -----------------------------------------------------------------
+diff --git a/setcifsacl.1 b/setcifsacl.1
+new file mode 100644
+index 0000000..071d72f
+--- /dev/null
++++ b/setcifsacl.1
+@@ -0,0 +1,104 @@
++'\" t
++.\"     Title: cifs.idmap
++.\"    Author: [see the "AUTHOR" section]
++.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
++.\"      Date: 08/19/2011
++.\"    Manual: System Administration tools
++.\"    Source: cifs-utils 4.0
++.\"  Language: English
++.\"
++.TH "SETCIFSACL" "1" "08/19/2011" "cifs-utils" "System Administration tools"
++.\" -----------------------------------------------------------------
++.\" * set default formatting
++.\" -----------------------------------------------------------------
++.\" disable hyphenation
++.nh
++.\" disable justification (adjust text to left margin only)
++.ad l
++.\" -----------------------------------------------------------------
++.\" * MAIN CONTENT STARTS HERE *
++.\" -----------------------------------------------------------------
++.SH "NAME"
++setcifsacl \- Userspace helper to alter an ACL in a security descriptor for Common Internet File System (CIFS)
++.SH "SYNOPSIS"
++.HP \w'\ 'u
++setcifsacl [\-v|\-a|\-D|\-M|\-S] "{one or more ACEs}" {file system object}
++.SH "DESCRIPTION"
++.PP
++This tool is part of the cifs-utils suite\&.
++.PP
++setcifsacl is a userspace helper program for the Linux CIFS client file system.  It is intended to alter an ACL of a security descriptor for a file system object.  It is best utilized when an option of cifsacl is specified when mounting a cifs share in conjunction with winbind facility of Samba suite.  Whether a security descriptor to be set is applied or not is determined by the CIFS/SMB server.
++.SH "OPTIONS"
++.PP
++\-v
++.RS 4
++Print version number and exit\&.
++.RE
++\-a
++.RS 4
++Add one or more ACEs to an ACL of a security descriptor.
++An ACE is added even if the same ACE exists in the ACL.
++.RE
++\-D
++.RS 4
++Delete one or more ACEs from an ACL of a security descriptor.
++Entire ACE has to match in an existing ACL for the listed ACEs to be deleted.
++.RE
++\-M
++.RS 4
++Modify one or more ACEs from an ACL of a security descriptor.
++SID and type are used to match for existing ACEs to be modified with the list of ACEs specified.
++.RE
++\-S
++.RS 4
++Set an ACL of security descriptor with the list of ACEs
++Existing ACL is replaced entirely with the specified ACEs.
++.RE
++.PP
++Every ACE entry starts with "ACL:"
++One or more ACEs are specified within double quotes.
++Multiple ACEs are separated by a comma.
++.PP
++Following fields of an ACE can be modified with possible values:
++.PP
++SID: Either a name or a raw SID value.
++.PP
++type: ALLOWED (0x0), DENIED (0x1), OBJECT_ALLOWED (0x5), OBJECT_DENIED (0x6)
++.PP
++flags: OBJECT_INHERIT_FLAG (OI or 0x1), CONTAINER_INHERIT_FLAG (CI or 0x2), NO_PROPAGATE_INHERIT_FLAG (NI or 0x4), INHERIT_ONLY_FLAG (IO or 0x8), INHERITED_ACE_FLAG (IA or 0x10) or a combination/OR of these values.
++.PP
++mask: Either one of FULL, CHANGE, READ, a combination of R W X D P O, or a hex value
++.SH "SEE ALSO"
++.PP
++\fBmount.cifs\fR(8),
++\fBwinbindd\fR(8),
++\fBgetcifsacl\fR(8)
++.PP
++.SH "EXAMPLES"
++.PP
++Add an ACE
++.br
++setcifsacl -a "ACL:CIFSTESTDOM\\user2:DENIED/0x1/D" <file_name>
++setcifsacl -a "ACL:CIFSTESTDOM\\user1:ALLOWED/OI|CI|NI/D" <file_name>
++.PP
++Delete an ACE
++.br
++setcifsacl -D "ACL:S-1-1-0:0x1/OI/0x1201ff" <file_name>
++.PP
++Modify an ACE
++.br
++setcifsacl -M "ACL:CIFSTESTDOM\\user1:ALLOWED/0x1f/CHANGE" <file_name>
++.PP
++Set an ACL
++.br
++setcifsacl -S "ACL:CIFSTESTDOM\\Administrator:0x0/0x0/FULL,
++.br
++ACL:CIFSTESTDOM\\user2:0x0/0x0/FULL," <file_name>
++.PP
++.SH "AUTHOR"
++.PP
++Shirish Pargaonkar wrote the setcifsacl program\&.
++.PP
++The
++Linux CIFS Mailing list
++is the preferred place to ask questions regarding these programs\&.
+diff --git a/setcifsacl.8.in b/setcifsacl.8.in
+deleted file mode 100644
+index 98ab0ac..0000000
+--- a/setcifsacl.8.in
++++ /dev/null
+@@ -1,104 +0,0 @@
+-'\" t
+-.\"     Title: cifs.idmap
+-.\"    Author: [see the "AUTHOR" section]
+-.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+-.\"      Date: 08/19/2011
+-.\"    Manual: System Administration tools
+-.\"    Source: cifs-utils 4.0
+-.\"  Language: English
+-.\"
+-.TH "SETCIFSACL" "8" "08/19/2011" "cifs-utils 4\&.0" "System Administration tools"
+-.\" -----------------------------------------------------------------
+-.\" * set default formatting
+-.\" -----------------------------------------------------------------
+-.\" disable hyphenation
+-.nh
+-.\" disable justification (adjust text to left margin only)
+-.ad l
+-.\" -----------------------------------------------------------------
+-.\" * MAIN CONTENT STARTS HERE *
+-.\" -----------------------------------------------------------------
+-.SH "NAME"
+-setcifsacl \- Userspace helper to alter an ACL in a security descriptor for Common Internet File System (CIFS)
+-.SH "SYNOPSIS"
+-.HP \w'\ 'u
+-setcifsacl [\-v|\-a|\-D|\-M|\-S] "{one or more ACEs}" {file system object}
+-.SH "DESCRIPTION"
+-.PP
+-This tool is part of the cifs-utils suite\&.
+-.PP
+-setcifsacl is a userspace helper program for the Linux CIFS client file system.  It is intended to alter an ACL of a security descriptor for a file system object.  It is best utilized when an option of cifsacl is specified when mounting a cifs share in conjunction with winbind facility of Samba suite.  Whether a security descriptor to be set is applied or not is determined by the CIFS/SMB server.
+-.SH "OPTIONS"
+-.PP
+-\-v
+-.RS 4
+-Print version number and exit\&.
+-.RE
+-\-a
+-.RS 4
+-Add one or more ACEs to an ACL of a security descriptor.
+-An ACE is added even if the same ACE exists in the ACL.
+-.RE
+-\-D
+-.RS 4
+-Delete one or more ACEs from an ACL of a security descriptor.
+-Entire ACE has to match in an existing ACL for the listed ACEs to be deleted.
+-.RE
+-\-M
+-.RS 4
+-Modify one or more ACEs from an ACL of a security descriptor.
+-SID and type are used to match for existing ACEs to be modified with the list of ACEs specified.
+-.RE
+-\-S
+-.RS 4
+-Set an ACL of security descriptor with the list of ACEs
+-Existing ACL is replaced entirely with the specified ACEs.
+-.RE
+-.PP
+-Every ACE entry starts with "ACL:"
+-One or more ACEs are specified within double quotes.
+-Multiple ACEs are separated by a comma.
+-.PP
+-Following fields of an ACE can be modified with possible values:
+-.PP
+-SID: Either a name or a raw SID value.
+-.PP
+-type: ALLOWED (0x0), DENIED (0x1), OBJECT_ALLOWED (0x5), OBJECT_DENIED (0x6)
+-.PP
+-flags: OBJECT_INHERIT_FLAG (OI or 0x1), CONTAINER_INHERIT_FLAG (CI or 0x2), NO_PROPAGATE_INHERIT_FLAG (NI or 0x4), INHERIT_ONLY_FLAG (IO or 0x8), INHERITED_ACE_FLAG (IA or 0x10) or a combination/OR of these values.
+-.PP
+-mask: Either one of FULL, CHANGE, READ, a combination of R W X D P O, or a hex value
+-.SH "SEE ALSO"
+-.PP
+-\fBmount.cifs\fR(8),
+-\fBwinbindd\fR(8),
+-\fBgetcifsacl\fR(8)
+-.PP
+-.SH "EXAMPLES"
+-.PP
+-Add an ACE
+-.br
+-setcifsacl -a "ACL:CIFSTESTDOM\\user2:DENIED/0x1/D" <file_name>
+-setcifsacl -a "ACL:CIFSTESTDOM\\user1:ALLOWED/OI|CI|NI/D" <file_name>
+-.PP
+-Delete an ACE
+-.br
+-setcifsacl -D "ACL:S-1-1-0:0x1/OI/0x1201ff" <file_name>
+-.PP
+-Modify an ACE
+-.br
+-setcifsacl -M "ACL:CIFSTESTDOM\\user1:ALLOWED/0x1f/CHANGE" <file_name>
+-.PP
+-Set an ACL
+-.br
+-setcifsacl -S "ACL:CIFSTESTDOM\\Administrator:0x0/0x0/FULL,
+-.br
+-ACL:CIFSTESTDOM\\user2:0x0/0x0/FULL," <file_name>
+-.PP
+-.SH "AUTHOR"
+-.PP
+-Shirish Pargaonkar wrote the setcifsacl program\&.
+-.PP
+-The
+-Linux CIFS Mailing list
+-is the preferred place to ask questions regarding these programs\&.
+-- 
+1.7.6.2
+
diff --git a/cifs-utils.spec b/cifs-utils.spec
index 6925b04..7faca04 100644
--- a/cifs-utils.spec
+++ b/cifs-utils.spec
@@ -12,6 +12,7 @@ URL:            http://linux-cifs.samba.org/cifs-utils/
 BuildRoot:      %{_tmppath}/%{name}-%{version}%{pre_release}-%{release}-root-%(%{__id_u} -n)
 
 Source0:        ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2
+Patch0:         cifs-utils-install-cifsacl-tools-in-usrbin.patch
 
 BuildRequires:  libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake samba-winbind-devel
 Requires:       keyutils
@@ -26,6 +27,7 @@ file system.
 
 %prep
 %setup -q -n %{name}-%{version}%{pre_release}
+%patch0 -p1
 
 %build
 %configure --prefix=/usr
@@ -42,8 +44,12 @@ rm -rf %{buildroot}
 %defattr(-,root,root,-)
 %doc
 /sbin/mount.cifs
+%{_bindir}/getcifsacl
+%{_bindir}/setcifsacl
 %{_sbindir}/cifs.upcall
 %{_sbindir}/cifs.idmap
+%{_mandir}/man1/getcifsacl.1.gz
+%{_mandir}/man1/setcifsacl.1.gz
 %{_mandir}/man8/cifs.upcall.8.gz
 %{_mandir}/man8/cifs.idmap.8.gz
 %{_mandir}/man8/mount.cifs.8.gz
@@ -51,6 +57,7 @@ rm -rf %{buildroot}
 %changelog
 * Fri Sep 23 2011 Jeff Layton <jlayton at redhat.com> 5.1-1
 - update to 5.1
+- add getcifsacl and setcifsacl to package
 
 * Fri Jul 29 2011 Jeff Layton <jlayton at redhat.com> 5.0-2
 - mount.cifs: fix check_newline retcode check (bz# 726717)


More information about the scm-commits mailing list