Adding a function that allows to remove an address set on an interface
Signed-off-by: Cyril Thomas <ketouem@gmail.com>
Merge pull request #297 from optiflows/delete_interface_ip

Adding a function that allows to remove an address set on an interface
user: *: fix function signatures

This patch changes the incorrectly named functions GetPasswdFile,
GetGroupFile, GetExecUserFile and several internal components to
GetPasswdPath, GetGroupPath, etc -- as these are far more appropriate
names and more clearly convey to users what the arguments represent.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
*: merge to new user/ API

This patch switches libcontainer's usage of the user/ API to the new
version.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
Merge pull request #301 from cyphar/user-fix-names

user: fix function signatures
add ExecConfig to set execin's cgroups settings

if ExecConfig.Cgroups is not set, then the execin process will be placed under
the container's cgroups.

This also refactors `ExecIn` method to accepts only `ExecConfig`, which
contains the container's configuration and its current state.

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Create subcgroups if ExecConfig has Cgroups data

always create nested cgroups under the container's cgroups when ExecConfig has
Cgroups data. This means setting Parent in ExecConfig's Cgroups will have no
effect.

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
cleanup execin process's cgroups when it finished

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
refactor setupCgroups to accept arg cgroups.Cgroup

instead of passing in `libcontainer.Config`, we just want to pass in a
`cgroups.Cgroup`. This doesnt change `SetupCgroups` public method

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)