Subject: Re: root password prompt fails
To: None <tech-pkg@NetBSD.org>
From: Chapman Flack <nblists@anastigmatix.net>
List: tech-pkg
Date: 06/13/2006 23:04:39
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.

-Chap