Path: utzoo!attcan!uunet!ogicse!emory!mephisto!udel!mmdf From: archer%segin4.segin.fr@prime.com (Vincent Archer) Newsgroups: comp.os.minix Subject: Bug report Message-ID: <14694@nigel.udel.EDU> Date: 22 Mar 90 18:29:17 GMT Sender: mmdf@udel.EDU Lines: 41 I've been out of touch for a while, so I don't know wether or not the 1.5 version does this or not. Try the following program (logged in as root): # cat test.c main() { if (chroot("/usr/archer/test")) printf("No chroot!\n"); execle("/bin/ls", "ls", "/", (char *)0); } # ls test test.c test.o # test test test.c test.o # Uh? What's the matter? Where on earth did execle find a /bin/ls, if / is the directory show above? (it is, since ls / displays it!). The test above works (erroneously) on a 1.1 ST version. Fix is in fs/stadir.c in do_chroot(), before the put_inode(fp->workdir);, you add put_inode(fp->rootdir); fp->rootdir = ch_dir ? get_inode(ROOT_DEV, ROOT_INODE) : rfp->rootdir; dup_inode(fp->rootdir); Another (harmless) bug is the kill function, that does a magnificent sig=11 when used on a process that you can't send signals to. In kill.c, you add the declaration: extern char *itoa(); and everything works fine! Otherwise, any error code trash the process. It did work on PCs, because pointer were 16bits integers, but fails on Atari because ints and pointer are not of the same size! Damn these 8086 and their small segments! :-)