]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/conf.h
uidmap: fix writing multiple ranges
authorDwight Engen <dwight.engen@oracle.com>
Mon, 11 Mar 2013 20:36:25 +0000 (16:36 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 12 Mar 2013 21:06:53 +0000 (17:06 -0400)
commit251d0d2a8b4ec7a12c22ba63b5d0e558289c2ef6
tree806498fbded66ee2a6c4dbc87ce8d83020501555
parenta84b99323ab760d67cf76ef2418313bfd4f8b3ca
uidmap: fix writing multiple ranges

The kernel requires a single atomic write for setting the /proc
idmap files. We were calling write(2) more than once when multiple
ranges were configured so instead build a buffer to pass in one write(2)
call.

Change id types to unsigned long to handle large id mappings gracefully.

Fix max id in example comment.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/conf.c
src/lxc/conf.h
src/lxc/confile.c