diff options
author | Neale Ranns <nranns@cisco.com> | 2019-02-19 00:41:22 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2019-02-21 14:41:50 +0000 |
commit | 30307af14583f6955eacafe73c3001164ee58a07 (patch) | |
tree | 18ae53112de51d907a42252691738b4aec3ff459 /src | |
parent | 0503aceeb53d7b0d81af6e7c62ae92f60ac25376 (diff) |
API: client does not set root permissions on shm segment
Change-Id: I4ba099832b646392c1b6fa34236ca3377c9f786c
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vlibmemory/memory_shared.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vlibmemory/memory_shared.c b/src/vlibmemory/memory_shared.c index 1263f2c9433..7526d87eb4b 100644 --- a/src/vlibmemory/memory_shared.c +++ b/src/vlibmemory/memory_shared.c @@ -515,7 +515,7 @@ vl_map_shmem (const char *region_name, int is_vlib) svm_map_region_args_t _a, *a = &_a; svm_region_t *vlib_rp, *root_rp; api_main_t *am = &api_main; - int i, rv; + int i; struct timespec ts, tsrem; char *vpe_api_region_suffix = "-vpe-api"; @@ -562,9 +562,7 @@ vl_map_shmem (const char *region_name, int is_vlib) return -2; } close (tfd); - rv = svm_region_init_chroot (am->root_path); - if (rv) - return rv; + svm_region_init_chroot_uid_gid (am->root_path, getuid (), getgid ()); } if (a->root_path != NULL) |