* kernel function to verify rootcontext
@ 2013-11-06 4:08 Matthew Thode
2013-11-06 13:20 ` Stephen Smalley
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Thode @ 2013-11-06 4:08 UTC (permalink / raw)
To: selinux
[-- Attachment #1: Type: text/plain, Size: 139 bytes --]
Is there a kernel function used to verify that a rootcontext is valid
(exists and/or is formatted correctly).
--
-- Matthew Thode
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kernel function to verify rootcontext
2013-11-06 4:08 kernel function to verify rootcontext Matthew Thode
@ 2013-11-06 13:20 ` Stephen Smalley
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Smalley @ 2013-11-06 13:20 UTC (permalink / raw)
To: mthode; +Cc: selinux
On 11/05/2013 11:08 PM, Matthew Thode wrote:
> Is there a kernel function used to verify that a rootcontext is valid
> (exists and/or is formatted correctly).
>
Not sure what you mean. SELinux directly handles and consumes the
rootcontext= and other related mount options before they are passed
along to the filesystem code, so your filesystem doesn't need to do
anything with it.
security_context_to_sid() is the SELinux kernel function for validating
security contexts and mapping them to a security identifier (SID), but
you shouldn't call that from your filesystem code.
>From userspace, you can check a context by writing the context string to
/sys/fs/selinux/context or by calling the libselinux
security_check_context() function (which internally does the same thing)
and checking the result.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-06 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 4:08 kernel function to verify rootcontext Matthew Thode
2013-11-06 13:20 ` Stephen Smalley
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.