Commit ca60d324 authored by Matt Mackall's avatar Matt Mackall Committed by Linus Torvalds

[PATCH] random: combine legacy ioctls

ZAPENTCNT is now effectively identical to RNDCLEARPOOL, fall through
Signed-off-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 540d6998
...@@ -1749,10 +1749,6 @@ random_ioctl(struct inode * inode, struct file * file, ...@@ -1749,10 +1749,6 @@ random_ioctl(struct inode * inode, struct file * file,
wake_up_interruptible(&random_read_wait); wake_up_interruptible(&random_read_wait);
return 0; return 0;
case RNDZAPENTCNT: case RNDZAPENTCNT:
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
random_state->entropy_count = 0;
return 0;
case RNDCLEARPOOL: case RNDCLEARPOOL:
/* Clear the entropy pool counters. */ /* Clear the entropy pool counters. */
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
......
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