]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/canonicalize: verify DM paths [coverity scan]
authorKarel Zak <kzak@redhat.com>
Tue, 14 May 2019 13:47:02 +0000 (15:47 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 May 2019 13:47:02 +0000 (15:47 +0200)
commit0ed52c662eea74f4c8a6d926f601a3c77fa3ff69
tree442a1e844377fea3fc7b5169dcbf9c47cfeff8bc
parentfbd2d01e23c56d78b343745bc532434d5517ae5d
lib/canonicalize: verify DM paths [coverity scan]

Now the code only checks that /sys/.../dm/name exists, but never
verify the device node in /dev (because path prefix is never NULL).

The prefix is used to redirect hardcoded paths to /sys dumps (e.g.
lsblk regression tests, etc.)

This bug has been introduced in v2.33. Fortunately, it's probably no
big issue as /dev is always in sync with /sys (thanks to udevd).

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/canonicalize.c