mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
blkid: Warn when rejecting a superblock with a bad csum
Bump libblkid requirement from 2.20 to 2.24. util-linux 2.25 is actually required since fdbbad981cc5da8bb4ed7e9b6646e7a114745ec5
This commit is contained in:
parent
9b6e0ce5ac
commit
d47f6ca5f9
2
README
2
README
@ -111,7 +111,7 @@ REQUIREMENTS:
|
|||||||
libcap
|
libcap
|
||||||
libmount >= 2.20 (from util-linux)
|
libmount >= 2.20 (from util-linux)
|
||||||
libseccomp >= 1.0.0 (optional)
|
libseccomp >= 1.0.0 (optional)
|
||||||
libblkid >= 2.20 (from util-linux) (optional)
|
libblkid >= 2.24 (from util-linux) (optional)
|
||||||
libkmod >= 15 (optional)
|
libkmod >= 15 (optional)
|
||||||
PAM >= 1.1.2 (optional)
|
PAM >= 1.1.2 (optional)
|
||||||
libcryptsetup (optional)
|
libcryptsetup (optional)
|
||||||
|
@ -432,7 +432,7 @@ AM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
|
|||||||
have_blkid=no
|
have_blkid=no
|
||||||
AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
|
AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
|
||||||
if test "x$enable_blkid" != "xno"; then
|
if test "x$enable_blkid" != "xno"; then
|
||||||
PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
|
PKG_CHECK_MODULES(BLKID, [ blkid >= 2.24 ],
|
||||||
[AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
|
[AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
|
||||||
if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
|
if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
|
||||||
AC_MSG_ERROR([*** blkid support requested but libraries not found])
|
AC_MSG_ERROR([*** blkid support requested but libraries not found])
|
||||||
|
@ -221,6 +221,7 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
|
|||||||
blkid_probe pr;
|
blkid_probe pr;
|
||||||
const char *data;
|
const char *data;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
const char *prtype = NULL;
|
||||||
int nvals;
|
int nvals;
|
||||||
int i;
|
int i;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
@ -256,7 +257,8 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
|
|||||||
blkid_probe_set_superblocks_flags(pr,
|
blkid_probe_set_superblocks_flags(pr,
|
||||||
BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID |
|
BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID |
|
||||||
BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE |
|
BLKID_SUBLKS_TYPE | BLKID_SUBLKS_SECTYPE |
|
||||||
BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION);
|
BLKID_SUBLKS_USAGE | BLKID_SUBLKS_VERSION |
|
||||||
|
BLKID_SUBLKS_BADCSUM);
|
||||||
|
|
||||||
if (noraid)
|
if (noraid)
|
||||||
blkid_probe_filter_superblocks_usage(pr, BLKID_FLTR_NOTIN, BLKID_USAGE_RAID);
|
blkid_probe_filter_superblocks_usage(pr, BLKID_FLTR_NOTIN, BLKID_USAGE_RAID);
|
||||||
@ -278,6 +280,15 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
|
|||||||
err = probe_superblocks(pr);
|
err = probe_superblocks(pr);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
if (blkid_probe_has_value(pr, "SBBADCSUM")) {
|
||||||
|
if (!blkid_probe_lookup_value(pr, "TYPE", &prtype, NULL))
|
||||||
|
log_warning("incorrect %s checksum on %s",
|
||||||
|
prtype, udev_device_get_devnode(dev));
|
||||||
|
else
|
||||||
|
log_warning("incorrect checksum on %s",
|
||||||
|
udev_device_get_devnode(dev));
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/* If we are a partition then our parent passed on the root
|
/* If we are a partition then our parent passed on the root
|
||||||
* partition UUID to us */
|
* partition UUID to us */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user