]> git.proxmox.com Git - mirror_lxc.git/commit
utmp: support non-rootfs configuration
authorDavid Ward <david.ward@ll.mit.edu>
Thu, 3 May 2012 22:50:15 +0000 (00:50 +0200)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Thu, 3 May 2012 22:50:15 +0000 (00:50 +0200)
commite7d04aaea0b66df1bdbd303580c7a6125b7071d1
tree5ad6c288b3a1c06f60094fb7b58f69d271eedf3b
parentf51db2b39a5006ed74271ffd0b46cbbc27d7bf0b
utmp: support non-rootfs configuration

Having a rootfs is not a necessary condition for monitoring utmp, since
/var or /var/run can just be remounted inside the container instead. We
should rely on the other two conditions already in place to decide
whether to monitor the utmp file:

 - the container was started with 'lxc-start', which indicates that it
   has a real init process and is expected to write to a utmp file

 - support for CAP_SYS_BOOT was not found in the kernel, which would
   otherwise supersede utmp monitoring

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/utmp.c