[BusyBox] OpenSSH on BusyBox

Nick Fedchik fnm at fusion.ukrsat.com
Wed Dec 18 08:58:03 UTC 2002


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

First what I said, there was successfull usage of
busybox/libpwdgrp/libpwdgrp.a:
openssh-3.5p1/Makefile
...
LIBS=-lpwdgrp -lutil -lz -lnsl  -lcrypto -lcrypt
...
LDFLAGS=-L. -Lopenbsd-compat/ -L../../ramdisk/usr/lib
-L../busybox/libpwdgrp

Next is:
> > ~ # ltrace ssh
> > __libc_start_main(0x0804b710, 1, 0xbffffed4, 0x0804a6b0, 0x0806fb90
> > <unfinished>SSLeay(0, 0, 0xbffffe68, 0x0804b737, 0xbfffff8a)  = 0x0090608f
...
> Hmm.
> You can see approximately this line also:
> open("/etc/nsswitch.conf", O_RDONLY)    = 3
> fstat(3, {...})                         = 0
Yes, it should be so if I will use strace instead of ltrace.
ok, let's `strace ssh'

open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=96, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40read(3, "# /etc/nsswitch.conf\npasswd:    "..., 1024) = 96
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x40015000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
...
open("/lib/libnss_file.so.2", O_RDONLY) = -1 ENOENT (No such file or
directory)
stat64("/lib", {st_mode=S_IFDIR|0555, st_size=864, ...}) = 0
...
write(2, "You don\'t exist, go away!\r\n", 27You don't exist, go away!
) = 27
_exit(1)                                = ?

So I start to laugh at this place long and strongly :))))
Re-read this:
> > > On target presend?
> > > /etc/nsswitch.conf on target presend?
> > # /etc/nsswitch.conf
> > passwd:         file
> > group:          file
> > shadow:         file
> > hosts:          file
# /etc/nsswitch.conf
passwd:         files
group:          files
shadow:         files
hosts:          files

Just one symbol `s' was the source of the problem!
Fixed on-fly by editing /etc/nsswitch.conf :)

Very thanks about Your help, Vladimir!

-- 
Nick Fedchik <nick at fedchik.org.ua>
FNM3-RIPE (-UANIC), UkrSat ISP



More information about the busybox mailing list