safe

Password protected secret keeper
git clone git://git.z3bra.org/safe.git
Log | Files | Refs | README | LICENSE

commit fc05dcf4f8bcdcbb199a7a9d9a98e35852ad135e
parent df835567ad72b5aeafbe36f3231a956c38bd5a81
Author: Willy Goiffon <dev@z3bra.org>
Date:   Mon,  3 Jun 2019 12:24:42 +0200

Remove 'open' from error messages

Diffstat:
safe.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/safe.c b/safe.c @@ -201,7 +201,7 @@ deriv(char *pw, struct safe *s) s->salt, crypto_pwhash_OPSLIMIT_INTERACTIVE, crypto_pwhash_MEMLIMIT_INTERACTIVE, crypto_pwhash_ALG_DEFAULT)) - err(1, "crypto_pwhash"); + err(1, "crypto_pwhash:"); } int @@ -306,7 +306,7 @@ store_secret(struct safe *s, int fd, char *name) mkdir_p(dirname(name), 0700); sfd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (sfd < 0) - err(1, "open %s", name); + err(1, "%s", name); xwrite(sfd, s->salt, sizeof(s->salt)); @@ -342,7 +342,7 @@ show_secret(struct safe *s, int fd, char *name) sfd = open(name, O_RDONLY); if (sfd < 0) - err(1, "open %s", name); + err(1, "%s", name); xread(sfd, s->salt, sizeof(s->salt), NULL); xread(sfd, s->h, sizeof(s->h), NULL);