1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-28 02:50:16 +03:00

catalog: assign a proper message ID for mounts on symlinked paths

For some reason we reused the non-empty catalog entry so far, which is
plain wrong. Correct that.
This commit is contained in:
Lennart Poettering 2025-02-07 14:32:44 +01:00
parent 38c35970b1
commit 66b5e7dfaa
3 changed files with 15 additions and 1 deletions

View File

@ -460,6 +460,18 @@ this directory become inaccessible. To see those over-mounted files,
please manually mount the underlying file system to a secondary
location.
-- 1edabb4eda2a49c19bc0206f24b43889
Subject: Mount point path contains symlinks
Defined-By: systemd
Support: %SUPPORT_URL%
The path @WHERE@ is specified as a mount point path (second field in /etc/fstab
or Where= field in systemd unit file) and is not canonical, i.e. contains one
or more symlinks as path elements. This is generally not supported and such
mount attempts are refused, because the mount table information exposed by the
kernel and the requested path would deviate once established. Please
canonicalize paths before requesting a mount to be established.
-- 24d8d4452573402496068381a6312df2
Subject: A virtual machine or container has been started
Defined-By: systemd

View File

@ -5131,7 +5131,7 @@ int unit_log_noncanonical_mount_path(Unit *u, const char *where) {
/* No need to mention "." or "..", they would already have been rejected by unit_name_from_path() */
log_unit_struct(u, LOG_ERR,
"MESSAGE_ID=" SD_MESSAGE_OVERMOUNTING_STR,
"MESSAGE_ID=" SD_MESSAGE_NON_CANONICAL_MOUNT_STR,
LOG_UNIT_INVOCATION_ID(u),
LOG_UNIT_MESSAGE(u, "Mount path %s is not canonical (contains a symlink).", where),
"WHERE=%s", where);

View File

@ -190,6 +190,8 @@ _SD_BEGIN_DECLARATIONS;
#define SD_MESSAGE_OVERMOUNTING SD_ID128_MAKE(1d,ee,03,69,c7,fc,47,36,b7,09,9b,38,ec,b4,6e,e7)
#define SD_MESSAGE_OVERMOUNTING_STR SD_ID128_MAKE_STR(1d,ee,03,69,c7,fc,47,36,b7,09,9b,38,ec,b4,6e,e7)
#define SD_MESSAGE_NON_CANONICAL_MOUNT SD_ID128_MAKE(1e,da,bb,4e,da,2a,49,c1,9b,c0,20,6f,24,b4,38,89)
#define SD_MESSAGE_NON_CANONICAL_MOUNT_STR SD_ID128_MAKE_STR(1e,da,bb,4e,da,2a,49,c1,9b,c0,20,6f,24,b4,38,89)
#define SD_MESSAGE_UNIT_OOMD_KILL SD_ID128_MAKE(d9,89,61,1b,15,e4,4c,9d,bf,31,e3,c8,12,56,e4,ed)
#define SD_MESSAGE_UNIT_OOMD_KILL_STR SD_ID128_MAKE_STR(d9,89,61,1b,15,e4,4c,9d,bf,31,e3,c8,12,56,e4,ed)