Commit cb8d8fe9 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] IDE capability elevation fix

From: Alan Cox <alan@redhat.com>

Capability elevation bug in 2.6.0 IDE. Long fixed in 2.4.x, trivial to cure
parent 90c6dd77
......@@ -1632,12 +1632,12 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
#endif /* CONFIG_IDE_TASK_IOCTL */
case HDIO_DRIVE_CMD:
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
if (!capable(CAP_SYS_RAWIO))
return -EACCES;
return ide_cmd_ioctl(drive, cmd, arg);
case HDIO_DRIVE_TASK:
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
if (!capable(CAP_SYS_RAWIO))
return -EACCES;
return ide_task_ioctl(drive, cmd, arg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment