tMake show_secret() use secret's salt in master pass absence - safe - password protected secret keeper
HTML git clone git://git.z3bra.org/safe.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit f9cce62c8b24ac4fb7f6d28ae6085b345081e4ca
DIR parent 83e2319375810b7b77c167307da011cff8bc0635
HTML Author: Willy Goiffon <dev@z3bra.org>
Date: Mon, 3 Jun 2019 18:13:37 +0200
Make show_secret() use secret's salt in master pass absence
Diffstat:
M safe.c | 3 +++
1 file changed, 3 insertions(+), 0 deletions(-)
---
DIR diff --git a/safe.c b/safe.c
t@@ -320,6 +320,9 @@ show_secret(struct safe *s, int fd, char *name)
xread(sfd, s->salt, sizeof(s->salt), NULL);
xread(sfd, s->h, sizeof(s->h), NULL);
+ if (!secret_exists(MASTER))
+ deriv((char *)passphrase, s);
+
flags = SAFE_INIT;
while ((n = xread(sfd, c, sizeof(c), &eof)) > 0) {
flags |= eof ? SAFE_FINAL : 0;