patch-2.1.100 linux/drivers/cdrom/sbpcd.c
Next file: linux/drivers/char/apm_bios.c
Previous file: linux/drivers/block/xd.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Wed May 6 10:56:03 1998
- Orig file:
v2.1.99/linux/drivers/cdrom/sbpcd.c
- Orig date:
Thu Feb 12 20:56:05 1998
diff -u --recursive --new-file v2.1.99/linux/drivers/cdrom/sbpcd.c linux/drivers/cdrom/sbpcd.c
@@ -4189,7 +4189,7 @@
switch (cmd) /* Sun-compatible */
{
case DDIOCSDBG: /* DDI Debug */
- if (!suser()) RETURN_UP(-EPERM);
+ if (!capable(CAP_SYS_ADMIN)) RETURN_UP(-EPERM);
i=sbpcd_dbg_ioctl(arg,1);
RETURN_UP(i);
case CDROMRESET: /* hard reset the drive */
@@ -4478,7 +4478,7 @@
} /* end of CDROMREADAUDIO */
case BLKRASET:
- if(!suser()) RETURN_UP(-EACCES);
+ if(!capable(CAP_SYS_ADMIN)) RETURN_UP(-EACCES);
if(!(cdi->dev)) RETURN_UP(-EINVAL);
if(arg > 0xff) RETURN_UP(-EINVAL);
read_ahead[MAJOR(cdi->dev)] = arg;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov