From: Stephen Smalley <sds@tycho.nsa.gov>
To: selinux@vger.kernel.org
Cc: Dominick Grift <dominick.grift@defensec.nl>
Subject: Re: question about fs sid
Date: Mon, 27 Jan 2020 08:55:00 -0500 [thread overview]
Message-ID: <e09a265c-83ad-8422-a67b-24b265ab8381@tycho.nsa.gov> (raw)
In-Reply-To: <20200127125228.GA1998492@brutus.lan>
On 1/27/20 7:52 AM, Dominick Grift wrote:
> What is the fs sid used for exactly? What, if any, is its relationship with persistent file systems with xattr support.
> Were currently associating a type that is generally also associated with persistent filesystems that support xattr but i dont know why.
> Why would it not apply to other filesystems, for example tmpfs or vfat or whatever?
>
> Is the fs sid still used and what do i need to consider when determining what context to associate with it?
Are you referring to the fs initial SID, or to the SID associated with
each filesystem/superblock?
The former appears to be unused by any kernel code other than the
declaration (grep -r SECINITSID_FS). At one time, it was the default
SID to use for the filesystem/superblock. Looks like this has never
been used in mainline Linux, just pre-mainline SELinux. Sadly we cannot
just remove obsolete initial SIDs until we fix
https://github.com/SELinuxProject/selinux-kernel/issues/12
The latter is still relevant but the defaults are now determined through
fs_use_* or genfscon statements, default to the unlabeled SID if there
is no match, and can be overridden via the fscontext= mount option. It
is used in permission checks on the superblock/filesystem (e.g. mount,
unmount, ...) and to limit what file contexts can be assigned to files
within the filesystem (associate).
next prev parent reply other threads:[~2020-01-27 13:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 12:52 question about fs sid Dominick Grift
2020-01-27 13:55 ` Stephen Smalley [this message]
2020-01-27 14:08 ` Dominick Grift
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=e09a265c-83ad-8422-a67b-24b265ab8381@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=dominick.grift@defensec.nl \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).