Skip to content

Commit

Permalink
virt: vbox: Use current_uid() in vbg_misc_device_requestor()
Browse files Browse the repository at this point in the history
Modify vbg_misc_device_requestor() to use current_uid() wrapper.

Signed-off-by: Denis Efremov <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
evdenis authored and gregkh committed Aug 28, 2020
1 parent 7cd7edb commit da0d6b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/virt/vboxguest/vboxguest_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static u32 vbg_misc_device_requestor(struct inode *inode)
VMMDEV_REQUESTOR_CON_DONT_KNOW |
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;
else
requestor |= VMMDEV_REQUESTOR_USR_USER;
Expand Down

0 comments on commit da0d6b3

Please sign in to comment.