Date: Fri, 29 Jan 2010 01:03:57 -0800 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: Oliver Fromme <olli@lurza.secnetix.de> Cc: jhell@DataIX.net, freebsd-standards@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, glen.j.barber@gmail.com Subject: Re: su password prompt to stdout instead of /dev/tty Message-ID: <20100129090357.GA38872@icarus.home.lan> In-Reply-To: <201001290802.o0T829sd050043@lurza.secnetix.de> References: <4B6228EF.5050400@laposte.net> <201001290802.o0T829sd050043@lurza.secnetix.de>
index | next in thread | previous in thread | raw e-mail
On Fri, Jan 29, 2010 at 09:02:09AM +0100, Oliver Fromme wrote:
> Cyrille Lefevre wrote:
> > found it, the guilty is prompt() in
> > src/contrib/openpam/lib/openpam_ttyconv.c and not getpass() as usual...
>
> Are you sure this affects su(1) only?
>
> > => fputs(msg, stdout);
> >
> > which should be, IMHO, something like :
> >
> > FILE *ttyp;
> > ttyp = fopen("/dev/tty", "w")
> > if (!stdtty)
> > ttyp = isatty(fileno(stderr)) ? stderr : stdout;
> > fputs(msg, ttyp);
> >
> > or, at least :
> >
> > fputs(msg, stderr);
>
> As long as it's still possible to easily redirect the prompt
> on the command line, it's fine with me.
> Right now I can do this in a script:
>
> echo -n "$myprompt: " ; su $somerole >/dev/null ...
>
> If that doesn't work anymore, I'll complain. ;-)
OpenPAM is des@'s responsibility. Has anyone brought this up to him?
--
| Jeremy Chadwick jdc@parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100129090357.GA38872>
