diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-11-30 19:28:38 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-11-30 19:28:38 +0000 |
commit | fb3934f07db6d15ace429d030550efe0a66658b1 (patch) | |
tree | f902513cd88dffa058a70dbede96e48fd0f8d4cc /sys/scsi/st.c | |
parent | e61649205f107102f4eead2d28193c945c02b7ee (diff) |
No longer require write permission for read-only SCSI commands
submitted via ioctl. Eliminate scsi_do_safeioctl(), thus permitting
ch, ss and st devices to submit SCSI commands. Return EPERM rather
than EBADF when permissions are inadequate.
Allows more programs to run with fewer permissions. Problem diagnosed
by Nikolay Sturm in mplayer port.
Tested by Nikolay, ok deraadt@.
Diffstat (limited to 'sys/scsi/st.c')
-rw-r--r-- | sys/scsi/st.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 0722bed0d0a..84efb0ca844 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.42 2004/10/16 04:05:39 krw Exp $ */ +/* $OpenBSD: st.c,v 1.43 2004/11/30 19:28:37 krw Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -1296,7 +1296,7 @@ stioctl(dev, cmd, arg, flag, p) default: if (STMODE(dev) == CTLMODE) - error = scsi_do_safeioctl(st->sc_link, dev, + error = scsi_do_ioctl(st->sc_link, dev, cmd, arg, flag, p); else error = ENOTTY; |