Sfoglia il codice sorgente

Load credentials when starting or stopping SNFMilter.


git-svn-id: https://svn.microneil.com/svn/SNFUtility/trunk@22 aa37657e-1934-4a5f-aa6d-2d8eab27ff7c
master
adeniz 12 anni fa
parent
commit
4d8afb2508

+ 2
- 0
SNFMilterConfig/SNFMilterConfig.cpp Vedi File

@@ -231,6 +231,7 @@ SNFMilterConfig::ExecuteCommand() {
LoadConfig();
LoadInfo();
LoadSocketInfo();
LoadCredentials();
StartSniffer("snf-milter start", ApplicationName);
break;
@@ -241,6 +242,7 @@ SNFMilterConfig::ExecuteCommand() {
LoadConfig();
LoadInfo();
LoadSocketInfo();
LoadCredentials();
StopSniffer("snf-milter stop", ApplicationName);
break;

+ 115
- 9
SNFMilterConfig/SNFMilterConfigTests.txt Vedi File

@@ -173,7 +173,7 @@ Start/stop functionality with XCI disabled, status.second enabled
-----------------------------------------------------------------

START_STOP_SEC-01: Install default configuration files, and ensure
that SNFMilter is stoped. Create a configuration file
that SNFMilter is stopped. Create a configuration file
SNFMilter_second.xml as follows:

1) Disable XCI.
@@ -184,22 +184,23 @@ SNFMilter_second.xml as follows:

Do the following, specifying the configuration file SNFMilter_second.xml:

1) Run SNFMilterConfig with "-start", and verify that SNFMilter starts.
1) Run "SNFMilterConfig -config=SNFMilter_second.xml -start", and verify that SNFMilter starts.

2) Run SNFMilterConfig with "-start" again and verify that SNFMilter
is not started again.
2) Run "SNFMilterConfig -config=SNFMilter_second.xml -start" again
and verify that SNFMilter is not started again.

3) Run SNFMitlerConfig with "-stop" and verify that SNFMilter stops.
3) Run "SNFMilterConfig -config=SNFMilter_second.xml -stop" and
verify that SNFMilter stops.

4) Run SNFMitlerConfig with "-stop" again and verify that SNFMilter
is not stopped again.
4) Run "SNFMilterConfig -config=SNFMilter_second.xml -stop" again
and verify that SNFMilter is not stopped again.

Result:
Result: Pass

START_STOP_SEC-02: Repeat START_STOP_SEC-01 but with "-v" in the
command-line.

Result:
Result: Pass

START_STOP_SEC-03: Configure as for START_STOP_SEC-01, and do the
following:
@@ -212,6 +213,111 @@ following:

3) Start SNFMilter.

4) Run SNFMilterConfig with "-start -explain". Verify correct
output, and that SNFMilterConfig doesn't start SNFMilter.

5) Run SNFMilterConfig with "-stop -explain". Verify correct
output, and that SNFMilterConfig doesn't stop SNFMilter.

Result: Pass

Start/stop functionality with XCI and status.second enabled, append mode
------------------------------------------------------------------------

START_STOP_SEC_APP-01: Install default configuration files, and ensure
that SNFMilter is stopped. Create a configuration file
SNFMilter_second_append.xml as follows:

1) Disable XCI.

2) Enable status.second logging with append.

3) Enable status.minute logging, with append.

Do the following, specifying the configuration file SNFMilter_second_append.xml:

1) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -start",
and verify that SNFMilter starts.

2) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -start"
again and verify that SNFMilter is not started again.

3) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -stop"
and verify that SNFMilter stops.

4) Run "SNFMilterConfig -config=SNFMilter_second_append.xml -stop"
again and verify that SNFMilter is not stopped again.

Result:

START_STOP_SEC_APP-02: Repeat START_STOP_SEC_APP-01 but with "-v" in
the command-line.

Result:

START_STOP_SEC_APP-03: Configure as for START_STOP_SEC_APP-01, and do
the following:

1) Run SNFMilterConfig with "-start -explain". Verify correct
output, and that SNFMilterConfig doesn't start SNFMilter.

2) Run SNFMilterConfig with "-stop -explain". Verify correct
output, and that SNFMilterConfig doesn't stop SNFMilter.

3) Start SNFMilter.

4) Run SNFMilterConfig with "-start -explain". Verify correct
output, and that SNFMilterConfig doesn't start SNFMilter.

5) Run SNFMilterConfig with "-stop -explain". Verify correct
output, and that SNFMilterConfig doesn't stop SNFMilter.

Result:

Start/stop functionality with XCI and status.second disabled, status.minute enabled
-----------------------------------------------------------------------------------

START_STOP_MIN-01: Install default configuration files, and ensure
that SNFMilter is stopped. Create a configuration file
SNFMilter_minute.xml as follows:

1) Disable XCI.

2) Disable status.second logging.

3) Enable status.minute logging, with append.

Do the following, specifying the configuration file SNFMilter_minute.xml:

1) Run "SNFMilterConfig -config=SNFMilter_minute.xml -start", and verify that SNFMilter starts.

2) Run "SNFMilterConfig -config=SNFMilter_minute.xml -start" again
and verify that SNFMilter is not started again.

3) Run "SNFMilterConfig -config=SNFMilter_minute.xml -stop" and
verify that SNFMilter stops.

4) Run "SNFMilterConfig -config=SNFMilter_minute.xml -stop" again
and verify that SNFMilter is not stopped again.

Result:

START_STOP_MIN-02: Repeat START_STOP_MIN-01 but with "-v" in the
command-line.

Result:

START_STOP_MIN-03: Configure as for START_STOP_MIN-01, and do the
following:

1) Run SNFMilterConfig with "-start -explain". Verify correct
output, and that SNFMilterConfig doesn't start SNFMilter.

2) Run SNFMilterConfig with "-stop -explain". Verify correct
output, and that SNFMilterConfig doesn't stop SNFMilter.

3) Start SNFMilter.

4) Run SNFMilterConfig with "-start -explain". Verify correct
output, and that SNFMilterConfig doesn't start SNFMilter.


Loading…
Annulla
Salva