~cjwatson/binfmt-support/master

Viewing all changes in revision 231.

  • Committer: Colin Watson
  • Date: 2019-01-13 22:55:35 UTC
  • Revision ID: git-v1:6841caf59a99310385a5b18545d9c1ae04f09cb1
Avoid cleanup problems in chroots

Don't enable formats on import or disable them on unimport unless
/proc/sys/fs/binfmt_misc is already mounted.

Fixes Debian bug #847788 and Ubuntu bug #534211.

* src/update-binfmts.c (is_enabled): New function.
(load_binfmt_misc): Use is_enabled rather than equivalent code.
(act_install): Add always_update_kernel argument.  Only enable/disable
if always_update_kernel or if binfmt_misc is already enabled.
(act_remove): Add always_update_kernel argument.  Only disable if
always_update_kernel or if binfmt_misc is already enabled.
(act_import, act_unimport, main): Adjust calls to act_install and
act_remove.
* NEWS: Document this.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: