]> 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:48:28 +0000 (14:48 -0500)
commit93525c00c76b2804c46cf3c275d610ebe71cb4be
treefcf7a9ab86f165077b86f7be85c06d3ccafd152d
parentd546aa0e7ebcb93ed3e17781c3803be33b8fbc8e
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