public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: provide a dummy certificate for the smtpd service
Date: Fri, 11 Sep 2026 13:22:55 GMT [thread overview]
Message-ID: <178913297562.1.2984787478629342739.tests-selinux-450f6475d0c7@fedoraproject.org> (raw)
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
reply other threads:[~2026-09-11 13:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178913297562.1.2984787478629342739.tests-selinux-450f6475d0c7@fedoraproject.org \
--to=mmalik@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox