VFS: provide correct root directory for lookups
This fixes a VFS panic and a chroot(2) security hole. Change-Id: Ifd1923f886501cf3a73277aab89db974798c47dc
This commit is contained in:
parent
71cd1dd4b9
commit
e7b4aa7d99
1 changed files with 1 additions and 1 deletions
|
@ -430,7 +430,7 @@ struct fproc *rfp;
|
|||
|
||||
/* Is the process' root directory on the same partition?,
|
||||
* if so, set the chroot directory too. */
|
||||
if (rfp->fp_rd->v_dev == rfp->fp_wd->v_dev)
|
||||
if (rfp->fp_rd->v_dev == start_node->v_dev)
|
||||
root_ino = rfp->fp_rd->v_inode_nr;
|
||||
else
|
||||
root_ino = 0;
|
||||
|
|
Loading…
Reference in a new issue