Skip to content

Commit 4859646

Browse files
author
Rustem Bapin
committed
Fixed controls in case appropriate configs are missing
1 parent e1f4d16 commit 4859646

8 files changed

+39
-1
lines changed

controls/autofs-browse-mode

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ new_subst disabled \
2222

2323
new_summary 'Browse autofs target mountpoints'
2424

25+
if [ ! -e $CONFIG -a "$*" = "status" ]; then
26+
echo "unknown"
27+
exit 0
28+
fi
29+
2530
control_subst "${CONFIG}" "$*"
2631

controls/krb5-conf-ccache

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ new_help kcm 'Kerberos credential manager (requires service like sssd-kcm)'
2828

2929
new_summary 'Kerberos client default credential cache'
3030

31-
test -f "$CONFIG" || exit 2
31+
if [ ! -e $CONFIG -a "$*" = "status" ]; then
32+
echo "unknown"
33+
exit 0
34+
fi
3235

3336
if ! is_builtin_mode "$1"; then
3437
case "$1" in

controls/ssh-gssapi-auth

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,10 @@ new_subst enabled \
2424
'^[[:space:]]*GSSAPIAuthentication[[:space:]]+yes$' \
2525
's/[[:space:]#]*\(GSSAPIAuthentication\)[[:space:]]\+.*/ \1 yes/'
2626

27+
if [ ! -e $CONFIG -a "$*" = "status" ]; then
28+
echo "unknown"
29+
exit 0
30+
fi
31+
2732
control_subst "${CONFIG}" "$*" || exit 1
2833

controls/sshd-allow-groups-list

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ new_help remoteonly 'Allow SSH Access to group remote only'
2424

2525
new_summary 'OpenSSH server list of allowed groups configuration'
2626

27+
if [ ! -e $CONFIG -a "$*" = "status" ]; then
28+
echo "unknown"
29+
exit 0
30+
fi
31+
2732
control_subst "$CONFIG" "$*"

controls/sshd-gssapi-auth

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@ new_help default 'Disable GSSAPI authentication (Single Sign-On feature)'
2323

2424
new_summary 'GSSAPI authentication mechanism in SSHD'
2525

26+
if [ ! -e $CONFIG -a "$*" = "status" ]; then
27+
echo "unknown"
28+
exit 0
29+
fi
30+
2631
control_subst "${CONFIG}" "$*"
2732

controls/sssd-ad-gpo-access-control

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,10 @@ new_subst disabled \
2727

2828
new_summary 'SSSD option specifies the operation mode for GPO-based access control functionality'
2929

30+
if [ ! -e $CONFIG -a "$*" = "status" ]; then
31+
echo "unknown"
32+
exit 0
33+
fi
34+
3035
control_subst "${CONFIG}" "$*"
3136

controls/sssd-ad-gpo-ignore-unreadable

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ new_subst disabled \
2222

2323
new_summary 'Ignore policy for SSSD if GPO (group policy AD object) templates (GPT) are not readable for SSSD'
2424

25+
if [ ! -e $CONFIG -a "$*" = "status" ]; then
26+
echo "unknown"
27+
exit 0
28+
fi
29+
2530
control_subst "${CONFIG}" "$*"
2631

controls/sssd-cache-credentials

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ new_subst disabled \
2222

2323
new_summary 'Determines SSSD user credentials are also cached in the local LDB cache'
2424

25+
if [ ! -e $CONFIG -a "$*" = "status" ]; then
26+
echo "unknown"
27+
exit 0
28+
fi
29+
2530
control_subst "${CONFIG}" "$*"
2631

0 commit comments

Comments
 (0)