mirror of
https://github.com/apache/nuttx.git
synced 2026-08-29 21:30:44 +00: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:
parent
941aa03401
commit
03c1496e8e
1 changed files with 2 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue