From 16c75df7976003305f57885639cbc4df4a6a12cf Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 31 May 2016 14:05:46 -0400 Subject: VPP-83 Allow non-privileged clients to use the vpp binary API. Use the command line argument "api-segment { uid gid }" to configure shared memory segment file ownership. Defaults to uid = gid = 0. Shared-memory segments are explicitly set to 0770 mode, aka "rwxrwx---". Change-Id: Ic5d596b68139add61e7de6ace035c57dfd030111 Signed-off-by: Dave Barach --- svm/svm.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'svm/svm.h') diff --git a/svm/svm.h b/svm/svm.h index 5f112cb83dc..bca23792059 100644 --- a/svm/svm.h +++ b/svm/svm.h @@ -74,6 +74,9 @@ typedef struct svm_map_region_args_ { uword flags; char *backing_file; uword backing_mmap_size; + /* uid, gid to own the svm region(s) */ + int uid; + int gid; } svm_map_region_args_t; @@ -108,6 +111,7 @@ typedef struct { void *svm_region_find_or_create (svm_map_region_args_t *a); void svm_region_init(void); void svm_region_init_chroot(char *root_path); +void svm_region_init_chroot_uid_gid(char *root_path, int uid, int gid); void svm_region_exit (void); void svm_region_unmap(void *rp_arg); void svm_client_scan (char *root_path); -- cgit 1.2.3-korg