You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
rocket: don't let random users reset the controller
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -1399,6 +1399,9 @@ static int reset_rm2(struct r_port *info, void __user *arg)
|
||||
{
|
||||
int reset;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (copy_from_user(&reset, arg, sizeof (int)))
|
||||
return -EFAULT;
|
||||
if (reset)
|
||||
|
||||
Reference in New Issue
Block a user