Bug 219137 - kshd stops processes if these are in the background.
Summary: kshd stops processes if these are in the background.
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: krb5   
(Show other bugs)
Version: 4.4
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Nalin Dahyabhai
QA Contact: Brian Brock
Depends On:
Blocks: 223669
TreeView+ depends on / blocked
Reported: 2006-12-11 13:43 UTC by Jose Plans
Modified: 2007-11-17 01:14 UTC (History)
1 user (show)

Fixed In Version: RHBA-2007-0238
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-07 22:09:56 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch allowing a task to be executed in the background in kshd. (1.18 KB, patch)
2006-12-11 13:43 UTC, Jose Plans
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0238 normal SHIPPED_LIVE krb5 bug fix update 2007-05-01 17:39:38 UTC

Description Jose Plans 2006-12-11 13:43:53 UTC
Description of problem:
Using kshd and requesting it to execute tasks in the background always fails
even if it announces a success. If we trap SIGTERM, then it gets executed normally.

This comes from the upstream change :
2003-08-29  Ken Raeburn  <raeburn@mit.edu>

       * krshd.c (ignore_signals): Split out from cleanup().
       (doit): Call it when the shell process has completed, before
       calling syslog.

Which did a split in cleanup, performing all the syslog calls on
ignore_signals() to avoid deadlocks on syslog as shown in the upstream post in

Now, the problem is that upstream forgot that this copy and paste on the split
was carrying a kill(-pid, SIGTERM); causing all the processes on this group to die.

Attached is a patch respecting their idea to split signal zone, allowing the
tasks to be executed in the background.

Version-Release number of selected component (if applicable):
krb5-server-1.3.4-33 and onwards.

How reproducible:

Steps to Reproduce:
1. Setup a KDC and xinetd enabling kshell.
2. Setup access (ktab / user account).
3. Supposidly we are using "jmp" run then :
   % /usr/kerberos/bin/rsh -n -l jmp -x kdc_host "sleep 60 < /dev/null
>/dev/null 2>/dev/null&"

   This task will be terminated.
   However, if you run it with :
       "trap \"\" TERM; sleep 60...........&"
   It will work.
Actual results:
Failure even if kshd reports success.

Expected results:
Task executed in the background.

Additional info:
Patch attached fixing this small bug (UPSTREAM too).
Please let me know if you require more informations.


Comment 1 Jose Plans 2006-12-11 13:43:54 UTC
Created attachment 143289 [details]
Patch allowing a task to be executed in the background in kshd.

Comment 17 Red Hat Bugzilla 2007-05-07 22:09:56 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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