diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-17 10:47:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-17 10:47:36 +0000 |
commit | 5fa60e6b8ac1dea1effdf37bdd366327efc4d6d6 (patch) | |
tree | e92f50f768a4c5426a59abf8420148943ef18820 /sys/kern/kern_acct.c | |
parent | 347f9d41e3b146e27e496603a3b87886691970d0 (diff) |
for acct(), vn_open() with O_APPEND flag so that append-only files work;
problem pointed out by andrew@untraceable.net
Diffstat (limited to 'sys/kern/kern_acct.c')
-rw-r--r-- | sys/kern/kern_acct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index 0df265df5ba..32421164e78 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_acct.c,v 1.5 1997/11/06 05:58:15 csapuntz Exp $ */ +/* $OpenBSD: kern_acct.c,v 1.6 1998/05/17 10:47:35 deraadt Exp $ */ /* $NetBSD: kern_acct.c,v 1.42 1996/02/04 02:15:12 christos Exp $ */ /*- @@ -118,7 +118,7 @@ sys_acct(p, v, retval) if (SCARG(uap, path) != NULL) { NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, SCARG(uap, path), p); - if ((error = vn_open(&nd, FWRITE, 0)) != 0) + if ((error = vn_open(&nd, FWRITE|O_APPEND, 0)) != 0) return (error); VOP_UNLOCK(nd.ni_vp, 0, p); if (nd.ni_vp->v_type != VREG) { |