Heads up for kernel 2.6.29 - module build failure with 2.1.0

Discussions related to using VirtualBox on Linux hosts.

Heads up for kernel 2.6.29 - module build failure with 2.1.0

Postby sboyce » 3. Jan 2009, 16:27

Distro is openSUSE 11.2 Alpha0 x86_64.
Kernel 2.6.28 is OK, from 2.6.28-git1 errors:-
barrabas:/usr/src/vboxdrv-2.1.0 # make
*** Building 'vboxdrv' module ***
make[1]: Entering directory `/usr/share/virtualbox/src/vboxdrv'
make KBUILD_VERBOSE= -C /lib/modules/2.6.28-git5-smp/build SUBDIRS=/usr/share/virtualbox/src/vboxdrv SRCROOT=/usr/share/virtualbox/src/vboxdrv modules
make[2]: Entering directory `/usr/src/linux-2.6.28-git5'
CC [M] /usr/share/virtualbox/src/vboxdrv/linux/SUPDrv-linux.o
/usr/share/virtualbox/src/vboxdrv/linux/SUPDrv-linux.c: In function ‘VBoxDrvLinuxCreate’:
/usr/share/virtualbox/src/vboxdrv/linux/SUPDrv-linux.c:706: error: ‘struct task_struct’ has no member named ‘euid’
/usr/share/virtualbox/src/vboxdrv/linux/SUPDrv-linux.c:719: error: ‘struct task_struct’ has no member named ‘uid’
/usr/share/virtualbox/src/vboxdrv/linux/SUPDrv-linux.c:720: error: ‘struct task_struct’ has no member named ‘gid’
make[3]: *** [/usr/share/virtualbox/src/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** [_module_/usr/share/virtualbox/src/vboxdrv] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.28-git5'
make[1]: *** [vboxdrv] Error 2
make[1]: Leaving directory `/usr/share/virtualbox/src/vboxdrv'
make: *** [all] Error 2
sboyce
 
Posts: 23
Joined: 10. Nov 2007, 02:47
Location: Halesowen, W. Midlands, UK

Postby nowster » 4. Jan 2009, 02:34

Code: Select all   Expand viewCollapse view
--- a/vboxdrv/linux/SUPDrv-linux.c 2008-12-29 16:15:53.000000000 +0000
+++ b/vboxdrv/linux/SUPDrv-linux.c        2009-01-04 00:02:20.346070537 +0000
@@ -703,7 +703,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;
@@ -716,8 +716,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;
nowster
 
Posts: 2
Joined: 4. Jan 2009, 02:03

Postby sboyce » 6. Jan 2009, 00:18

Patch applied, problem solved.....Thanks.
sboyce
 
Posts: 23
Joined: 10. Nov 2007, 02:47
Location: Halesowen, W. Midlands, UK

Postby JackieBrown » 13. Jan 2009, 06:00

That worked for me as well.

Thanks.

It looks like the auth credentials are changing with this kernel? I guess this explains some other issues involving running some apps as root.
JackieBrown
 
Posts: 6
Joined: 20. Oct 2007, 19:27

Re: Heads up for kernel 2.6.29 - module build failure with 2.1.0

Postby colonius » 12. Dec 2009, 14:37

Hello,

can you explain how to apply the patch ?

Klaus
colonius
 
Posts: 3
Joined: 2. Jul 2007, 20:22


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 22 guests