Skip to content

Commit

Permalink
lxc_map_ids: add a comment
Browse files Browse the repository at this point in the history
Explain why we insist that root use newuidmap if it is available.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
hallyn authored and stgraber committed Sep 22, 2014
1 parent c424086 commit b682262
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lxc/conf.c
Expand Up @@ -3361,6 +3361,12 @@ int lxc_map_ids(struct lxc_list *idmap, pid_t pid)
enum idtype type;
char *buf = NULL, *pos, *cmdpath = NULL;

/*
* If newuidmap exists, that is, if shadow is handing out subuid
* ranges, then insist that root also reserve ranges in subuid. This
* will protected it by preventing another user from being handed the
* range by shadow.
*/
cmdpath = on_path("newuidmap");
if (cmdpath) {
use_shadow = 1;
Expand Down

0 comments on commit b682262

Please sign in to comment.