Merge pull request #162 from rhatdan/unreserve

Allow docker to free container labels when containers are removed.
This commit is contained in:
Michael Crosby 2014-08-25 11:04:53 -07:00
commit 3e908c1f0c
2 changed files with 12 additions and 0 deletions

View File

@ -39,3 +39,7 @@ func Init() {
func ReserveLabel(label string) error {
return nil
}
func UnreserveLabel(label string) error {
return nil
}

View File

@ -128,3 +128,11 @@ func ReserveLabel(label string) error {
selinux.ReserveLabel(label)
return nil
}
// UnreserveLabel will remove the reservation of the MCS label.
// This will allow InitLabels to use the MCS label in a newly created
// containers
func UnreserveLabel(label string) error {
selinux.FreeLxcContexts(label)
return nil
}