patch-2.1.100 linux/drivers/scsi/sr_ioctl.c

Next file: linux/drivers/scsi/st.c
Previous file: linux/drivers/scsi/sd_ioctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
@@ -106,8 +106,8 @@
 	    break;
 	case ILLEGAL_REQUEST:
             if (!quiet)
-                printk("sr%d: CDROM (ioctl) reports ILLEGAL REQUEST.\n",
-                       target);
+		printk(KERN_ERR "sr%d: CDROM (ioctl) reports ILLEGAL "
+		       "REQUEST.\n", target);
             if (SCpnt->sense_buffer[12] == 0x20 &&
                 SCpnt->sense_buffer[13] == 0x00) {
                 /* sense: Invalid command operation code */
@@ -121,7 +121,7 @@
 #endif
 	    break;
 	default:
-	    printk("sr%d: CDROM (ioctl) error, command: ", target);
+	    printk(KERN_ERR "sr%d: CDROM (ioctl) error, command: ", target);
 	    print_command(sr_cmd);
 	    print_sense("sr", SCpnt);
             err = -EIO;
@@ -792,7 +792,7 @@
 	return 0;
 
     case BLKRASET:
-	if(!suser())
+	if(!capable(CAP_SYS_ADMIN))
         	return -EACCES;
 	if(!(cdi->dev))
         	return -EINVAL;
@@ -804,7 +804,7 @@
     RO_IOCTLS(cdi->dev,arg);
 
     case BLKFLSBUF:
-	if(!suser())
+	if(!capable(CAP_SYS_ADMIN))
 		return -EACCES;
 	if(!(cdi->dev))
 		return -EINVAL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov