Blame SOURCES/rhnsd-5.0.13-7-el7-to-rhnsd-5.0.13-7.1-el7.patch

cc76d3
diff --git a/rhnsd.c b/rhnsd.c
cc76d3
index ad2100d..493aac0 100644
cc76d3
--- a/rhnsd.c
cc76d3
+++ b/rhnsd.c
cc76d3
@@ -310,8 +310,12 @@ static int write_pid (const char *file)
cc76d3
     FILE *fp;
cc76d3
 
cc76d3
     fp = fopen (file, "w");
cc76d3
-    if (fp == NULL)
cc76d3
-	return -1;
cc76d3
+    if (fp == NULL) {
cc76d3
+        return -1;
cc76d3
+    } else if (chmod (file, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) != 0) {
cc76d3
+        fclose(fp);
cc76d3
+        return -1;
cc76d3
+    }
cc76d3
 
cc76d3
     fprintf (fp, "%d\n", getpid ());
cc76d3
     if (fflush (fp) || ferror (fp)) {
cc76d3
diff --git a/rhnsd.spec b/rhnsd.spec
cc76d3
index 333a555..8ef3a39 100644
cc76d3
--- a/rhnsd.spec
cc76d3
+++ b/rhnsd.spec
cc76d3
@@ -5,7 +5,7 @@ Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.
cc76d3
 URL:     https://fedorahosted.org/spacewalk
cc76d3
 Name: rhnsd
cc76d3
 Version: 5.0.13
cc76d3
-Release: 7%{?dist}
cc76d3
+Release: 7.1%{?dist}
cc76d3
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
cc76d3
 
cc76d3
 BuildRequires: gettext
cc76d3
@@ -138,6 +138,9 @@ rm -fr $RPM_BUILD_ROOT
cc76d3
 %doc LICENSE
cc76d3
 
cc76d3
 %changelog
cc76d3
+* Tue Sep 12 2017 Gennadii Altukhov <galt@redhat.com> 5.0.13-7.1
cc76d3
+- Resolves: #1489119 - change permissions for rhnsd.pid (galt@redhat.com)
cc76d3
+
cc76d3
 * Mon Mar 06 2017 Gennadii Altukhov <galt@redhat.com> 5.0.13-7
cc76d3
 - Resolves: #1409562 - fix BZ IDs in spec file (galt@redhat.com)
cc76d3