diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-09-22 15:51:17 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-09-23 18:57:36 +0200 |
commit | 511a8cfe300662963522cea314e3b2426fc2f3ee (patch) | |
tree | d496c0cb8d88bb47552dbf3dc450758671715c6b /src/home/homework-mount.c | |
parent | mount-util: make sure get_mount_flags() ever follows symlinks (diff) | |
download | systemd-511a8cfe300662963522cea314e3b2426fc2f3ee.tar.xz systemd-511a8cfe300662963522cea314e3b2426fc2f3ee.zip |
mount-util: switch most mount_verbose() code over to not follow symlinks
Diffstat (limited to 'src/home/homework-mount.c')
-rw-r--r-- | src/home/homework-mount.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/home/homework-mount.c b/src/home/homework-mount.c index 51c0a38649..7c94de49cc 100644 --- a/src/home/homework-mount.c +++ b/src/home/homework-mount.c @@ -38,7 +38,7 @@ int home_mount_node(const char *node, const char *fstype, bool discard, unsigned } else options = discard_option; - r = mount_verbose(LOG_ERR, node, "/run/systemd/user-home-mount", fstype, flags|MS_RELATIME, strempty(options)); + r = mount_nofollow_verbose(LOG_ERR, node, "/run/systemd/user-home-mount", fstype, flags|MS_RELATIME, strempty(options)); if (r < 0) return r; @@ -52,7 +52,7 @@ int home_unshare_and_mount(const char *node, const char *fstype, bool discard, u if (unshare(CLONE_NEWNS) < 0) return log_error_errno(errno, "Couldn't unshare file system namespace: %m"); - r = mount_verbose(LOG_ERR, "/run", "/run", NULL, MS_SLAVE|MS_REC, NULL); /* Mark /run as MS_SLAVE in our new namespace */ + r = mount_nofollow_verbose(LOG_ERR, "/run", "/run", NULL, MS_SLAVE|MS_REC, NULL); /* Mark /run as MS_SLAVE in our new namespace */ if (r < 0) return r; @@ -83,7 +83,7 @@ int home_move_mount(const char *user_name_and_realm, const char *target) { (void) mkdir_p(target, 0700); - r = mount_verbose(LOG_ERR, d, target, NULL, MS_BIND, NULL); + r = mount_nofollow_verbose(LOG_ERR, d, target, NULL, MS_BIND, NULL); if (r < 0) return r; |