[Chrootssh-users] [Solaris 7] 3 problems after connecting via patched sshd
Brought to you by:
punkball
From: Sajid A. <saj...@in...> - 2003-09-11 10:52:44
|
Setting up chroot-patched OpenSSH on Solaris 7 ---------------------------------------------- shell: bash-2.05 used openssl-0.9.7b using: openssh-3.6.1p1 used zlib-1.1.4 =20 patch version 2.5.4 used libgcc-3.2.3 =20 used osshChroot-3.6.1.diff =20 -patched sshd daemon starts-up fine; -accepts connection and chroots the user just fine; (although not critical, for the record: owner, group info for = files/dirs not displayed; uid/gid mapping not done perhaps due to absence of /etc/passwd, = /etc/group, /etc/nsswitch.conf) Few problems: [X] Problem #1 (^C, ^D et al do not work) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [CARNATION /var/log]# cd / [CARNATION /]# ls 200 bin@ etc/ kernel/ mnt/ = nsmail/ proc/ tmp/ vol/ TT_DB/ cdrom/ export/ lib@ net/ opt/ = sbin/ upgrade/ xfn/ apache-tmp/ dev/ home/ local/ new.dat pkgs/ = systeminfo usr/ backup/ devices/ jail/ lost+found/ nohup.out = platform/ test/ var/ [CARNATION /]# cd /var/log/ ; "just changed to an arbitrary dir" [CARNATION /var/log]# /usr/sbin/chroot /jail /usr/local/bin/bash ; = "testing the jail from command-line" [CARNATION /]# ls bin dev etc lib test.txt tmp usr = var [CARNATION /]# tail -f test.txt=20 ... Microsoft using a Linux service is ironic, given that Microsoft has = identified Linux as its biggest competitor. In a conference call with = analysts last month, company CFO John Connors ranked Linux as the #2 = risk faced by the company. The #1 risk was the general economic = environment, Connors said. Nearly one in five small and mid-sized = businesses are using Linux on the desktop.=20 = http://story.news.yahoo.com/news?tmpl=3Dstory&u=3D/cmp/20030821/tc_cmp/13= 100775 = -------------------------------------------------------------------------= -------------------- Test line to test 'tail' from jail... Test line to test 'tail' from jail... Test line to test 'tail' from jail... Test line to test 'tail' from jail... Test line to test 'tail' from jail... ^C [CARNATION /]#=20 (breaking from the 'tail' by ^C) [CARNATION /]# exit [CARNATION /var/log]# "jail 'seems' ok; back to where we = started" Now, loging in via an ssh connection, although chroots to the specified = dir, does not break from 'tail': [CARNATION /]$ tail -f test.txt=20 ... = http://story.news.yahoo.com/news?tmpl=3Dstory&u=3D/cmp/20030821/tc_cmp/13= 100775 = -------------------------------------------------------------------------= -------------------- Test line to test 'tail' from jail... Test line to test 'tail' from jail... ^C^C^C^C^C^Z^C^C (the only way is to close the terminal window, thereby losing the = session!) [X] Problem #2 (truss won't run! Need it to find out other dependencies = for programs I wish to add to the jail on the go...) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ldd /usr/bin/truss shows: | = /jail/usr/bin/truss present =20 libc.so.1 =3D> /usr/lib/libc.so.1 | required = libraries present =20 libdl.so.1 =3D> /usr/lib/libdl.so.1 | = /jail/usr/lib/libc.so.1 =20 /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1 | = /jail/usr/lib/libdl.so.1 =20 | = /jail/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1 but I get, for instance: [CARNATION /]# truss ls truss: getexecname() failed [X] Problem #3 (can't clear screen) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 'clear' does not work from within jail, I get: [CARNATION /]# /usr/bin/clear ; "/usr/bin/clear exists" bash: /usr/bin/clear: bad interpreter: No such file or directory +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++++++++++++++++++ [CARNATION /jail]# ls -lR ; "my jail looks like this" .: total 20 drwxrwx--- 2 apache portal 512 Sep 8 07:06 bin/ drwxrwx--- 2 apache portal 512 Sep 8 07:23 dev/ drwxrwx--- 2 apache portal 512 Sep 8 07:06 etc/ lrwxrwxrwx 1 root other 8 Sep 9 06:55 lib -> /usr/lib/ -rw-rw-r-- 1 root other 2935 Sep 11 08:01 test.txt drwxrwxrwx 3 apache portal 512 Sep 11 08:13 tmp/ drwxrwx--- 7 apache portal 512 Sep 11 07:11 usr/ drwxrwx--- 3 apache portal 512 Sep 8 12:16 var/ ./bin: total 0 ./dev: total 0 crw-rw-rw- 1 root other 21, 5 Sep 8 07:23 log crw-rw-rw- 1 root other 13, 2 Sep 8 07:22 null crw-rw-rw- 1 root other 13, 12 Sep 8 07:22 zero ./etc: total 0 ./tmp: total 2 drwx------ 2 dev portal 512 Sep 11 08:13 ssh-xgx17624/ ./tmp/ssh-xgx17624: total 0 srwxrwxr-x 1 dev portal 0 Sep 11 08:13 agent.17624=3D ./usr: total 10 drwxrwxr-x 2 root other 512 Sep 11 06:58 bin/ drwxrwxr-x 2 root other 512 Sep 9 06:49 lib/ drwxrwxr-x 3 root other 512 Sep 8 07:11 local/ drwxrwxr-x 3 root other 512 Sep 8 07:13 platform/ drwxrwxr-x 3 root other 512 Sep 11 07:12 share/ ./usr/bin: total 110 -r-xr-xr-x 1 root other 131 Sep 8 09:22 cd* -r-xr-xr-x 1 root other 647 Sep 11 06:58 clear* -r-xr-xr-x 1 root other 18704 Sep 9 06:54 ln* -r-xr-xr-x 1 root other 18120 Sep 8 09:22 ls* -r-xr-xr-x 1 root other 9588 Sep 8 09:23 tail* -r-xr-xr-x 1 root other 5540 Sep 8 11:17 truss* ./usr/lib: total 5426 -rwxr-xr-x 1 root other 211268 Sep 8 07:32 ld.so.1* -rwxr-xr-x 1 root other 1126044 Sep 8 11:23 libc.so.1* -rwxr-xr-x 1 root other 474964 Sep 8 11:22 libcurses.so.1* -rwxr-xr-x 1 root other 4908 Sep 8 11:23 libdl.so.1* -rwxr-xr-x 1 root other 19876 Sep 8 11:23 libmp.so.2* -rwxr-xr-x 1 root other 838640 Sep 8 11:23 libnsl.so.1* -rwxr-xr-x 1 root other 56988 Sep 8 11:22 libsocket.so.1* ./usr/local: total 2 drwxrwxr-x 2 root other 512 Sep 8 07:12 bin/ ./usr/local/bin: total 7216 -rwxr-xr-x 1 root other 3685104 Sep 8 07:12 bash* ./usr/platform: total 2 drwxrwxr-x 3 root other 512 Sep 8 07:13 SUNW,Ultra-60/ ./usr/platform/SUNW,Ultra-60: total 2 drwxrwxr-x 2 root other 512 Sep 8 07:14 lib/ ./usr/platform/SUNW,Ultra-60/lib: total 34 -rwxr-xr-x 1 root other 17256 Sep 8 11:23 libc_psr.so.1* ./usr/share: total 2 drwxrwxr-x 3 root other 512 Sep 11 07:12 lib/ ./usr/share/lib: total 2 drwxrwxr-x 3 root other 512 Sep 11 07:12 terminfo/ ./usr/share/lib/terminfo: total 2 drwxrwxr-x 2 root other 512 Sep 11 07:13 v/ ./usr/share/lib/terminfo/v: total 4 -rw-r--r-- 1 root other 1493 Sep 11 07:13 vt100 ./var: total 2 drwxrwxr-x 2 root other 512 Sep 8 12:16 tmp/ ./var/tmp: total 0 Any and all help will be greatly apprecited friends. Thank you all much in advance. Best regards. ^ <s.a> V |