import util-linux-2.32.1-38.el8
This commit is contained in:
parent
5c8c968232
commit
71c28db45d
@ -0,0 +1,109 @@
|
|||||||
|
From 97a5abd36eeab4e07a31b27f6a2c2078d42e2e33 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 8 Mar 2022 11:40:58 +0100
|
||||||
|
Subject: lib/loopdev: retry LOOP_SET_STATUS64 and LOOP_SET_BLOCK_SIZE on
|
||||||
|
EAGAIN
|
||||||
|
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/0ae7bb11c29aa11c8ef25b1ef2f82ee4701b856d
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/eab90ef8d4f66394285e0cff1dfc0a27242c05aa
|
||||||
|
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=2058176
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
lib/loopdev.c | 42 +++++++++++++++++++++++++++++++++++++-----
|
||||||
|
1 file changed, 37 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/loopdev.c b/lib/loopdev.c
|
||||||
|
index 54d337ea3..48af82aef 100644
|
||||||
|
--- a/lib/loopdev.c
|
||||||
|
+++ b/lib/loopdev.c
|
||||||
|
@@ -42,6 +42,8 @@
|
||||||
|
#include "blkdev.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
+#define LOOPDEV_MAX_TRIES 10
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Debug stuff (based on include/debug.h)
|
||||||
|
*/
|
||||||
|
@@ -1260,6 +1262,7 @@ int loopcxt_setup_device(struct loopdev_cxt *lc)
|
||||||
|
{
|
||||||
|
int file_fd, dev_fd, mode = O_RDWR, rc = -1, cnt = 0;
|
||||||
|
int errsv = 0;
|
||||||
|
+ int err, again;
|
||||||
|
|
||||||
|
if (!lc || !*lc->device || !lc->filename)
|
||||||
|
return -EINVAL;
|
||||||
|
@@ -1331,7 +1334,17 @@ int loopcxt_setup_device(struct loopdev_cxt *lc)
|
||||||
|
|
||||||
|
DBG(SETUP, ul_debugobj(lc, "LOOP_SET_FD: OK"));
|
||||||
|
|
||||||
|
- if (ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info)) {
|
||||||
|
+ cnt = 0;
|
||||||
|
+ do {
|
||||||
|
+ err = ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info);
|
||||||
|
+ again = err && errno == EAGAIN;
|
||||||
|
+ if (again) {
|
||||||
|
+ xusleep(250000);
|
||||||
|
+ cnt++;
|
||||||
|
+ }
|
||||||
|
+ } while (again && cnt <= LOOPDEV_MAX_TRIES);
|
||||||
|
+
|
||||||
|
+ if (err) {
|
||||||
|
rc = -errno;
|
||||||
|
errsv = errno;
|
||||||
|
DBG(SETUP, ul_debugobj(lc, "LOOP_SET_STATUS64 failed: %m"));
|
||||||
|
@@ -1376,7 +1389,7 @@ err:
|
||||||
|
*/
|
||||||
|
int loopcxt_set_status(struct loopdev_cxt *lc)
|
||||||
|
{
|
||||||
|
- int dev_fd, rc = -1;
|
||||||
|
+ int dev_fd, rc = -1, err, again, tries = 0;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
|
dev_fd = loopcxt_get_fd(lc);
|
||||||
|
@@ -1387,7 +1400,16 @@ int loopcxt_set_status(struct loopdev_cxt *lc)
|
||||||
|
}
|
||||||
|
DBG(SETUP, ul_debugobj(lc, "device open: OK"));
|
||||||
|
|
||||||
|
- if (ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info)) {
|
||||||
|
+ do {
|
||||||
|
+ err = ioctl(dev_fd, LOOP_SET_STATUS64, &lc->info);
|
||||||
|
+ again = err && errno == EAGAIN;
|
||||||
|
+ if (again) {
|
||||||
|
+ xusleep(250000);
|
||||||
|
+ tries++;
|
||||||
|
+ }
|
||||||
|
+ } while (again && tries <= LOOPDEV_MAX_TRIES);
|
||||||
|
+
|
||||||
|
+ if (err) {
|
||||||
|
rc = -errno;
|
||||||
|
DBG(SETUP, ul_debugobj(lc, "LOOP_SET_STATUS64 failed: %m"));
|
||||||
|
return rc;
|
||||||
|
@@ -1440,12 +1462,22 @@ int loopcxt_set_dio(struct loopdev_cxt *lc, unsigned long use_dio)
|
||||||
|
int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize)
|
||||||
|
{
|
||||||
|
int fd = loopcxt_get_fd(lc);
|
||||||
|
+ int err, again, tries = 0;
|
||||||
|
|
||||||
|
if (fd < 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
- /* Kernels prior to v4.14 don't support this ioctl */
|
||||||
|
- if (ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) blocksize) < 0) {
|
||||||
|
+ do {
|
||||||
|
+ /* Kernels prior to v4.14 don't support this ioctl */
|
||||||
|
+ err = ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) blocksize);
|
||||||
|
+ again = err && errno == EAGAIN;
|
||||||
|
+ if (again) {
|
||||||
|
+ xusleep(250000);
|
||||||
|
+ tries++;
|
||||||
|
+ }
|
||||||
|
+ } while (again && tries <= LOOPDEV_MAX_TRIES);
|
||||||
|
+
|
||||||
|
+ if (err) {
|
||||||
|
int rc = -errno;
|
||||||
|
DBG(CXT, ul_debugobj(lc, "LOOP_SET_BLOCK_SIZE failed: %m"));
|
||||||
|
return rc;
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
47
SOURCES/0076-libblkid-fix-Atari-prober-logic.patch
Normal file
47
SOURCES/0076-libblkid-fix-Atari-prober-logic.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
From 214eaa70d8431161de03ea7903f814c102e87919 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Fri, 9 Oct 2020 13:06:08 +0200
|
||||||
|
Subject: libblkid: fix Atari prober logic
|
||||||
|
|
||||||
|
Addresses: https://github.com/karelzak/util-linux/issues/1159
|
||||||
|
Addresses: https://github.com/karelzak/util-linux/issues/1116
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/282ceadc3a72fc07dd0388b8880fd751490bb87f
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
libblkid/src/partitions/atari.c | 12 +++++++-----
|
||||||
|
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libblkid/src/partitions/atari.c b/libblkid/src/partitions/atari.c
|
||||||
|
index 1224a577c..b469ef5a1 100644
|
||||||
|
--- a/libblkid/src/partitions/atari.c
|
||||||
|
+++ b/libblkid/src/partitions/atari.c
|
||||||
|
@@ -199,11 +199,10 @@ static int probe_atari_pt(blkid_probe pr,
|
||||||
|
|
||||||
|
hdsize = blkid_probe_get_size(pr) / 512;
|
||||||
|
|
||||||
|
- /* Look for validly looking primary partition */
|
||||||
|
- for (i = 0; ; i++) {
|
||||||
|
- if (i >= ARRAY_SIZE(rs->part))
|
||||||
|
- goto nothing;
|
||||||
|
-
|
||||||
|
+ /*
|
||||||
|
+ * At least one valid partition required
|
||||||
|
+ */
|
||||||
|
+ for (i = 0; i < 4; i++) {
|
||||||
|
if (IS_PARTDEF_VALID(rs->part[i], hdsize)) {
|
||||||
|
blkid_probe_set_magic(pr,
|
||||||
|
offsetof(struct atari_rootsector, part[i]),
|
||||||
|
@@ -213,6 +212,9 @@ static int probe_atari_pt(blkid_probe pr,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (i == 4)
|
||||||
|
+ goto nothing;
|
||||||
|
+
|
||||||
|
if (blkid_partitions_need_typeonly(pr))
|
||||||
|
/* caller does not ask for details about partitions */
|
||||||
|
return BLKID_PROBE_OK;
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
129
SOURCES/0077-libblkid-make-Atari-more-robust.patch
Normal file
129
SOURCES/0077-libblkid-make-Atari-more-robust.patch
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
From e7f0f5d3a80324e1430e979b0a170ded77b380e2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 13 Oct 2020 16:19:20 +0200
|
||||||
|
Subject: libblkid: make Atari more robust
|
||||||
|
|
||||||
|
* ignore large disks
|
||||||
|
* check in-table stored device size
|
||||||
|
* check bad sectors list
|
||||||
|
* check partition dimensions against in-table device size
|
||||||
|
|
||||||
|
Addresses: https://github.com/karelzak/util-linux/issues/1159
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/282ceadc3a72fc07dd0388b8880fd751490bb87f
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
libblkid/src/partitions/atari.c | 66 ++++++++++++++++++++++++---------
|
||||||
|
1 file changed, 48 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libblkid/src/partitions/atari.c b/libblkid/src/partitions/atari.c
|
||||||
|
index b469ef5a1..c3f77117a 100644
|
||||||
|
--- a/libblkid/src/partitions/atari.c
|
||||||
|
+++ b/libblkid/src/partitions/atari.c
|
||||||
|
@@ -74,16 +74,27 @@ static int linux_isalnum(unsigned char c) {
|
||||||
|
|
||||||
|
#define IS_ACTIVE(partdef) ((partdef).flags & 1)
|
||||||
|
|
||||||
|
-#define IS_PARTDEF_VALID(partdef, hdsize) \
|
||||||
|
- ( \
|
||||||
|
- (partdef).flags & 1 && \
|
||||||
|
- isalnum((partdef).id[0]) && \
|
||||||
|
- isalnum((partdef).id[1]) && \
|
||||||
|
- isalnum((partdef).id[2]) && \
|
||||||
|
- be32_to_cpu((partdef).start) <= (hdsize) && \
|
||||||
|
- be32_to_cpu((partdef).start) + \
|
||||||
|
- be32_to_cpu((partdef).size) <= (hdsize) \
|
||||||
|
- )
|
||||||
|
+static int is_valid_dimension(uint32_t start, uint32_t size, uint32_t maxoff)
|
||||||
|
+{
|
||||||
|
+ uint64_t end = start + size;
|
||||||
|
+
|
||||||
|
+ return end >= start
|
||||||
|
+ && 0 < start && start <= maxoff
|
||||||
|
+ && 0 < size && size <= maxoff
|
||||||
|
+ && 0 < end && end <= maxoff;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int is_valid_partition(struct atari_part_def *part, uint32_t maxoff)
|
||||||
|
+{
|
||||||
|
+ uint32_t start = be32_to_cpu(part->start),
|
||||||
|
+ size = be32_to_cpu(part->size);
|
||||||
|
+
|
||||||
|
+ return (part->flags & 1)
|
||||||
|
+ && isalnum(part->id[0])
|
||||||
|
+ && isalnum(part->id[1])
|
||||||
|
+ && isalnum(part->id[2])
|
||||||
|
+ && is_valid_dimension(start, size, maxoff);
|
||||||
|
+}
|
||||||
|
|
||||||
|
static int is_id_common(char *id)
|
||||||
|
{
|
||||||
|
@@ -184,12 +195,20 @@ static int probe_atari_pt(blkid_probe pr,
|
||||||
|
unsigned i;
|
||||||
|
int has_xgm = 0;
|
||||||
|
int rc = 0;
|
||||||
|
- off_t hdsize;
|
||||||
|
+ uint32_t rssize; /* size in sectors from root sector */
|
||||||
|
+ uint64_t size; /* size in sectors from system */
|
||||||
|
|
||||||
|
/* Atari partition is not defined for other sector sizes */
|
||||||
|
if (blkid_probe_get_sectorsize(pr) != 512)
|
||||||
|
goto nothing;
|
||||||
|
|
||||||
|
+ size = blkid_probe_get_size(pr) / 512;
|
||||||
|
+
|
||||||
|
+ /* Atari is not well defined to support large disks */
|
||||||
|
+ if (size > INT32_MAX)
|
||||||
|
+ goto nothing;
|
||||||
|
+
|
||||||
|
+ /* read root sector */
|
||||||
|
rs = (struct atari_rootsector *) blkid_probe_get_sector(pr, 0);
|
||||||
|
if (!rs) {
|
||||||
|
if (errno)
|
||||||
|
@@ -197,17 +216,29 @@ static int probe_atari_pt(blkid_probe pr,
|
||||||
|
goto nothing;
|
||||||
|
}
|
||||||
|
|
||||||
|
- hdsize = blkid_probe_get_size(pr) / 512;
|
||||||
|
+ rssize = be32_to_cpu(rs->hd_size);
|
||||||
|
+
|
||||||
|
+ /* check number of sectors stored in the root sector */
|
||||||
|
+ if (rssize < 2 || rssize > size)
|
||||||
|
+ goto nothing;
|
||||||
|
+
|
||||||
|
+ /* check list of bad blocks */
|
||||||
|
+ if ((rs->bsl_start || rs->bsl_len)
|
||||||
|
+ && !is_valid_dimension(be32_to_cpu(rs->bsl_start),
|
||||||
|
+ be32_to_cpu(rs->bsl_len),
|
||||||
|
+ rssize))
|
||||||
|
+ goto nothing;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* At least one valid partition required
|
||||||
|
*/
|
||||||
|
for (i = 0; i < 4; i++) {
|
||||||
|
- if (IS_PARTDEF_VALID(rs->part[i], hdsize)) {
|
||||||
|
- blkid_probe_set_magic(pr,
|
||||||
|
- offsetof(struct atari_rootsector, part[i]),
|
||||||
|
- sizeof(rs->part[i].flags) + sizeof(rs->part[i].id),
|
||||||
|
- (unsigned char *) &rs->part[i]);
|
||||||
|
+ if (is_valid_partition(&rs->part[i], rssize)) {
|
||||||
|
+ if (blkid_probe_set_magic(pr,
|
||||||
|
+ offsetof(struct atari_rootsector, part[i]),
|
||||||
|
+ sizeof(rs->part[i].flags) + sizeof(rs->part[i].id),
|
||||||
|
+ (unsigned char *) &rs->part[i]))
|
||||||
|
+ goto err;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -234,7 +265,6 @@ static int probe_atari_pt(blkid_probe pr,
|
||||||
|
blkid_partlist_increment_partno(ls);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
if (!memcmp(p->id, "XGM", 3)) {
|
||||||
|
has_xgm = 1;
|
||||||
|
rc = parse_extended(pr, ls, tab, p);
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
53
SOURCES/0078-libblkid-allow-a-lot-of-mac-partitions.patch
Normal file
53
SOURCES/0078-libblkid-allow-a-lot-of-mac-partitions.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 2348779e225dd581c32c00108e017f5c1924e706 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Samanta Navarro <ferivoz@riseup.net>
|
||||||
|
Date: Sun, 8 Nov 2020 11:45:18 +0000
|
||||||
|
Subject: libblkid: allow a lot of mac partitions
|
||||||
|
|
||||||
|
If the map count is set to INT_MAX then the for loop does not stop
|
||||||
|
because its check is never false.
|
||||||
|
|
||||||
|
I have not found a correct upper limit. The other partition logics have
|
||||||
|
a maximum amount (exception is atari.c).
|
||||||
|
|
||||||
|
The loop itself wouldn't be endless. If the iteration reaches block 0
|
||||||
|
then the signature will be wrong. This means that map count = INT_MAX
|
||||||
|
case would fail even if such a setup would be correct on disk.
|
||||||
|
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/8f22adaaf30e9fd3bf83da0213b4a6525c9305cd
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030
|
||||||
|
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
|
||||||
|
---
|
||||||
|
libblkid/src/partitions/mac.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c
|
||||||
|
index 4713d6042..2be91a620 100644
|
||||||
|
--- a/libblkid/src/partitions/mac.c
|
||||||
|
+++ b/libblkid/src/partitions/mac.c
|
||||||
|
@@ -123,12 +123,12 @@ static int probe_mac_pt(blkid_probe pr,
|
||||||
|
ssf = block_size / 512;
|
||||||
|
nblks = be32_to_cpu(p->map_count);
|
||||||
|
|
||||||
|
- for (i = 1; i <= nblks; ++i) {
|
||||||
|
+ for (i = 0; i < nblks; ++i) {
|
||||||
|
blkid_partition par;
|
||||||
|
uint32_t start;
|
||||||
|
uint32_t size;
|
||||||
|
|
||||||
|
- p = (struct mac_partition *) get_mac_block(pr, block_size, i);
|
||||||
|
+ p = (struct mac_partition *) get_mac_block(pr, block_size, i + 1);
|
||||||
|
if (!p) {
|
||||||
|
if (errno)
|
||||||
|
return -errno;
|
||||||
|
@@ -141,7 +141,7 @@ static int probe_mac_pt(blkid_probe pr,
|
||||||
|
DBG(LOWPROBE, ul_debug(
|
||||||
|
"mac: inconsistent map_count in partition map, "
|
||||||
|
"entry[0]: %d, entry[%d]: %d",
|
||||||
|
- nblks, i - 1,
|
||||||
|
+ nblks, i,
|
||||||
|
be32_to_cpu(p->map_count)));
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
@ -0,0 +1,85 @@
|
|||||||
|
From 24f5385f4a54b90f4b7674e23f30567591962bcb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Samanta Navarro <ferivoz@riseup.net>
|
||||||
|
Date: Tue, 10 Nov 2020 11:48:04 +0100
|
||||||
|
Subject: libblkid: limit amount of parsed partitions
|
||||||
|
|
||||||
|
The linux kernel does not support more than 256 partitions
|
||||||
|
(DISK_MAX_PARTS). The atari and mac block devices have no such limits.
|
||||||
|
|
||||||
|
Use dos logical partition limit for atari as well (100).
|
||||||
|
Use the kernel limit for mac (256).
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/c70b4f2a5b99876d230b8f4f413c3bb3ee6647f1
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
|
||||||
|
---
|
||||||
|
libblkid/src/partitions/atari.c | 6 +++++-
|
||||||
|
libblkid/src/partitions/mac.c | 15 +++++++++++----
|
||||||
|
2 files changed, 16 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libblkid/src/partitions/atari.c b/libblkid/src/partitions/atari.c
|
||||||
|
index c3f77117a..fdd5498b5 100644
|
||||||
|
--- a/libblkid/src/partitions/atari.c
|
||||||
|
+++ b/libblkid/src/partitions/atari.c
|
||||||
|
@@ -141,12 +141,16 @@ static int parse_extended(blkid_probe pr, blkid_partlist ls,
|
||||||
|
blkid_parttable tab, struct atari_part_def *part)
|
||||||
|
{
|
||||||
|
uint32_t x0start, xstart;
|
||||||
|
- unsigned i = 0;
|
||||||
|
+ unsigned ct = 0, i = 0;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
x0start = xstart = be32_to_cpu(part->start);
|
||||||
|
while (1) {
|
||||||
|
struct atari_rootsector *xrs;
|
||||||
|
+
|
||||||
|
+ if (++ct > 100)
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
xrs = (struct atari_rootsector *) blkid_probe_get_sector(pr, xstart);
|
||||||
|
if (!xrs) {
|
||||||
|
if (errno)
|
||||||
|
diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c
|
||||||
|
index 2be91a620..092d31d32 100644
|
||||||
|
--- a/libblkid/src/partitions/mac.c
|
||||||
|
+++ b/libblkid/src/partitions/mac.c
|
||||||
|
@@ -79,7 +79,7 @@ static int probe_mac_pt(blkid_probe pr,
|
||||||
|
blkid_partlist ls;
|
||||||
|
uint16_t block_size;
|
||||||
|
uint16_t ssf; /* sector size fragment */
|
||||||
|
- uint32_t nblks, i;
|
||||||
|
+ uint32_t nblks, nprts, i;
|
||||||
|
|
||||||
|
|
||||||
|
/* The driver descriptor record is always located at physical block 0,
|
||||||
|
@@ -122,8 +122,15 @@ static int probe_mac_pt(blkid_probe pr,
|
||||||
|
|
||||||
|
ssf = block_size / 512;
|
||||||
|
nblks = be32_to_cpu(p->map_count);
|
||||||
|
-
|
||||||
|
- for (i = 0; i < nblks; ++i) {
|
||||||
|
+ if (nblks > 256) {
|
||||||
|
+ nprts = 256;
|
||||||
|
+ DBG(LOWPROBE, ul_debug(
|
||||||
|
+ "mac: map_count too large, entry[0]: %u, "
|
||||||
|
+ "enforcing limit of %u", nblks, nprts));
|
||||||
|
+ } else
|
||||||
|
+ nprts = nblks;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < nprts; ++i) {
|
||||||
|
blkid_partition par;
|
||||||
|
uint32_t start;
|
||||||
|
uint32_t size;
|
||||||
|
@@ -140,7 +147,7 @@ static int probe_mac_pt(blkid_probe pr,
|
||||||
|
if (be32_to_cpu(p->map_count) != nblks) {
|
||||||
|
DBG(LOWPROBE, ul_debug(
|
||||||
|
"mac: inconsistent map_count in partition map, "
|
||||||
|
- "entry[0]: %d, entry[%d]: %d",
|
||||||
|
+ "entry[0]: %u, entry[%u]: %u",
|
||||||
|
nblks, i,
|
||||||
|
be32_to_cpu(p->map_count)));
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 7180c1ad36a1f419e20e90ddfad0b2f77d8c018f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Thu, 2 Jun 2022 16:02:54 +0200
|
||||||
|
Subject: libblkid: (mac) make sure block size is large enough [fuzzing]
|
||||||
|
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/4e12fbca62be10b09503cecc7507757874043474
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030
|
||||||
|
Reported-by: Thibault Guittet <tguittet@redhat.com>
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
libblkid/src/partitions/mac.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c
|
||||||
|
index 092d31d32..75a558b0a 100644
|
||||||
|
--- a/libblkid/src/partitions/mac.c
|
||||||
|
+++ b/libblkid/src/partitions/mac.c
|
||||||
|
@@ -93,6 +93,8 @@ static int probe_mac_pt(blkid_probe pr,
|
||||||
|
}
|
||||||
|
|
||||||
|
block_size = be16_to_cpu(md->block_size);
|
||||||
|
+ if (block_size < sizeof(struct mac_partition))
|
||||||
|
+ goto nothing;
|
||||||
|
|
||||||
|
/* The partition map always begins at physical block 1,
|
||||||
|
* the second block on the disk.
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
From c223ad8f05d2d20a80e21dbb4b6240f11909f92c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Thu, 14 Jul 2022 13:10:16 +0200
|
||||||
|
Subject: lscpu: don;t read from HW when use /sys snapshot
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2069187
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
sys-utils/lscpu.c | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
|
||||||
|
index 70a797dd6..01f8fba35 100644
|
||||||
|
--- a/sys-utils/lscpu.c
|
||||||
|
+++ b/sys-utils/lscpu.c
|
||||||
|
@@ -1850,7 +1850,10 @@ print_summary(struct lscpu_desc *desc, struct lscpu_modifier *mod)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (desc->is_cluster) {
|
||||||
|
- int sockets = get_number_of_physical_sockets_from_dmi();
|
||||||
|
+ int sockets = 0;
|
||||||
|
+
|
||||||
|
+ if (mod->system == SYSTEM_LIVE)
|
||||||
|
+ sockets = get_number_of_physical_sockets_from_dmi();
|
||||||
|
|
||||||
|
if (sockets > 0)
|
||||||
|
add_summary_n(tb, _("Socket(s):"), sockets);
|
||||||
|
@@ -2109,7 +2112,8 @@ int main(int argc, char *argv[])
|
||||||
|
qsort(desc->ecaches, desc->necaches,
|
||||||
|
sizeof(struct cpu_cache), cachecmp);
|
||||||
|
|
||||||
|
- desc->is_cluster = is_fallback_to_cluster(desc);
|
||||||
|
+ if (mod->system == SYSTEM_LIVE)
|
||||||
|
+ desc->is_cluster = is_fallback_to_cluster(desc);
|
||||||
|
|
||||||
|
read_nodes(desc);
|
||||||
|
read_hypervisor(desc, mod);
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
84
SOURCES/0082-lslogins-improve-prefixes-interpretation.patch
Normal file
84
SOURCES/0082-lslogins-improve-prefixes-interpretation.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
From 818cd2018ca66e804ea30066c44572ca128a24a7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 7 Jun 2022 09:11:56 +0200
|
||||||
|
Subject: lslogins: improve prefixes interpretation
|
||||||
|
|
||||||
|
It seems that for example 'passwd --lock' uses two exclamation marks
|
||||||
|
in password field. It seems better to assume arbitrary number of '!'
|
||||||
|
and '*' prefixes.
|
||||||
|
|
||||||
|
The patch also makes description of the PWD-EMPTY output field more
|
||||||
|
explicit.
|
||||||
|
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/c51cba1e838ae7e36a843ec785543492bb8737cd
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2093166
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
login-utils/lslogins.c | 31 +++++++++++++++++++++++++------
|
||||||
|
1 file changed, 25 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c
|
||||||
|
index 6f804aa35..b81afc6c7 100644
|
||||||
|
--- a/login-utils/lslogins.c
|
||||||
|
+++ b/login-utils/lslogins.c
|
||||||
|
@@ -216,7 +216,7 @@ static const struct lslogins_coldesc coldescs[] =
|
||||||
|
{
|
||||||
|
[COL_USER] = { "USER", N_("user name"), N_("Username"), 0.1, SCOLS_FL_NOEXTREMES },
|
||||||
|
[COL_UID] = { "UID", N_("user ID"), "UID", 1, SCOLS_FL_RIGHT},
|
||||||
|
- [COL_PWDEMPTY] = { "PWD-EMPTY", N_("password not required"), N_("Password not required"), 1, SCOLS_FL_RIGHT },
|
||||||
|
+ [COL_PWDEMPTY] = { "PWD-EMPTY", N_("password not defined"), N_("Password not required (empty)"), 1, SCOLS_FL_RIGHT },
|
||||||
|
[COL_PWDDENY] = { "PWD-DENY", N_("login by password disabled"), N_("Login by password disabled"), 1, SCOLS_FL_RIGHT },
|
||||||
|
[COL_PWDLOCK] = { "PWD-LOCK", N_("password defined, but locked"), N_("Password is locked"), 1, SCOLS_FL_RIGHT },
|
||||||
|
[COL_NOLOGIN] = { "NOLOGIN", N_("log in disabled by nologin(8) or pam_nologin(8)"), N_("No login"), 1, SCOLS_FL_RIGHT },
|
||||||
|
@@ -755,16 +755,24 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c
|
||||||
|
break;
|
||||||
|
case COL_PWDEMPTY:
|
||||||
|
if (shadow) {
|
||||||
|
- if (!*shadow->sp_pwdp) /* '\0' */
|
||||||
|
+ const char *p = shadow->sp_pwdp;
|
||||||
|
+
|
||||||
|
+ while (p && (*p == '!' || *p == '*'))
|
||||||
|
+ p++;
|
||||||
|
+
|
||||||
|
+ if (!p || !*p)
|
||||||
|
user->pwd_empty = STATUS_TRUE;
|
||||||
|
} else
|
||||||
|
user->pwd_empty = STATUS_UNKNOWN;
|
||||||
|
break;
|
||||||
|
case COL_PWDDENY:
|
||||||
|
if (shadow) {
|
||||||
|
- if ((*shadow->sp_pwdp == '!' ||
|
||||||
|
- *shadow->sp_pwdp == '*') &&
|
||||||
|
- !valid_pwd(shadow->sp_pwdp + 1))
|
||||||
|
+ const char *p = shadow->sp_pwdp;
|
||||||
|
+
|
||||||
|
+ while (p && (*p == '!' || *p == '*'))
|
||||||
|
+ p++;
|
||||||
|
+
|
||||||
|
+ if (p && *p && p != shadow->sp_pwdp && !valid_pwd(p))
|
||||||
|
user->pwd_deny = STATUS_TRUE;
|
||||||
|
} else
|
||||||
|
user->pwd_deny = STATUS_UNKNOWN;
|
||||||
|
@@ -772,7 +780,18 @@ static struct lslogins_user *get_user_info(struct lslogins_control *ctl, const c
|
||||||
|
|
||||||
|
case COL_PWDLOCK:
|
||||||
|
if (shadow) {
|
||||||
|
- if (*shadow->sp_pwdp == '!' && valid_pwd(shadow->sp_pwdp + 1))
|
||||||
|
+ const char *p = shadow->sp_pwdp;
|
||||||
|
+ int i = 0;
|
||||||
|
+
|
||||||
|
+ /* 'passwd --lock' uses two exclamation marks,
|
||||||
|
+ * shadow(5) describes the lock as "field which
|
||||||
|
+ * starts with an exclamation mark". Let's
|
||||||
|
+ * support more '!' ...
|
||||||
|
+ */
|
||||||
|
+ while (p && *p == '!')
|
||||||
|
+ p++, i++;
|
||||||
|
+
|
||||||
|
+ if (i != 0 && (!*p || valid_pwd(p)))
|
||||||
|
user->pwd_lock = STATUS_TRUE;
|
||||||
|
} else
|
||||||
|
user->pwd_lock = STATUS_UNKNOWN;
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
149
SOURCES/0083-tests-update-atari-blkid-tests.patch
Normal file
149
SOURCES/0083-tests-update-atari-blkid-tests.patch
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
From 78be9c320883e77c2b5fdc676277a51efc98c723 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 13 Oct 2020 16:29:19 +0200
|
||||||
|
Subject: tests: update atari blkid tests
|
||||||
|
|
||||||
|
The old images of the atari label are truncated and in-table stored
|
||||||
|
sizes do not match with real images sizes -- libblkid checks it now.
|
||||||
|
|
||||||
|
I have no idea how to generate ICD format, let's ignore it in tests
|
||||||
|
for now.
|
||||||
|
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/0d061b6e68bc74ce7d61524097b5d0f3becee437
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
tests/expected/blkid/lowprobe-pt-atari-icd | 8 --------
|
||||||
|
tests/expected/blkid/lowprobe-pt-atari-primary | 3 +++
|
||||||
|
tests/expected/blkid/lowprobe-pt-atari-xgm | 10 +++-------
|
||||||
|
tests/ts/blkid/images-pt/atari-icd.img.xz | Bin 1920 -> 0 bytes
|
||||||
|
tests/ts/blkid/images-pt/atari-primary.img.xz | Bin 0 -> 932 bytes
|
||||||
|
tests/ts/blkid/images-pt/atari-xgm.img.xz | Bin 1920 -> 956 bytes
|
||||||
|
6 files changed, 6 insertions(+), 15 deletions(-)
|
||||||
|
delete mode 100644 tests/expected/blkid/lowprobe-pt-atari-icd
|
||||||
|
create mode 100644 tests/expected/blkid/lowprobe-pt-atari-primary
|
||||||
|
delete mode 100644 tests/ts/blkid/images-pt/atari-icd.img.xz
|
||||||
|
create mode 100644 tests/ts/blkid/images-pt/atari-primary.img.xz
|
||||||
|
|
||||||
|
diff --git a/tests/expected/blkid/lowprobe-pt-atari-icd b/tests/expected/blkid/lowprobe-pt-atari-icd
|
||||||
|
deleted file mode 100644
|
||||||
|
index 29942b123..000000000
|
||||||
|
--- a/tests/expected/blkid/lowprobe-pt-atari-icd
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,8 +0,0 @@
|
||||||
|
-size: 8388608, sector size: 512, PT: atari, offset: 0, id=(null)
|
||||||
|
----
|
||||||
|
-#1: 65 4032 0x0 type='FAT'
|
||||||
|
-#2: 4097 904 0x0 type='FOO'
|
||||||
|
-#4: 12289 4096 0x0 type='BAR'
|
||||||
|
-#5: 5002 1999 0x0 type='GEM'
|
||||||
|
-#6: 7003 3238 0x0 type='RAW'
|
||||||
|
-#7: 10241 2048 0x0 type='RAW'
|
||||||
|
diff --git a/tests/expected/blkid/lowprobe-pt-atari-primary b/tests/expected/blkid/lowprobe-pt-atari-primary
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..472821e47
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/expected/blkid/lowprobe-pt-atari-primary
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+size: 5242880, sector size: 512, PT: atari, offset: 0, id=(null)
|
||||||
|
+---
|
||||||
|
+#1: 2 10238 0x0 type='RAW'
|
||||||
|
diff --git a/tests/expected/blkid/lowprobe-pt-atari-xgm b/tests/expected/blkid/lowprobe-pt-atari-xgm
|
||||||
|
index 4b7756655..a7dae6995 100644
|
||||||
|
--- a/tests/expected/blkid/lowprobe-pt-atari-xgm
|
||||||
|
+++ b/tests/expected/blkid/lowprobe-pt-atari-xgm
|
||||||
|
@@ -1,8 +1,4 @@
|
||||||
|
-size: 8388608, sector size: 512, PT: atari, offset: 0, id=(null)
|
||||||
|
+size: 5242880, sector size: 512, PT: atari, offset: 0, id=(null)
|
||||||
|
---
|
||||||
|
-#1: 65 4032 0x0 type='FAT'
|
||||||
|
-#2: 4097 904 0x0 type='FOO'
|
||||||
|
-#3: 5002 1999 0x0 type='GEM'
|
||||||
|
-#4: 7003 3238 0x0 type='RAW'
|
||||||
|
-#5: 10241 2048 0x0 type='RAW'
|
||||||
|
-#6: 12289 4096 0x0 type='BAR'
|
||||||
|
+#1: 2 9 0x0 type='RAW'
|
||||||
|
+#2: 14 10226 0x0 type='RAW'
|
||||||
|
diff --git a/tests/ts/blkid/images-pt/atari-icd.img.xz b/tests/ts/blkid/images-pt/atari-icd.img.xz
|
||||||
|
deleted file mode 100644
|
||||||
|
index 00a2aba49a8f940c35b788fd693f966a31cd1aaf..0000000000000000000000000000000000000000
|
||||||
|
GIT binary patch
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
literal 1920
|
||||||
|
zcmexsUKJ6=z`*kC+7>q^21Q0O1_p)_{ilon|NqLI8OvZIducK^<D#q<ONrmzr7PMy
|
||||||
|
z=Re+dD(FN^i0Z8=QGYU3)3SOsKNYUE<teKW$h*z@Da6KG##!?D_SzK}=ewS=QwkRf
|
||||||
|
zxzbX}@_f!Z)%e<woF9|fYR|0lp0G0f`-gY``AxPJey<QwNW16%FSdP&)8+C%F~2I4
|
||||||
|
z{_B6tP6!P7a!FyfvS6dFJIf=9>Ecg5@jkusTr=nRy9*!Bn(bM`eR*oT<-}u76EuU~
|
||||||
|
zr&{jenxVc;S-qm~ZIsPAhf|HgcYYYo_5QBSWhxk^uDJZlk@ka|=4h`oy~sXG;MryA
|
||||||
|
zIO|(4yiWFOUJ0<66IC1R`kF;$<I9dcO@CDFABkD|MgDka?b)(bopIG?ZiRV5-5
|
||||||
|
z&wrJCJMneM`)PcKG6n8Gn6muo+=$TV!;Z6dyb-VXef4neVW0EN5;oQihkrbEc=K@o
|
||||||
|
zx0jV2|I?>O2rLg_J2GWu-_F>bn|D|)EpJ!*v${KQj{VzR>(-u`|K~x`ZzH*T0p2&o
|
||||||
|
zI-4YzQ@78Q>MqMUn_j_J&?R}Ab%JX4g_GgC#kn_Er2N@;{G{oT!>g3%?{7LTl&~r1
|
||||||
|
z*sPkJ_H4EL-ks8A5cG>Zb+_(`db`H=OHtd`KiM;({>U6}*_GC3*O{IFD%<~0_S{B}
|
||||||
|
zIAt^L!kb^-#2H7;7G8c(H`jXWaenqoR^eP0x0jjMz0;S=ntyt=$t<^43C^Wa`_>-0
|
||||||
|
zn)7LCqnV7@rul}KIZjS|we9MTwfEKjD!a`sVqAVcbjH02iV_QaLoQ$Lm6>2)J5?)m
|
||||||
|
z+4ZM<_KLr<4xZ|{k^g93P-0R3!R;b!3l;9v+iG1rUa|31OFLJ<z4Fz~B8qtzuU37w
|
||||||
|
z6A4Z#TNC-@X*4Ux&*Qh&{`noGU2;|~TEXe(-C)}vnkk&t4X3qo?r*jJaAdDu{3?Ds
|
||||||
|
z?=+_g!hHV)CjTg`i2T8Q_Wx83H~y7>YVQ4>WuO;!puhEVbK`;3BdWnazD_hVWL>)9
|
||||||
|
zUH-uWUw59169reTO_1GnZlk(HOk~^3w4jK6F9(a&E)Q>o&j0_BF`3~_aq#lL`_|PM
|
||||||
|
zO3mNiYnWFsZ@F^(8;#Sg7pKnXs?(bINxk&D<N>xBzBB&bSbuc_Kc+u-9hd96{dU62
|
||||||
|
zdy9&v9!&J;nWpuKafAQ2KRiy8H+G)6azfr>>9!ZUEsJ{hn{EH;vMu55vVwblapfAb
|
||||||
|
zxMqapUGF~CVIOb!`-J}sVcYGG8+IwL_`%kF^K1PzUTOPUszzJx7yZuII0hq?niBJy
|
||||||
|
ztHO<bZHoEeb??p39f4v$CnZ^ZH?w&9HG2Bb3&qh5R7@FV8>i*X|1ZF(LqR~lKc93~
|
||||||
|
zM{UwbNSDCeSh)377bwKEDG0HlkOiq$@C5SPZ)#xt%D~Ft{N&Fs28N&OuDBU3?>)l6
|
||||||
|
bc!#f{p@D_bU0QSFk@Vk8z<QQ}B{B*CjfKee
|
||||||
|
|
||||||
|
diff --git a/tests/ts/blkid/images-pt/atari-primary.img.xz b/tests/ts/blkid/images-pt/atari-primary.img.xz
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000000000000000000000000000..6f915fa8ad96578f32b0daeeb92d438046482478
|
||||||
|
GIT binary patch
|
||||||
|
literal 932
|
||||||
|
zcmexsUKJ6=z`*kC+7>q^21Q0O1_p)_{ilon|NG21IhKJT|L>o5D`zuK%~gJC<+=Ii
|
||||||
|
zjxFDrre11~o8UX~^*sr`-ND)CA`-a`g{vlPsQ4ms_SS~eoI5Q;loOk08+!D2evoWh
|
||||||
|
za^cV`_b30BuKD=6`BwT2=4;0@BCk29bN`)lS>&4=``*}-hYFe|Np9+Tq~OEO|Ip}x
|
||||||
|
zJ4;5zolM)LTaTWs>#-B)sg`FET(veqcGtO$>Jl-LZ7<V;BKEy3TNC-@X*4Ux&*Qh&
|
||||||
|
z{`noGU2;|~TEXe(-C)}vnkk&t4X3qo?r*jJaAdDu{3?Ds?=+_g!hHV)CjTg`i2T8Q
|
||||||
|
z_Wx83H~y7>YVQ4>WuO;!puhEVbK`;3BdWnazD_hVWL>)9UH-uWUw59169<{qE8fUY
|
||||||
|
zo&R5eQJdjSaq#lL`_|PMO3mNiYnWFsZ@F^(8;#Sg7pKnXs?(bINxk&D<N>xBzBB&b
|
||||||
|
zSbuc_{}AvSO=2{V-+t2s#$OCG2V;Pp`LJObFuO6V(c5<Fu|Ufz2FCwv4GjmFGA4R9
|
||||||
|
PZak9yn+YVz5*Y;mtR2mT
|
||||||
|
|
||||||
|
literal 0
|
||||||
|
HcmV?d00001
|
||||||
|
|
||||||
|
diff --git a/tests/ts/blkid/images-pt/atari-xgm.img.xz b/tests/ts/blkid/images-pt/atari-xgm.img.xz
|
||||||
|
index bc2b8f94a77f5015ef7f91bb8acdc9950c8be7ad..a98c02de943eb1f70c5d09b7812fd237b0facb1b 100644
|
||||||
|
GIT binary patch
|
||||||
|
delta 254
|
||||||
|
zcmV<a00IAi54;DE8h=*-t6cy9Z~gqPsha_nZ6oD6NwupI8`mp<%bF(xLvD5Rc8W7`
|
||||||
|
zX)WzPD$MTS!%B(|Y-}5#$Apx#1e(KC*{Pqmx)SsG9Xw0f%eaQXL!_kre&U)tNOpTG
|
||||||
|
z*`SUYP}mJ59xhhp;RT@IihuacmkuJPZKAP=s%k;MCh}UW4>G(m3T!1071TaDPc176
|
||||||
|
z%r3#|+u3QZtfaEW{3%z$%QU-cGO>PfMsWxu0c{gkG*2F%lPd=M1Y0KMdb1z~F#!dT
|
||||||
|
z0hR!nlZ*pGlY9kID9q|Q?7#p305pfRGwmY1>Hq<k2Y`UU0`E1BSh2)s`vL#}000D8
|
||||||
|
ET8n^h+5i9m
|
||||||
|
|
||||||
|
delta 911
|
||||||
|
zcmV;A191Gj2Y?Td8h`ZzXk7p_9nzBv0itSzIT-tkb*P7lpX0X5Qpj9XCEAo){And-
|
||||||
|
zYK<xKajiWJc6bnO+XeDeJWCuy8RxfssL`KA%041j5>(WLc?9R2t|ec6RBZT@27Sz`
|
||||||
|
zOOUBo_werj4>Y!M_jnW_X5LT!U5BJX(|7z_`gvmiFY#+&QGZnQ(jc275rI8N1mYN%
|
||||||
|
z7v%B{<<#dXY{%}<@y#~8tP9hXhdGhPLXas^?`1i>3YaIhBPV!{?OHspK+1tr-1sq_
|
||||||
|
zOZO`ZH4#=PA*a;DhrzO(E3P%s2bvJ((;Hqp+UQEjk15npIGkF2Q$_0pB(dp;yn_5C
|
||||||
|
zKjIcSPFeWwJAX-pwI>0p^9vxJ5{vOrh0paF?UCzL@0Je2X%OGwl&9sLSXEoYL7KSi
|
||||||
|
z7kK;C!)?P%&jT1dJAlLZ<v{G=zxL^Qi2rAoSP-XF2E>%9j=5dAv$#2>cZVkYtBX;b
|
||||||
|
zKkd4%t<0bN;Bxyi9^Oz(*%pa{7z1UunHr0BY|UqQ4u5cp8OsHbC2P>hSGyMrvv_3u
|
||||||
|
zzQ@Tm#KWp1pTB~~5@51y#+rP&KL&li?#e9y5l&so-G1aJhbZ^bTDPy{ypVsyoJ$?4
|
||||||
|
zJI$^(&-ERT{vFP-2wo#L3vt=>>|Qfkn-izOEp0os#}5b6I#&uf+o6-(AknAKCP^m+
|
||||||
|
zEB^#2tYI)UL`(v`beQMaSJV*sS*EXE2$I<^GcOj!0Hii26j3aN*&gGTU5Zv+1i&@u
|
||||||
|
zjId2o5C}?3I%5GFBrU@lP*l(vtk2>ZTe5<OTkisoMjv{FPqwYL0GjR*a@n;|`0^i<
|
||||||
|
zKLLl6&;loud;(qxcU-f=pa1azVUhzvSGva@irejwsotqou2fu#X_{6NcY&beo68>f
|
||||||
|
z$zE{PRc+w5GMeW^E4f@oa+%ryKCLFeKmd=m8Cq32;k}|hR%L!j^w4xxgPa6z%)Qy@
|
||||||
|
zimjI||1RsAlMMk+M<v-$($uIxLJsc(-~zF}Sj>(8o4AFk??@Qc3})r~lth`4dR`1>
|
||||||
|
z^;L1tHfbGi`%8!rY(mS3KU@Hh&`z%=D3oy@J&z>elMn+h2}%2(tDpZ60W6XOI|uL2
|
||||||
|
zV$Ccjl9Rv!H<Nq<dy{+uH3@OG>WZKL5CJQa1C*2A0vVHh0)H=n0rda{07K;b`Tzg`
|
||||||
|
l001+77wRp|PznG6*$#k!fCRGE)_JkSXZr#G00004Sz1dOv2XwY
|
||||||
|
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
55
SOURCES/0084-tests-update-atari-partx-tests.patch
Normal file
55
SOURCES/0084-tests-update-atari-partx-tests.patch
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
From cf74ece6486dabfd4b84c90435348c04ff72ef54 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
Date: Tue, 13 Oct 2020 18:34:39 +0200
|
||||||
|
Subject: tests: update atari partx tests
|
||||||
|
|
||||||
|
Upstream: http://github.com/util-linux/util-linux/commit/017c0308c7d3b0d84bfc11e5863220bc32d640ba
|
||||||
|
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2060030
|
||||||
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
tests/expected/partx/partx-image-atari-icd | 7 -------
|
||||||
|
tests/expected/partx/partx-image-atari-primary | 2 ++
|
||||||
|
tests/expected/partx/partx-image-atari-xgm | 10 +++-------
|
||||||
|
3 files changed, 5 insertions(+), 14 deletions(-)
|
||||||
|
delete mode 100644 tests/expected/partx/partx-image-atari-icd
|
||||||
|
create mode 100644 tests/expected/partx/partx-image-atari-primary
|
||||||
|
|
||||||
|
diff --git a/tests/expected/partx/partx-image-atari-icd b/tests/expected/partx/partx-image-atari-icd
|
||||||
|
deleted file mode 100644
|
||||||
|
index 8677dff03..000000000
|
||||||
|
--- a/tests/expected/partx/partx-image-atari-icd
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,7 +0,0 @@
|
||||||
|
-NR START END SECTORS SIZE NAME UUID
|
||||||
|
- 1 65 4096 4032 2M
|
||||||
|
- 2 4097 5000 904 452K
|
||||||
|
- 4 12289 16384 4096 2M
|
||||||
|
- 5 5002 7000 1999 999.5K
|
||||||
|
- 6 7003 10240 3238 1.6M
|
||||||
|
- 7 10241 12288 2048 1M
|
||||||
|
diff --git a/tests/expected/partx/partx-image-atari-primary b/tests/expected/partx/partx-image-atari-primary
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..044d319be
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/expected/partx/partx-image-atari-primary
|
||||||
|
@@ -0,0 +1,2 @@
|
||||||
|
+NR START END SECTORS SIZE NAME UUID
|
||||||
|
+ 1 2 10239 10238 5M
|
||||||
|
diff --git a/tests/expected/partx/partx-image-atari-xgm b/tests/expected/partx/partx-image-atari-xgm
|
||||||
|
index 248d6a56a..557327c04 100644
|
||||||
|
--- a/tests/expected/partx/partx-image-atari-xgm
|
||||||
|
+++ b/tests/expected/partx/partx-image-atari-xgm
|
||||||
|
@@ -1,7 +1,3 @@
|
||||||
|
-NR START END SECTORS SIZE NAME UUID
|
||||||
|
- 1 65 4096 4032 2M
|
||||||
|
- 2 4097 5000 904 452K
|
||||||
|
- 3 5002 7000 1999 999.5K
|
||||||
|
- 4 7003 10240 3238 1.6M
|
||||||
|
- 5 10241 12288 2048 1M
|
||||||
|
- 6 12289 16384 4096 2M
|
||||||
|
+NR START END SECTORS SIZE NAME UUID
|
||||||
|
+ 1 2 10 9 4.5K
|
||||||
|
+ 2 14 10239 10226 5M
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
1
SOURCES/uuidd-tmpfiles.conf
Normal file
1
SOURCES/uuidd-tmpfiles.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
d /run/uuidd 2775 uuidd uuidd
|
@ -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: 34%{?dist}
|
Release: 38%{?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
|
||||||
@ -53,6 +53,7 @@ Source2: util-linux-remote.pamd
|
|||||||
Source3: util-linux-chsh-chfn.pamd
|
Source3: util-linux-chsh-chfn.pamd
|
||||||
Source4: util-linux-60-raw.rules
|
Source4: util-linux-60-raw.rules
|
||||||
Source5: adjtime
|
Source5: adjtime
|
||||||
|
Source6: uuidd-tmpfiles.conf
|
||||||
Source12: util-linux-su.pamd
|
Source12: util-linux-su.pamd
|
||||||
Source13: util-linux-su-l.pamd
|
Source13: util-linux-su-l.pamd
|
||||||
Source14: util-linux-runuser.pamd
|
Source14: util-linux-runuser.pamd
|
||||||
@ -241,6 +242,24 @@ Patch72: 0072-blkid-check-device-type-and-name-before-probe.patch
|
|||||||
Patch73: 0073-blkid-don-t-print-all-devices-if-only-garbage-specif.patch
|
Patch73: 0073-blkid-don-t-print-all-devices-if-only-garbage-specif.patch
|
||||||
# 1950187 - Ambient capabilities failed to applied to non-root user even when correct rules are in /etc/security/capability.conf
|
# 1950187 - Ambient capabilities failed to applied to non-root user even when correct rules are in /etc/security/capability.conf
|
||||||
Patch74: 0074-Complete-Linux-PAM-compliance-for-forked-child-in-su.patch
|
Patch74: 0074-Complete-Linux-PAM-compliance-for-forked-child-in-su.patch
|
||||||
|
# 2058176 - losetup Retry LOOP_SET_STATUS64 on EAGAIN
|
||||||
|
Patch75: 0075-lib-loopdev-retry-LOOP_SET_STATUS64-and-LOOP_SET_BLO.patch
|
||||||
|
|
||||||
|
### RHEL-8.7
|
||||||
|
###
|
||||||
|
# 2060030 - Please backport patches for atari partition detection to RHEL 8
|
||||||
|
Patch76: 0076-libblkid-fix-Atari-prober-logic.patch
|
||||||
|
Patch77: 0077-libblkid-make-Atari-more-robust.patch
|
||||||
|
Patch78: 0078-libblkid-allow-a-lot-of-mac-partitions.patch
|
||||||
|
Patch79: 0079-libblkid-limit-amount-of-parsed-partitions.patch
|
||||||
|
Patch80: 0080-libblkid-mac-make-sure-block-size-is-large-enough-fu.patch
|
||||||
|
# 2069187 - Internal testsuite for lscpu failed on aarch64
|
||||||
|
Patch81: 0081-lscpu-don-t-read-from-HW-when-use-sys-snapshot.patch
|
||||||
|
# 2093166 - lslogins reports incorrect "Password is locked" status
|
||||||
|
Patch82: 0082-lslogins-improve-prefixes-interpretation.patch
|
||||||
|
# 2060030 - Please backport patches for atari partition detection to RHEL 8
|
||||||
|
Patch83: 0083-tests-update-atari-blkid-tests.patch
|
||||||
|
Patch84: 0084-tests-update-atari-partx-tests.patch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -477,9 +496,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
|
|||||||
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5}
|
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
|
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps}
|
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/var/log
|
mkdir -p ${RPM_BUILD_ROOT}%{_tmpfilesdir}
|
||||||
touch ${RPM_BUILD_ROOT}/var/log/lastlog
|
|
||||||
chmod 0664 ${RPM_BUILD_ROOT}/var/log/lastlog
|
|
||||||
|
|
||||||
# install util-linux
|
# install util-linux
|
||||||
make install DESTDIR=${RPM_BUILD_ROOT}
|
make install DESTDIR=${RPM_BUILD_ROOT}
|
||||||
@ -498,6 +515,7 @@ echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8
|
|||||||
mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw
|
mv ${RPM_BUILD_ROOT}%{_sbindir}/raw ${RPM_BUILD_ROOT}%{_bindir}/raw
|
||||||
|
|
||||||
# And a dirs uuidd needs that the makefiles don't create
|
# And a dirs uuidd needs that the makefiles don't create
|
||||||
|
install -m 644 %{SOURCE6} ${RPM_BUILD_ROOT}%{_tmpfilesdir}/uuidd.conf
|
||||||
install -d ${RPM_BUILD_ROOT}/run/uuidd
|
install -d ${RPM_BUILD_ROOT}/run/uuidd
|
||||||
install -d ${RPM_BUILD_ROOT}/var/lib/libuuid
|
install -d ${RPM_BUILD_ROOT}/var/lib/libuuid
|
||||||
|
|
||||||
@ -585,22 +603,6 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \
|
|||||||
-printf "%{_mandir}/man8/%f*\n" >> %{name}.files
|
-printf "%{_mandir}/man8/%f*\n" >> %{name}.files
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# only for minimal buildroots without /var/log
|
|
||||||
[ -d /var/log ] || mkdir -p /var/log
|
|
||||||
touch /var/log/lastlog
|
|
||||||
chown root:utmp /var/log/lastlog
|
|
||||||
chmod 0664 /var/log/lastlog
|
|
||||||
# Fix the file context, do not use restorecon
|
|
||||||
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
|
|
||||||
SECXT=$( /usr/sbin/matchpathcon -n /var/log/lastlog 2> /dev/null )
|
|
||||||
if [ -n "$SECXT" ]; then
|
|
||||||
# Selinux enabled, but without policy? It's true for buildroots
|
|
||||||
# without selinux stuff on host machine with enabled selinux.
|
|
||||||
# We don't want to use any RPM dependence on selinux policy for
|
|
||||||
# matchpathcon(2). SELinux policy should be optional.
|
|
||||||
/usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ ! -L /etc/mtab ]; then
|
if [ ! -L /etc/mtab ]; then
|
||||||
ln -sf ../proc/self/mounts /etc/mtab || :
|
ln -sf ../proc/self/mounts /etc/mtab || :
|
||||||
fi
|
fi
|
||||||
@ -678,7 +680,6 @@ fi
|
|||||||
%attr(755,root,root) %{_bindir}/login
|
%attr(755,root,root) %{_bindir}/login
|
||||||
%attr(2755,root,tty) %{_bindir}/write
|
%attr(2755,root,tty) %{_bindir}/write
|
||||||
|
|
||||||
%ghost %attr(0664,root,utmp) %verify(not md5 size mtime) /var/log/lastlog
|
|
||||||
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab
|
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab
|
||||||
|
|
||||||
%{_unitdir}/fstrim.*
|
%{_unitdir}/fstrim.*
|
||||||
@ -1021,6 +1022,7 @@ fi
|
|||||||
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
|
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
|
||||||
%dir %attr(2775, uuidd, uuidd) /run/uuidd
|
%dir %attr(2775, uuidd, uuidd) /run/uuidd
|
||||||
%{compldir}/uuidd
|
%{compldir}/uuidd
|
||||||
|
%{_tmpfilesdir}/uuidd.conf
|
||||||
|
|
||||||
|
|
||||||
%files -n libfdisk
|
%files -n libfdisk
|
||||||
@ -1107,6 +1109,22 @@ fi
|
|||||||
%{_libdir}/python*/site-packages/libmount/
|
%{_libdir}/python*/site-packages/libmount/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 22 2022 Karel Zak <kzak@redhat.com> 2.32.1-38
|
||||||
|
- improve tmpfiles.d use in spec file (related to #2059241)
|
||||||
|
|
||||||
|
* Fri Jul 15 2022 Karel Zak <kzak@redhat.com> 2.32.1-37
|
||||||
|
- update atari partition tests (related to #2060030)
|
||||||
|
|
||||||
|
* Thu Jul 14 2022 Karel Zak <kzak@redhat.com> 2.32.1-36
|
||||||
|
- fix #2060030 - Please backport patches for atari partition detection to RHEL 8
|
||||||
|
- fix #2069187 - Internal testsuite for lscpu failed on aarch64
|
||||||
|
- fix #2093166 - lslogins reports incorrect "Password is locked" status
|
||||||
|
- fix #2059241 - rpm -V / --verify reports bad user/group/mtime for /run/uuidd
|
||||||
|
- fix #2044592 - Move /var/log/lastlog ownership to systemd
|
||||||
|
|
||||||
|
* Tue Mar 08 2022 Karel Zak <kzak@redhat.com> 2.32.1-35
|
||||||
|
- fix #2058176 - losetup Retry LOOP_SET_STATUS64 on EAGAIN
|
||||||
|
|
||||||
* Mon Jan 17 2022 Karel Zak <kzak@redhat.com> 2.32.1-34
|
* Mon Jan 17 2022 Karel Zak <kzak@redhat.com> 2.32.1-34
|
||||||
- rebuild after revert
|
- rebuild after revert
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user