From b8d87d2e414b4061f0637fcf138604a17a19077d Mon Sep 17 00:00:00 2001 From: schwarze Date: Mon, 14 Jul 2014 08:49:27 +0000 Subject: [PATCH] The file /etc/exports is now optional and not installed by default, so do not complain when it is absent. issue found by and patch ok by ajacoutot@ "I don't do perl, but seems ok" deraadt@ --- libexec/security/security | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/security/security b/libexec/security/security index faa8e1cd681..2039a9cc6c6 100644 --- a/libexec/security/security +++ b/libexec/security/security @@ -1,6 +1,6 @@ #!/usr/bin/perl -T -# $OpenBSD: security,v 1.30 2014/06/26 16:00:16 schwarze Exp $ +# $OpenBSD: security,v 1.31 2014/07/14 08:49:27 schwarze Exp $ # # Copyright (c) 2011, 2012, 2014 Ingo Schwarze # Copyright (c) 2011 Andrew Fresh @@ -461,6 +461,7 @@ sub check_mailboxes { # File systems should not be globally exported. sub check_exports { my $filename = '/etc/exports'; + return unless -e $filename; nag !(open my $fh, '<', $filename), "open: $filename: $!" and return; LINE: while (<$fh>) { -- 2.20.1