Commit Graph

6 Commits

Author SHA1 Message Date
Dan Walsh 6932807107 Add support for r/o mount labels
We need support for read/only mounts in SELinux to allow a bunch of
containers to share the same read/only image.  In order to do this
we need a new label which allows container processes to read/execute
all files but not write them.

Existing mount label is either shared write or private write.  This
label is shared read/execute.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-10-17 16:56:42 -04:00
Dan Walsh ff066b84ce Add label.GetFileLabel interface
One of our volume plugins needs to get the label of the target mount point
so that it can set the content inside of the volume to match.

We need label.GetFileLabel() to make this work.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-04-08 13:10:37 -04:00
allencloud 10cc27888c fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-25 11:11:48 +08:00
Dan Walsh 69c3ea4e17 Docker needs to know whether the user requested a relabel
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2015-10-28 15:44:38 -04:00
David Calavera 4bd4d462af Make label.Relabel safer.
- Check if Selinux is enabled before relabeling. This is a bug.
- Make exclusion detection constant time. Kinda buggy too, imo.
- Do not depend on a magic string to create a new Selinux context.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-31 10:37:32 -07:00
Michael Crosby 8f97d39dd2 Move libcontainer into subdirectory
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-21 19:29:15 -07:00