public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: create drop-in file only if /etc/ssh/sshd_config.d/ exists
@ 2026-09-11 13:20 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : cfcc5231747913631e3b2515fdb706f1f5ad0c7f
Author : Milos Malik <mmalik@redhat.com>
Date : 2023-04-25T13:06:23+02:00
Stats : +3/-1 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/cfcc5231747913631e3b2515fdb706f1f5ad0c7f?branch=pr775-checkpolicy-revdeps
Log:
create drop-in file only if /etc/ssh/sshd_config.d/ exists
The rlSEConfigureSSH function produced the following error message:
/usr/share/beakerlib/testing.sh: line 896: /etc/ssh/sshd_config.d/001-enable-password.conf: No such file or directory
when the /etc/ssh/sshd_config.d directory did not exist.
To avoid such situations in the future, the 001-enable-password.conf
file will be created only if the /etc/ssh/sshd_config.d/ directory
exists.
---
diff --git a/selinux-policy/Library/common/lib.sh b/selinux-policy/Library/common/lib.sh
index af691e0..658d42e 100755
--- a/selinux-policy/Library/common/lib.sh
+++ b/selinux-policy/Library/common/lib.sh
@@ -1289,7 +1289,9 @@ function rlSEConfigureSSH () {
rlFileBackup /etc/ssh/sshd_config
rlRun "sed -i 's/^.*PermitRootLogin.*$/PermitRootLogin yes/' /etc/ssh/sshd_config"
rlRun "sed -i 's/^.*PasswordAuthentication.*$/PasswordAuthentication yes/' /etc/ssh/sshd_config"
- rlRun "echo 'PasswordAuthentication yes' > /etc/ssh/sshd_config.d/001-enable-password.conf"
+ if [ -d /etc/ssh/sshd_config.d ] ; then
+ rlRun "echo 'PasswordAuthentication yes' > /etc/ssh/sshd_config.d/001-enable-password.conf"
+ fi
rlRun "service sshd restart"
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:20 [tests/selinux] pr775-checkpolicy-revdeps: create drop-in file only if /etc/ssh/sshd_config.d/ exists Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox