rpms/cyrus-sasl/devel cyrus-sasl.spec, 1.82, 1.83 saslauthd.init, 1.5, 1.6 saslauthd.sysconfig, 1.2, 1.3
Jan F. Chadima
jfch2222 at fedoraproject.org
Wed Sep 23 16:02:01 UTC 2009
Author: jfch2222
Update of /cvs/pkgs/rpms/cyrus-sasl/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8812
Modified Files:
cyrus-sasl.spec saslauthd.init saslauthd.sysconfig
Log Message:
Add possibility to run the saslauth without root privilegies (#185614)
Index: cyrus-sasl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cyrus-sasl/devel/cyrus-sasl.spec,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -p -r1.82 -r1.83
--- cyrus-sasl.spec 21 Aug 2009 12:58:56 -0000 1.82
+++ cyrus-sasl.spec 23 Sep 2009 16:01:58 -0000 1.83
@@ -1,10 +1,14 @@
+%define username saslauth
+%define hint "Saslauthd user"
+%define homedir %{_var}/empty/%{username}
+
%define _plugindir2 %{_libdir}/sasl2
%define bootstrap_cyrus_sasl 0
Summary: The Cyrus SASL library
Name: cyrus-sasl
Version: 2.1.23
-Release: 2%{?dist}
+Release: 3%{?dist}
License: BSD
Group: System Environment/Libraries
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
@@ -41,6 +45,12 @@ BuildRequires: db4-devel
BuildRequires: openldap-devel
%endif
Requires(post): chkconfig, /sbin/service
+Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
+Requires(postun): /usr/sbin/userdel /usr/sbin/groupdel
+Requires: /sbin/nologin
+Provides: user(%username) = %hint
+Provides: group(%username) = %hint
+
%description
The %{name} package contains the Cyrus implementation of SASL.
@@ -292,6 +302,10 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/cat8/sas
%clean
test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
+%pre
+/usr/sbin/groupadd -r %{username} 2> /dev/null || :
+/usr/sbin/useradd -c \"%{hint}\" -g %{username} -s /sbin/nologin -r -d %{homedir} %{username} 2> /dev/null || :
+
%post
/sbin/chkconfig --add saslauthd
@@ -305,6 +319,8 @@ fi
if [ $1 -ne 0 ] ; then
/sbin/service saslauthd condrestart 2>&1 > /dev/null
fi
+/usr/sbin/userdel %{username}
+/usr/sbin/groupdel %{username}
%post lib -p /sbin/ldconfig
%postun lib -p /sbin/ldconfig
@@ -371,6 +387,9 @@ fi
%{_sbindir}/sasl2-shared-mechlist
%changelog
+* Wed Sep 23 2009 Jan F. Chadima <jchadima at redhat.com> - 2.1.23-3
+- Add possibility to run the saslauth without root privilegies (#185614)
+
* Fri Aug 21 2009 Tomas Mraz <tmraz at redhat.com> - 2.1.23-2
- rebuilt with new openssl
Index: saslauthd.init
===================================================================
RCS file: /cvs/pkgs/rpms/cyrus-sasl/devel/saslauthd.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- saslauthd.init 23 Jan 2009 16:05:35 -0000 1.5
+++ saslauthd.init 23 Sep 2009 16:01:58 -0000 1.6
@@ -38,7 +38,7 @@ lockfile=/var/lock/subsys/$prog
start() {
[ -x $path ] || exit 5
echo -n $"Starting $prog: "
- daemon $path -m $SOCKETDIR -a $MECH $FLAGS
+ daemon $DAEMONOPTS $path -m $SOCKETDIR -a $MECH $FLAGS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
Index: saslauthd.sysconfig
===================================================================
RCS file: /cvs/pkgs/rpms/cyrus-sasl/devel/saslauthd.sysconfig,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- saslauthd.sysconfig 29 Aug 2005 18:27:47 -0000 1.2
+++ saslauthd.sysconfig 23 Sep 2009 16:01:58 -0000 1.3
@@ -6,6 +6,9 @@ SOCKETDIR=/var/run/saslauthd
# of which mechanism your installation was compiled with the ablity to use.
MECH=pam
+# Options sent to the saslauthd. If the MECH is other than "pam" uncomment the next line.
+# DAEMONOPTS=--user saslauth
+
# Additional flags to pass to saslauthd on the command line. See saslauthd(8)
# for the list of accepted flags.
FLAGS=
More information about the fedora-extras-commits
mailing list