]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/namespace.c
namespace: fix mode for TemporaryFileSystem=
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Wed, 29 Aug 2018 21:36:37 +0000 (22:36 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 1 Sep 2018 08:22:14 +0000 (17:22 +0900)
commitad8e66dcc485425da925a9ef99e911c6e9d8ee5b
treeb0b8a61dd5f778e27e9e77e29b05366581883391
parent69338c3dfb13d5f5e2d8b7f66f785daab8cbe190
namespace: fix mode for TemporaryFileSystem=

... when no mount options are passed.

Change the code, to avoid the following failure in the newly added tests:

exec-temporaryfilesystem-rw.service: Executing: /usr/bin/sh -x -c
'[ "$(stat -c %a /var)" == 755 ]'
++ stat -c %a /var
+ '[' 1777 == 755 ']'
Received SIGCHLD from PID 30364 (sh).
Child 30364 (sh) died (code=exited, status=1/FAILURE)

(And I spotted an opportunity to use TAKE_PTR() at the end).
src/core/namespace.c
test/test-execute/exec-temporaryfilesystem-ro.service
test/test-execute/exec-temporaryfilesystem-rw.service