mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user