summaryrefslogtreecommitdiffstats
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-09-23 10:12:56 +0200
committerLennart Poettering <lennart@poettering.net>2020-09-23 18:57:37 +0200
commit21935150a0c42b91a322105f6a9129116bfc8e2e (patch)
treef94e500a5d1111f0b91df076996a9f5725a61d2d /src/login
parentmount-util: rework umount_verbose() to take log level and flags arg (diff)
downloadsystemd-21935150a0c42b91a322105f6a9129116bfc8e2e.tar.xz
systemd-21935150a0c42b91a322105f6a9129116bfc8e2e.zip
tree-wide: switch remaining mount() invocations over to mount_nofollow_verbose()
(Well, at least the ones where that makes sense. Where it does't make sense are the ones that re invoked on the root path, which cannot possibly be a symlink.)
Diffstat (limited to 'src/login')
-rw-r--r--src/login/user-runtime-dir.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c
index ab25ebf41b..84d8f1e8fd 100644
--- a/src/login/user-runtime-dir.c
+++ b/src/login/user-runtime-dir.c
@@ -13,6 +13,7 @@
#include "limits-util.h"
#include "main-func.h"
#include "mkdir.h"
+#include "mount-util.h"
#include "mountpoint-util.h"
#include "path-util.h"
#include "rm-rf.h"
@@ -81,14 +82,14 @@ static int user_mkdir_runtime_path(
(void) mkdir_label(runtime_path, 0700);
- r = mount("tmpfs", runtime_path, "tmpfs", MS_NODEV|MS_NOSUID, options);
+ r = mount_nofollow_verbose(LOG_DEBUG, "tmpfs", runtime_path, "tmpfs", MS_NODEV|MS_NOSUID, options);
if (r < 0) {
- if (!ERRNO_IS_PRIVILEGE(errno)) {
- r = log_error_errno(errno, "Failed to mount per-user tmpfs directory %s: %m", runtime_path);
+ if (!ERRNO_IS_PRIVILEGE(r)) {
+ log_error_errno(r, "Failed to mount per-user tmpfs directory %s: %m", runtime_path);
goto fail;
}
- log_debug_errno(errno,
+ log_debug_errno(r,
"Failed to mount per-user tmpfs directory %s.\n"
"Assuming containerized execution, ignoring: %m", runtime_path);