From 98cfc1aab07d311b53b0171fad62a4031c96fcfd Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Mon, 18 Jul 2016 14:23:36 -0400 Subject: Add uid/gid config parameters to shared-vm database map operator So vpp_get_metrics and similar will not need to run as root Change-Id: I635e830834c82990ad84ddaae06f2e50e55fd616 Signed-off-by: Dave Barach --- gmod/gmod/mod_vpp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gmod') diff --git a/gmod/gmod/mod_vpp.c b/gmod/gmod/mod_vpp.c index 4a82ca70..4a1da83c 100644 --- a/gmod/gmod/mod_vpp.c +++ b/gmod/gmod/mod_vpp.c @@ -33,6 +33,7 @@ static int vpp_metric_init (apr_pool_t *p) apr_array_header_t *list_params = vpp_module.module_params_list; mmparam *params; char *chroot_path = 0; + svmdb_map_args_t _ma, *ma= &_ma; int i; if (str_params) { @@ -47,7 +48,10 @@ static int vpp_metric_init (apr_pool_t *p) } } - svmdb_client = svmdb_map_chroot (chroot_path); + memset (ma, 0, sizeof (*ma)); + ma->root_path = (char *)chroot_path; + + svmdb_client = svmdb_map (ma); /* Initialize the metadata storage for each of the metrics and then -- cgit 1.2.3-korg