From c4f2ef7d7e315e183e3994630209471c5362163a Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Wed, 30 May 2018 22:43:25 +0200 Subject: VPP-1299: Reset uid/gid on shared memory segment if client starts first. Change-Id: I2b5bc7d864f8829e1dff63fec3c9484078601309 Signed-off-by: Ole Troan --- src/svm/svm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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) { -- cgit 1.2.3-korg