s/NOSYMLINK/O_NOFOLLOW/

This commit is contained in:
christos 2002-12-06 22:44:49 +00:00
parent b5b005c247
commit 0948705ad2
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_sig.c,v 1.128 2002/11/28 21:00:27 jdolecek Exp $ */
/* $NetBSD: kern_sig.c,v 1.129 2002/12/06 22:44:49 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.128 2002/11/28 21:00:27 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.129 2002/12/06 22:44:49 christos Exp $");
#include "opt_ktrace.h"
#include "opt_compat_sunos.h"
@ -1417,7 +1417,7 @@ coredump(struct proc *p)
return error;
NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, p);
error = vn_open(&nd, O_CREAT | FWRITE | FNOSYMLINK, S_IRUSR | S_IWUSR);
error = vn_open(&nd, O_CREAT | O_NOFOLLOW | FWRITE, S_IRUSR | S_IWUSR);
if (error)
return (error);
vp = nd.ni_vp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_vnops.c,v 1.58 2002/10/29 12:31:24 blymn Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.59 2002/12/06 22:44:50 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.58 2002/10/29 12:31:24 blymn Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.59 2002/12/06 22:44:50 christos Exp $");
#include "fs_union.h"
@ -108,7 +108,7 @@ vn_open(ndp, fmode, cmode)
ndp->ni_cnd.cn_nameiop = CREATE;
ndp->ni_cnd.cn_flags = LOCKPARENT | LOCKLEAF;
if ((fmode & O_EXCL) == 0 &&
((fmode & FNOSYMLINK) == 0))
((fmode & O_NOFOLLOW) == 0))
ndp->ni_cnd.cn_flags |= FOLLOW;
if ((error = namei(ndp)) != 0)
return (error);