Separate chroot() into kern_chroot(). Rename change_dir() to checkvp_chdir()
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 16 Mar 2004 17:53:53 +0000 (17:53 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 16 Mar 2004 17:53:53 +0000 (17:53 +0000)
commite24b948e7688956f2d1894c08ea3246b660d7c38
tree0d0e88109d3138d55dbf2446a642de1db4b9778d
parent56ba60b1bf7570f7122428912223b754c4f13fd2
Separate chroot() into kern_chroot().  Rename change_dir() to checkvp_chdir()
and reorganize the code to avoid doing weird things to the passed vnode's
lock and ref count in deep subroutines (which lead to buggy code).

Fix a bug in chdir()/kern_chdir() (the namei data was not being freed in all
cases), and also fix a bug in symlink() (missing zfree in error case).

Submitted-by: Paul Herman <pherman@frenchfries.net>
Additional-work-by: dillon
sys/kern/vfs_syscalls.c
sys/sys/kern_syscall.h
sys/sys/namei.h