Blob Blame History Raw
diff --git a/Makefile.rhnsd b/Makefile.rhnsd
index 080f907..4d51b8e 100644
--- a/Makefile.rhnsd
+++ b/Makefile.rhnsd
@@ -46,7 +46,7 @@ install:: all $(DIRS)
 	$(INSTALL_DATA) $(RHNSD).sysconfig $(CONFIG_DIR)/$(RHNSD)	
 
 $(RHNSD): $(RHNSD).o
-	$(CC) -o $@ $<
+	$(CC) $(CFLAGS) -o $@ $<
 %.o : %.c
 	$(CC) -DVERSION=\"$(VERSION)\" -fPIC $(CFLAGS) -c -o $@ $<
 
diff --git a/rhnsd.init b/rhnsd.init
index ac5fe89..ee3e811 100644
--- a/rhnsd.init
+++ b/rhnsd.init
@@ -37,15 +37,6 @@ RHNSD=/usr/sbin/rhnsd
 
 # Sanity checks.
 [ -x $RHNSD ] || exit 6
-RHN_UP2DATE_FILE="/etc/sysconfig/rhn/up2date"
-[ -f $RHN_UP2DATE_FILE ] || exit 6
-if [ -r $RHN_UP2DATE_FILE ]; then
-        RHN_SYSTEMID_FILE=`awk -F '=[[:space:]]*' '/^[[:space:]]*systemIdPath[[:space:]]*=/ {print $2}' $RHN_UP2DATE_FILE`
-        [ -f $RHN_SYSTEMID_FILE ] || exit 6
-elif [ "$1" != "status" ];  then
-        echo "Insufficient privilege. Cannot open file $RHN_UP2DATE_FILE for reading."
-        exit 4
-fi
 
 # Source function library.
 . /etc/rc.d/init.d/functions
diff --git a/rhnsd.init.SUSE b/rhnsd.init.SUSE
index d310523..d96e764 100644
--- a/rhnsd.init.SUSE
+++ b/rhnsd.init.SUSE
@@ -38,15 +38,6 @@ RHNSD_PIDFILE=/var/run/rhnsd.pid
 
 # Sanity checks.
 [ -x $RHNSD ] || exit 6
-RHN_UP2DATE_FILE="/etc/sysconfig/rhn/up2date"
-[ -f $RHN_UP2DATE_FILE ] || exit 6
-if [ -r $RHN_UP2DATE_FILE ]; then
-        RHN_SYSTEMID_FILE=`awk -F '=[[:space:]]*' '/^[[:space:]]*systemIdPath[[:space:]]*=/ {print $2}' $RHN_UP2DATE_FILE`
-        [ -f $RHN_SYSTEMID_FILE ] || exit 6
-elif [ "$1" != "status" ];  then
-        echo "Insufficient privilege. Cannot open file $RHN_UP2DATE_FILE for reading."
-        exit 4
-fi
 
 # Source function library.
 . /etc/rc.status
diff --git a/rhnsd.spec b/rhnsd.spec
index f39abb6..89bde9d 100644
--- a/rhnsd.spec
+++ b/rhnsd.spec
@@ -5,7 +5,7 @@ Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.
 URL:     https://fedorahosted.org/spacewalk
 Name: rhnsd
 Version: 5.0.13
-Release: 1%{?dist}
+Release: 2%{?dist}
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: gettext
@@ -46,7 +46,7 @@ your machine, and runs any actions.
 %setup -q
 
 %build
-make -f Makefile.rhnsd %{?_smp_mflags} CFLAGS="%{optflags}"
+make -f Makefile.rhnsd %{?_smp_mflags} CFLAGS="-pie -fPIE -Wl,-z,relro,-z,now %{optflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -138,6 +138,11 @@ rm -fr $RPM_BUILD_ROOT
 %doc LICENSE
 
 %changelog
+* Wed Jun 24 2015 Grant Gainey 5.0.13-2
+- Resolves: #1138939 - up2date and systemid files are managed by rhnsd itself,
+  no need to break init script if they do not exist (jdobes@redhat.com)
+- Resolves: #1092518 - PIE+RELRO for rhnsd (mkollar@redhat.com)
+
 * Mon Jun 17 2013 Michael Mraka <michael.mraka@redhat.com> 5.0.13-1
 - removed old CVS/SVN version ids