Skip to content
Commit 8e014720 authored by Stephen Smalley's avatar Stephen Smalley Committed by Paul Moore
Browse files

selinux: enable genfscon labeling for sysfs and pstore files



Support per-file labeling of sysfs and pstore files based on
genfscon policy entries.  This is safe because the sysfs
and pstore directory tree cannot be manipulated by userspace,
except to unlink pstore entries.
This provides an alternative method of assigning per-file labeling
to sysfs or pstore files without needing to set the labels from
userspace on each boot.  The advantages of this approach are that
the labels are assigned as soon as the dentry is first instantiated
and userspace does not need to walk the sysfs or pstore tree and
set the labels on each boot.  The limitations of this approach are
that the labels can only be assigned based on pathname prefix matching.
You can initially assign labels using this mechanism and then change
them at runtime via setxattr if allowed to do so by policy.

Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
Suggested-by: default avatarDominick Grift <dac.override@gmail.com>
Acked-by: default avatarJeff Vander Stoep <jeffv@google.com>
Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
parent 134509d5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment