auto-import from udev does not work on jammy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Committed
|
High
|
Valentin David |
Bug Description
`66-snapd-
This should try to mount `/dev/%k` to read file `auto-import.
However according to udev(7) for `RUN`:
> Note that running programs that access the network or mount/unmount filesystems is not allowed inside of udev rules, due to the default sandbox that is enforced on systemd-
Here is the error logs from UC22 when running `systemd-udevd` with `SYSTEMD_
```
Mar 10 22:18:57 ubuntu systemd-
Mar 10 22:18:57 ubuntu systemd-
Mar 10 22:18:57 ubuntu systemd-
```
Note that `unshare -m` will try re-mount / as recursive private in the namespace. This is likely where it fails. But even if we remove `unshare`, I suspect
Instead of using udev, we should listen to udisks through dbus to find added filesystems which are marked as automatic.
My bet is on SystemCallFilter which is set to `@system-service @module @raw-io bpf` which IIRC would deny mount among other things.