From e30d89ef6b64b14fa7533cc5c63fa56ddf8a08b2 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 18 Jan 2005 01:34:27 +0000 Subject: [PATCH] Return the correct exit status in the event of known failures instead of always returning 255. Reported by Awais Riaz. --- pgpverify | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pgpverify b/pgpverify index b3cffd9..44a76e4 100755 --- a/pgpverify +++ b/pgpverify @@ -4,7 +4,7 @@ # # written April 1996, tale@isc.org (David C Lawrence) # Currently maintained by Russ Allbery -# Version 1.25, 2003-12-10 +# Version 1.26, 2005-01-17 # # NOTICE TO INN MAINTAINERS: The version that is shipped with INN is the # same as the version that I make available to the rest of the world @@ -16,6 +16,10 @@ # me about it; I want to know what old versions of Perl are still used in # practice. # +# Changes from 1.25 -> 1.26 +# -- Return the correct status code when the message isn't verified +# instead of always returning 255. +# # Changes from 1.24 -> 1.25 # -- Fix the -test switch to actually do something. # -- Improve date generation when logging to standard output. @@ -253,7 +257,7 @@ unless ($gpgv) { } print "$signer\n" if $signer; unless ($ok == 0) { - &fail("$0: verification failed\n"); + &errmsg("$0: verification failed\n"); } exit $ok;