blob: 50e17d2a970117a8da6f930241f76643f49cc414 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
diff -ur vboxdrv.orig/linux/SUPDrv-linux.c vboxdrv/linux/SUPDrv-linux.c
--- vboxdrv.orig/linux/SUPDrv-linux.c 2009-01-18 23:06:25.000000000 -0800
+++ vboxdrv/linux/SUPDrv-linux.c 2009-01-18 23:07:08.000000000 -0800
@@ -647,7 +647,7 @@
/*
* Only root is allowed to access the device, enforce it!
*/
- if (current->euid != 0 /* root */ )
+ if (current->cred->euid != 0 /* root */ )
{
Log(("VBoxDrvLinuxCreate: euid=%d, expected 0 (root)\n", current->euid));
return -EPERM;
@@ -660,8 +660,8 @@
rc = supdrvCreateSession(&g_DevExt, true /* fUser */, (PSUPDRVSESSION *)&pSession);
if (!rc)
{
- pSession->Uid = current->uid;
- pSession->Gid = current->gid;
+ pSession->Uid = current->cred->uid;
+ pSession->Gid = current->cred->gid;
}
pFilp->private_data = pSession;
|