summaryrefslogtreecommitdiff
path: root/usr.sbin/rpki-client/output.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2019-12-06 09:27:13 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2019-12-06 09:27:13 +0000
commit8fbd7851a98a4d46db86ee5fc9e9bd80354ed999 (patch)
tree633104bd56e3c0a22da1bfe526dcb7ff3c9c7dda /usr.sbin/rpki-client/output.c
parentd1dea0abcde59475229a12b798b72ebcf068f472 (diff)
Don't hardcode the cache directory for rpki-client. If started as root
rpki-client will use the defaults for cache and output directory. If not started as root users need to provide both directories as arguments. While there switch from absolute path names to relative ones. For this the parser and rsync process do a chdir(2) to the cache directory on startup. OK benno@
Diffstat (limited to 'usr.sbin/rpki-client/output.c')
-rw-r--r--usr.sbin/rpki-client/output.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/rpki-client/output.c b/usr.sbin/rpki-client/output.c
index 0dfcc1f0fa9..c62b3b0a1ae 100644
--- a/usr.sbin/rpki-client/output.c
+++ b/usr.sbin/rpki-client/output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output.c,v 1.3 2019/12/04 23:03:05 benno Exp $ */
+/* $OpenBSD: output.c,v 1.4 2019/12/06 09:27:12 claudio Exp $ */
/*
* Copyright (c) 2019 Theo de Raadt <deraadt@openbsd.org>
*
@@ -28,8 +28,7 @@
#include "extern.h"
-char *outputdir = _PATH_ROA_DIR;
-FILE *output = NULL;
+char *outputdir;
char output_tmpname[PATH_MAX];
char output_name[PATH_MAX];