public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: kernel-confined-exec: add test for coredump disabled via /usr/bin/false
Date: Fri, 11 Sep 2026 13:20:39 GMT [thread overview]
Message-ID: <178913283963.1.1786698823278020745.tests-selinux-a54b9e0d6b2e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : a54b9e0d6b2e500328996e75bcd7c433aded557a
Author : Ondrej Mosnacek <omosnace@redhat.com>
Date : 2023-05-11T15:37:59+02:00
Stats : +14/-0 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/a54b9e0d6b2e500328996e75bcd7c433aded557a?branch=pr775-checkpolicy-revdeps
Log:
kernel-confined-exec: add test for coredump disabled via /usr/bin/false
Systemd may disable coredumps by setting kernel.core_pattern to
"|/usr/bin/false", so this needs to work.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
---
diff --git a/selinux-policy/kernel-confined-exec/runtest.sh b/selinux-policy/kernel-confined-exec/runtest.sh
index 1f59a75..2694fb1 100755
--- a/selinux-policy/kernel-confined-exec/runtest.sh
+++ b/selinux-policy/kernel-confined-exec/runtest.sh
@@ -126,6 +126,20 @@ rlJournalStart
"Reset kernel.core_pattern to default"
rlPhaseEnd
+ rlPhaseStartTest "Core pattern set to |/usr/bin/false"
+ rlLog "Should work with no AVCs"
+
+ rlRun "sysctl kernel.core_pattern='|/usr/bin/false'" 0 \
+ "Set kernel.core_pattern to |/usr/bin/false"
+ rlSESetTimestamp
+ sleep 1
+ rlRun "./trigger_segfault" 139
+ sleep 2
+ rlSECheckAVC
+ rlRun "sysctl kernel.core_pattern=\"\$original_core_pattern\"" 0 \
+ "Reset kernel.core_pattern to default"
+ rlPhaseEnd
+
rlPhaseStartCleanup
rlRun "rm -f trigger_segfault"
rlPhaseEnd
reply other threads:[~2026-09-11 13:20 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=178913283963.1.1786698823278020745.tests-selinux-a54b9e0d6b2e@fedoraproject.org \
--to=omosnace@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