diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2009-03-24 09:04:31 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2009-03-24 09:04:31 +0000 |
commit | 6105ca7120025b4c14f909e556e34df061eac730 (patch) | |
tree | 3817a61a2180ee7ceffeda829fdee47b1212ce7c /sys/kern | |
parent | 61afc4f1e5bee2f547fc0f6a2a18f22aa98d99a8 (diff) |
only apply the strict limit on F_SETLK; ok deraadt@ fgsch@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_lockf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_lockf.c b/sys/kern/vfs_lockf.c index 4821612a300..a67eaa4d2f2 100644 --- a/sys/kern/vfs_lockf.c +++ b/sys/kern/vfs_lockf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_lockf.c,v 1.14 2009/03/23 09:29:33 otto Exp $ */ +/* $OpenBSD: vfs_lockf.c,v 1.15 2009/03/24 09:04:30 otto Exp $ */ /* $NetBSD: vfs_lockf.c,v 1.7 1996/02/04 02:18:21 christos Exp $ */ /* @@ -181,7 +181,7 @@ lf_advlock(struct lockf **head, off_t size, caddr_t id, int op, /* * Create the lockf structure. */ - lock = lf_alloc(p->p_ucred->cr_uid, op != F_UNLCK ? 1 : 2); + lock = lf_alloc(p->p_ucred->cr_uid, op == F_SETLK ? 1 : 2); if (!lock) return (ENOLCK); lock->lf_start = start; |