Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!usc!wuarchive!udel!mmdf From: archer%segin4.segin.fr@relay.prime.com (Vincent Archer) Newsgroups: comp.os.minix Subject: Fix to the chroot(2) problem. Message-ID: <27583@nigel.ee.udel.edu> Date: 16 Aug 90 07:07:27 GMT Sender: mmdf@ee.udel.edu Lines: 29 Since info-minix is up gaian, here's the fix to the chroot(2) problem reported earlier. Quite simple, isn't it? :-) Of course, there's a hack to it :-) (when generating the cdif, i forgot an earlier patch); add #include in the list of include files, otherwise ROOT_DEV remains undefined. *** old/fs/stadir.c Mon Aug 6 22:33:48 1990 --- fs/stadir.c Mon Aug 6 22:35:38 1990 *************** *** 32,37 **** --- 32,41 ---- if (who == MM_PROC_NR) { rfp = &fproc[slot1]; + put_inode(fp->fp_rootdir); + fp->fp_rootdir = (cd_flag ? get_inode(ROOT_DEV, ROOT_INODE) + : rfp->fp_rootdir); + dup_inode(fp->fp_rootdir); put_inode(fp->fp_workdir); fp->fp_workdir = (cd_flag ? fp->fp_rootdir : rfp->fp_workdir); dup_inode(fp->fp_workdir); ----------------------------------------------------------------------------- Vincent Vincent Archer | Email:archer%segin4.segin.fr@relay.prime.com "People that are good at finding excuses are never good at anything else"