* [PATCH] virt: vbox: Use current_uid() in vbg_misc_device_requestor()
@ 2020-08-24 12:53 Denis Efremov
2020-08-24 14:35 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Denis Efremov @ 2020-08-24 12:53 UTC (permalink / raw)
Cc: Denis Efremov, Hans de Goede, Arnd Bergmann, Greg Kroah-Hartman,
linux-kernel
Modify vbg_misc_device_requestor() to use current_uid() wrapper.
Signed-off-by: Denis Efremov <efremov@linux.com>
---
drivers/virt/vboxguest/vboxguest_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virt: vbox: Use current_uid() in vbg_misc_device_requestor()
2020-08-24 12:53 [PATCH] virt: vbox: Use current_uid() in vbg_misc_device_requestor() Denis Efremov
@ 2020-08-24 14:35 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2020-08-24 14:35 UTC (permalink / raw)
To: Denis Efremov; +Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel
Hi,
On 8/24/20 2:53 PM, Denis Efremov wrote:
> Modify vbg_misc_device_requestor() to use current_uid() wrapper.
>
> Signed-off-by: Denis Efremov <efremov@linux.com>
Thank you, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/virt/vboxguest/vboxguest_linux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-24 14:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 12:53 [PATCH] virt: vbox: Use current_uid() in vbg_misc_device_requestor() Denis Efremov
2020-08-24 14:35 ` Hans de Goede
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.