Re: Glitch in sys_chroot()

Alan Cox (alan@lxorguk.ukuu.org.uk)
Thu, 14 Nov 1996 23:06:31 +0000 (GMT)


> sys_chroot() doesn't change directory after the chroot has happened.

It never used to on other OS's (which isnt to say its not a good thing
to fix)

> The simple solution in fs/open.c is the addition of the following
> to sys_chroot() before the return:
>
> iput(current->fs->pwd);
> current->fs->pwd = inode;
> inode->i_count++;

Thats certainly a good idea.