diff options
author | 2008-06-14 00:05:47 +0000 | |
---|---|---|
committer | 2008-06-14 00:05:47 +0000 | |
commit | a83e457793ff688c9d17013caa8bfbd7020a5bb1 (patch) | |
tree | e084fcef58f7bc37970d713ce1aa69e467ebfe72 | |
parent | - don't ask for yesno confirmation when running in automatic mode (diff) | |
download | wireguard-openbsd-a83e457793ff688c9d17013caa8bfbd7020a5bb1.tar.xz wireguard-openbsd-a83e457793ff688c9d17013caa8bfbd7020a5bb1.zip |
friendly error message when key decryption fails; ok hshoexer@
-rw-r--r-- | sbin/bioctl/bioctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c index 4953a03282f..71387212b8a 100644 --- a/sbin/bioctl/bioctl.c +++ b/sbin/bioctl/bioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bioctl.c,v 1.65 2008/06/13 21:03:40 hshoexer Exp $ */ +/* $OpenBSD: bioctl.c,v 1.66 2008/06/14 00:05:47 djm Exp $ */ /* * Copyright (c) 2004, 2005 Marco Peereboom @@ -673,8 +673,11 @@ bio_createraid(u_int16_t level, char *dev_list) rv = ioctl(devh, BIOCCREATERAID, &create); memset(&kdfinfo, 0, sizeof(kdfinfo)); - if (rv == -1) + if (rv == -1) { + if (errno == EPERM) + errx(1, "Incorrect passphrase"); err(1, "BIOCCREATERAID"); + } free(dt); } |