Merge branch 'master' into compiler_warning_part_5

This commit is contained in:
Lorenz Kästle 2023-09-07 16:10:20 +02:00 committed by GitHub
commit fe239bf1c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 50 additions and 18368 deletions

View file

@ -25,8 +25,9 @@
'NP_HOST_TCP_POP' => 'pop.web.de',
'NP_HOST_TCP_PROXY' => 'localhost',
'NP_HOST_TCP_SMTP' => 'localhost',
'NP_HOST_TCP_SMTP_NOTLS' => '',
'NP_HOST_TCP_SMTP_TLS' => '',
'NP_HOST_TCP_SMTP_NOSTARTTLS' => '',
'NP_HOST_TCP_SMTP_STARTTLS' => 'localhost',
'NP_HOST_TCP_SMTP_TLS' => 'localhost',
'NP_HOST_TLS_CERT' => 'localhost',
'NP_HOST_TLS_HTTP' => 'localhost',
'NP_HOST_UDP_TIME' => 'none',

View file

@ -116,7 +116,11 @@ service snmpd start
# start cron, will be used by check_nagios
cron
# start postfix
# postfix
cat <<EOD >> /etc/postfix/master.cf
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
EOD
service postfix start
# start ftpd

View file

@ -40,7 +40,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View file

@ -16,9 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@master
uses: codespell-project/actions-codespell@v2
with:
skip: "./.git,./.gitignore,./ABOUT-NLS,*.po,./gl,./po,./tools/squid.conf,./build-aux/ltmain.sh"
ignore_words_list: allright,gord,didi,hda,nd,alis,clen,scrit,ser,fot,te,parm,isnt,consol,oneliners
@ -31,7 +31,7 @@ jobs:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# uses: actions/checkout@v4
# - name: Lint Code Base
# uses: github/super-linter@v5.0.0
# env:
@ -57,7 +57,7 @@ jobs:
#...
steps:
- name: Git clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4
#- name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate
# uses: mxschmitt/action-tmate@v3
- name: Run the tests on ${{ matrix.distro }}

View file

@ -381,7 +381,7 @@ print_help (void)
printf ("\n");
printf ("%s\n", _("This plugin tests a RADIUS server to see if it is accepting connections."));
printf ("%s\n", _("The server to test must be specified in the invocation, as well as a user"));
printf ("%s\n", _("name and password. A configuration file may also be present. The format of"));
printf ("%s\n", _("name and password. A configuration file must be present. The format of"));
printf ("%s\n", _("the configuration file is described in the radiusclient library sources."));
printf ("%s\n", _("The password option presents a substantial security issue because the"));
printf ("%s\n", _("password can possibly be determined by careful watching of the command line"));

View file

@ -8,12 +8,14 @@ use strict;
use Test::More;
use NPTest;
my $host_tcp_smtp = getTestParameter( "NP_HOST_TCP_SMTP",
my $host_tcp_smtp = getTestParameter( "NP_HOST_TCP_SMTP",
"A host providing an SMTP Service (a mail server)", "mailhost");
my $host_tcp_smtp_tls = getTestParameter( "NP_HOST_TCP_SMTP_TLS",
my $host_tcp_smtp_starttls = getTestParameter( "NP_HOST_TCP_SMTP_STARTTLS",
"A host providing SMTP with STARTTLS", $host_tcp_smtp);
my $host_tcp_smtp_nostarttls = getTestParameter( "NP_HOST_TCP_SMTP_NOSTARTTLS",
"A host providing SMTP without STARTTLS", "");
my $host_tcp_smtp_tls = getTestParameter( "NP_HOST_TCP_SMTP_TLS",
"A host providing SMTP with TLS", $host_tcp_smtp);
my $host_tcp_smtp_notls = getTestParameter( "NP_HOST_TCP_SMTP_NOTLS",
"A host providing SMTP without TLS", "");
my $host_nonresponsive = getTestParameter( "NP_HOST_NONRESPONSIVE",
"The hostname of system not responsive to network requests", "10.0.0.1" );
@ -22,7 +24,7 @@ my $hostname_invalid = getTestParameter( "NP_HOSTNAME_INVALID",
"An invalid (not known to DNS) hostname", "nosuchhost" );
my $res;
plan tests => 10;
plan tests => 16;
SKIP: {
skip "No SMTP server defined", 4 unless $host_tcp_smtp;
@ -42,22 +44,38 @@ SKIP: {
local $TODO = "Output is over two lines";
like ( $res->output, qr/^SMTP WARNING/, "Correct error message" );
}
$res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp --ssl -p 25" );
is ($res->return_code, 2, "Check rc of connecting to $host_tcp_smtp with TLS on standard SMTP port" );
like ($res->output, qr/^CRITICAL - Cannot make SSL connection\./, "Check output of connecting to $host_tcp_smtp with TLS on standard SMTP port");
}
SKIP: {
skip "No SMTP server with TLS defined", 1 unless $host_tcp_smtp_tls;
# SSL connection for TLS
$res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_tls -p 25 -S" );
skip "No SMTP server with STARTTLS defined", 1 unless $host_tcp_smtp_starttls;
# SSL connection for STARTTLS
$res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_starttls -p 25 -S" );
is ($res->return_code, 0, "OK, with STARTTLS" );
}
SKIP: {
skip "No SMTP server without TLS defined", 2 unless $host_tcp_smtp_notls;
$res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_notls -p 25 -S" );
is ($res->return_code, 1, "OK, got warning from server without TLS");
skip "No SMTP server without STARTTLS defined", 2 unless $host_tcp_smtp_nostarttls;
$res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_nostarttls -p 25 -S" );
is ($res->return_code, 1, "OK, got warning from server without STARTTLS");
is ($res->output, "WARNING - TLS not supported by server", "Right error message" );
}
SKIP: {
skip "No SMTP server with TLS defined", 1 unless $host_tcp_smtp_tls;
$res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_tls --ssl" );
is ($res->return_code, 0, "Check rc of connecting to $host_tcp_smtp_tls with TLS" );
like ($res->output, qr/^SMTP OK - /, "Check output of connecting to $host_tcp_smtp_tls with TLS" );
my $unused_port = 4465;
$res = NPTest->testCmd( "./check_smtp -H $host_tcp_smtp_tls -p $unused_port --ssl" );
is ($res->return_code, 2, "Check rc of connecting to $host_tcp_smtp_tls with TLS on unused port $unused_port" );
like ($res->output, qr/^connect to address $host_tcp_smtp_tls and port $unused_port: Connection refused/, "Check output of connecting to $host_tcp_smtp_tls with TLS on unused port $unused_port");
}
$res = NPTest->testCmd( "./check_smtp $host_nonresponsive" );
is ($res->return_code, 2, "CRITICAL - host non responding" );

View file

@ -8,7 +8,7 @@ subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --flag=error:3:c-format --flag=error_at_line:5:c-format --flag=asprintf:2:c-format --flag=vasprintf:2:c-format
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --flag=error:3:c-format --flag=error_at_line:5:c-format --flag=asprintf:2:c-format --flag=vasprintf:2:c-format --no-location
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding

1524
po/de.po

File diff suppressed because it is too large Load diff

6894
po/de.po~

File diff suppressed because it is too large Load diff

1524
po/fr.po

File diff suppressed because it is too large Load diff

6887
po/fr.po~

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff