virt: vbox: Use current_uid() in vbg_misc_device_requestor()
Modify vbg_misc_device_requestor() to use current_uid() wrapper. Signed-off-by: Denis Efremov <efremov@linux.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200824125330.487083-1-efremov@linux.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7cd7edb894
commit
da0d6b3a53
@@ -35,7 +35,7 @@ static u32 vbg_misc_device_requestor(struct inode *inode)
|
|||||||
VMMDEV_REQUESTOR_CON_DONT_KNOW |
|
VMMDEV_REQUESTOR_CON_DONT_KNOW |
|
||||||
VMMDEV_REQUESTOR_TRUST_NOT_GIVEN;
|
VMMDEV_REQUESTOR_TRUST_NOT_GIVEN;
|
||||||
|
|
||||||
if (from_kuid(current_user_ns(), current->cred->uid) == 0)
|
if (from_kuid(current_user_ns(), current_uid()) == 0)
|
||||||
requestor |= VMMDEV_REQUESTOR_USR_ROOT;
|
requestor |= VMMDEV_REQUESTOR_USR_ROOT;
|
||||||
else
|
else
|
||||||
requestor |= VMMDEV_REQUESTOR_USR_USER;
|
requestor |= VMMDEV_REQUESTOR_USR_USER;
|
||||||
|
|||||||
Reference in New Issue
Block a user