core: create per-user inaccessible node from the service manager
authorLennart Poettering <lennart@poettering.net>
Wed, 19 Aug 2020 15:42:33 +0000 (17:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 20 Aug 2020 08:18:02 +0000 (10:18 +0200)
commit3242980582d501ec2adbcc0f794c7161056812e8
tree04182f66b098c67a39d99f6204983193c8b0eb10
parent00e64c6d064c1024d57d0e5b6cfd83944e9e626b
core: create per-user inaccessible node from the service manager

Previously, we'd create them from user-runtime-dir@.service. That has
one benefit: since this service runs privileged, we can create the full
set of device nodes. It has one major drawback though: it security-wise
problematic to create files/directories in directories as privileged
user in directories owned by unprivileged users, since they can use
symlinks to redirect what we want to do. As a general rule we hence
avoid this logic: only unpriv code should populate unpriv directories.

Hence, let's move this code to an appropriate place in the service
manager. This means we lose the inaccessible block device node, but
since there's already a fallback in place, this shouldn't be too bad.
src/core/main.c
src/login/user-runtime-dir.c