From 6cb4acce8b136e0dd2afa647b9b8cdf7c1702aed Mon Sep 17 00:00:00 2001
From: Eric Blake
Date: Thu, 22 Dec 2011 17:47:49 -0700
Subject: [PATCH] seclabel: extend XML to allow per-disk label overrides
When doing security relabeling, there are cases where a per-file
override might be appropriate. For example, with a static label
and relabeling, it might be appropriate to skip relabeling on a
particular disk, where the backing file lives on NFS that lacks
the ability to track labeling. Or with dynamic labeling, it might
be appropriate to use a custom (non-dynamic) label for a disk
specifically intended to be shared across domains.
The new XML resembles the top-level , but with fewer
options (basically relabel='no', or ):
...
...
...
...
text
This patch only introduces the XML and documentation; future patches
will actually parse and make use of it. The intent is that we can
further extend things as needed, adding a per-device in
more places (such as the source of a console device), and possibly
allowing a instead of
- Valid input XML configurations for the security label
+ Valid input XML configurations for the top-level security label
are:
When relabeling is in effect, it is also possible to fine-tune
+ the labeling done for specific source file names, by either
+ disabling the labeling (useful if the file lives on NFS or other
+ file system that lacks security labeling) or requesting an
+ alternate label (useful when a management application creates a
+ special label to allow sharing of some, but not all, resources
+ between domains), since 0.9.9. When
+ a seclabel element is attached to a specific path
+ rather than the top-level domain assignment, only the
+ attribute relabel or the
+ sub-element label are supported.
+