Khimenko Victor wrote:
>
> In <388450C0.C423B4A2@fht-esslingen.de> Harald Hoyer (hahoit00@fht-esslingen.de) wrote:
> > Hi,
>
> > could anybody explain me, why it is possible to eject a CD media as a
> > non-root user, if you own the device, but not a ZIP media.
>
> I can not explain since it is possible to eject BOTH CD and ZIP as a
> non-root user. What version of kernel, eject and ZIP you are using ?
Just wanted to express the need for a special non-root zip (scsi) eject
ioctl.
Parallel ZIP drive:
[harald@HarryH harald]$ strace eject -s sdb
execve("/usr/bin/eject", ["eject", "-s", "sdb"], [/* 27 vars */]) = 0
...
open("/dev/sdb", O_RDONLY|O_NONBLOCK) = 3
ioctl(3, FIBMAP, 0xbffffb2c) = -1 EACCES (Permission denied)
...
[harald@HarryH harald]$ rpm -qf /usr/bin/eject
eject-2.0.2-3
[harald@HarryH harald]$ uname -rmsv
Linux 2.2.14 #10 SMP Sam Jan 15 21:23:13 CET 2000 i686
/usr/src/linux/fs/ioctl.c:
static int file_ioctl(struct file *filp,unsigned int cmd,unsigned long
arg)
{
...
switch (cmd) {
case FIBMAP:
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
-- Harald Hoyer, Software Developer Tel. : +49-711-96437-0 Red Hat GmbH Fax. : +49-711-96437-111 Hauptstaetterstr. 58 Email: Harald.Hoyer@redhat.de D-70178 Stuttgart Web : http://www.redhat.de/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:20 EST