diff options
author | kib <kib@FreeBSD.org> | 2009-06-22 10:08:48 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-06-22 10:08:48 +0000 |
commit | 117b33aa8da5ffe5e2d9181a68446d7060b037f3 (patch) | |
tree | 6dac5e9bf9ff947b87ccda83a645d8464a60f362 /sys/cddl/compat/opensolaris | |
parent | 71e36df28b389b464418ca17444d125311b94225 (diff) | |
download | FreeBSD-src-117b33aa8da5ffe5e2d9181a68446d7060b037f3.zip FreeBSD-src-117b33aa8da5ffe5e2d9181a68446d7060b037f3.tar.gz |
O_NOFOLLOW shall be in flags, not in cmode.
Noted by: bde
Diffstat (limited to 'sys/cddl/compat/opensolaris')
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c b/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c index 328bba1..c214488 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c @@ -83,10 +83,9 @@ kobj_open_file_vnode(const char *file) } FILEDESC_XUNLOCK(fd); - flags = FREAD; + flags = FREAD | O_NOFOLLOW; NDINIT(&nd, LOOKUP, MPSAFE, UIO_SYSSPACE, file, td); - error = vn_open_cred(&nd, &flags, O_NOFOLLOW, 0, curthread->td_ucred, - NULL); + error = vn_open_cred(&nd, &flags, 0, 0, curthread->td_ucred, NULL); NDFREE(&nd, NDF_ONLY_PNBUF); if (error != 0) return (NULL); |