[Pkg-shadow-devel] Bug#333138: marked as forwarded (chfn behaves bogusly when either fd 0, 1 or 2 is not a tty)

Alexander Gattin xrgtn at yandex.ru
Tue Oct 11 19:17:20 UTC 2005


Hi!

Christian wrote:
> Tomasz, could you have a look at the patch proposed by Robert Millan
> for Debian bug #331138: http://bugs.debian.org/331138
> 
> As usual, please just keep us posted if commited or not....
> 
> ----- Forwarded message from Robert Millan <rmh at aybabtu.com> -----
> 
> Date: Tue, 11 Oct 2005 08:10:15 +0200
> From: Robert Millan <rmh at aybabtu.com>
> To: Alexander Gattin <xrgtn at yandex.ru>
> Organisation: free as in freedom
> Subject: Bug#333138: [Pkg-shadow-devel] chfn behaves bogusly when either fd 0,
> 	1 or 2 is not a tty
> Cc: 333138 at bugs.debian.org

Shit! Why the hell did I miss this message? Appears
that I have some strange problem with my yandex e-mail.
OK, now I see your patch, Robert.

> The problem with this one is that when it's being
> called indirectly by adduser,
> then your script has no control over it.

Sorry, I don't understand -- I always thought adduser
calls (let's take) chfn passing all info to it on
cmdline.

> This patch solves the problem. It affects the first lines of output (since
> they're in the same buffer), and all subsequent prompt queries.

Yes, this is quite obvious _workaround_, but I wouldn't
consider this a "fix" for the "bug". That's my personal
opinion.

> I've tested it with:
> 
>   # cat | chfn rmh 2>&1 | cat

Today this woks, tomorrow you will need smth. slightly
different and it will break in some other place. I'll
just repeat that interactive mode utils can't _in_
_general_ be scripted/controlled using pipesi -- ptys
should be used instead (or cmdline).

-- 
WBR,
xrgtn



More information about the Pkg-shadow-devel mailing list