diff --git a/openslp-1.2.0-daemon.diff b/openslp-1.2.0-daemon.diff new file mode 100644 index 0000000..4a8ae10 --- /dev/null +++ b/openslp-1.2.0-daemon.diff @@ -0,0 +1,13 @@ +Index: openslp-1.2.0/slpd/slpd_main.c +=================================================================== +--- openslp-1.2.0.orig/slpd/slpd_main.c ++++ openslp-1.2.0/slpd/slpd_main.c +@@ -508,7 +508,7 @@ int Daemonize(const char* pidfile) + close(2); + setsid(); /* will only fail if we are already the process group leader */ + +- pwent = getpwnam("daemon"); ++ pwent = getpwnam("openslp"); + /*---------------------*/ + /* chroot to slp.reg.d */ + /*---------------------*/ diff --git a/openslp.changes b/openslp.changes index 480195c..c65ff14 100644 --- a/openslp.changes +++ b/openslp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 28 12:12:37 UTC 2011 - lnussel@suse.de + +- use dedicated user instead of 'daemon' (bnc#656780) + ------------------------------------------------------------------- Fri Nov 5 22:06:43 UTC 2010 - cristian.rodriguez@opensuse.org diff --git a/openslp.spec b/openslp.spec index c9e0c99..03fcce7 100644 --- a/openslp.spec +++ b/openslp.spec @@ -63,6 +63,7 @@ Patch20: openslp.initda.diff Patch21: openslp.ignorespaces.diff Patch22: openslp.parseext.diff Patch23: openslp-1.2.0-visibility.patch +Patch24: openslp-1.2.0-daemon.diff %description Service Location Protocol is an IETF standards track protocol that provides a framework that allows networking applications to discover @@ -88,7 +89,7 @@ Authors: License: BSD3c Group: System/Daemons Summary: The OpenSLP Implementation of the Service Location Protocol V2 -PreReq: %fillup_prereq %insserv_prereq +PreReq: %fillup_prereq %insserv_prereq /usr/sbin/useradd Recommends: logrotate %description server @@ -171,6 +172,7 @@ Authors: %patch21 %patch22 %patch23 +%patch24 -p1 %build autoreconf -fiv %configure --disable-static --with-pic --enable-slpv1 \ @@ -226,6 +228,9 @@ nm -C -D %{buildroot}%_libdir/libslp.so %postun -p /sbin/ldconfig +%pre server +/usr/sbin/useradd -r -g daemon -d /var/lib/empty -s /sbin/nologin -c "openslp daemon" openslp 2>/dev/null || : + %post server %if 0%{?sles_version} == 9 || 0%{?sles_version} == 10 %{fillup_and_insserv -y slpd}