diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-06-17 05:16:45 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-06-17 05:16:45 +0000 |
commit | be073414b870fd48cfe6d14494455438a6e886d5 (patch) | |
tree | 985c929abeae456a3255dd4dec72c7c2a0e46409 /sys | |
parent | 3fb4bab675609a4ad6e1e773caa1f49d2e3e1b09 (diff) |
SCIOCCOMMAND now requires that the device be open for writing.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index b951641bfe4..c11dfba368b 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.3 1996/06/16 23:53:16 downsj Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.4 1996/06/17 05:16:44 downsj Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.20 1996/02/14 21:47:22 christos Exp $ */ /* @@ -41,6 +41,7 @@ #include <sys/errno.h> #include <sys/param.h> #include <sys/systm.h> +#include <sys/file.h> #include <sys/malloc.h> #include <sys/buf.h> #include <sys/proc.h> @@ -294,6 +295,9 @@ scsi_do_ioctl(sc_link, dev, cmd, addr, flag, p) struct scsi_ioctl *si; int len; + if ((flag & FWRITE) == 0) + return EBADF; + si = si_get(); si->si_screq = *screq; si->si_sc_link = sc_link; |