sim: change ownership to user ID of the calling process for shm file

Change-Id: Ia0b5721421c2eb7fb408d55a26f821d6e95202df
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong
2021-07-21 22:19:46 +08:00
parent 941aa03401
commit 03c1496e8e
+2
View File
@@ -92,6 +92,8 @@ void *host_alloc_shmem(const char *name, size_t size, int master)
return NULL;
}
fchown(fd, getuid(), getgid());
if (!master)
{
/* Avoid the second slave instance open successfully */