Merge pull request #11290 from LK4D4/fix_lxc_for_new_api

Use CgroupString instead of missing GetCgroupAllowString in lxc_template
This commit is contained in:
Michael Crosby 2015-03-10 10:39:17 -07:00
commit 1835665e94
2 changed files with 4 additions and 1 deletions

View File

@ -420,6 +420,9 @@ func setupUser(userSpec string) error {
if err != nil { if err != nil {
return err return err
} }
if err := syscall.Setgroups(execUser.Sgids); err != nil {
return err
}
if err := system.Setgid(execUser.Gid); err != nil { if err := system.Setgid(execUser.Gid); err != nil {
return err return err
} }

View File

@ -51,7 +51,7 @@ lxc.cgroup.devices.allow = a
lxc.cgroup.devices.deny = a lxc.cgroup.devices.deny = a
#Allow the devices passed to us in the AllowedDevices list. #Allow the devices passed to us in the AllowedDevices list.
{{range $allowedDevice := .AllowedDevices}} {{range $allowedDevice := .AllowedDevices}}
lxc.cgroup.devices.allow = {{$allowedDevice.GetCgroupAllowString}} lxc.cgroup.devices.allow = {{$allowedDevice.CgroupString}}
{{end}} {{end}}
{{end}} {{end}}