Bug 292521

Summary: /etc/init.d/radiusd stop, restart, cond-restart broken
Product: [Fedora] Fedora Reporter: litt
Component: freeradiusAssignee: John Dennis <jdennis>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 6CC: fs
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-17 15:39:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description litt 2007-09-16 17:31:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)

Description of problem:
/etc/init.d/radiusd stop doesn't stop radiusd

Because stop is used by restart and condrestart, they fail too (if radiusd is running).

This can be very bad when the intent is to update the server, with, for example an updated CRL.

Version-Release number of selected component (if applicable):
FreeRADIUS Version 1.1.7, for host i686-pc-linux-gnu, built on Aug 28 2007 at 12:19:21

How reproducible:
Always


Steps to Reproduce:
1./etc/init.d/radiusd start
2./etc/init.d/radiusd status
3./etc/init.d/radiusd stop
4./etc/init.d/radiusd status


Actual Results:
/etc/init.d/radiusd start
radiusd is stopped
Starting RADIUS server: Sun Sep 16 13:15:09 2007 : Info: Starting - reading configuration files ...
/etc/init.d/radiusd status
radiusd (pid 3623) is running...
radiusd (pid 3623) is running...
/etc/init.d/radiusd stop
radiusd (pid 3623) is running...
/etc/init.d/radiusd status
radiusd (pid 3623) is running...
radiusd (pid 3623) is running...


Expected Results:
/etc/init.d/radiusd start
radiusd is stopped
Starting RADIUS server: Sun Sep 16 13:15:09 2007 : Info: Starting - reading configuration files ...
/etc/init.d/radiusd status
radiusd (pid 3623) is running...
radiusd (pid 3623) is running...
/etc/init.d/radiusd stop
radiusd (pid 3623) is running...
Stopping RADIUS server:                                    [  OK  ]
 /etc/init.d/radiusd status
radiusd is stopped
radiusd is stopped


Additional info:
Here's the bug:
 stop)
	[ $running -ne 0 ] || exit 0
	echo -n $"Stopping RADIUS server: "

The || should be &&
        if [ already-stopped ] then exit 
   not
        if [ already-stopped ] or exit

This is severe because in my case, it caused denial of service:
   CRL was updated
   condrestart issued
      stop executed (didn't stop)
      start executed (saw we were already running)
   radiusd proceeded with the old CRL until it expired
      users were then denied service

The fix, of course is trivial.

Comment 1 Red Hat Bugzilla 2007-09-17 05:22:12 UTC
transferred from Thomas Woerner to John Dennis, requested by Steve Grubb.

Comment 2 Thomas Woerner 2007-09-17 15:39:09 UTC
Fixed in package freeradius-1.1.7-3.1 .