forked from pool/util-linux
Accepting request 808136 from home:mcalabkova:branches:Base:System
- Include pam_securetty in login.pamd again (bsc#1033626) - Update to 2.35.2 * make glibc 2.31 compatible - Dropped unneeded patch libfdisk-script-accept-sector-size.patch - Include pam_securetty in login.pamd again (bsc#1033626) - Update to 2.35.2 * make glibc 2.31 compatible - Dropped unneeded patch libfdisk-script-accept-sector-size.patch - Include pam_securetty in login.pamd again (bsc#1033626) - Update to 2.35.2 * make glibc 2.31 compatible - Dropped unneeded patch libfdisk-script-accept-sector-size.patch OBS-URL: https://build.opensuse.org/request/show/808136 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=430
This commit is contained in:
parent
b8b77fde7a
commit
20b1dd3c6f
@ -1,131 +0,0 @@
|
||||
From d8c68b52cc939a16f04ec976648a37f5f5de718c Mon Sep 17 00:00:00 2001
|
||||
From: Karel Zak <kzak@redhat.com>
|
||||
Date: Tue, 4 Feb 2020 15:11:19 +0100
|
||||
Subject: [PATCH] libfdisk: (script) accept sector-size, ignore unknown headers
|
||||
|
||||
- add sector-size between supported headers (already in --dump output)
|
||||
|
||||
- report unknown headers by -ENOTSUP
|
||||
|
||||
- ignore ENOTSUP in sfdisk (but print warning) and in fdisk_script_read_file()
|
||||
|
||||
Addresses: https://github.com/karelzak/util-linux/issues/949
|
||||
Signed-off-by: Karel Zak <kzak@redhat.com>
|
||||
---
|
||||
disk-utils/sfdisk.c | 6 +++++-
|
||||
libfdisk/src/script.c | 49 +++++++++++++++++++++++--------------------
|
||||
2 files changed, 31 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
|
||||
index 0db797b2d..e08862aa8 100644
|
||||
--- a/disk-utils/sfdisk.c
|
||||
+++ b/disk-utils/sfdisk.c
|
||||
@@ -1823,7 +1823,11 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
|
||||
}
|
||||
|
||||
rc = fdisk_script_read_line(dp, stdin, buf, sizeof(buf));
|
||||
- if (rc < 0) {
|
||||
+ if (rc == -ENOTSUP) {
|
||||
+ buf[sizeof(buf) - 1] = '\0';
|
||||
+ fdisk_warnx(sf->cxt, _("Unknown script header '%s' -- ignore."), buf);
|
||||
+ continue;
|
||||
+ } else if (rc < 0) {
|
||||
DBG(PARSE, ul_debug("script parsing failed, trying sfdisk specific commands"));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
rc = loop_control_commands(sf, dp, buf);
|
||||
diff --git a/libfdisk/src/script.c b/libfdisk/src/script.c
|
||||
index a21771b6a..d3e67fa9c 100644
|
||||
--- a/libfdisk/src/script.c
|
||||
+++ b/libfdisk/src/script.c
|
||||
@@ -805,8 +805,12 @@ static inline int is_header_line(const char *s)
|
||||
/* parses "<name>: value", note modifies @s*/
|
||||
static int parse_line_header(struct fdisk_script *dp, char *s)
|
||||
{
|
||||
- int rc = -EINVAL;
|
||||
+ size_t i;
|
||||
char *name, *value;
|
||||
+ static const char *supported[] = {
|
||||
+ "label", "unit", "label-id", "device", "grain",
|
||||
+ "first-lba", "last-lba", "table-length", "sector-size"
|
||||
+ };
|
||||
|
||||
DBG(SCRIPT, ul_debugobj(dp, " parse header '%s'", s));
|
||||
|
||||
@@ -816,7 +820,7 @@ static int parse_line_header(struct fdisk_script *dp, char *s)
|
||||
name = s;
|
||||
value = strchr(s, ':');
|
||||
if (!value)
|
||||
- goto done;
|
||||
+ return -EINVAL;
|
||||
*value = '\0';
|
||||
value++;
|
||||
|
||||
@@ -825,32 +829,30 @@ static int parse_line_header(struct fdisk_script *dp, char *s)
|
||||
ltrim_whitespace((unsigned char *) value);
|
||||
rtrim_whitespace((unsigned char *) value);
|
||||
|
||||
+ if (!*name || !*value)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ /* check header name */
|
||||
+ for (i = 0; i < ARRAY_SIZE(supported); i++) {
|
||||
+ if (strcmp(name, supported[i]) == 0)
|
||||
+ break;
|
||||
+ }
|
||||
+ if (i == ARRAY_SIZE(supported))
|
||||
+ return -ENOTSUP;
|
||||
+
|
||||
+ /* header specific actions */
|
||||
if (strcmp(name, "label") == 0) {
|
||||
if (dp->cxt && !fdisk_get_label(dp->cxt, value))
|
||||
- goto done; /* unknown label name */
|
||||
+ return -EINVAL; /* unknown label name */
|
||||
dp->force_label = 1;
|
||||
+
|
||||
} else if (strcmp(name, "unit") == 0) {
|
||||
if (strcmp(value, "sectors") != 0)
|
||||
- goto done; /* only "sectors" supported */
|
||||
- } else if (strcmp(name, "label-id") == 0
|
||||
- || strcmp(name, "device") == 0
|
||||
- || strcmp(name, "grain") == 0
|
||||
- || strcmp(name, "first-lba") == 0
|
||||
- || strcmp(name, "last-lba") == 0
|
||||
- || strcmp(name, "table-length") == 0) {
|
||||
- ; /* whatever is possible */
|
||||
- } else
|
||||
- goto done; /* unknown header */
|
||||
+ return -EINVAL; /* only "sectors" supported */
|
||||
|
||||
- if (*name && *value)
|
||||
- rc = fdisk_script_set_header(dp, name, value);
|
||||
-done:
|
||||
- if (rc)
|
||||
- DBG(SCRIPT, ul_debugobj(dp, "header parse error: "
|
||||
- "[rc=%d, name='%s', value='%s']",
|
||||
- rc, name, value));
|
||||
- return rc;
|
||||
+ }
|
||||
|
||||
+ return fdisk_script_set_header(dp, name, value);
|
||||
}
|
||||
|
||||
/* returns zero terminated string with next token and @str is updated */
|
||||
@@ -1363,7 +1365,8 @@ int fdisk_script_set_fgets(struct fdisk_script *dp,
|
||||
*
|
||||
* Reads next line into dump.
|
||||
*
|
||||
- * Returns: 0 on success, <0 on error, 1 when nothing to read.
|
||||
+ * Returns: 0 on success, <0 on error, 1 when nothing to read. For unknown headers
|
||||
+ * returns -ENOTSUP, it's usually safe to ignore this error.
|
||||
*/
|
||||
int fdisk_script_read_line(struct fdisk_script *dp, FILE *f, char *buf, size_t bufsz)
|
||||
{
|
||||
@@ -1428,7 +1431,7 @@ int fdisk_script_read_file(struct fdisk_script *dp, FILE *f)
|
||||
|
||||
while (!feof(f)) {
|
||||
rc = fdisk_script_read_line(dp, f, buf, sizeof(buf));
|
||||
- if (rc)
|
||||
+ if (rc && rc != -ENOTSUP)
|
||||
break;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#%PAM-1.0
|
||||
auth requisite pam_nologin.so
|
||||
auth [user_unknown=ignore success=ok ignore=ignore auth_err=die default=bad] pam_securetty.so
|
||||
auth include common-auth
|
||||
account include common-account
|
||||
password include common-password
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 21 12:48:40 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Include pam_securetty in login.pamd again (bsc#1033626)
|
||||
- Update to 2.35.2
|
||||
* make glibc 2.31 compatible
|
||||
- Dropped unneeded patch libfdisk-script-accept-sector-size.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 13 10:19:22 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
|
@ -122,7 +122,7 @@ BuildRequires: libmount-devel
|
||||
%endif
|
||||
%endif
|
||||
#END SECOND STAGE DEPENDENCIES
|
||||
Version: 2.35.1
|
||||
Version: 2.35.2
|
||||
Release: 0
|
||||
URL: https://www.kernel.org/pub/linux/utils/util-linux/
|
||||
Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.35/util-linux-%{version}.tar.xz
|
||||
@ -148,7 +148,6 @@ Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch
|
||||
Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
|
||||
Patch3: libeconf.patch
|
||||
Patch4: libmount-Avoid-triggering-autofs-in-lookup_umount_fs.patch
|
||||
Patch5: libfdisk-script-accept-sector-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#
|
||||
%if %build_util_linux
|
||||
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAl4z91YACgkQ5LcdXuw5
|
||||
woR+HBAAitw3A7hcWjYo+SPHRtPtLr8PwbdJMNohAtRkTBa11bBTypgJY6tHq0iU
|
||||
f3ny8XX+s9x65ccSOYtSyZRLjde5lliD53rOKSU32mjcgm7WVSSBavludf9JNRuE
|
||||
ou/JbN8zhWk0y/EdEoav5d27wpCSMb8QJNWItI79QJqRks1hKPXkZqXSoZv6fmhZ
|
||||
qUdGLoc7V90Xe3iLEQSSMi0PUkdXFyTBD0gEo7YIHhbTn6ElQZoUHCYKno7QHVUI
|
||||
b422K64X7jEeAw2EQFOuVZ7eruMswItrt6hUTp20ZfkBTcTf7r/dYTJPU8YAY5+a
|
||||
b0VWmd4cpFalCuifqeCwl9sufyVB61TN5NnSzM4vHLZukPIokZn9onKjWCfayze/
|
||||
aSoTH7h/CIiYg7IIgAGPMOquU76Uyrsun5M034x9wZ4lobNyP5MFsPNhAmqJz+I/
|
||||
c49FQWO7NhPDZKfAGajOK2jx33MopYtOxr2SyObFqBH8VhAGPdF1XYlC3HBYjQ44
|
||||
4uXTeJ5AtTFOEdOYiGtyztR9am4QVrl1GOaO/ZHLDWXI5HHNNrAuQ7lI0u7NP4BS
|
||||
mUqfOH+/AJL7srrgd0hWNGn7mnTQsHEIzt/cpZ+AfU93FQl8u7We4QQSjXMA3qPX
|
||||
TXu9F1aEg9z2do/m/uWeYI3b8d8sE2i0Unon91Cb291EN6h5RWw=
|
||||
=lzWN
|
||||
-----END PGP SIGNATURE-----
|
BIN
util-linux-2.35.1.tar.xz
(Stored with Git LFS)
BIN
util-linux-2.35.1.tar.xz
(Stored with Git LFS)
Binary file not shown.
16
util-linux-2.35.2.tar.sign
Normal file
16
util-linux-2.35.2.tar.sign
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEsMZNFDAcxu+u32Dk5LcdXuw5woQFAl7FNt8ACgkQ5LcdXuw5
|
||||
woROgQ//Q79zKa/HRJ7m7E03vK9c+XoPIh7olSXvaAjgGtenljIuPGZtRHlwDHh4
|
||||
ySmcapjKvthUXNTkReTIFTMqrvehIdJhd1fAQUKQip+9YlMAzCS+RJ+hYdiC8nQk
|
||||
I/3Id50G97zbgynAAzOWtp1rnjcg9GpX6hp4/ps7J0mlR7W67JNYYkcNoFp3mqze
|
||||
zp+06mYNUb22iitdrsMR1DBtx/yIlkKgqWhtxEWWILEZ7VcqhkjByA5rTUzRTTl5
|
||||
XuDLXphc1IA+unk/IR0k/aDdCqSPEO8KaNJVNld1mQbqKz7suz/PnpILcOTDLmNN
|
||||
MSbcCfb6IsSVF0Yd6pzGRtEHT+dtph3wdzNGIj4ynFBqgQ3NVgHRRirxxknQeRbh
|
||||
B1nejDlc+O+jueykc9lDGYgHxBwDn6JMQiuc+CM6XOwrGuroVy5LAjK/YYbsnZ2G
|
||||
0oshDNA8qo9zZdTLAq+s4o2zJLY1YtecL1e+119r64WEDZZptQEjZKcDVDZG34sU
|
||||
6iwOP4ELVdwEq9itQvXOSHQshM2o3ncyXmVIkQJec0+M+jbcJc4gqnYcKXCp8SAR
|
||||
/RJRnoXOb91HWrWbcSfIgEpSz7aHuEtcYizPAKWBx2gwPcsRCB2wa2y08S6jj+ej
|
||||
4oHmDNa4jt8Sj2jNtP2m8EF83X0srxoBQmikRjuXNOi9G7CwryA=
|
||||
=zKqm
|
||||
-----END PGP SIGNATURE-----
|
BIN
util-linux-2.35.2.tar.xz
(Stored with Git LFS)
Normal file
BIN
util-linux-2.35.2.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 21 12:48:40 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Include pam_securetty in login.pamd again (bsc#1033626)
|
||||
- Update to 2.35.2
|
||||
* make glibc 2.31 compatible
|
||||
- Dropped unneeded patch libfdisk-script-accept-sector-size.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 13 10:19:22 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
|
@ -122,7 +122,7 @@ BuildRequires: libmount-devel
|
||||
%endif
|
||||
%endif
|
||||
#END SECOND STAGE DEPENDENCIES
|
||||
Version: 2.35.1
|
||||
Version: 2.35.2
|
||||
Release: 0
|
||||
URL: https://www.kernel.org/pub/linux/utils/util-linux/
|
||||
Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.35/util-linux-%{version}.tar.xz
|
||||
@ -148,7 +148,6 @@ Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch
|
||||
Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
|
||||
Patch3: libeconf.patch
|
||||
Patch4: libmount-Avoid-triggering-autofs-in-lookup_umount_fs.patch
|
||||
Patch5: libfdisk-script-accept-sector-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#
|
||||
%if %build_util_linux
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 21 12:48:40 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Include pam_securetty in login.pamd again (bsc#1033626)
|
||||
- Update to 2.35.2
|
||||
* make glibc 2.31 compatible
|
||||
- Dropped unneeded patch libfdisk-script-accept-sector-size.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 13 10:19:22 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
|
@ -122,7 +122,7 @@ BuildRequires: libmount-devel
|
||||
%endif
|
||||
%endif
|
||||
#END SECOND STAGE DEPENDENCIES
|
||||
Version: 2.35.1
|
||||
Version: 2.35.2
|
||||
Release: 0
|
||||
URL: https://www.kernel.org/pub/linux/utils/util-linux/
|
||||
Source: https://www.kernel.org/pub/linux/utils/util-linux/v2.35/util-linux-%{version}.tar.xz
|
||||
@ -148,7 +148,6 @@ Patch1: libmount-print-a-blacklist-hint-for-unknown-filesyst.patch
|
||||
Patch2: Add-documentation-on-blacklisted-modules-to-mount-8-.patch
|
||||
Patch3: libeconf.patch
|
||||
Patch4: libmount-Avoid-triggering-autofs-in-lookup_umount_fs.patch
|
||||
Patch5: libfdisk-script-accept-sector-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#
|
||||
%if %build_util_linux
|
||||
|
Loading…
Reference in New Issue
Block a user