Skip to content

Commit

Permalink
Item12180: Trap exec warnings when no SELinux
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@16200 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
TimotheLitt authored and TimotheLitt committed Dec 13, 2012
1 parent a1d44c4 commit 69d8238
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions core/lib/Foswiki/Configure/Checkers/EnableEmail.pm
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ sub autoconfigProgram {
. " and Net::SMTP configuration failed. Please correct the Net::SMTP parameters, or configure a mail program manually."
)
. $scroll
. $this->FB_VALUE( '{Email}{MailMethod}', 'Net::SMTP' )
);
}
if ( $seen && $perlAvail ) {
Expand All @@ -257,6 +258,7 @@ sub autoconfigProgram {
. ". and Net::SMTP configuration failed. Please correct the Net::SMTP parameters, or install a mail program."
)
. $scroll
. $this->FB_VALUE( '{Email}{MailMethod}', 'Net::SMTP' )
);
}

Expand Down Expand Up @@ -287,10 +289,15 @@ sub mailwrapperConfig {
sub diagnoseFailure {
my ( $noconnect, $allconnect ) = @_;

my $selStatus = system("selinuxenabled");
my $blameSEL = 1
unless ( $selStatus == -1
|| ( ( $selStatus >> 8 ) && !( $selStatus & 127 ) ) );
my $blameSEL;
{
no warnings 'exec';

my $selStatus = system("selinuxenabled");
$blameSEL = 1
unless ( $selStatus == -1
|| ( ( $selStatus >> 8 ) && !( $selStatus & 127 ) ) );
}

my $e .= << "SELINUX";
<strong>Note:</strong> SELinux appears to be enabled on your system.
Expand Down

0 comments on commit 69d8238

Please sign in to comment.