aboutsummaryrefslogtreecommitdiffstats
path: root/gmod
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-07-18 14:23:36 -0400
committerDave Barach <dave@barachs.net>2016-07-18 14:29:04 -0400
commit98cfc1aab07d311b53b0171fad62a4031c96fcfd (patch)
tree7779590482e032169590f2a5d1c4f4fcab66678f /gmod
parent2221cd8dd18e66bcdb9bb9a4114ba0c3dddcd00c (diff)
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 <dave@barachs.net>
Diffstat (limited to 'gmod')
-rw-r--r--gmod/gmod/mod_vpp.c6
1 files changed, 5 insertions, 1 deletions
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