From owner-freebsd-stable@FreeBSD.ORG Wed Jan 27 21:49:12 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426B81065693 for ; Wed, 27 Jan 2010 21:49:12 +0000 (UTC) (envelope-from cyrille.lefevre-lists@laposte.net) Received: from out1.laposte.net (out2.laposte.net [193.251.214.119]) by mx1.freebsd.org (Postfix) with ESMTP id F13068FC2A for ; Wed, 27 Jan 2010 21:49:11 +0000 (UTC) Received: from meplus.info (localhost [127.0.0.1]) by mwinf8214.laposte.net (SMTP Server) with ESMTP id EF0287000065; Wed, 27 Jan 2010 22:49:09 +0100 (CET) Received: from [192.168.1.133] (137.228.100-84.rev.gaoland.net [84.100.228.137]) by mwinf8214.laposte.net (SMTP Server) with ESMTP id 8898C7000044; Wed, 27 Jan 2010 22:49:09 +0100 (CET) X-ME-UUID: 20100127214909559.8898C7000044@mwinf8214.laposte.net Message-ID: <4B60B4D4.3020803@laposte.net> Date: Wed, 27 Jan 2010 22:49:08 +0100 From: Cyrille Lefevre Organization: ACME User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: jhell References: <4B5CEC53.3090402@laposte.net> <20100125025744.GA94378@orion.hsd1.pa.comcast.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-me-spamlevel: not-spam X-me-spamrating: 32.799999 X-me-spamcause: OK, (-180)(0000)gggruggvucftvghtrhhoucdtuddrvdeltddruddtucetggdotefuucfrrhhofhhilhgvmecuoehnohhnvgeqnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucdlqddutddtmdenfhhrvggvsghsugefgiculddqfedtmdenfhhrvggvsghsugdgucdlqddutddmneeuufffvdigucdlqddvtddmnehgvghnvghrihgtjdculdeftddmnehtohcutghhrghtucdlhedtmd Cc: freebsd-standard@freebsd.org, freebsd-stable@freebsd.org, Glen Barber Subject: Re: su password prompt ti stdout instead of /dev/tty X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2010 21:49:12 -0000 jhell a =E9crit : > On Sun, 24 Jan 2010 21:57, glen.j.barber@ wrote: >> >> Cyrille Lefevre wrote: >>> >>> 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 No= v >>> 21 15:48:17 UTC 2009 >>> root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >>> >>> I suppose this is a getpass() problem ? >>> >=20 > This is intended operation as su(1) may not always be affiliated with a= =20 > TTY. This leaves it open for a script to chat with much like what samba= =20 > does with its passwd chat mechanism. just to feed the debate : aix 5.2 : prompt to tty hp-ux : prompt to stderr netbsd : prompt to tty solaris 9 : prompt to stderr solaris 10 : prompt to tty openbsd : prompt to tty ubuntu : prompt to stderr freebsd is the only one which prompt to stdout ! IMHO, it should at least prompt to stderr if not tty... and report errors to stderr as usually. CC -standard Regards, Cyrille Lefevre --=20 mailto:Cyrille.Lefevre-lists@laposte.net