[freeradius/f18] - specify homedir (/var/lib/radiusd) for radiusd user in useradd, do not permit useradd to default

John Dennis jdennis at fedoraproject.org
Thu Dec 13 17:49:17 UTC 2012


commit b37019d97bc212c53c47b0b18414686c8d9c2cbe
Author: John Dennis <jdennis at redhat.com>
Date:   Thu Dec 13 12:11:47 2012 -0500

    - specify homedir (/var/lib/radiusd) for radiusd user in useradd,
      do not permit useradd to default the homedir.

 freeradius.spec |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/freeradius.spec b/freeradius.spec
index 1251769..c97e7d1 100644
--- a/freeradius.spec
+++ b/freeradius.spec
@@ -1,7 +1,7 @@
 Summary: High-performance and highly configurable free RADIUS server
 Name: freeradius
 Version: 2.2.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+ and LGPLv2+
 Group: System Environment/Daemons
 URL: http://www.freeradius.org/
@@ -263,7 +263,7 @@ EOF
 # Make sure our user/group is present prior to any package or subpackage installation
 %pre
 getent group  radiusd >/dev/null || /usr/sbin/groupadd -r -g 95 radiusd > /dev/null 2>&1
-getent passwd radiusd >/dev/null || /usr/sbin/useradd  -r -g radiusd -u 95 -c "radiusd user" -s /sbin/nologin radiusd > /dev/null 2>&1
+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
@@ -608,6 +608,10 @@ exit 0
 %{_libdir}/freeradius/rlm_sql_unixodbc-%{version}.so
 
 %changelog
+* Thu Dec 13 2012 John Dennis <jdennis at redhat.com> - 2.2.0-3
+- specify homedir (/var/lib/radiusd) for radiusd user in useradd,
+  do not permit useradd to default the homedir.
+
 * Wed Dec 12 2012 John Dennis <jdennis at redhat.com> - 2.2.0-2
 - add security options to compiler/linker
 


More information about the scm-commits mailing list