summaryrefslogtreecommitdiffstats
path: root/drivers/block/ps2esdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/ps2esdi.c')
-rw-r--r--drivers/block/ps2esdi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c
index cf13eccaf..bef50bd36 100644
--- a/drivers/block/ps2esdi.c
+++ b/drivers/block/ps2esdi.c
@@ -1091,7 +1091,7 @@ static int ps2esdi_ioctl(struct inode *inode,
}
break;
case BLKRASET:
- if (!suser())
+ if (!capable(CAP_SYS_ADMIN))
return -EACCES;
if (!inode->i_rdev)
return -EINVAL;
@@ -1109,7 +1109,7 @@ static int ps2esdi_ioctl(struct inode *inode,
}
break;
case BLKFLSBUF:
- if (!suser())
+ if (!capable(CAP_SYS_ADMIN))
return -EACCES;
if (!inode->i_rdev)
return -EINVAL;
@@ -1118,6 +1118,8 @@ static int ps2esdi_ioctl(struct inode *inode,
return 0;
case BLKRRPART:
+ if (!capable(CAP_SYS_ADMIN))
+ return -EACCES;
return (ps2esdi_reread_partitions(inode->i_rdev));
RO_IOCTLS(inode->i_rdev, arg);
}