]> git.proxmox.com Git - mirror_lxcfs.git/commit
bindings: handle current working directory on upgrade
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 13 Mar 2020 10:34:37 +0000 (11:34 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 13 Mar 2020 10:34:37 +0000 (11:34 +0100)
commitde69569b541fb7cb2f9bde65b88b444543dec0b8
treeaed1592be3e3ef7b2e3b4f29de2922d6a4c00dd5
parent3326c17e2686df9d543f0b4b47665e8dd991e170
bindings: handle current working directory on upgrade

Recenly I've made failures to run the constructor or destructor fatal.
Mostly, because we can't guarantee correct functionality if they fail.
In fact we can't do anything useful at all (Maybe I can come up with
something more useful soon.)
In any case, this surfaced a bug where on systems that replace/delete
the current workding directory of lxcfs will cause the constructor to
crash on reload because the path that getcwd() returns does not exist
anymore. Fix this by always escaping to root after the construtor has
run but also make it optional in case someone is messing with chroot()s
or other things.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/bindings.c