svn commit: trunk/busybox/loginutils

Bernhard Fischer rep.nop at aon.at
Sun Sep 3 17:41:10 UTC 2006


On Sun, Sep 03, 2006 at 10:11:34AM -0700, vda at busybox.net wrote:
>Author: vda
>Date: 2006-09-03 10:11:34 -0700 (Sun, 03 Sep 2006)
>New Revision: 16045
>
>Log:
>sulogin: fix bug: -tNNN didn't work

Just a sidenote..

>@@ -87,7 +88,7 @@
> 			close(0);
> 			close(1);
> 			close(2);
>-			if (open(device, O_RDWR) >= 0) {
>+			if (open(device, O_RDWR) == 0) {
> 				dup(0);
> 				dup(0);

A cursory look, init (twice), sulogin, telnetd duplicate
dup(0);dup(0).

A couple of others have variations of dup2(0,1);dup2(0,2);
Some manually do something like a wdup(x,y) that warns.

Perhaps something where a byte or two could be saved..

cheers,
Bernhard



More information about the busybox mailing list