Bug 292521 - /etc/init.d/radiusd stop, restart, cond-restart broken
Summary: /etc/init.d/radiusd stop, restart, cond-restart broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: freeradius
Version: 6
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: John Dennis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-16 17:31 UTC by litt
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-17 15:39:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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 .


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