]> git.ipfire.org Git - thirdparty/lxc.git/commit
use PR_SET_MM_MAP instead of PR_SET_MM
authorTycho Andersen <tycho.andersen@canonical.com>
Fri, 6 Nov 2015 19:34:47 +0000 (12:34 -0700)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 6 Nov 2015 19:51:30 +0000 (14:51 -0500)
commiteac6837f7839d85a958636b395599a77e3763999
tree02460e6fdc66b2f84727a77ce5817f40f20ef447
parentba35272e956fafe6098838f84b52c1b6b47529f8
use PR_SET_MM_MAP instead of PR_SET_MM

PR_SET_MM_MAP can be called as non-root, which we are in the unprivileged
(or nested) case.

Also, let's not do the strcpy() for the new cmdline until after we're sure
the prctl succeeded. This means that even if it does fail, we won't
mutilate the command line like we did before, it just won't be as pretty.

v2: remember to chop off bits of the string that are too long

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/utils.c