From 22a3ea69c15b172d7769fafab6feca76c06d0af1 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Fri, 27 Aug 2010 11:26:11 +0800 Subject: [PATCH] * Fri Aug 27 2010 Ian Kent - 1:5.0.5-31.fc15 - fix status privilege error (bz627605). --- autofs-5.0.5-fix-status-privilege-error.patch | 36 +++++++++++++++++++ autofs.spec | 7 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 autofs-5.0.5-fix-status-privilege-error.patch diff --git a/autofs-5.0.5-fix-status-privilege-error.patch b/autofs-5.0.5-fix-status-privilege-error.patch new file mode 100644 index 0000000..90f90b4 --- /dev/null +++ b/autofs-5.0.5-fix-status-privilege-error.patch @@ -0,0 +1,36 @@ +autofs-5.0.5 - fix status privilege error + +From: Ian Kent + +The recent LSB init init script change prevent normal users from using +the status init script action. Maybe the (very poor) specification is +wrong or I misread it, in either case this behaviour is unacceptable. +--- + + CHANGELOG | 2 ++ + redhat/autofs.init.in | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + + +--- autofs-5.0.5.orig/CHANGELOG ++++ autofs-5.0.5/CHANGELOG +@@ -47,6 +47,8 @@ + - fix error handing in do_mount_indirect(). + - expire thread use pending mutex. + - remove ERR_remove_state() openssl call. ++- fix init script restart option. ++- fix init script status privilege error. + + 03/09/2009 autofs-5.0.5 + ----------------------- +--- autofs-5.0.5.orig/redhat/autofs.init.in ++++ autofs-5.0.5/redhat/autofs.init.in +@@ -154,7 +154,7 @@ function reload() { + RETVAL=0 + + # Only the root user may change the service status +-if [ `id -u` -ne 0 ]; then ++if [ `id -u` -ne 0 ] && [ "$1" != "status" ]; then + echo "insufficient privilege to change service status" + exit 4 + fi diff --git a/autofs.spec b/autofs.spec index c967f61..b8ebea5 100644 --- a/autofs.spec +++ b/autofs.spec @@ -4,7 +4,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.5 -Release: 30%{?dist} +Release: 31%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -61,6 +61,7 @@ Patch49: autofs-5.0.5-include-krb5-library.patch Patch50: autofs-5.0.5-make-verbose-mode-a-little-less-verbose.patch Patch51: autofs-5.0.5-remove-ERR_remove_state-openssl-call.patch Patch52: autofs-5.0.5-fix-restart.patch +Patch53: autofs-5.0.5-fix-status-privilege-error.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel Conflicts: cyrus-sasl-lib < 2.1.23-9 @@ -155,6 +156,7 @@ echo %{version}-%{release} > .version %patch50 -p1 %patch51 -p1 %patch52 -p1 +%patch53 -p1 %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} @@ -207,6 +209,9 @@ fi %{_libdir}/autofs/ %changelog +* Fri Aug 27 2010 Ian Kent - 1:5.0.5-31.fc15 +- fix status privilege error (bz627605). + * Wed Aug 18 2010 Ian Kent - 1:5.0.5-30.fc15 - fix restart not working (bz624694).