diff options
author | Daniel Mack <daniel@zonque.org> | 2014-11-13 20:33:03 +0100 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2014-11-13 20:41:52 +0100 |
commit | 63cc4c3138fd0ce9cc97884373a2dd8959a13ee9 (patch) | |
tree | a3a1da14e79d69685cd1c5ecf8b0baff703a21f0 /src/core/mount-setup.c | |
parent | c1ec25a0634bba8ef82b69ac603597d4749baf9d (diff) |
sd-bus: sync with kdbus upstream (ABI break)
kdbus has seen a larger update than expected lately, most notably with
kdbusfs, a file system to expose the kdbus control files:
* Each time a file system of this type is mounted, a new kdbus
domain is created.
* The layout inside each mount point is the same as before, except
that domains are not hierarchically nested anymore.
* Domains are therefore also unnamed now.
* Unmounting a kdbusfs will automatically also detroy the
associated domain.
* Hence, the action of creating a kdbus domain is now as
privileged as mounting a filesystem.
* This way, we can get around creating dev nodes for everything,
which is last but not least something that is not limited by
20-bit minor numbers.
The kdbus specific bits in nspawn have all been dropped now, as nspawn
can rely on the container OS to set up its own kdbus domain, simply by
mounting a new instance.
A new set of mounts has been added to mount things *after* the kernel
modules have been loaded. For now, only kdbus is in this set, which is
invoked with mount_setup_late().
Diffstat (limited to 'src/core/mount-setup.c')
-rw-r--r-- | src/core/mount-setup.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index cda25ede13..e9a2ec6886 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -110,6 +110,13 @@ static const MountPoint mount_table[] = { #endif }; +static const MountPoint mount_table_late[] = { +#ifdef ENABLE_KDBUS + { "kdbusfs", "/sys/fs/kdbus", "kdbusfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, + NULL, MNT_IN_CONTAINER }, +#endif +}; + /* These are API file systems that might be mounted by other software, * we just list them here so that we know that we should ignore them */ @@ -221,6 +228,21 @@ int mount_setup_early(void) { return r; } +int mount_setup_late(void) { + unsigned i; + int r = 0; + + for (i = 0; i < ELEMENTSOF(mount_table_late); i ++) { + int j; + + j = mount_one(mount_table_late + i, false); + if (r == 0) + r = j; + } + + return r; +} + int mount_cgroup_controllers(char ***join_controllers) { _cleanup_set_free_free_ Set *controllers = NULL; _cleanup_fclose_ FILE *f; |