Subject: Re: Dir and Solaris 2.5.1

From: Steve Chan <[email-masked]>
Date: Mon, 3 Mar 1997 15:08:31 -0800 (PST)

So, do you have a /dev/zero file under you're chroot'ed directory?
Has it been created correctly.

	Stephen
		
>
> chdir("/")                                      = 0
> execve("/bin/ls", 0xEFFFF8E4, 0xEFFFF8EC)  argc = 1
> open("/dev/zero", O_RDONLY)                     Err#16 EBUSY
> open("/dev/zero", O_RDONLY)                     Err#16 EBUSY
> open("/dev/zero", O_RDONLY)                     Err#16 EBUSY
> open("/dev/zero", O_RDONLY)                     Err#16 EBUSY
> open("/dev/zero", O_RDONLY)                     Err#16 EBUSY
> open("/dev/zero", O_RDONLY)                     Err#16 EBUSY
> open("/dev/zero", O_RDONLY)                     Err#16 EBUSY
>

---

From: Emil Isberg <[email-masked]>
Date: Tue, 4 Mar 1997 01:50:36 +0100 (MET)

<cut>
> <> cp /usr/lib/libc.so.1 /usr/lib/libdl.so.1 ~ftp/lib

Ooops .. I am getting tired .. well .. that damn mashine should be working
.. (right now I got one crashed 1 GB .. 2GB working (swap 500 MB) ~300
persons that want to hang me for not being done) .. Sorry .. ment
~ftp/usr/lib ..

> Interesting, these files are already in ~ftp/usr/lib.  But, for testing
> purposes I copied everything that I have in ~ftp/usr/lib into ~ftp/lib.

> <> cp /usr/bin/truss ~ftp/bin

> Ok, done that.

> <> chroot ~ftp /bin/truss /bin/ls
> 
> It core dumped :-(  No output at all.

Hmm .. something should be fault there then ..

> <(Skillnaden är att i andra fallet kör du truss på ls .. i första fallet
> <körde du truss på chroot .. hmm .. förresten den körde en execve .. vad
> <händer med truss då .. den borde följa.. hmm .. ja ja .. testa ..)

> ????

OOOPS .. well .. I said I am tired .. and I am also swedish .. swedish is
my natural language .. hmm .. I know I should have been born in an
englishspoken country ..

What I said was (The difference is that in my example (second case) do you
run truss on ls .. but in the the other example (the first case) you run
truss on chroot .. hmm .. but it run execve .. I don't know exactly what
truss does when it run through the exec but I think it should follow it ..
well .. better safe than sorrow (something)..)

> <Hmm .. > <> uname -a
> <SunOS bombadill 5.5.1 Generic sun4c sparc SUNW,Sun_4_50
> <> ls -l ~ftp/dev
> <total 0
> <crw-rw-rw-   1 root     root      13,  2 Feb 17 18:25 null
> <crw-rw-rw-   1 root     root      11, 42 Feb  7 16:31 tcp
> <crw-rw-rw-   1 root     root     105,  1 Feb  7 16:31 ticotsord
> <crw-rw-rw-   1 root     root      11, 41 Feb  7 16:31 udp
> <crw-rw-rw-   1 root     root      13, 12 Feb  7 16:31 zero
> <> ls -lL /dev/null /dev/tcp /dev/ticotsord /dev/udb /dev/zero
> <crw-rw-rw-   1 root     sys       13,  2 Mar  3 23:45 /dev/null
> <crw-rw-rw-   1 root     sys       11, 42 Nov 29 16:12 /dev/tcp
> <crw-rw-rw-   1 root     sys      105,  1 Nov 29 16:12 /dev/ticotsord
> <crw-rw-rw-   1 root     sys       11, 41 May  3  1996 /dev/udp
> <crw-rw-rw-   1 root     sys       13, 12 May  3  1996 /dev/zero

> You have more stuff in dev that I do, so I created the pieces that I am
> missing.  It has made no difference.

Well I got a lot there just to test (but I think I have forgotten to
remove those after the testing .. or simply haven't stop testing) ..

> The changes that I have made still do not let "dir" work.

Hmm .. then perhaps you miss the most important dl.so ?? (I missed it and
tried for long without it ..) hmm .. it's named ld.so.1 in ~ftp/usr/lib ..
(softlinked to it is ld.so) .. hmm .. well .. I'll need to check later ..
I need to get some programs installed on a mashine that almost doesn't
know it own name (and I still need to show it the network) .. *sigh*

> I'm still stumped.
Good luck .. I am here on email length ..

/Emil
"The last good thing written in C was Franz Schubert's Symphony number 9."