- Timestamp:
- Apr 9, 2024 7:16:25 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r103789 r104243 309 309 310 310 #ifdef VBOX_WITH_HARDENING 311 /** Get the effective UID within the current user namespace. */312 DECLINLINE(RTUID) vboxdrvLinuxEuid InNs(void)311 /** Get the effective UID of the current process. */ 312 DECLINLINE(RTUID) vboxdrvLinuxEuid(void) 313 313 { 314 314 # if RTLNX_VER_MIN(2,6,29) 315 315 # if RTLNX_VER_MIN(3,5,0) 316 return from_kuid(current_user_ns(),current->cred->euid);316 return __kuid_val(current->cred->euid); 317 317 # else 318 318 return current->cred->euid; … … 493 493 */ 494 494 if ( fUnrestricted 495 && vboxdrvLinuxEuid InNs() != 0 /* root */ )496 { 497 Log(("VBoxDrvLinuxCreate: euid=%d, expected 0 (root)\n", vboxdrvLinuxEuid InNs()));495 && vboxdrvLinuxEuid() != 0 /* root */ ) 496 { 497 Log(("VBoxDrvLinuxCreate: euid=%d, expected 0 (root)\n", vboxdrvLinuxEuid())); 498 498 return -EPERM; 499 499 }
Note:
See TracChangeset
for help on using the changeset viewer.