From: Mike Yuan Date: Mon, 24 Feb 2025 17:32:58 +0000 (+0100) Subject: mount-tool: honor arg_canonicalize for ACTION_UMOUNT path_is_absolute() check too X-Git-Tag: v258-rc1~652^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F37398%2Fhead;p=thirdparty%2Fsystemd.git mount-tool: honor arg_canonicalize for ACTION_UMOUNT path_is_absolute() check too Follow-up for 4e24796b5a64064f8b21c07356eba19e9db4bb33 --- diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c index de90f9d9837..2c64ccdf307 100644 --- a/src/mount/mount-tool.c +++ b/src/mount/mount-tool.c @@ -418,11 +418,11 @@ static int parse_argv(int argc, char *argv[]) { return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "At least one argument required."); - if (arg_transport != BUS_TRANSPORT_LOCAL) + if (arg_transport != BUS_TRANSPORT_LOCAL || !arg_canonicalize) for (int i = optind; i < argc; i++) if (!path_is_absolute(argv[i])) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "Path must be absolute when operating remotely: %s", + "Path must be absolute when operating remotely or when canonicalization is turned off: %s", argv[i]); } else { if (optind >= argc)