diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2012-10-23 14:36:19 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2012-10-23 14:36:19 +0000 |
commit | 0393d6fe1cb61827036e7990aa57a9a6a37287ff (patch) | |
tree | 4316338dcf9cf5647e9322a1a443ae00515a561f /usr.sbin | |
parent | a08614f1b58fab6f1cb652bd66bdc00dec2ae4f9 (diff) |
Allow to overwrite a few more definitions like file paths from the
Makefile. No functional change.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ikectl/ikeca.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/usr.sbin/ikectl/ikeca.c b/usr.sbin/ikectl/ikeca.c index b500fbb22c2..c7008b7a4b0 100644 --- a/usr.sbin/ikectl/ikeca.c +++ b/usr.sbin/ikectl/ikeca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikeca.c,v 1.22 2012/09/18 12:07:59 reyk Exp $ */ +/* $OpenBSD: ikeca.c,v 1.23 2012/10/23 14:36:18 reyk Exp $ */ /* $vantronix: ikeca.c,v 1.13 2010/06/03 15:52:52 reyk Exp $ */ /* @@ -38,15 +38,29 @@ #include "types.h" #include "parser.h" -#define SSL_CNF "/etc/ssl/openssl.cnf" -#define X509_CNF "/etc/ssl/x509v3.cnf" -#define IKECA_CNF "/etc/ssl/ikeca.cnf" -#define KEYBASE "/etc/iked" -#define EXPDIR "/usr/share/iked" - +#ifndef PREFIX +#define PREFIX "" +#endif +#ifndef SSLDIR +#define SSLDIR PREFIX "/etc/ssl" +#endif +#define SSL_CNF SSLDIR "/openssl.cnf" +#define X509_CNF SSLDIR "/x509v3.cnf" +#define IKECA_CNF SSLDIR "/ikeca.cnf" +#define KEYBASE PREFIX "/etc/iked" +#ifndef EXPDIR +#define EXPDIR PREFIX "/usr/share/iked" +#endif + +#ifndef PATH_OPENSSL #define PATH_OPENSSL "/usr/sbin/openssl" +#endif +#ifndef PATH_ZIP #define PATH_ZIP "/usr/local/bin/zip" +#endif +#ifndef PATH_TAR #define PATH_TAR "/bin/tar" +#endif struct ca { char sslpath[PATH_MAX]; @@ -802,7 +816,7 @@ ca_setup(char *caname, int create, int quiet, char *pass) err(1, "calloc"); ca->caname = strdup(caname); - strlcpy(ca->sslpath, "/etc/ssl/", sizeof(ca->sslpath)); + strlcpy(ca->sslpath, SSLDIR, sizeof(ca->sslpath)); strlcat(ca->sslpath, caname, sizeof(ca->sslpath)); strlcpy(ca->passfile, ca->sslpath, sizeof(ca->passfile)); strlcat(ca->passfile, "/ikeca.passwd", sizeof(ca->passfile)); |