[SCSI] aacraid: fix security weakness
[powerpc.git] / drivers / scsi / aacraid / linit.c
index 0523cc6..143e4c1 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);
 }