Bug 2308 - su doesn't print error message when fork () fails
su doesn't print error message when fork () fails
Product: Red Hat Linux
Classification: Retired
Component: sh-utils (Show other bugs)
i386 Linux
low Severity low
: ---
: ---
Assigned To: Cristian Gafton
Depends On:
  Show dependency treegraph
Reported: 1999-04-21 06:28 EDT by martin
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-07-28 21:13:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description martin 1999-04-21 06:28:54 EDT
There's a small problem in su (sh-utils 1.16):

run_shell () is already run with the target user's identity;
when USE_PAM you'll find this code around line 519:

  child = fork();
  if (child == 0) {  /* child shell */

This uses a fork () when we already have the identity of
the target user and does not catch any errors when this
fork fails.

The problem occured when trying to su from root to a
non-root user which already had the maximum number of
possible processes running. Su simply died without doing
anything and there was no error message at all.

One should change this code to make it at least write an
error message to syslog - it is very confusing for root
if the su simply fails without printing an error message.

Comment 1 Jay Turner 1999-06-30 12:46:59 EDT
This issue has been forwarded to a developer for further action.
Comment 2 Cristian Gafton 1999-07-28 21:13:59 EDT
fixed in sh-utils-1.16-24 and later

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