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/ss.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/ss.c')
-rw-r--r-- | sys/scsi/ss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/ss.c b/sys/scsi/ss.c index b842a5dcf93..3c2bed9e41c 100644 --- a/sys/scsi/ss.c +++ b/sys/scsi/ss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ss.c,v 1.49 2004/05/09 04:01:59 krw Exp $ */ +/* $OpenBSD: ss.c,v 1.50 2004/11/30 19:28:37 krw Exp $ */ /* $NetBSD: ss.c,v 1.10 1996/05/05 19:52:55 christos Exp $ */ /* @@ -734,7 +734,7 @@ ssioctl(dev, cmd, addr, flag, p) default: if (SSMODE(dev) != MODE_CONTROL) return (ENOTTY); - return (scsi_do_safeioctl(ss->sc_link, dev, cmd, addr, + return (scsi_do_ioctl(ss->sc_link, dev, cmd, addr, flag, p)); } return (error); |