summaryrefslogtreecommitdiffstats
path: root/proxy/src/gssproxy.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-08-21 12:51:46 -0400
committerGünther Deschner <gdeschner@redhat.com>2014-09-15 13:09:21 +0200
commit38a158446d1f9ce495715aa83265fe35a29f8a2b (patch)
tree8215d55c60102b1f7ed0b18f14fae87b7db153a5 /proxy/src/gssproxy.c
parentf39b471f34b381784a1bd1906bf8335ac2c7ef5e (diff)
downloadgss-proxy-38a158446d1f9ce495715aa83265fe35a29f8a2b.tar.gz
gss-proxy-38a158446d1f9ce495715aa83265fe35a29f8a2b.tar.xz
gss-proxy-38a158446d1f9ce495715aa83265fe35a29f8a2b.zip
Add cmdline option to override default socket
This is especially useful for testing, but can be useful for custom configurations of gss-proxy as well (containers, chroots, etc..) Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Guenther Deschner <gdeschner@redhat.com>
Diffstat (limited to 'proxy/src/gssproxy.c')
-rw-r--r--proxy/src/gssproxy.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/proxy/src/gssproxy.c b/proxy/src/gssproxy.c
index 80430d6..354d595 100644
--- a/proxy/src/gssproxy.c
+++ b/proxy/src/gssproxy.c
@@ -36,6 +36,7 @@ int main(int argc, const char *argv[])
int opt_interactive = 0;
int opt_version = 0;
char *opt_config_file = NULL;
+ char *opt_config_socket = NULL;
int opt_debug = 0;
verto_ctx *vctx;
verto_ev *ev;
@@ -54,6 +55,8 @@ int main(int argc, const char *argv[])
_("Run interactive (not a daemon)"), NULL}, \
{"config", 'c', POPT_ARG_STRING, &opt_config_file, 0, \
_("Specify a non-default config file"), NULL}, \
+ {"socket", 's', POPT_ARG_STRING, &opt_config_socket, 0, \
+ _("Specify a custom default socket"), NULL}, \
{"debug", 'd', POPT_ARG_NONE, &opt_debug, 0, \
_("Enable debugging"), NULL}, \
{"version", '\0', POPT_ARG_NONE, &opt_version, 0, \
@@ -93,7 +96,9 @@ int main(int argc, const char *argv[])
gpctx = calloc(1, sizeof(struct gssproxy_ctx));
- gpctx->config = read_config(opt_config_file, opt_daemon);
+ gpctx->config = read_config(opt_config_file,
+ opt_config_socket,
+ opt_daemon);
if (!gpctx->config) {
exit(EXIT_FAILURE);
}