summaryrefslogtreecommitdiffstats
path: root/drivers/virt
diff options
context:
space:
mode:
authorDenis Efremov <efremov@linux.com>2020-08-24 15:53:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-28 12:22:50 +0200
commitda0d6b3a536bc800cb46b35cc75327fd546b6272 (patch)
treea864f7dea1e771da1790ab423e9b0f867cf40831 /drivers/virt
parent7cd7edb89437457ec36ffdbb970cc314d00c4aba (diff)
downloadlinux-da0d6b3a536bc800cb46b35cc75327fd546b6272.tar.gz
linux-da0d6b3a536bc800cb46b35cc75327fd546b6272.tar.bz2
linux-da0d6b3a536bc800cb46b35cc75327fd546b6272.zip
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>
Diffstat (limited to 'drivers/virt')
-rw-r--r--drivers/virt/vboxguest/vboxguest_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virt/vboxguest/vboxguest_linux.c b/drivers/virt/vboxguest/vboxguest_linux.c
index 32c2c52f7e84..6215a688edaf 100644
--- a/drivers/virt/vboxguest/vboxguest_linux.c
+++ b/drivers/virt/vboxguest/vboxguest_linux.c
@@ -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;