Have package install config files in /etc/request-key.d for cifs.idmap

and cifs.spnego key types.
This commit is contained in:
Jeff Layton 2011-12-09 21:51:01 -05:00
parent a1d2550223
commit fe0cb12e47
2 changed files with 63 additions and 1 deletions

View File

@ -0,0 +1,52 @@
From a58988c1b9b096da85f99e6fabb7a311bfa3e81d Mon Sep 17 00:00:00 2001
From: Jeff Layton <jlayton@samba.org>
Date: Fri, 9 Dec 2011 21:45:49 -0500
Subject: [PATCH] contrib: add a set of sample /etc/request-key.d files
Add a contrib directory, a set of sample /etc/request-key.d files and
a README that explains what they're for.
Signed-off-by: Jeff Layton <jlayton@samba.org>
---
contrib/request-key.d/README | 7 +++++++
contrib/request-key.d/cifs.idmap.conf | 1 +
contrib/request-key.d/cifs.spnego.conf | 1 +
3 files changed, 9 insertions(+), 0 deletions(-)
create mode 100644 contrib/README
create mode 100644 contrib/request-key.d/README
create mode 100644 contrib/request-key.d/cifs.idmap.conf
create mode 100644 contrib/request-key.d/cifs.spnego.conf
diff --git a/contrib/README b/contrib/README
new file mode 100644
index 0000000..e69de29
diff --git a/contrib/request-key.d/README b/contrib/request-key.d/README
new file mode 100644
index 0000000..b605da7
--- /dev/null
+++ b/contrib/request-key.d/README
@@ -0,0 +1,7 @@
+As of version 1.5.5, prior to opening /etc/request-key.conf, the
+request-key utility will look first in /etc/request-key.d for a file of
+the key type name plus ".conf". These files are example config files
+that distro packagers can use to have request-key autoconfigured to
+use the cifs utilities that are installed. Typically, distro packagers
+will want to drop these into /etc/request-key.d.
+
diff --git a/contrib/request-key.d/cifs.idmap.conf b/contrib/request-key.d/cifs.idmap.conf
new file mode 100644
index 0000000..84d3d5e
--- /dev/null
+++ b/contrib/request-key.d/cifs.idmap.conf
@@ -0,0 +1 @@
+create cifs.idmap * * /usr/sbin/cifs.idmap %k
diff --git a/contrib/request-key.d/cifs.spnego.conf b/contrib/request-key.d/cifs.spnego.conf
new file mode 100644
index 0000000..a94afd8
--- /dev/null
+++ b/contrib/request-key.d/cifs.spnego.conf
@@ -0,0 +1 @@
+create cifs.spnego * * /usr/sbin/cifs.upcall %k
--
1.7.7.3

View File

@ -3,7 +3,7 @@
Name: cifs-utils
Version: 5.2
Release: 1%{pre_release}%{?dist}
Release: 2%{pre_release}%{?dist}
Summary: Utilities for mounting and managing CIFS mounts
Group: System Environment/Daemons
@ -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: 0001-contrib-add-a-set-of-sample-etc-request-key.d-files.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
@ -34,6 +36,9 @@ make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/request-key.d
install -m 644 contrib/request-key.d/cifs.idmap.conf %{buildroot}%{_sysconfdir}/request-key.d
install -m 644 contrib/request-key.d/cifs.spnego.conf %{buildroot}%{_sysconfdir}/request-key.d
%clean
rm -rf %{buildroot}
@ -51,8 +56,13 @@ rm -rf %{buildroot}
%{_mandir}/man8/cifs.upcall.8.gz
%{_mandir}/man8/cifs.idmap.8.gz
%{_mandir}/man8/mount.cifs.8.gz
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.idmap.conf
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.conf
%changelog
* Fri Dec 09 2011 Jeff Layton <jlayton@redhat.com> 5.2-2
- add /etc/request-key.d files
* Fri Dec 09 2011 Jeff Layton <jlayton@redhat.com> 5.2-1
- update to 5.2