summaryrefslogtreecommitdiffstats
path: root/proxy/src/gssproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'proxy/src/gssproxy.c')
-rw-r--r--proxy/src/gssproxy.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/proxy/src/gssproxy.c b/proxy/src/gssproxy.c
index 354d595..0e84859 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_dir = NULL;
char *opt_config_socket = NULL;
int opt_debug = 0;
verto_ctx *vctx;
@@ -55,6 +56,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}, \
+ {"configdir", 'C', POPT_ARG_STRING, &opt_config_dir, 0, \
+ _("Specify a non-default config directory"), NULL}, \
{"socket", 's', POPT_ARG_STRING, &opt_config_socket, 0, \
_("Specify a custom default socket"), NULL}, \
{"debug", 'd', POPT_ARG_NONE, &opt_debug, 0, \
@@ -90,6 +93,13 @@ int main(int argc, const char *argv[])
return 1;
}
+ if (opt_config_file && opt_config_dir) {
+ fprintf(stderr, "Option -C|--configdir is not allowed together with"
+ " -c|--config\n");
+ poptPrintUsage(pc, stderr, 0);
+ return 1;
+ }
+
if (opt_interactive) {
opt_daemon = 2;
}
@@ -97,6 +107,7 @@ int main(int argc, const char *argv[])
gpctx = calloc(1, sizeof(struct gssproxy_ctx));
gpctx->config = read_config(opt_config_file,
+ opt_config_dir,
opt_config_socket,
opt_daemon);
if (!gpctx->config) {