attach: Fix minor memory leak in environment variable handling

Signed-off-by: Christian Seiler <christian@iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
python/attach: Fix minor memory leaks

Signed-off-by: Christian Seiler <christian@iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
cgroup: minor bugfixes so start and attach work again

This fixes some minor bugs in the cgroup logic that made start and
attach fail (at least when all cgroup controllers were mounted
together).

Signed-off-by: Christian Seiler <christian@iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
python/attach: export CLONE_NEW* constants to Python

Signed-off-by: Christian Seiler <christian@iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
python/attach: Add function that returns personality for architecture

Adds the arch_to_personality function that looks up an architecture
and returns the corresponding personality. This may be used in
conjunction with the attach/attach_wait keyword argument.

Signed-off-by: Christian Seiler <christian@iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
fix oldlen update

Signed-off-by: Ubuntu <ubuntu@ip-10-181-158-15.ec2.internal>