Bug 16275 - Infinite recursion in "apmd status" script
Summary: Infinite recursion in "apmd status" script
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apmd   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-08-15 18:17 UTC by andrzej
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-16 22:05:06 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description andrzej 2000-08-15 18:17:09 UTC
The script in /etc/rc.d/init.d/apmd defines a shell function status(),
which includes the line "status apmd". This was presumably intended to
invoke the status() of /etc/init.d/functions, but instead ends up calling
itself recursively, ultimately leading to the shell running out of memory
and crashing.

A natural fix would be to rename the status() of apmd, or to simply inline
its body in the case-statement below.

Comment 1 Alan Cox 2000-08-16 10:43:58 UTC

Replacing status with dostatus() for the internal function makes everything
happy again

Comment 2 Glen Foster 2000-08-16 22:05:04 UTC
Bero, please fix this ASAP.

Comment 3 Phil Knirsch 2000-08-17 16:17:01 UTC
Has been fixed (probably by Bero).

Comment 4 Gregory Leblanc 2000-09-18 22:51:52 UTC
Would this be liable to cause '/etc/rc.d/init.d/apmd status' to seg fault and
dump core?  gdb -c core followed by bt gives me a very very very long list of
calls.  Thanks,

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