diff options
author | Ole Troan <ot@cisco.com> | 2018-05-30 22:43:25 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-05-31 07:50:44 +0000 |
commit | c4f2ef7d7e315e183e3994630209471c5362163a (patch) | |
tree | 7e6f5d5c0e117e97e07fe8de0856d3f8fbe76ec1 /src/svm | |
parent | c0c919c6fa721a564a08b367b839efc802d4c963 (diff) |
VPP-1299: Reset uid/gid on shared memory segment if client starts first.
Change-Id: I2b5bc7d864f8829e1dff63fec3c9484078601309
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/svm')
-rw-r--r-- | src/svm/svm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/svm/svm.c b/src/svm/svm.c index afba54e74fc..7d98fbe936d 100644 --- a/src/svm/svm.c +++ b/src/svm/svm.c @@ -652,6 +652,10 @@ svm_map_region (svm_map_region_args_t * a) return (0); } + /* Reset ownership in case the client started first */ + if (fchown (svm_fd, a->uid, a->gid) < 0) + clib_unix_warning ("segment chown [ok if client starts first]"); + time_left = 20; while (1) { |