(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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user