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-1.2.0-visibility.patch b/openslp-1.2.0-visibility.patch new file mode 100644 index 0000000..8c40f44 --- /dev/null +++ b/openslp-1.2.0-visibility.patch @@ -0,0 +1,36 @@ +--- libslp/Makefile.am.orig ++++ libslp/Makefile.am +@@ -26,4 +26,4 @@ libslp_la_SOURCES = libslp_dereg.c \ + libslp_mdns.c \ + libslp.h + libslp_la_LIBADD = ../common/libcommonlibslp.la +-libslp_la_LDFLAGS = -version-info 1:0:0 ++libslp_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libslp.map -version-info 1:0:0 +--- /dev/null ++++ libslp/libslp.map +@@ -0,0 +1,25 @@ ++{ ++global: ++ SLPAssociateIFList; ++ SLPAssociateIP; ++ SLPClose; ++ SLPDelAttrs; ++ SLPDereg; ++ SLPEscape; ++ SLPFindAttrs; ++ SLPFindScopes; ++ SLPFindSrvTypes; ++ SLPFindSrvs; ++ SLPFree; ++ SLPGetMDNSName; ++ SLPGetPeer; ++ SLPGetProperty; ++ SLPGetRefreshInterval; ++ SLPOpen; ++ SLPParseAttrs; ++ SLPParseSrvURL; ++ SLPReg; ++ SLPSetProperty; ++ SLPUnescape; ++local: *; ++}; diff --git a/openslp.changes b/openslp.changes index 7cf642e..c65ff14 100644 --- a/openslp.changes +++ b/openslp.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +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 + +- libslp: export only functions of the public interface + defined in slp.h + ------------------------------------------------------------------- Tue Oct 12 17:46:47 CEST 2010 - mls@suse.de diff --git a/openslp.spec b/openslp.spec index d19eeed..03fcce7 100644 --- a/openslp.spec +++ b/openslp.spec @@ -62,7 +62,8 @@ Patch19: openslp.discovery.diff 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 @@ -170,7 +171,8 @@ Authors: %patch20 %patch21 %patch22 - +%patch23 +%patch24 -p1 %build autoreconf -fiv %configure --disable-static --with-pic --enable-slpv1 \ @@ -221,10 +223,14 @@ install -m 0644 %SOURCE6 $RPM_BUILD_ROOT/usr/share/omc/svcinfo.d install -D -m 644 %{S:7} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/openslp %endif +nm -C -D %{buildroot}%_libdir/libslp.so %post -p /sbin/ldconfig %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} @@ -271,7 +277,7 @@ rm -rf $RPM_BUILD_ROOT /usr/sbin/rcopenslp /usr/sbin/rcslpd /usr/sbin/slpd -/etc/init.d/slpd +%config /etc/init.d/slpd %config(noreplace) /etc/slp.reg %config(noreplace) /etc/logrotate.d/openslp-server /usr/share/omc/svcinfo.d/slpd.xml