VirtualBox

Changeset 45300 in vbox for trunk/src


Ignore:
Timestamp:
Apr 3, 2013 9:48:39 AM (12 years ago)
Author:
vboxsync
Message:

Linux: more CONFIG_UIDGID_STRICT_TYPE_CHECKS fixes

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r44923 r45300  
    146146
    147147#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
    148     inode->i_uid = KUIDT_INIT(sf_g->uid);
    149     inode->i_gid = KGIDT_INIT(sf_g->gid);
     148    inode->i_uid = make_kuid(current_user_ns(), sf_g->uid);
     149    inode->i_gid = make_kgid(current_user_ns(), sf_g->gid);
    150150#else
    151151    inode->i_uid = sf_g->uid;
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r44594 r45300  
    254254{
    255255#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
     256# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
     257    return from_kuid(current_user_ns(), current->cred->uid);
     258# else
    256259    return current->cred->uid;
     260# endif
    257261#else
    258262    return current->uid;
     
    263267{
    264268#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
     269# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
     270    return from_kgid(current_user_ns(), current->cred->gid);
     271# else
    265272    return current->cred->gid;
     273# endif
    266274#else
    267275    return current->gid;
     
    272280{
    273281#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
     282# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
     283    return from_kuid(current_user_ns(), current->cred->euid);
     284# else
    274285    return current->cred->euid;
     286# endif
    275287#else
    276288    return current->euid;
  • trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c

    r39432 r45300  
    430430                goto done;
    431431
     432# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
     433        pNewCreds->fsuid = GLOBAL_ROOT_UID;
     434# else
    432435        pNewCreds->fsuid = 0;
     436# endif
    433437        pOldCreds = override_creds(pNewCreds);
    434438#endif
     
    540544            goto done;
    541545
     546# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
     547        pNewCreds->fsuid = GLOBAL_ROOT_UID;
     548# else
    542549        pNewCreds->fsuid = 0;
     550# endif
    543551        pOldCreds = override_creds(pNewCreds);
    544552#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette