Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 156373 - shell_cmd should use waitpid instead of wait
Summary: shell_cmd should use waitpid instead of wait
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tcp_wrappers
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas Janousek
QA Contact: David Lawrence
URL:
Whiteboard:
: 157204 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-29 15:03 UTC by Francis Montagnac
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: tcp_wrappers-7.6-46.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-28 13:53:56 UTC


Attachments (Terms of Use)

Description Francis Montagnac 2005-04-29 15:03:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041220

Description of problem:

The shell_cmd function in shell_cmd.c does the following loop to
wait for its command to terminate:

  while ((wait_pid = wait((int *) 0)) != -1 && wait_pid != child_pid)

Having now the waitpid primitive, it would be safer to use it instead:

  waitpid(child_pid, (int *) 0, 0)

otherwise an application linked with tcp_wrappers and needing to get
the exit status of its children may fail because of that loop in
shell_cmd, if /etc/hosts.allow is setup to fork a command for this
application.

That happened on our site with am-utils (amd and amq).

Version-Release number of selected component (if applicable):
tcp_wrappers-7.6-37.2.rpm

How reproducible:
Sometimes

Steps to Reproduce:
1. acces to many automount points
2. tell amd to unmount them with "amq -u"
3. repeat 1. end 2.
  

Additional info:

Comment 1 Thomas Woerner 2005-05-11 15:08:29 UTC
*** Bug 157204 has been marked as a duplicate of this bug. ***

Comment 2 Matthew Miller 2006-07-10 20:17:18 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!


Comment 3 Tomas Janousek 2007-05-28 13:53:56 UTC
This should be fixed in rawhide.


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