From owner-freebsd-stable@FreeBSD.ORG  Mon Jan 25 03:01:14 2010
Return-Path: <owner-freebsd-stable@FreeBSD.ORG>
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 2BFB11065694
	for <freebsd-stable@freebsd.org>; Mon, 25 Jan 2010 03:01:14 +0000 (UTC)
	(envelope-from glen.j.barber@gmail.com)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27])
	by mx1.freebsd.org (Postfix) with ESMTP id D3E768FC08
	for <freebsd-stable@freebsd.org>; Mon, 25 Jan 2010 03:01:13 +0000 (UTC)
Received: by qw-out-2122.google.com with SMTP id 5so166477qwd.7
	for <freebsd-stable@freebsd.org>; Sun, 24 Jan 2010 19:01:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:date:from:to:cc:subject
	:message-id:references:mime-version:content-type:content-disposition
	:in-reply-to:user-agent;
	bh=ssce4hVDqF+9L+YYLS05kelXa+A8EUmUAL4/7I7HDu0=;
	b=oz/zwz9YF9anILo8w8ZajWPUrKKAIKSjX/6bCYhc1Qa1TBq+68ojv79lRJROdBSltf
	1gijjmxD4sv8dv6yfhhbc1Ux3Rghx2aGhYOHDzlYxh02eK0Usb9G9DDlaPFJK2keb+aj
	fxLdikspOY8c8gwlQrPjZ/uebIVPsUlm9a/WU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=date:from:to:cc:subject:message-id:references:mime-version
	:content-type:content-disposition:in-reply-to:user-agent;
	b=MjRscivbe4tn1x/U3xqd1jdih1A9I+IODyg89+jZCCQ8vpvDNY9SDeCnVUZFT3o03p
	XRYSu15kebGbZOstZWgMRcuramhVO0pgHp0boB3BihQd6fTpKFNIYYJLVlba9PaDtYHZ
	6o9Y47ULFkHecmD294yWtrl4Z7tu0mGcY8hz4=
Received: by 10.224.1.37 with SMTP id 37mr3757149qad.325.1264388466354;
	Sun, 24 Jan 2010 19:01:06 -0800 (PST)
Received: from orion.hsd1.pa.comcast.net (c-71-230-240-241.hsd1.pa.comcast.net
	[71.230.240.241])
	by mx.google.com with ESMTPS id 21sm4459512qyk.4.2010.01.24.19.01.04
	(version=SSLv3 cipher=RC4-MD5); Sun, 24 Jan 2010 19:01:05 -0800 (PST)
Date: Sun, 24 Jan 2010 21:57:44 -0500
From: Glen Barber <glen.j.barber@gmail.com>
To: Cyrille Lefevre <cyrille.lefevre-lists@laposte.net>
Message-ID: <20100125025744.GA94378@orion.hsd1.pa.comcast.net>
References: <4B5CEC53.3090402@laposte.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B5CEC53.3090402@laposte.net>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: freebsd-stable@freebsd.org
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 <freebsd-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-stable>, 
	<mailto:freebsd-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-stable>
List-Post: <mailto:freebsd-stable@freebsd.org>
List-Help: <mailto:freebsd-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-stable>,
	<mailto:freebsd-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Jan 2010 03:01:14 -0000

Hi,

Cyrille Lefevre wrote: 
> 
> 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 
> 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 ?
> 

I cannot reproduce this.  In fact,

	su root -c date > /tmp/date

hangs waiting for input.

	orion % su root -c date > /tmp/date 
	^C
	su: Sorry
	orion % less /tmp/date 
	Password:
	orion % 

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 upgrading.

For what it's worth:
orion % uname -a
FreeBSD orion 8.0-STABLE FreeBSD 8.0-STABLE #20 r202187: Wed Jan 13
11:51:15 EST 2010     root@orion:/usr/obj/usr/src/sys/ORION  amd64

Regards,

-- 
Glen Barber