public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: provide a dummy certificate for the smtpd service
@ 2026-09-11 13:22 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:22 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 450f6475d0c7dcc80b59059a951e5fbfa494e5b0
Author : Milos Malik <mmalik@redhat.com>
Date : 2025-06-10T12:26:23+00:00
Stats : +11/-0 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/450f6475d0c7dcc80b59059a951e5fbfa494e5b0?branch=pr775-checkpolicy-revdeps
Log:
provide a dummy certificate for the smtpd service
The opensmtpd service does not start when the /etc/pki/tls/cert.pem
file is missing. Let's provide an empty file to work around this
issue.
---
diff --git a/selinux-policy/opensmtpd-and-similar/runtest.sh b/selinux-policy/opensmtpd-and-similar/runtest.sh
index c98321a..c728060 100755
--- a/selinux-policy/opensmtpd-and-similar/runtest.sh
+++ b/selinux-policy/opensmtpd-and-similar/runtest.sh
@@ -49,6 +49,11 @@ rlJournalStart
rlAssertRpm ${SERVICE_PACKAGE}
fi
+ if [ -e /etc/pki/tls/cert.pem ] ; then
+ CERTIFICATE_MISSING="false"
+ else
+ CERTIFICATE_MISSING="true"
+ fi
rlServiceStop ${SERVICE_NAME} postfix sendmail
rlSESetEnforce
@@ -86,6 +91,9 @@ rlJournalStart
# for environments where the service is not yet confined
PROCESS_CONTEXT="unconfined_service_t"
fi
+ if ${CERTIFICATE_MISSING} ; then
+ rlRun "touch /etc/pki/tls/cert.pem"
+ fi
rlSEService - ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "start status" 1
rlRun "sestatus | mailx -s test-email root@localhost"
rlRun "restorecon -Rv /etc /var /run -e /var/ARTIFACTS" 0-255
@@ -98,6 +106,9 @@ rlJournalStart
sleep 2
rlSECheckAVC
+ if ${CERTIFICATE_MISSING} ; then
+ rlRun "rm -f /etc/pki/tls/cert.pem"
+ fi
rlServiceRestore ${SERVICE_NAME} postfix sendmail
rlPhaseEnd
rlJournalPrintText
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:22 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:22 [tests/selinux] pr775-checkpolicy-revdeps: provide a dummy certificate for the smtpd service Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox