API: client does not set root permissions on shm segment

Change-Id: I4ba099832b646392c1b6fa34236ca3377c9f786c
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vlibmemory/memory_shared.c b/src/vlibmemory/memory_shared.c
index 1263f2c..7526d87 100644
--- a/src/vlibmemory/memory_shared.c
+++ b/src/vlibmemory/memory_shared.c
@@ -515,7 +515,7 @@
   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 @@
 	  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)