diff options
author | 2011-04-23 17:01:04 +0000 | |
---|---|---|
committer | 2011-04-23 17:01:04 +0000 | |
commit | c5c080b5c231b9ada24c02a6bdea91984decbcfd (patch) | |
tree | 23cc2a3c485448b699fa502d8292a4c0cf19bd33 /sys/dev/vnd.c | |
parent | backout the miod change since it is wrong (diff) | |
download | wireguard-openbsd-c5c080b5c231b9ada24c02a6bdea91984decbcfd.tar.xz wireguard-openbsd-c5c080b5c231b9ada24c02a6bdea91984decbcfd.zip |
The previous code only prevented the vnd from being opened for write in
both simple and non-simple mode. Restore this behaviour by removing the
openmask check.
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r-- | sys/dev/vnd.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 917913d1b42..0e3db970b49 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.111 2011/04/23 14:57:01 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.112 2011/04/23 17:01:04 jsing Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -226,13 +226,6 @@ vndopen(dev_t dev, int flags, int mode, struct proc *p) part = DISKPART(dev); pmask = 1 << part; - /* Allow access to the raw device even if we are open. */ - if (sc->sc_dk.dk_openmask && !(part == RAW_PART) && - !(mode == S_IFCHR)) { - error = EBUSY; - goto bad; - } - /* Check that the partition exists. */ if (part != RAW_PART && ((sc->sc_flags & VNF_HAVELABEL) == 0 || |