]> git.ipfire.org Git - thirdparty/lxc.git/commit
Allow full path in lxc.devices.allow 1708/head
authoraeris <aeris@imirhil.fr>
Wed, 19 Jul 2017 15:21:24 +0000 (17:21 +0200)
committeraeris <aeris@imirhil.fr>
Wed, 26 Jul 2017 10:17:33 +0000 (12:17 +0200)
commitc8bf519d7ec4a6e0aa996f8828b5b319b93d0483
tree5337d7bf10254daa9b4827a6168c1073e9df8273
parent82ce69b151c7c09ada600b6c2f401a846699e1ca
Allow full path in lxc.devices.allow

Some devices like LVM or cryptsetup entries have no stable major/minor, changing between host reboots.
In this case, hardcoded numbers are not usable in config file and there is currently no way to use hook with lxc-device to do the link at guest startup :

    * `pre-start`/`autodev` hook runs in host context but has the guest in stopped state and so lxc-device not usable
    * `start` hook is in running state but runs in guest context and so lxc-device not available

This patch converts fullpath in lxc.devices.allow to current major/minor numbers to address those changing numbers.

Signed-off-by: aeris <aeris@imirhil.fr>
src/lxc/cgroups/cgfsng.c