Skip to content

Commit eea44e5

Browse files
committed
Optimizational function for 8.3.3 8.3.6
1 parent 25c083a commit eea44e5

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

bin/hardening/8.3.3_configure_syslog-ng.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,29 @@ set -u # One variable unset, it's over
1414
HARDENING_LEVEL=3
1515

1616
SERVICE_NAME="syslog-ng"
17+
PACKAGE_R='rsyslog'
1718

1819
# This function will be called if the script status is on enabled / audit mode
1920
audit () {
20-
info "Ensure default and local facilities are preserved on the system"
21-
info "No measure here, please review the file by yourself"
21+
is_pkg_installed $PACKAGE_R
22+
if [ $FNRET = 0 ]; then
23+
ok "$PACKAGE_R has installed, so pass."
24+
FNRET=0
25+
else
26+
info "Ensure default and local facilities are preserved on the system"
27+
info "No measure here, please review the file by yourself"
28+
fi
2229
}
2330

2431
# This function will be called if the script status is on enabled mode
2532
apply () {
26-
info "Ensure default and local facilities are preserved on the system"
27-
info "No measure here, please review the file by yourself"
33+
is_pkg_installed $PACKAGE_R
34+
if [ $FNRET = 0 ]; then
35+
ok "$PACKAGE_R has installed, so pass."
36+
else
37+
info "Ensure default and local facilities are preserved on the system"
38+
info "No measure here, please review the file by yourself"
39+
fi
2840
}
2941

3042
# This function will check config parameters required

bin/hardening/8.3.6_remote_syslog-ng_acl.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,27 @@ set -e # One error, it's over
1212
set -u # One variable unset, it's over
1313

1414
HARDENING_LEVEL=3
15+
PACKAGE_R='rsyslog'
1516

1617
# This function will be called if the script status is on enabled / audit mode
1718
audit () {
18-
info "Not implemented yet"
19+
is_pkg_installed $PACKAGE_R
20+
if [ $FNRET = 0 ]; then
21+
ok "$PACKAGE_R has installed, so pass."
22+
FNRET=0
23+
else
24+
info "Not implemented yet"
25+
fi
1926
}
2027

2128
# This function will be called if the script status is on enabled mode
2229
apply () {
23-
info "Not implemented yet"
30+
is_pkg_installed $PACKAGE_R
31+
if [ $FNRET = 0 ]; then
32+
ok "$PACKAGE_R has installed, so pass."
33+
else
34+
info "Not implemented yet"
35+
fi
2436
}
2537

2638
# This function will check config parameters required

0 commit comments

Comments
 (0)