]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxc_user_nic: add a check to make sure caller owns target netns
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 19 Nov 2013 16:17:44 +0000 (16:17 +0000)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 19 Nov 2013 22:25:52 +0000 (16:25 -0600)
commit8d9f636daf77f1a551f0c25e1270ab32e5b21ea4
tree0a7ac21ddc5feb3175073b8d49cd4b36aa65dbb1
parentad40563e902214317e669590186ab348627b8491
lxc_user_nic: add a check to make sure caller owns target netns

Temporarily set our euid back to the calling ruid, so that the
access(2) check can succeed based on the euid being the userns
creator.

Also switch from atoi to strtol

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc_user_nic.c