From: Martin Wilck <mwi...@suse.com> It's useful to sanitize these right away. We can't do this for DEV_DEVMAP, as aliases with trailing whitespace aren't strictly forbidden, but for the other types we can.
Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multipath/main.c b/multipath/main.c index 4c43314..cfb85dc 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -1028,6 +1028,8 @@ main (int argc, char *argv[]) condlog(0, "'%s' is not a valid argument\n", dev); goto out; } + if (dev_type == DEV_DEVNODE || dev_type == DEV_DEVT) + strchop(dev); } if (dev_type == DEV_UEVENT) { openlog("multipath", 0, LOG_DAEMON); -- 2.26.2 -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel