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 2308 - su doesn't print error message when fork () fails
Summary: su doesn't print error message when fork () fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sh-utils
Version: 5.2
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-04-21 10:28 UTC by martin
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-07-29 01:13:18 UTC


Attachments (Terms of Use)

Description martin 1999-04-21 10:28:54 UTC
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.

Martin

Comment 1 Jay Turner 1999-06-30 16:46:59 UTC
This issue has been forwarded to a developer for further action.

Comment 2 Cristian Gafton 1999-07-29 01:13:59 UTC
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.