From ecea0d04290e1ec622a45680d327710acf17c07c Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Tue, 5 Feb 2019 11:33:54 -0500 Subject: [PATCH] Fix for bz#1672284 Signed-off-by: Alexander Scheel --- freeradius.spec | 16 +++++----------- radiusd.service | 2 ++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/freeradius.spec b/freeradius.spec index 89beccc..1f70b3c 100644 --- a/freeradius.spec +++ b/freeradius.spec @@ -1,7 +1,7 @@ Summary: High-performance and highly configurable free RADIUS server Name: freeradius Version: 3.0.17 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.freeradius.org/ @@ -319,16 +319,6 @@ getent group radiusd >/dev/null || /usr/sbin/groupadd -r -g 95 radiusd > /dev/n getent passwd radiusd >/dev/null || /usr/sbin/useradd -r -g radiusd -u 95 -c "radiusd user" -d %{_localstatedir}/lib/radiusd -s /sbin/nologin radiusd > /dev/null 2>&1 exit 0 -%post -%systemd_post radiusd.service -if [ $1 -eq 1 ]; then # install - # Initial installation - if [ ! -e /etc/raddb/certs/server.pem ]; then - /sbin/runuser -g radiusd -c 'umask 007; /etc/raddb/certs/bootstrap' > /dev/null 2>&1 - fi -fi -exit 0 - %preun %systemd_preun radiusd.service @@ -800,6 +790,10 @@ exit 0 %attr(640,root,radiusd) %config(noreplace) /etc/raddb/mods-available/rest %changelog +* Mon Feb 05 2019 Alexander Scheel - 3.0.17-5 +- Unit file generates certificates if not present. + Resolves: bz#1672284 + * Thu Jan 31 2019 Fedora Release Engineering - 3.0.17-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/radiusd.service b/radiusd.service index 32ed926..133788a 100644 --- a/radiusd.service +++ b/radiusd.service @@ -6,6 +6,8 @@ After=syslog.target network-online.target ipa.service dirsrv.target krb5kdc.serv Type=forking PIDFile=/var/run/radiusd/radiusd.pid ExecStartPre=-/bin/chown -R radiusd.radiusd /var/run/radiusd +ExecStartPre=/bin/sh /etc/raddb/certs/bootstrap +ExecStartPre=/bin/chgrp -R radiusd /etc/raddb/certs/ ExecStartPre=/usr/sbin/radiusd -C ExecStart=/usr/sbin/radiusd -d /etc/raddb ExecReload=/usr/sbin/radiusd -C