[Pkg-shadow-devel] Bug#360276: su: wrong exit status for commands
	terminated by signals
    Eero Häkkinen 
    eero17 at bigfoot.com
       
    Fri Mar 31 21:04:49 UTC 2006
    
    
  
Package: login
Version: 1:4.0.15-1
Severity: normal
Tags: patch
If the command executed by su is terminated by a signal which was not 
cautch, the number of that signal is given to the parent process of su. In 
that situation su exists with an exit status 0 and thus does not give any 
indication of the signal.
Thus the command
    # su nobody -c 'kill -s HUP $$'; echo $?
    0
should print 129 (128+1) instead of 0.
The source code lacks the test of WIFEXITED and the use of WTERMSIG for the 
status returned by waitpid.
-- System Information:
Architecture: powerpc (ppc)
Kernel: Linux 2.6.15-1-powerpc
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shadow-4.0.15.patch
Type: text/x-diff
Size: 309 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20060401/38c2b324/shadow-4.0.15.bin
    
    
More information about the Pkg-shadow-devel
mailing list