[SCSI] aacraid: fix security weakness
[deliverable/linux.git] / drivers / scsi / aacraid / linit.c
index 0523cc6d895c47ea3827ae60981c030a6e91c4ba..143e4c16b07905da78f30ee0353851bb6c66d368 100644 (file)
@@ -517,6 +517,8 @@ static struct device_attribute *aac_dev_attrs[] = {
 static int aac_ioctl(struct scsi_device *sdev, int cmd, void __user * arg)
 {
        struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
+       if (!capable(CAP_SYS_RAWIO))
+               return -EPERM;
        return aac_do_ioctl(dev, cmd, arg);
 }
 
This page took 0.029848 seconds and 5 git commands to generate.