(renew): don't set the OTP if the reading of the string fails.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4198 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-12-14 23:57:57 +00:00
parent 13e01878ae
commit 1d0e156eef

View File

@@ -105,7 +105,7 @@ renew (int argc, char **argv, OtpAlgorithm *alg, char *user)
ctx = &newctx;
ret = 0;
} else
ret = 1;
return 1;
dbm = otp_db_open ();
if (dbm == NULL) {
@@ -245,7 +245,7 @@ print_otp_entry_for_name (void *db, char *user)
ctx.user = user;
if (!otp_simple_get(db, &ctx)) {
fprintf(stdout,
"%s\totp-%s %d",
"%s\totp-%s %d %s",
ctx.user, ctx.alg->name, ctx.n, ctx.seed);
if (ctx.lock_time)
fprintf(stdout,