initial commit of file from CVS for e-smith-openssh on Thu Jul 13 12:50:02 AEST 2023

This commit is contained in:
Trevor Batley
2023-07-13 12:50:02 +10:00
parent 0990ad9bc0
commit 5b637d96ad
90 changed files with 2123 additions and 2 deletions

View File

@@ -0,0 +1,48 @@
# Welcome to the Wonderful World of Glassbox Testing.
#
# Load up esmith::util/system and override them with testing stubs.
use Test::More 'no_plan';
# Here we tell the test to not use any numbers (because there were
# probably tests output'd before us) and to not do end-of-test
# checks.
my $TB = Test::More->builder;
$TB->use_numbers(0);
$TB->no_ending(1);
use esmith::util;
use esmith::util::system;
package esmith::util;
::can_ok('esmith::util', 'serviceControl');
no warnings 'redefine';
sub serviceControl {
my(%params) = @_;
::pass('service control called');
::is( $params{NAME}, 'sshd', 'serviceControl NAME == sshd' );
::is( $params{ACTION}, 'stop', ' ACTION == stop' );
return 1;
}
package esmith::util::system;
::can_ok('esmith::util::system', 'killall');
no warnings 'redefine';
sub killall {
my($sig, @commands) = @_;
::pass('killall called');
::is( $sig, 'HUP', ' with a HUP' );
::is( @commands, 1, ' one command' );
::is( $commands[0], 'sshd', ' for sshd' );
return 1;
}

View File

@@ -0,0 +1 @@
sshd=service|InitscriptOrder|85|PasswordAuthentication|yes|PermitRootLogin|yes|access|private

View File

@@ -0,0 +1 @@
sshd=service|InitscriptOrder|85|PasswordAuthentication|yes|PermitRootLogin|yes|access|private|status|disabled