[PATCH] ttyname.c Re: [uClibc]tinylogin vs uclibc problems

Danny Lepage danny.lepage at cognicase.com
Tue Nov 5 15:21:54 UTC 2002


Hi there.

It seems that uclibc ttyname() have some problem when we are not using
devfs or devpts and stdin,stdout and stderr are links to
/proc/self/fd/(0,1,2).

In this case, ttyname returns "stdin" instead of the ttyname.

The include patch fixed it. It modifies __check_dir_for_tty_match() to
use lstat instead of stat so that it won't return "softlinks" as tty
name, only the "real name" of a char device.

Regards,

Danny

On Mon, 2002-11-04 at 21:54, Danny Lepage wrote:
> From: "Mr Pink" <eleclerc at cgocable.ca>
> >
> > Login[19]:password incorrect for root on stdin
> 
> for root on stdin ?!?!
> 
> I this case, my guess is that /dev/stdin is not in /etc/securetty.
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: uClibc-0.9.15.ttyname.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20021105/fcf2f4bf/attachment.bin 


More information about the uClibc mailing list