]> git.ipfire.org Git - thirdparty/lxc.git/commit
fix logic for execute log file 2303/head
authorTycho Andersen <tycho@tycho.ws>
Thu, 3 May 2018 18:32:19 +0000 (18:32 +0000)
committerTycho Andersen <tycho@tycho.ws>
Thu, 3 May 2018 18:32:19 +0000 (18:32 +0000)
commitcd90db2c0ec7948a9a52dfc83d3a2b92ed522511
treef4c0d98b0c5d328308beca9940fbd94d9f5c878f
parentcef701ede302a70f52bb1951f2dec2c0f88c2e5f
fix logic for execute log file

The problem here is that lxc-init runs *inside* the container. So if a
person has the log file set to /home/$USER/foo, lxc-init ends up making a
directory /home/$USER/foo inside the container to put the log file in. What
we really want are the logs to be propagated from inside the container to
the outside. We accomplish this by passing an fd without O_CLOEXEC, and
telling lxc-init to log to that file.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
src/lxc/execute.c