diff options
author | Sebastien Marie <semarie@cvs.openbsd.org> | 2015-08-15 04:45:50 +0000 |
---|---|---|
committer | Sebastien Marie <semarie@cvs.openbsd.org> | 2015-08-15 04:45:50 +0000 |
commit | 23c633c6dd8f553c1239dc6a844cbd6e69c0df81 (patch) | |
tree | ce51f902ecb7fc66b67816bd03c1cdc6fc7d577e /usr.sbin/ikectl | |
parent | 70cbdd17d58af2116b518b527717cc26fa83efd5 (diff) |
corrects three err() to errx() calls
- a if condition don't set errno
- strlcpy(3) don't set errno (no mention is man page)
- ca_readpass() already manage errno error message with warn(3)
ok sthen@
Diffstat (limited to 'usr.sbin/ikectl')
-rw-r--r-- | usr.sbin/ikectl/ikeca.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ikectl/ikeca.c b/usr.sbin/ikectl/ikeca.c index 7e25f7fb609..918f17734e5 100644 --- a/usr.sbin/ikectl/ikeca.c +++ b/usr.sbin/ikectl/ikeca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikeca.c,v 1.30 2015/01/16 06:40:17 deraadt Exp $ */ +/* $OpenBSD: ikeca.c,v 1.31 2015/08/15 04:45:49 semarie Exp $ */ /* * Copyright (c) 2010 Jonathan Gray <jsg@openbsd.org> @@ -219,7 +219,7 @@ ca_sign(struct ca *ca, char *keyname, int type, char *envargs) ca->sslpath, keyname, ca->sslpath, ca->sslpath, ca->extcnf, ca->sslpath, keyname, ca->passfile); } else - err(1, "unknown host type %d", type); + errx(1, "unknown host type %d", type); system(cmd); @@ -561,7 +561,7 @@ ca_export(struct ca *ca, char *keyname, char *myname, char *password) if (keyname != NULL) { if (strlcpy(oname, keyname, sizeof(oname)) >= sizeof(oname)) - err(1, "name too long"); + errx(1, "name too long"); } else { strlcpy(oname, "ca", sizeof(oname)); } @@ -758,7 +758,7 @@ ca_revoke(struct ca *ca, char *keyname) snprintf(path, sizeof(path), "%s/ikeca.passwd", ca->sslpath); pass = ca_readpass(path, &len); if (pass == NULL) - err(1, "could not open passphrase file"); + errx(1, "could not open passphrase file"); /* create index if it doesn't already exist */ snprintf(path, sizeof(path), "%s/index.txt", ca->sslpath); |