summaryrefslogtreecommitdiff
path: root/src/VBox/Additions/linux/sharedfolders/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Additions/linux/sharedfolders/utils.c')
-rw-r--r--src/VBox/Additions/linux/sharedfolders/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/VBox/Additions/linux/sharedfolders/utils.c b/src/VBox/Additions/linux/sharedfolders/utils.c
index aa9c3965..674af7a5 100644
--- a/src/VBox/Additions/linux/sharedfolders/utils.c
+++ b/src/VBox/Additions/linux/sharedfolders/utils.c
@@ -144,8 +144,14 @@ void sf_init_inode(struct sf_glob_info *sf_g, struct inode *inode,
#endif
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
+ inode->i_uid = make_kuid(current_user_ns(), sf_g->uid);
+ inode->i_gid = make_kgid(current_user_ns(), sf_g->gid);
+#else
inode->i_uid = sf_g->uid;
inode->i_gid = sf_g->gid;
+#endif
+
inode->i_size = info->cbObject;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) && !defined(KERNEL_FC6)
inode->i_blksize = 4096;