From 1d0e156eef0ecd80b1fff98e241877fa8b786d9f Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 14 Dec 1997 23:57:57 +0000 Subject: [PATCH] (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 --- appl/otp/otp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appl/otp/otp.c b/appl/otp/otp.c index 7d5f7ddd9..f889e727a 100644 --- a/appl/otp/otp.c +++ b/appl/otp/otp.c @@ -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,