[BusyBox] OpenSSH on BusyBox

Nick Fedchik fnm at fusion.ukrsat.com
Wed Dec 18 08:15:04 UTC 2002


On Wed, 18 Dec 2002, Vladimir N. Oleynik wrote:

> Nick,
I change the code fragmet to debug, but it was useless:
        /* Get user data. */
        pw = getpwuid(original_real_uid);
        if (!pw) {
                log("You don't exist, go away!");
                exit(1);
        }

~ # ssh
getpwuid: Success
You don't exist, go away!

> On target presend?
> /etc/nsswitch.conf on target presend?
# /etc/nsswitch.conf
passwd:         file
group:          file
shadow:         file
hosts:          file

> > and IADM all getXXent is inside the libnss_files-2.2.5.so.
> > Also see `ldd ssh' output in one of my prev msgs.
> ldd can`t show dynamic loaded library in runtime
~ # ltrace ssh
__libc_start_main(0x0804b710, 1, 0xbffffed4, 0x0804a6b0, 0x0806fb90
<unfinished>SSLeay(0, 0, 0xbffffe68, 0x0804b737, 0xbfffff8a)  = 0x0090608f
getuid(0, 0, 0xbffffe68, 0x0804b737, 0xbfffff8a)  = 0
geteuid(0, 0, 0xbffffe68, 0x0804b737, 0xbfffff8a) = 0
getuid(0xbfffff8a, 0, 0, 0xbffffd2c, 0)           = 0
geteuid(0xbfffff8a, 0, 0, 0xbffffd2c, 0)          = 0
__errno_location(0xbfffff8a, 0, 0, 0xbffffd2c, 0) = 0x4026b540
seteuid(0, 0, 0, 0xbffffd2c, 0)                   = 0
getpwuid(0, 0, 0, 0xbffffd2c, 0)                  = 0
__errno_location(0, 0, 0, 0xbffffd2c, 0)          = 0x4026b540
strerror(0, 0, 0, 0xbffffd2c, 0)                  = 0x402614f8
vsnprintf(0xbffff860, 1024, 0x08070ffe, 0xbffffca4, 0) = 17
fprintf(0x402682c0, 0x0807560b, 0xbffff860, 6, 0getpwuid: Success
) = 19
vsnprintf(0xbffff860, 1024, 0x080711c8, 0xbffffca4, 0) = 25
fprintf(0x402682c0, 0x0807560b, 0xbffff860, 6, 0You don't exist, go away!
) = 27
exit(1, 0x402614f8, 0, 0xbffffd2c, 0 <unfinished ...>
+++ exited (status 1) +++

> > About busybox/lib_pw: here ssh is not a busybox applet, and
> > I don't known how to use  busybox/lib_pw in the standalone ssh.
> You can added for ssh Makefile
> busybox/libpwdgrp/libpwdgrp.a
> for linking procedure.
Roger that! Recompiling...

-- 
Nick Fedchik <fnm at fusion.ukrsat.com>
FNM3-RIPE (-UANIC), UkrSat ISP



More information about the busybox mailing list