Subject: Re: root password prompt fails
To: None <tech-pkg@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-pkg
Date: 06/14/2006 03:52:22
In article <448F7CC7.4000408@anastigmatix.net>,
Chapman Flack <nblists@anastigmatix.net> wrote:
>Johnny C. Lam wrote:
>> The "install" target does a just-in-time su to acquire root privileges
>> for the installation, but the su tries to get terminal settings for
>> standard input (from the pipe) using tcgetattr() and fails, which
>> causes su to exit with the puzzling "conversation failure" error.
>> ...
>> invoke a target that does a just-in-time su. I'm trying to figure
>> out a general rule we can follow in pkgsrc/mk to avoid these situations
>> altogether. Perhaps we should just avoid pipes in places where we can
>
>In an ideal world, redirecting stdin to a pipe does not change the ctty
>of the process, and if su looked at /dev/tty rather than stdin it would
>not get thrown off; this sounds like something su could be taught to do,
>if there is not some (questionable?) standard requiring it to use stdin.
>
>I think that would be a more farsighted fix than anything that could be
>changed in pkgsrc/mk.
You need to modify openpam_ttyconv.c
christos