mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-02 22:43:48 +08:00
18ebcf26f4
Currently in varisous e2fsprogs tools, most notably tune2fs and e2fsck we will get the device name by passing the user provided string into blkid_get_devname(). This library function however is primarily intended for parsing "NAME=value" tokens. It will return the device matching the specified token, NULL if nothing is found, or copy of the string if it's not in "NAME=value" format. However in case where we're passing in a file name that contains an equal sign blkid_get_devname() will treat it as a token and will attempt to find the device with the match. Likely finding nothing. Fix it by checking existence of the file first and then attempt to call blkid_get_devname(). In case of a collision, notify the user and automatically prefer the one returned by blkid_get_devname(). Otherwise return either the existing file, or NULL. We do it this way to avoid some existing file in working directory (for example LABEL=volume-name) masking an actual device containing the matchin LABEL. User can specify full, or relative path (e.g. ./LABEL=volume-name) to make sure the file is used instead. Link: https://lore.kernel.org/r/20220812130122.69468-1-lczerner@redhat.com Signed-off-by: Lukas Czerner <lczerner@redhat.com> Reported-by: Daniel Ng <danielng@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> |
||
---|---|---|
config | ||
contrib | ||
debian | ||
debugfs | ||
doc | ||
e2fsck | ||
ext2ed | ||
include | ||
install-utils | ||
lib | ||
misc | ||
po | ||
resize | ||
scrub | ||
tests | ||
util | ||
.gitignore | ||
.missing-copyright | ||
.release-checklist | ||
ABOUT-NLS | ||
acinclude.m4 | ||
aclocal.m4 | ||
Android.bp | ||
CleanSpec.mk | ||
configure | ||
configure.ac | ||
depfix.sed | ||
e2fsprogs.lsm | ||
e2fsprogs.spec | ||
INSTALL | ||
INSTALL.elfbin | ||
Makefile.in | ||
MCONFIG.in | ||
NOTICE | ||
README | ||
RELEASE-NOTES | ||
SHLIBS | ||
SUBMITTING-PATCHES | ||
version.h | ||
wordwrap.pl |
This is the new version (1.46.4) of the second extended file system management programs. From time to time, I release new versions of e2fsprogs, to fix bugs and to make the utilities more robust. You can always find information about the latest version at the the e2fsprogs web page, which is: http://e2fsprogs.sourceforge.net The INSTALL file has instructions on building and installing e2fsprogs. Provisions for building Red Hat RPMs and Debian dpkg files are supplied as well. In case of bugs in these programs, please contact Ted Ts'o at tytso@mit.edu or tytso@alum.mit.edu. See the e2fsck man page for suggestions of what sort of information to include when submitting bug reports for these programs.