add in validation for shm size, run go fmt on util.go

This commit is contained in:
Oliver Marks 2016-10-07 22:18:46 +01:00
parent f478c8eeb6
commit 9d5e17ee92
2 changed files with 4 additions and 1 deletions

View file

@ -51,6 +51,9 @@ func CheckTrusted(c *yaml.Container) error {
if c.Privileged { if c.Privileged {
return fmt.Errorf("Insufficient privileges to use privileged mode") return fmt.Errorf("Insufficient privileges to use privileged mode")
} }
if c.ShmSize != 0 {
return fmt.Errorf("Insufficient privileges to override shm_size")
}
if len(c.DNS) != 0 { if len(c.DNS) != 0 {
return fmt.Errorf("Insufficient privileges to use custom dns") return fmt.Errorf("Insufficient privileges to use custom dns")
} }