From owner-freebsd-stable@FreeBSD.ORG Mon Jan 25 09:40:41 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 0E3021065672 for ; Mon, 25 Jan 2010 09:40:41 +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 BE20B8FC0A for ; Mon, 25 Jan 2010 09:40:40 +0000 (UTC) Received: from meplus.info (localhost [127.0.0.1]) by mwinf8208.laposte.net (SMTP Server) with ESMTP id E8B0E700050A; Mon, 25 Jan 2010 10:40:38 +0100 (CET) Received: from [192.168.1.133] (137.228.100-84.rev.gaoland.net [84.100.228.137]) by mwinf8208.laposte.net (SMTP Server) with ESMTP id 6B46270004F7; Mon, 25 Jan 2010 10:40:38 +0100 (CET) X-ME-UUID: 20100125094038442.6B46270004F7@mwinf8208.laposte.net Message-ID: <4B5D674F.9070903@laposte.net> Date: Mon, 25 Jan 2010 10:41:35 +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)gggruggvucftvghtrhhoucdtuddrvdeltddrtdehucetggdotefuucfrrhhofhhilhgvmecuoehnohhnvgeqnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucdlqddutddtmdenfhhrvggvsghsugefgiculddqfedtmdenfhhrvggvsghsugdgucdlqddutddmneeuufffvdigucdlqddvtddmnehgvghnvghrihgtjdculdeftddmnehtohcutghhrghtucdlhedtmd Cc: 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: Mon, 25 Jan 2010 09:40:41 -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. well, all other oses (netbsd, openbsd, ubuntu at least) don't do it this = way, they all password prompt to /dev/tty instead of stdout. freebsd is the only one which prompt to stdout. Regards, Cyrille Lefevre --=20 mailto:Cyrille.Lefevre-lists@laposte.net