Bug 118342 - sys-apps/shadow-4.0.14: su doesn't recognize the option -c
Bug#: 118342 Product:  Gentoo Linux Version: 2005.1 Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: xororand@frexx.de
Component: Core system
URL: 
Summary: sys-apps/shadow-4.0.14: su doesn't recognize the option -c
Keywords:  
Status Whiteboard: 
Opened: 2006-01-08 17:27 0000
Description:   Opened: 2006-01-08 17:27 0000
sys-apps/shadow has a getopts() related bug which breaks the -c option which is
used by some scripts, so people might depend on it. This bug is also mentioned
in the official change log: ftp://ftp.pld.org.pl/software/shadow/ChangeLog

temporary solution: downgrade to sys-apps/shadow-4.0.13

------- Comment #1 From SpanKY 2006-01-09 06:27:04 0000 -------
the ChangeLog lists fixes for -c, it doesnt mention any bugs

------- Comment #2 From jack_mort 2006-01-09 12:38:11 0000 -------
Well I don't konw if the changes intended to modify the -c option but if you
want it to work now, you have to specify the user, even if you want to su to
root : 

- before : su -c foo bar => executes foo bar using root privileges
- after : su -c foo bar => -c isn't a recognized option, but su root -c foo bar
will still work

------- Comment #3 From SpanKY 2006-01-09 14:54:27 0000 -------
you could use `su - -c foo bar` or `su -- -c foo bar`, but yes, `su -c foo bar`
should work

------- Comment #4 From SpanKY 2006-01-09 16:00:01 0000 -------
grabbed a fix from upstream cvs and added to 4.0.14-r1

------- Comment #5 From Wolfgang Frisch 2006-01-09 18:40:36 0000 -------
Thanks alot, that was quick.

------- Comment #6 From Olaf Freyer 2006-01-10 05:53:34 0000 -------
*** Bug 118004 has been marked as a duplicate of this bug. ***