[BusyBox] Re: login buggy also in 1.00pre5

Friedrich Lobenstock fl at fl.priv.at
Tue Jan 6 13:19:10 UTC 2004


Rob Landley wrote on 06.01.2004 08:36 MET:
> On Monday 05 January 2004 20:48, Friedrich Lobenstock wrote:
> 
> 
>>>>I have the problem also when running login from a shell or
>>>
>>>>from getty (here it hangs forever). So I think the telnet daemon
>>>
>>>>does not make a difference here. BTW I use the utelnetd that is
>>>>included in the Axis developer kit, which I see got included now
>>>>in busybox, but the sources are a little different.
>>>
>>>Hmm.  Nothing has changed in the login stuff since -pre3.
>>>I'm really at a loss to explain your problems.
>>
>>I could make it break in pre3 too if I enabled inetd. See my
>>posting http://busybox.net/lists/busybox/2003-December/010186.html
> 
> 
> Sounds like a symbol collision.  If two files are defining the same function 
> name (to do two different things), and the linker is using just the first one 
> it finds...
> 
> Does it break if inetd and login are the _only_ two things you have enabled in 
> the same busybox binary?  (make allnoconfig, make menuconfig and switch those 
> two on, then try it...)

busybox-1.00-pre3> sed -e "/^$/d" -e "/^#/d" .config
HAVE_DOT_CONFIG=y
CONFIG_FEATURE_BUFFERS_GO_IN_BSS=y
CONFIG_FEATURE_VERBOSE_USAGE=y
CONFIG_FEATURE_DEVPTS=y
EXTRA_CFLAGS_OPTIONS=""
PREFIX="./_install"
CONFIG_USE_BB_PWD_GRP=y
CONFIG_LOGIN=y
CONFIG_FEATURE_SECURETTY=y
CONFIG_FEATURE_SH_IS_NONE=y
CONFIG_DEBUG=y

Result: "login" works

Now with inetd enabled:

busybox-1.00-pre3> sed -e "/^$/d" -e "/^#/d" .config
HAVE_DOT_CONFIG=y
CONFIG_FEATURE_BUFFERS_GO_IN_BSS=y
CONFIG_FEATURE_VERBOSE_USAGE=y
CONFIG_FEATURE_DEVPTS=y
EXTRA_CFLAGS_OPTIONS=""
PREFIX="./_install"
CONFIG_USE_BB_PWD_GRP=y
CONFIG_LOGIN=y
CONFIG_FEATURE_SECURETTY=y
CONFIG_INETD=y
CONFIG_FEATURE_INETD_SUPPORT_BILTIN_ECHO=y
CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DISCARD=y
CONFIG_FEATURE_INETD_SUPPORT_BILTIN_TIME=y
CONFIG_FEATURE_INETD_SUPPORT_BILTIN_DAYTIME=y
CONFIG_FEATURE_INETD_SUPPORT_BILTIN_CHARGEN=y
CONFIG_FEATURE_SH_IS_NONE=y
CONFIG_DEBUG=y

Result: "login" segfaults!


If I NOW disable BB_PWD_GRP it works even with inetd enabled.


> If so, I'd guess either a function or a global variable in login and inetd 
> have the same name, without saying "static" where they should...

I don't know which strange interdependencies there are but it
looks really weired to me.


Now having learned from that I try to reproduce it with BB_PWD_GRP
disabled in pre5:

busybox-1.00-pre5> sed -e "/^$/d" -e "/^#/d" .config
HAVE_DOT_CONFIG=y
CONFIG_FEATURE_BUFFERS_GO_IN_BSS=y
CONFIG_FEATURE_VERBOSE_USAGE=y
CONFIG_FEATURE_DEVPTS=y
EXTRA_CFLAGS_OPTIONS=""
PREFIX="./_install"
CONFIG_LOGIN=y
CONFIG_FEATURE_SECURETTY=y
CONFIG_FEATURE_SH_IS_NONE=y
CONFIG_DEBUG=y

Result: "login" works!

Maybe you can shine a light on what is going on here. Why
did it work in pre3 without inetd but BB_PWD_GRP enabled
and why not in pre5?

-- 
MfG / Regards
Friedrich Lobenstock




More information about the busybox mailing list