Commit Graph

14 Commits

Author SHA1 Message Date
Franck Bui 07ccf434e7 units: restore sysfs conditions in sys-fs-fuse-connections.mount and sys-kernel-config.mount
Commit 42cc2855ba incorrectly removed the condition on sysfs in both
sys-fs-fuse-connections.mount and sys-kernel-config.mount. However there are
still needed in case modprobe of one of these modules is intentionally skipped
(due to lack of privs for example).

This patch restores the 2 conditions which should be safe for the common case,
since all conditions are only checked after all deps ordered before are
complete.

Follow-up for 42cc2855ba.
2020-11-21 01:10:17 +09:00
Franck Bui 42cc2855ba units: wait until some fs modules are entirely loaded before mounting their corresponding filesystem
udev requests to start the fs mount units when their respective module is
loaded. For that it monitors uevents of type "ADD" for the relevant fs modules.

However the uevent is sent by the kernel too early, ie before the init() of the
module is called hence before directories in /sys/fs/ are created.

This patch workarounds adds "Requires/After=modprobe@<fs-module>.service" to
the mount unit, which means that modprobe(8) will be called once the fs module
is announced to be loaded. This sounds pointless, but given that modprobe only
returns after the initialization of the module is complete, it should
workaround the issue.

As a side effect, the module will be automatically loaded if the mount unit is
started manually.

Fixes #17586.
2020-11-19 11:50:52 +01:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Lennart Poettering 5cb02182fd units: set nodev,nosuid,noexec flags for various secondary API VFS
A couple of API VFS we mount via .mount units. Let's set the three flags
for those too, just in case.

This is just paranoia, nothing else, but shouldn't hurt.
2019-03-25 19:39:00 +01:00
Zbigniew Jędrzejewski-Szmek a7df2d1e43 Add SPDX license headers to unit files 2017-11-19 19:08:15 +01:00
AsciiWolf 16a5d4128f units: use https for the freedesktop url (#6227) 2017-06-28 22:54:12 -04:00
Zbigniew Jędrzejewski-Szmek b878b618ad units: disable /sys/fs/fuse/connections in private user namespaces (#4592)
The mount fails, even though CAP_SYS_ADMIN is granted.

Only file systems with FU_USERNS_MOUNT in .fs_flags may be mounted in userns,
and the patch to add that fusectl was rejected [1]. It would be nice if we
could check if the kernel has FU_USERNS_MOUNT for a given fs type, since this
could change over time, but this information doesn't seem to be exported.
So let's just skip this mount in userns to avoid an error during boot.

[1] https://patchwork.kernel.org/patch/2828269/
2016-11-11 19:00:33 +01:00
Lennart Poettering 03a7868805 units: don't try to mount the FUSE fs if we lack the privileges for it
See:

https://lists.freedesktop.org/archives/systemd-devel/2016-February/035740.html
2016-02-10 23:42:39 +01:00
Lennart Poettering 25ed795892 units: add reference to new wiki page to all api mount units 2013-01-15 18:14:13 +01:00
Lennart Poettering 744881d173 man: add Documentation= tags to all kinds of missing units 2012-06-27 01:07:04 +02:00
Lennart Poettering 5430f7f2bc relicense to LGPLv2.1 (with exceptions)
We finally got the OK from all contributors with non-trivial commits to
relicense systemd from GPL2+ to LGPL2.1+.

Some udev bits continue to be GPL2+ for now, but we are looking into
relicensing them too, to allow free copy/paste of all code within
systemd.

The bits that used to be MIT continue to be MIT.

The big benefit of the relicensing is that closed source code may now
link against libsystemd-login.so and friends.
2012-04-12 00:24:39 +02:00
Lennart Poettering 7ef5875d14 units: introduce unit file for FUSE fs
FUSE and configfs is very very similar, so handle both the same way.
2011-09-22 03:00:04 +02:00
Lennart Poettering 5c546cb75e units: drop fuse fs from automount, since this is now done by udev internally 2010-06-01 19:50:35 +02:00
Lennart Poettering 6d526de267 unit: add automount units for a number of API filesystems 2010-05-23 01:56:54 +02:00