mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
core: do not make private /dev/ read-only too soon
The read-only bit is flipped after setting up all the mounts, so that bind mounts can be added. Remove the early config, and add a unit test. Fixes https://github.com/systemd/systemd/issues/30372
This commit is contained in:
committed by
Yu Watanabe
parent
0122c7d060
commit
ae7482b994
10
test/test-execute/exec-privatedevices-bind.service
Normal file
10
test/test-execute/exec-privatedevices-bind.service
Normal file
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=Test for PrivateDevices=yes with a bind mounted device
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c 'test -c /dev/kmsg'
|
||||
ExecStart=/bin/sh -c 'test ! -w /dev/'
|
||||
Type=oneshot
|
||||
PrivateDevices=yes
|
||||
BindPaths=/dev/kmsg
|
||||
Reference in New Issue
Block a user