Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jan 2010 10:34:50 +0100
From:      Cyrille Lefevre <cyrille.lefevre-lists@laposte.net>
To:        Glen Barber <glen.j.barber@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: su password prompt ti stdout instead of /dev/tty
Message-ID:  <4B5D65BA.5060300@laposte.net>
In-Reply-To: <20100125025744.GA94378@orion.hsd1.pa.comcast.net>
References:  <4B5CEC53.3090402@laposte.net> <20100125025744.GA94378@orion.hsd1.pa.comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help

Glen Barber a =E9crit :
> Hi,
>=20
> Cyrille Lefevre wrote:=20
>> Hi,
>>
>> su password prompt is displayed to *stdout* instead of */dev/tty*.
>>
>> # su user
>> $ su root -c date > /tmp/date 2>&1
>> (nothing displayed)
>> $ cat /tmp/date
>> Password:su: Sorry
>> $ uname -a
>> FreeBSD freebsd8.my.domain 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov=
=20
>> 21 15:48:17 UTC 2009=20
>> root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>>
>> I suppose this is a getpass() problem ?
>>
>=20
> I cannot reproduce this.  In fact,
>=20
> 	su root -c date > /tmp/date
>=20
> hangs waiting for input.

in fact, you exactly reproduce what I want, su hangs for input bcoz the
password prompt is displayed onto stdout, but you don't know it unless
you look at the output file.

> 	orion % su root -c date > /tmp/date=20
> 	^C
> 	su: Sorry
> 	orion % less /tmp/date=20
> 	Password:
> 	orion %=20
>=20
> Also, you appear to be running an unpatched version of FreeBSD 8.0,
> subject to the rtld exploit (among a few others).  I'd suggest upgradin=
g.

don't care, it's a vmware guest for testing. thanks anyway.

Regards,

Cyrille Lefevre
--=20
mailto:Cyrille.Lefevre-lists@laposte.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B5D65BA.5060300>