summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libexec/security/security8
1 files changed, 6 insertions, 2 deletions
diff --git a/libexec/security/security b/libexec/security/security
index ef11c0c85e3..65ec816e985 100644
--- a/libexec/security/security
+++ b/libexec/security/security
@@ -1,6 +1,6 @@
#!/usr/bin/perl -T
-# $OpenBSD: security,v 1.34 2015/03/27 13:26:19 schwarze Exp $
+# $OpenBSD: security,v 1.35 2015/04/21 10:24:22 schwarze Exp $
#
# Copyright (c) 2011, 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
# Copyright (c) 2011 Andrew Fresh <andrew@afresh1.com>
@@ -738,7 +738,11 @@ sub diff {
and return;
local $/;
my $diff = <$fh>;
- close_or_nag $fh, "diff";
+ {
+ close $fh and last;
+ nag $!, "diff: error closing pipe: $!" and last;
+ nag $? >> 8 > 1, "diff: exit code " . ($? >> 8);
+ }
return nag !!$diff, $diff;
}