import util-linux-2.32.1-24.el8
This commit is contained in:
parent
6c871e5234
commit
abd54c6e0b
@ -0,0 +1,80 @@
|
|||||||
|
From 3fd5c8e78a9758a6fc9310485d2428e300ad3b63 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Thu, 11 Jun 2020 10:55:25 +0200
|
||||||
|
Subject: [PATCH 35/40] tests: mark MD tests with metadata v0.90 as KNOWN-FAIL
|
||||||
|
|
||||||
|
metadata v0.90 is deprecated thing and unsupported to create by some new
|
||||||
|
mdadm versions. It's possible to assemble this array (with
|
||||||
|
default_layout=1 on modprobe raid0), but impossible to create a new
|
||||||
|
one.
|
||||||
|
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/4ae96cf77b36660255d5870a4209480bbec47902
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1826251
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
tests/ts/blkid/md-raid0-whole | 3 +++
|
||||||
|
tests/ts/blkid/md-raid1-part | 3 +++
|
||||||
|
tests/ts/blkid/md-raid1-whole | 3 +++
|
||||||
|
tests/ts/fdisk/align-512-4K-md | 3 +++
|
||||||
|
4 files changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/tests/ts/blkid/md-raid0-whole b/tests/ts/blkid/md-raid0-whole
|
||||||
|
index 45c6ee55b..1f3fc2634 100755
|
||||||
|
--- a/tests/ts/blkid/md-raid0-whole
|
||||||
|
+++ b/tests/ts/blkid/md-raid0-whole
|
||||||
|
@@ -29,6 +29,9 @@ ts_skip_nonroot
|
||||||
|
ts_check_losetup
|
||||||
|
ts_check_prog "mdadm"
|
||||||
|
|
||||||
|
+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1-12.
|
||||||
|
+TS_KNOWN_FAIL="yes"
|
||||||
|
+
|
||||||
|
ts_log "Initialize devices"
|
||||||
|
IMGNAME="${TS_OUTDIR}/${TS_TESTNAME}"
|
||||||
|
|
||||||
|
diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part
|
||||||
|
index 3fa6395b0..3d42aadb8 100755
|
||||||
|
--- a/tests/ts/blkid/md-raid1-part
|
||||||
|
+++ b/tests/ts/blkid/md-raid1-part
|
||||||
|
@@ -28,6 +28,9 @@ ts_check_test_command "$TS_CMD_BLKID"
|
||||||
|
ts_skip_nonroot
|
||||||
|
ts_check_prog "mdadm"
|
||||||
|
|
||||||
|
+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1-12.
|
||||||
|
+TS_KNOWN_FAIL="yes"
|
||||||
|
+
|
||||||
|
# set global variable TS_DEVICE
|
||||||
|
ts_scsi_debug_init dev_size_mb=51 sector_size=512
|
||||||
|
|
||||||
|
diff --git a/tests/ts/blkid/md-raid1-whole b/tests/ts/blkid/md-raid1-whole
|
||||||
|
index ddf4a6934..6eba9cc8e 100755
|
||||||
|
--- a/tests/ts/blkid/md-raid1-whole
|
||||||
|
+++ b/tests/ts/blkid/md-raid1-whole
|
||||||
|
@@ -29,6 +29,9 @@ ts_skip_nonroot
|
||||||
|
ts_check_losetup
|
||||||
|
ts_check_prog "mdadm"
|
||||||
|
|
||||||
|
+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1-12.
|
||||||
|
+TS_KNOWN_FAIL="yes"
|
||||||
|
+
|
||||||
|
ts_log "Initialize devices"
|
||||||
|
IMGNAME="${TS_OUTDIR}/${TS_TESTNAME}"
|
||||||
|
|
||||||
|
diff --git a/tests/ts/fdisk/align-512-4K-md b/tests/ts/fdisk/align-512-4K-md
|
||||||
|
index 68aaff0b7..0a8e09bc1 100755
|
||||||
|
--- a/tests/ts/fdisk/align-512-4K-md
|
||||||
|
+++ b/tests/ts/fdisk/align-512-4K-md
|
||||||
|
@@ -31,6 +31,9 @@ ts_check_test_command "$TS_CMD_FDISK"
|
||||||
|
ts_skip_nonroot
|
||||||
|
ts_check_prog "mdadm"
|
||||||
|
|
||||||
|
+# rhbz#182625: It can't create new raid0 with metadata 0.90 from mdadm-4.1-12.
|
||||||
|
+TS_KNOWN_FAIL="yes"
|
||||||
|
+
|
||||||
|
# set global variable TS_DEVICE
|
||||||
|
ts_scsi_debug_init dev_size_mb=50 sector_size=512 physblk_exp=3
|
||||||
|
DEVNAME=$(basename $TS_DEVICE)
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
284
SOURCES/0036-libblkid-add-BitLocker-detection.patch
Normal file
284
SOURCES/0036-libblkid-add-BitLocker-detection.patch
Normal file
@ -0,0 +1,284 @@
|
|||||||
|
From ae7b79ff8a7fb576c018bc9a7eaf9e135b7b553e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 24 Apr 2018 10:57:48 +0200
|
||||||
|
Subject: [PATCH 36/40] libblkid: add BitLocker detection
|
||||||
|
|
||||||
|
Supported:
|
||||||
|
* WinVista version
|
||||||
|
* Win7 and later versions (based on NTFS)
|
||||||
|
* BitLockerToGo (for removable media; based on FAT32)
|
||||||
|
|
||||||
|
Unfortunately, it's without LABEL and UUID. It seems BitLocker does
|
||||||
|
not use volume_label and volume_serial stuff from NTFS header.
|
||||||
|
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/136f89ce5ed8cd159a1c56b5a775dada2363ecd3
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/47afae0caaa2b3440d6ac812079e3ada5f2aa0bd (bitlocker.c part)
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1812576
|
||||||
|
Addresses: https://github.com/karelzak/util-linux/issues/617
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
libblkid/src/Makemodule.am | 1 +
|
||||||
|
libblkid/src/superblocks/bitlocker.c | 191 +++++++++++++++++++++++++
|
||||||
|
libblkid/src/superblocks/superblocks.c | 1 +
|
||||||
|
libblkid/src/superblocks/superblocks.h | 3 +
|
||||||
|
libblkid/src/superblocks/vfat.c | 3 +
|
||||||
|
5 files changed, 199 insertions(+)
|
||||||
|
create mode 100644 libblkid/src/superblocks/bitlocker.c
|
||||||
|
|
||||||
|
diff --git a/libblkid/src/Makemodule.am b/libblkid/src/Makemodule.am
|
||||||
|
index 0e1c765fb..ea0230702 100644
|
||||||
|
--- a/libblkid/src/Makemodule.am
|
||||||
|
+++ b/libblkid/src/Makemodule.am
|
||||||
|
@@ -47,6 +47,7 @@ libblkid_la_SOURCES = \
|
||||||
|
libblkid/src/superblocks/bcache.c \
|
||||||
|
libblkid/src/superblocks/befs.c \
|
||||||
|
libblkid/src/superblocks/bfs.c \
|
||||||
|
+ libblkid/src/superblocks/bitlocker.c \
|
||||||
|
libblkid/src/superblocks/btrfs.c \
|
||||||
|
libblkid/src/superblocks/cramfs.c \
|
||||||
|
libblkid/src/superblocks/ddf_raid.c \
|
||||||
|
diff --git a/libblkid/src/superblocks/bitlocker.c b/libblkid/src/superblocks/bitlocker.c
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..111edf39b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libblkid/src/superblocks/bitlocker.c
|
||||||
|
@@ -0,0 +1,191 @@
|
||||||
|
+/*
|
||||||
|
+ * Copyright (C) 2018 Karel Zak <kzak@redhat.com>
|
||||||
|
+ *
|
||||||
|
+ * This file may be redistributed under the terms of the
|
||||||
|
+ * GNU Lesser General Public License.
|
||||||
|
+ */
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+#include <errno.h>
|
||||||
|
+#include <ctype.h>
|
||||||
|
+#include <stdint.h>
|
||||||
|
+
|
||||||
|
+#include "superblocks.h"
|
||||||
|
+
|
||||||
|
+#define BDE_HDR_SIZE 512
|
||||||
|
+#define BDE_HDR_OFFSET 0
|
||||||
|
+
|
||||||
|
+struct bde_header_win7 {
|
||||||
|
+/* 0 */ unsigned char boot_entry_point[3];
|
||||||
|
+/* 3 */ unsigned char fs_signature[8];
|
||||||
|
+/* 11 */ unsigned char __dummy1[67 - 11];
|
||||||
|
+/* 67 */ uint32_t volume_serial; /* NTFS uses 64bit serial number */
|
||||||
|
+/* 71 */ unsigned char volume_label[11]; /* "NO NAME\x20\x20\x20\x20" only */
|
||||||
|
+/* 82 */ unsigned char __dummy2[160 - 82];
|
||||||
|
+/* 160 */ unsigned char guid[16]; /* BitLocker specific GUID */
|
||||||
|
+/* 176 */ uint64_t fve_metadata_offset;
|
||||||
|
+} __attribute__((packed));
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+struct bde_header_togo {
|
||||||
|
+/* 0 */ unsigned char boot_entry_point[3];
|
||||||
|
+/* 3 */ unsigned char fs_signature[8];
|
||||||
|
+/* 11 */ unsigned char __dummy[424 - 11];
|
||||||
|
+/* 424 */ unsigned char guid[16];
|
||||||
|
+/* 440 */ uint64_t fve_metadata_offset;
|
||||||
|
+} __attribute__((packed));
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+struct bde_fve_metadata {
|
||||||
|
+/* 0 */ unsigned char signature[8];
|
||||||
|
+/* 8 */ uint16_t size;
|
||||||
|
+/* 10 */ uint16_t version;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+enum {
|
||||||
|
+ BDE_VERSION_VISTA = 0,
|
||||||
|
+ BDE_VERSION_WIN7,
|
||||||
|
+ BDE_VERSION_TOGO
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+#define BDE_MAGIC_VISTA "\xeb\x52\x90-FVE-FS-"
|
||||||
|
+#define BDE_MAGIC_WIN7 "\xeb\x58\x90-FVE-FS-"
|
||||||
|
+#define BDE_MAGIC_TOGO "\xeb\x58\x90MSWIN4.1"
|
||||||
|
+
|
||||||
|
+#define BDE_MAGIC_FVE "-FVE-FS-"
|
||||||
|
+
|
||||||
|
+static int get_bitlocker_type(const unsigned char *buf)
|
||||||
|
+{
|
||||||
|
+ size_t i;
|
||||||
|
+ static const char *map[] = {
|
||||||
|
+ [BDE_VERSION_VISTA] = BDE_MAGIC_VISTA,
|
||||||
|
+ [BDE_VERSION_WIN7] = BDE_MAGIC_WIN7,
|
||||||
|
+ [BDE_VERSION_TOGO] = BDE_MAGIC_TOGO
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < ARRAY_SIZE(map); i++) {
|
||||||
|
+ if (memcmp(buf, map[i], 11) == 0)
|
||||||
|
+ return (int) i;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return -1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Returns: < 0 error, 1 nothing, 0 success
|
||||||
|
+ */
|
||||||
|
+static int get_bitlocker_headers(blkid_probe pr,
|
||||||
|
+ int *type,
|
||||||
|
+ const unsigned char **buf_hdr,
|
||||||
|
+ const unsigned char **buf_fve)
|
||||||
|
+{
|
||||||
|
+
|
||||||
|
+ const unsigned char *buf;
|
||||||
|
+ const struct bde_fve_metadata *fve;
|
||||||
|
+ uint64_t off = 0;
|
||||||
|
+ int kind;
|
||||||
|
+
|
||||||
|
+ if (buf_hdr)
|
||||||
|
+ *buf_hdr = NULL;
|
||||||
|
+ if (buf_fve)
|
||||||
|
+ *buf_fve = NULL;
|
||||||
|
+ if (type)
|
||||||
|
+ *type = -1;
|
||||||
|
+
|
||||||
|
+ buf = blkid_probe_get_buffer(pr, BDE_HDR_OFFSET, BDE_HDR_SIZE);
|
||||||
|
+ if (!buf)
|
||||||
|
+ return errno ? -errno : 1;
|
||||||
|
+
|
||||||
|
+ kind = get_bitlocker_type(buf);
|
||||||
|
+
|
||||||
|
+ /* Check BitLocker header */
|
||||||
|
+ switch (kind) {
|
||||||
|
+ case BDE_VERSION_WIN7:
|
||||||
|
+ off = le64_to_cpu(((const struct bde_header_win7 *) buf)->fve_metadata_offset);
|
||||||
|
+ break;
|
||||||
|
+ case BDE_VERSION_TOGO:
|
||||||
|
+ off = le64_to_cpu(((const struct bde_header_togo *) buf)->fve_metadata_offset);
|
||||||
|
+ break;
|
||||||
|
+ case BDE_VERSION_VISTA:
|
||||||
|
+ goto done;
|
||||||
|
+ default:
|
||||||
|
+ goto nothing;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (!off)
|
||||||
|
+ goto nothing;
|
||||||
|
+ if (buf_hdr)
|
||||||
|
+ *buf_hdr = buf;
|
||||||
|
+
|
||||||
|
+ /* Check Bitlocker FVE metadata header */
|
||||||
|
+ buf = blkid_probe_get_buffer(pr, off, sizeof(struct bde_fve_metadata));
|
||||||
|
+ if (!buf)
|
||||||
|
+ return errno ? -errno : 1;
|
||||||
|
+
|
||||||
|
+ fve = (const struct bde_fve_metadata *) buf;
|
||||||
|
+ if (memcmp(fve->signature, BDE_MAGIC_FVE, sizeof(fve->signature)) != 0)
|
||||||
|
+ goto nothing;
|
||||||
|
+ if (buf_fve)
|
||||||
|
+ *buf_fve = buf;
|
||||||
|
+done:
|
||||||
|
+ if (type)
|
||||||
|
+ *type = kind;
|
||||||
|
+ return 0;
|
||||||
|
+nothing:
|
||||||
|
+ return 1;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * This is used by vFAT and NTFS prober to avoid collisions with bitlocker.
|
||||||
|
+ */
|
||||||
|
+int blkid_probe_is_bitlocker(blkid_probe pr)
|
||||||
|
+{
|
||||||
|
+ return get_bitlocker_headers(pr, NULL, NULL, NULL) == 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int probe_bitlocker(blkid_probe pr,
|
||||||
|
+ const struct blkid_idmag *mag __attribute__((__unused__)))
|
||||||
|
+{
|
||||||
|
+ const unsigned char *buf_fve = NULL;
|
||||||
|
+ const unsigned char *buf_hdr = NULL;
|
||||||
|
+ int rc, kind;
|
||||||
|
+
|
||||||
|
+ rc = get_bitlocker_headers(pr, &kind, &buf_hdr, &buf_fve);
|
||||||
|
+ if (rc)
|
||||||
|
+ return rc;
|
||||||
|
+
|
||||||
|
+ if (kind == BDE_VERSION_WIN7) {
|
||||||
|
+ const struct bde_header_win7 *hdr = (const struct bde_header_win7 *) buf_hdr;
|
||||||
|
+
|
||||||
|
+ /* Unfortunately, it seems volume_serial is always zero */
|
||||||
|
+ blkid_probe_sprintf_uuid(pr,
|
||||||
|
+ (const unsigned char *) &hdr->volume_serial,
|
||||||
|
+ sizeof(hdr->volume_serial),
|
||||||
|
+ "%016d", le32_to_cpu(hdr->volume_serial));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (buf_fve) {
|
||||||
|
+ const struct bde_fve_metadata *fve = (const struct bde_fve_metadata *) buf_fve;
|
||||||
|
+
|
||||||
|
+ blkid_probe_sprintf_version(pr, "%d", fve->version);
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* See header details:
|
||||||
|
+ * https://github.com/libyal/libbde/blob/master/documentation/BitLocker%20Drive%20Encryption%20(BDE)%20format.asciidoc
|
||||||
|
+ */
|
||||||
|
+const struct blkid_idinfo bitlocker_idinfo =
|
||||||
|
+{
|
||||||
|
+ .name = "BitLocker",
|
||||||
|
+ .usage = BLKID_USAGE_CRYPTO,
|
||||||
|
+ .probefunc = probe_bitlocker,
|
||||||
|
+ .magics =
|
||||||
|
+ {
|
||||||
|
+ { .magic = BDE_MAGIC_VISTA, .len = 11 },
|
||||||
|
+ { .magic = BDE_MAGIC_WIN7, .len = 11 },
|
||||||
|
+ { .magic = BDE_MAGIC_TOGO, .len = 11 },
|
||||||
|
+ { NULL }
|
||||||
|
+ }
|
||||||
|
+};
|
||||||
|
diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c
|
||||||
|
index 076541d1a..6dfd2be64 100644
|
||||||
|
--- a/libblkid/src/superblocks/superblocks.c
|
||||||
|
+++ b/libblkid/src/superblocks/superblocks.c
|
||||||
|
@@ -115,6 +115,7 @@ static const struct blkid_idinfo *idinfos[] =
|
||||||
|
&ubi_idinfo,
|
||||||
|
&vdo_idinfo,
|
||||||
|
&stratis_idinfo,
|
||||||
|
+ &bitlocker_idinfo,
|
||||||
|
|
||||||
|
/* Filesystems */
|
||||||
|
&vfat_idinfo,
|
||||||
|
diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h
|
||||||
|
index 2723fb1d5..d677f85bc 100644
|
||||||
|
--- a/libblkid/src/superblocks/superblocks.h
|
||||||
|
+++ b/libblkid/src/superblocks/superblocks.h
|
||||||
|
@@ -81,6 +81,7 @@ extern const struct blkid_idinfo bcache_idinfo;
|
||||||
|
extern const struct blkid_idinfo mpool_idinfo;
|
||||||
|
extern const struct blkid_idinfo vdo_idinfo;
|
||||||
|
extern const struct blkid_idinfo stratis_idinfo;
|
||||||
|
+extern const struct blkid_idinfo bitlocker_idinfo;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* superblock functions
|
||||||
|
@@ -105,4 +106,6 @@ extern int blkid_probe_set_id_label(blkid_probe pr, const char *name,
|
||||||
|
extern int blkid_probe_set_utf8_id_label(blkid_probe pr, const char *name,
|
||||||
|
unsigned char *data, size_t len, int enc);
|
||||||
|
|
||||||
|
+extern int blkid_probe_is_bitlocker(blkid_probe pr);
|
||||||
|
+
|
||||||
|
#endif /* _BLKID_SUPERBLOCKS_H */
|
||||||
|
diff --git a/libblkid/src/superblocks/vfat.c b/libblkid/src/superblocks/vfat.c
|
||||||
|
index 3aeba018a..29b3c501c 100644
|
||||||
|
--- a/libblkid/src/superblocks/vfat.c
|
||||||
|
+++ b/libblkid/src/superblocks/vfat.c
|
||||||
|
@@ -268,6 +268,9 @@ static int fat_valid_superblock(blkid_probe pr,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (blkid_probe_is_bitlocker(pr))
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
return 1; /* valid */
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
1121
SOURCES/0037-blkid-retport-block-size-of-a-filesystem.patch
Normal file
1121
SOURCES/0037-blkid-retport-block-size-of-a-filesystem.patch
Normal file
File diff suppressed because it is too large
Load Diff
29
SOURCES/0038-libblkid-xfs-fix-sector-size-calculation.patch
Normal file
29
SOURCES/0038-libblkid-xfs-fix-sector-size-calculation.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 28b89361bf574af24c2f9c857d0e5f7c84e2787c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 3 Sep 2019 15:10:35 +0200
|
||||||
|
Subject: [PATCH 38/40] libblkid: (xfs) fix sector size calculation
|
||||||
|
|
||||||
|
Reported-by: Anatoly Pugachev <matorola@gmail.com>
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/2771d40b88660a11306aa5d4e200fc0ebebfe315
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1817726
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
libblkid/src/superblocks/xfs.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c
|
||||||
|
index eb513ac3e..98e59ff7c 100644
|
||||||
|
--- a/libblkid/src/superblocks/xfs.c
|
||||||
|
+++ b/libblkid/src/superblocks/xfs.c
|
||||||
|
@@ -173,7 +173,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag)
|
||||||
|
blkid_probe_set_label(pr, (unsigned char *) xs->sb_fname,
|
||||||
|
sizeof(xs->sb_fname));
|
||||||
|
blkid_probe_set_uuid(pr, xs->sb_uuid);
|
||||||
|
- blkid_probe_set_block_size(pr, xs->sb_sectsize * 256);
|
||||||
|
+ blkid_probe_set_block_size(pr, be16_to_cpu(xs->sb_sectsize));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
68
SOURCES/0039-col-make-flush_line-a-little-bit-robust.patch
Normal file
68
SOURCES/0039-col-make-flush_line-a-little-bit-robust.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
From 54e3d1414e1a031d6f635f8fcbe273eecfd65560 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 5 Feb 2019 12:06:00 +0100
|
||||||
|
Subject: [PATCH 39/40] col: make flush_line() a little bit robust
|
||||||
|
|
||||||
|
The code is horrible. The core of the problem are signed integers
|
||||||
|
and no check for the limits.
|
||||||
|
|
||||||
|
This patch fixes c->c_column = cur_col; where c_column is "short"
|
||||||
|
and "cur_col" is int. Let's use "int" for all the variables. It's
|
||||||
|
really not perfect as for bigger lines it can segfault again...
|
||||||
|
|
||||||
|
The patch also removes some unnecessary static variables.
|
||||||
|
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/004356f05018e3bfcaddd2652846659a4d8481f3
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1803753
|
||||||
|
Addresses: https://github.com/karelzak/util-linux/issues/749
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
text-utils/col.c | 11 ++++++-----
|
||||||
|
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/text-utils/col.c b/text-utils/col.c
|
||||||
|
index 3d9e15d26..c2f8db64d 100644
|
||||||
|
--- a/text-utils/col.c
|
||||||
|
+++ b/text-utils/col.c
|
||||||
|
@@ -88,7 +88,7 @@ typedef char CSET;
|
||||||
|
typedef struct char_str {
|
||||||
|
#define CS_NORMAL 1
|
||||||
|
#define CS_ALTERNATE 2
|
||||||
|
- short c_column; /* column character is in */
|
||||||
|
+ int c_column; /* column character is in */
|
||||||
|
CSET c_set; /* character set (currently only 2) */
|
||||||
|
wchar_t c_char; /* character in question */
|
||||||
|
int c_width; /* character width */
|
||||||
|
@@ -476,8 +476,9 @@ void flush_line(LINE *l)
|
||||||
|
nchars = l->l_line_len;
|
||||||
|
|
||||||
|
if (l->l_needs_sort) {
|
||||||
|
- static CHAR *sorted;
|
||||||
|
- static int count_size, *count, i, save, sorted_size, tot;
|
||||||
|
+ static CHAR *sorted = NULL;
|
||||||
|
+ static int count_size = 0, *count = NULL, sorted_size = 0;
|
||||||
|
+ int i, tot;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do an O(n) sort on l->l_line by column being careful to
|
||||||
|
@@ -494,7 +495,7 @@ void flush_line(LINE *l)
|
||||||
|
(unsigned)sizeof(int) * count_size);
|
||||||
|
}
|
||||||
|
memset(count, 0, sizeof(int) * l->l_max_col + 1);
|
||||||
|
- for (i = nchars, c = l->l_line; --i >= 0; c++)
|
||||||
|
+ for (i = nchars, c = l->l_line; c && --i >= 0; c++)
|
||||||
|
count[c->c_column]++;
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -502,7 +503,7 @@ void flush_line(LINE *l)
|
||||||
|
* indices into new line.
|
||||||
|
*/
|
||||||
|
for (tot = 0, i = 0; i <= l->l_max_col; i++) {
|
||||||
|
- save = count[i];
|
||||||
|
+ int save = count[i];
|
||||||
|
count[i] = tot;
|
||||||
|
tot += save;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
49
SOURCES/0040-libmount-improve-smb-2-3-support.patch
Normal file
49
SOURCES/0040-libmount-improve-smb-2-3-support.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 2cd5219da87274db251a7f836efe6ac724b70e53 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Wed, 11 Mar 2020 10:38:37 +0100
|
||||||
|
Subject: [PATCH 40/40] libmount: improve smb{2,3} support
|
||||||
|
|
||||||
|
It seems kernel can use smb3 as fstype in mountinfo.
|
||||||
|
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/36d80cb6c11b3064ed9fb29c7c8b101e3f266441
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/b7ff4134beea53688ab3c01484cf59b2ce2d9ce9
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1812118
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
libmount/src/tab.c | 5 ++++-
|
||||||
|
libmount/src/utils.c | 1 +
|
||||||
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libmount/src/tab.c b/libmount/src/tab.c
|
||||||
|
index eb61dd33e..74d60df3d 100644
|
||||||
|
--- a/libmount/src/tab.c
|
||||||
|
+++ b/libmount/src/tab.c
|
||||||
|
@@ -1644,9 +1644,12 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
|
||||||
|
if (root) {
|
||||||
|
const char *fstype = mnt_fs_get_fstype(fs);
|
||||||
|
|
||||||
|
- if (fstype && strcmp(fstype, "cifs") == 0) {
|
||||||
|
+ if (fstype && (strcmp(fstype, "cifs") == 0
|
||||||
|
+ || strcmp(fstype, "smb3") == 0)) {
|
||||||
|
+
|
||||||
|
const char *unc_subdir = get_cifs_unc_subdir_path(src);
|
||||||
|
const char *path_on_fs = mnt_fs_get_root(fs);
|
||||||
|
+
|
||||||
|
if (!unc_subdir || !path_on_fs || !streq_paths(unc_subdir, path_on_fs))
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
|
||||||
|
index 04e79f53f..e43588831 100644
|
||||||
|
--- a/libmount/src/utils.c
|
||||||
|
+++ b/libmount/src/utils.c
|
||||||
|
@@ -315,6 +315,7 @@ int mnt_fstype_is_pseudofs(const char *type)
|
||||||
|
int mnt_fstype_is_netfs(const char *type)
|
||||||
|
{
|
||||||
|
if (strcmp(type, "cifs") == 0 ||
|
||||||
|
+ strcmp(type, "smb3") == 0 ||
|
||||||
|
strcmp(type, "smbfs") == 0 ||
|
||||||
|
strncmp(type,"nfs", 3) == 0 ||
|
||||||
|
strcmp(type, "afs") == 0 ||
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
65
SOURCES/0041-libmount-fix-mount-a-EBUSY-for-cifs.patch
Normal file
65
SOURCES/0041-libmount-fix-mount-a-EBUSY-for-cifs.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
From 618aedc9e892b206492c1720bec261b043c66263 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Roberto Bergantinos Corpas <rbergant@redhat.com>
|
||||||
|
Date: Mon, 27 Apr 2020 15:46:02 +0200
|
||||||
|
Subject: [PATCH] libmount: fix mount -a EBUSY for cifs
|
||||||
|
|
||||||
|
fstab:
|
||||||
|
|
||||||
|
//rhel73/myshare/sub/path /mnt cifs
|
||||||
|
|
||||||
|
after mount in mountinfo:
|
||||||
|
|
||||||
|
# grep cifs /proc/self/mountinfo
|
||||||
|
47 39 0:40 /sub/path /mnt rw,relatime shared:60 - cifs //rhel73/myshare/sub/path ...
|
||||||
|
^^^^^^^^^
|
||||||
|
or:
|
||||||
|
|
||||||
|
# grep cifs /proc/self/mountinfo
|
||||||
|
47 39 0:40 / /mnt rw,relatime shared:60 - cifs //rhel73/myshare/sub/path ...
|
||||||
|
^
|
||||||
|
|
||||||
|
That is so since on kernel cifs code, cifs_get_root (which returns the
|
||||||
|
entry associated with mnt_root) return s_root if
|
||||||
|
CIFS_MOUNT_USE_PREFIX_PATH is set, no questions asked.
|
||||||
|
|
||||||
|
This situation can occurr often on CIFS mounts, as CIFS servers limit
|
||||||
|
frequently scope of access to the root path.
|
||||||
|
|
||||||
|
[kzak@redhat.com: - add more info to the commit message,
|
||||||
|
- clean up variable names]
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1829245
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/31b3a523eca2fc7e5876ec5fd89094208fed0899
|
||||||
|
Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com>
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
libmount/src/tab.c | 11 ++++++-----
|
||||||
|
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libmount/src/tab.c b/libmount/src/tab.c
|
||||||
|
index 74d60df3d..cd97a1cb5 100644
|
||||||
|
--- a/libmount/src/tab.c
|
||||||
|
+++ b/libmount/src/tab.c
|
||||||
|
@@ -1644,13 +1644,14 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
|
||||||
|
if (root) {
|
||||||
|
const char *fstype = mnt_fs_get_fstype(fs);
|
||||||
|
|
||||||
|
- if (fstype && (strcmp(fstype, "cifs") == 0
|
||||||
|
- || strcmp(fstype, "smb3") == 0)) {
|
||||||
|
+ if (fstype && (strcmp(fstype, "cifs") == 0 ||
|
||||||
|
+ strcmp(fstype, "smb3") == 0)) {
|
||||||
|
|
||||||
|
- const char *unc_subdir = get_cifs_unc_subdir_path(src);
|
||||||
|
- const char *path_on_fs = mnt_fs_get_root(fs);
|
||||||
|
+ const char *sub = get_cifs_unc_subdir_path(src);
|
||||||
|
+ const char *r = mnt_fs_get_root(fs);
|
||||||
|
|
||||||
|
- if (!unc_subdir || !path_on_fs || !streq_paths(unc_subdir, path_on_fs))
|
||||||
|
+ if (!sub || !r || (!streq_paths(sub, r) &&
|
||||||
|
+ !streq_paths("/", r)))
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
const char *r = mnt_fs_get_root(fs);
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 0717177be22588d4e419de280eccd0eeafb15016 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rupesh Girase <rgirase@redhat.com>
|
||||||
|
Date: Thu, 18 Jun 2020 19:17:41 +0530
|
||||||
|
Subject: [PATCH] Manual pages: losetup.8: Fix "--direct-io" defaults
|
||||||
|
|
||||||
|
"--direct-io" option is "off" by default while configuring
|
||||||
|
loop device but it's mentioned "on" in man page.
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1848919
|
||||||
|
Upstream: http://github.com/karelzak/util-linux/commit/4bee67e2d1a78abc52e89c6eb71f0efc8a278ce9
|
||||||
|
Signed-off-by: Rupesh Girase <rgirase@redhat.com>
|
||||||
|
---
|
||||||
|
sys-utils/losetup.8 | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8
|
||||||
|
index cdb9ed052..c87c231b6 100644
|
||||||
|
--- a/sys-utils/losetup.8
|
||||||
|
+++ b/sys-utils/losetup.8
|
||||||
|
@@ -130,7 +130,7 @@ Set up a read-only loop device.
|
||||||
|
.BR \-\-direct\-io [ =on | off ]
|
||||||
|
Enable or disable direct I/O for the backing file. The optional argument
|
||||||
|
can be either \fBon\fR or \fBoff\fR. If the argument is omitted, it defaults
|
||||||
|
-to \fBon\fR.
|
||||||
|
+to \fBoff\fR.
|
||||||
|
.TP
|
||||||
|
.BR \-v , " \-\-verbose"
|
||||||
|
Verbose mode.
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
Summary: A collection of basic system utilities
|
Summary: A collection of basic system utilities
|
||||||
Name: util-linux
|
Name: util-linux
|
||||||
Version: 2.32.1
|
Version: 2.32.1
|
||||||
Release: 22%{?dist}
|
Release: 24%{?dist}
|
||||||
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
|
License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://en.wikipedia.org/wiki/Util-linux
|
URL: http://en.wikipedia.org/wiki/Util-linux
|
||||||
@ -162,6 +162,25 @@ Patch33: 0033-tests-update-lscpu-test-for-RHEL8.patch
|
|||||||
# CI fix
|
# CI fix
|
||||||
Patch34: 0034-tests-fdisk-make-sure-we-use-the-same-sizes-for-MD-d.patch
|
Patch34: 0034-tests-fdisk-make-sure-we-use-the-same-sizes-for-MD-d.patch
|
||||||
|
|
||||||
|
### RHEL-8.3
|
||||||
|
###
|
||||||
|
# 1826251 - remove MD metadata 0.90 based tests from util-linux CI
|
||||||
|
Patch35: 0035-tests-mark-MD-tests-with-metadata-v0.90-as-KNOWN-FAI.patch
|
||||||
|
# 1812576 - RFE: Bitlocker detection for RHEL 8.3
|
||||||
|
Patch36: 0036-libblkid-add-BitLocker-detection.patch
|
||||||
|
# 1817726 - libblkid BLOCK_SIZE
|
||||||
|
Patch37: 0037-blkid-retport-block-size-of-a-filesystem.patch
|
||||||
|
Patch38: 0038-libblkid-xfs-fix-sector-size-calculation.patch
|
||||||
|
# 1803753 - col struct char_str c_column field should be of unsigned type and/or larger than 16 bit
|
||||||
|
Patch39: 0039-col-make-flush_line-a-little-bit-robust.patch
|
||||||
|
# 1812118 - mount -a always tries to mount smb3 share subdir despite being already mounted.
|
||||||
|
Patch40: 0040-libmount-improve-smb-2-3-support.patch
|
||||||
|
# 1829245 - mount -a tries to mount already mounted cifs shares when we cannot query up to root dir
|
||||||
|
Patch41: 0041-libmount-fix-mount-a-EBUSY-for-cifs.patch
|
||||||
|
# 1848919 - Update losetup man page to fix "--direct-io" defaults
|
||||||
|
Patch42: 0042-Manual-pages-losetup.8-Fix-direct-io-defaults.patch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The util-linux package contains a large variety of low-level system
|
The util-linux package contains a large variety of low-level system
|
||||||
utilities that are necessary for a Linux system to function. Among
|
utilities that are necessary for a Linux system to function. Among
|
||||||
@ -1026,6 +1045,18 @@ fi
|
|||||||
%{_libdir}/python*/site-packages/libmount/
|
%{_libdir}/python*/site-packages/libmount/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 26 2020 Karel Zak <kzak@redhat.com> 2.32.1-24
|
||||||
|
- fix #1848919 - Update losetup man page to fix "--direct-io" defaults
|
||||||
|
|
||||||
|
* Thu Jun 11 2020 Karel Zak <kzak@redhat.com> 2.32.1-23
|
||||||
|
- fix #1826251 - remove MD metadata 0.90 based tests from util-linux CI
|
||||||
|
- fix #1812576 - RFE: Bitlocker detection for RHEL 8.3
|
||||||
|
- fix #1817726 - add libblkid BLOCK_SIZE
|
||||||
|
- fix #1803753 - RHEL-8: col struct char_str c_column field should be of unsigned type and/or larger than 16 bit
|
||||||
|
- fix #1812118 - mount -a always tries to mount smb3 share subdir despite being already mounted
|
||||||
|
- fix #1824727 - util-linux: Include python3-libmount package in the release
|
||||||
|
- fix #1829245 - mount -a tries to mount already mounted cifs shares when we cannot query up to root dir
|
||||||
|
|
||||||
* Tue Dec 17 2019 Karel Zak <kzak@redhat.com> 2.32.1-22
|
* Tue Dec 17 2019 Karel Zak <kzak@redhat.com> 2.32.1-22
|
||||||
- improve CI tests portability to rhel-8 kernel
|
- improve CI tests portability to rhel-8 kernel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user