From: Ian Pilcher <arequipeno@gmail.com>
To: SElinux list <selinux@vger.kernel.org>
Subject: File access macros
Date: Sat, 13 Sep 2025 16:00:08 -0500 [thread overview]
Message-ID: <78602e06-7db0-4e0c-9415-75098682e58a@gmail.com> (raw)
I'm writing a policy module to allow containerized and non-containerized
services to share content. (Basically to give container_t access to
public_content_t and/or public_content_rw_t.)
I don't normally make much use of SELinux policy macros, as the
documentation seems to be rather difficult to find, scattered, and
sometimes conflicting; instead I usually just use the denials generated
by the program that I'm confining to determine exactly what access it
needs.
In this case, however, I'm trying to do something much more generic.
I don't really know exactly what permissions a given containerized
service might need, so I'm looking for a good, standard set of read-only
and read/write permissions for files, directories, and symbolic links.
It sure seems like this must be a solved problem. I.e. there must be
something like this macro, which Google Gemini so helpfully
hallucinated.
fs_read_access(<domain_type>, <file_type>);
Thus far, I've been completely unable to find anything like this.
Am I wrong that macros like this exist?
--
========================================================================
If your user interface is intuitive in retrospect ... it isn't intuitive
========================================================================
next reply other threads:[~2025-09-13 21:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-13 21:00 Ian Pilcher [this message]
2025-09-14 5:29 ` File access macros Dominick Grift
2025-09-15 12:25 ` Stephen Smalley
2025-09-15 15:18 ` Ian Pilcher
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=78602e06-7db0-4e0c-9415-75098682e58a@gmail.com \
--to=arequipeno@gmail.com \
--cc=selinux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.