Bug 1255346 - radiusd does not delete the radiusd.sock file on stop if the logs were rotated
radiusd does not delete the radiusd.sock file on stop if the logs were rotated
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: freeradius (Show other bugs)
6.7
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Nikolai Kondrashov
Patrik Kis
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-20 06:55 EDT by Patrik Kis
Modified: 2016-08-08 12:15 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-08 12:15:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrik Kis 2015-08-20 06:55:35 EDT
Description of problem:
Normally radiusd deletes the /var/run/radiusd/radiusd.sock file when the daemon is stopped. This is not the case is the log files in /var/log/radius/ were rotated by logrotate in the meantime.

Version-Release number of selected component (if applicable):
freeradius-2.2.6-4.el6
logrotate-3.7.8-23.el6

How reproducible:
always

Steps to Reproduce:
# ls -l /var/log/radius/
total 8
drwx------. 2 radiusd radiusd 4096 Feb 12  2015 radacct
-rw-r-----. 1 radiusd radiusd  872 Aug 20 18:51 radius.log
# service radiusd start; echo $?; ll -Z /var/run/radiusd/; cat /var/run/radiusd/radiusd.pid; ps -ef |grep -v grep |grep radiusd
Starting radiusd: [  OK  ]
0
-rw-r--r--. radiusd radiusd unconfined_u:object_r:radiusd_var_run_t:s0 radiusd.pid
srw-rw----. radiusd radiusd unconfined_u:object_r:radiusd_var_run_t:s0 radiusd.sock
10239
radiusd  10239     1  0 18:52 ?        00:00:00 /usr/sbin/radiusd -d /etc/raddb
#
# radtest bz705723 poiuyt localhost 0 testing123
Sending Access-Request of id 18 to 127.0.0.1 port 1812
	User-Name = "bz705723"
	User-Password = "poiuyt"
	NAS-IP-Address = 10.66.87.85
	NAS-Port = 0
	Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=18, length=20
#
# cat > /etc/cron.d/0radiusd-test <<EOF
> SHELL=/bin/bash
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> MAILTO=root
> HOME=/
> * * * * * root logrotate -f /etc/logrotate.d/radiusd
> EOF
#
# date
Thu Aug 20 18:52:30 CST 2015
# date
Thu Aug 20 18:53:08 CST 2015
# ls -l /var/log/radius/
total 12
drwx------. 2 radiusd radiusd 4096 Feb 12  2015 radacct
-rw-r-----. 1 radiusd radiusd  765 Aug 20 18:53 radius.log
-rw-r-----. 1 radiusd radiusd  362 Aug 20 18:53 radius.log.1.gz
#
# cat /var/run/radiusd/radiusd.pid; ps -ef |grep -v grep |grep radiusd; service radiusd stop; echo $?; ll -Z /var/run/radiusd/; ps -ef |grep -v grep |grep radiusd
10239
radiusd  10239     1  0 18:52 ?        00:00:00 /usr/sbin/radiusd -d /etc/raddb
Stopping radiusd: [  OK  ]
0
srw-rw----. radiusd radiusd unconfined_u:object_r:radiusd_var_run_t:s0 radiusd.sock
#
# rm -f /etc/cron.d/0radiusd-test
Comment 2 Nikolai Kondrashov 2016-08-08 12:15:40 EDT
This is not a problem in RHEL7. We're not going to fix this in RHEL6.

Note You need to log in before you can comment on or make changes to this bug.