Fix warnings from go vet

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Merge pull request #156 from LK4D4/fix_vet_errors

Fix warnings from go vet
Enter cgroups while entering namespaces as part of NsEnter.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Enter cgroups as part of nsenter while using systemd.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Store all the cgroups paths as part of the state. This simplifies entering cgroups and will be useful for
cleanups too in the future.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Update cgroups paths in state to be a map with cgroup type as key and path as value.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Cleanup systemd cgroup code

The current paths for the different systemd cgroup subsystems that
systemd manages and that we have to manage are very inconsistent.  This
patch cleans up those differences and allows consistent paths to be
used.

Signed-off-by: Michael Crosby <michael@docker.com>
Merge pull request #4 from crosbymichael/cgroup-enter

Cleanup systemd cgroup code
Merge pull request #143 from vishh/enter_cgroup

Enter cgroups as part of NsEnter
Remove dependency from docker/pkg/systemd

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Merge pull request #159 from LK4D4/remove_docker_systemd_dep

Remove dependency from docker/pkg/systemd
Return NotFound error for cgroups abs paths

Signed-off-by: Michael Crosby <michael@docker.com>
Change not found error to be typed with cgroup subsystem

Signed-off-by: Michael Crosby <michael@docker.com>
Ignore not found erros in Paths

Signed-off-by: Michael Crosby <michael@docker.com>
Merge pull request #161 from crosbymichael/return-notfound-err

Return NotFound error for cgroups abs paths
Allow docker to free container labels when containers are removed.

Currently we do not remove reservations on MCS labels when a container
is removed.  Not a big problem, since on reboot it would be freed.
But we should be cleaning this up.  Currently we support ~500,000
labels.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Use --privileged in Makefile

We need --privileged for apparmor based systems until we have an
apparmor specific flag to set the profile to unconfined.

Signed-off-by: Michael Crosby <michael@docker.com>
Merge pull request #162 from rhatdan/unreserve

Allow docker to free container labels when containers are removed.
Merge pull request #164 from crosbymichael/use-privilged

Use --privileged in Makefile
Move mount logic into Mount type

Signed-off-by: Michael Crosby <michael@docker.com>