From c65687821a124c93717966e4bacf9561eab53f6f Mon Sep 17 00:00:00 2001 From: songkai Date: Fri, 26 Apr 2024 14:26:13 +0800 Subject: [PATCH] prlimit fix optional arguments parsing --- ...limit-fix-optional-arguments-parsing.patch | 31 +++++++++++++++++++ util-linux.spec | 8 +++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 0001-prlimit-fix-optional-arguments-parsing.patch diff --git a/0001-prlimit-fix-optional-arguments-parsing.patch b/0001-prlimit-fix-optional-arguments-parsing.patch new file mode 100644 index 0000000..1c91a50 --- /dev/null +++ b/0001-prlimit-fix-optional-arguments-parsing.patch @@ -0,0 +1,31 @@ +From 1ad8db5521ec03d41a058674437f648d15ef8344 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Thu, 18 Mar 2021 10:23:36 +0100 +Subject: [PATCH] prlimit: fix optional arguments parsing + + $ prlimit -f=100:100 + failed to parse FSIZE limit + +Fixes: https://github.com/karelzak/util-linux/issues/1265 +Signed-off-by: Karel Zak +--- + sys-utils/prlimit.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c +index c8c7d5c42..18601efd3 100644 +--- a/sys-utils/prlimit.c ++++ b/sys-utils/prlimit.c +@@ -453,6 +453,9 @@ static int parse_prlim(struct rlimit *lim, char *ops, size_t id) + rlim_t soft, hard; + int found = 0; + ++ if (ops && *ops == '=') ++ ops++; ++ + if (get_range(ops, &soft, &hard, &found)) + errx(EXIT_FAILURE, _("failed to parse %s limit"), + prlimit_desc[id].name); +-- +2.39.3 + diff --git a/util-linux.spec b/util-linux.spec index 45f1f04..aa4cda0 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -3,7 +3,7 @@ Summary: A collection of basic system utilities Name: util-linux Version: 2.32.1 -Release: 44%{anolis_release}%{?dist}.1 +Release: 45%{anolis_release}%{?dist}.1 License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain Group: System Environment/Base URL: http://en.wikipedia.org/wiki/Util-linux @@ -307,13 +307,14 @@ Patch1003: 1003-fix-lscpu-to-get-cpu-frequency-from-cpuinfo-on-arm64.patch Patch1004: 1004-util-linux-add-sw.patch +Patch2001: 0001-prlimit-fix-optional-arguments-parsing.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among others, Util-linux contains the fdisk configuration tool and the login program. - %package -n libfdisk Summary: Partitioning library for fdisk-like programs. Group: Development/Libraries @@ -1154,6 +1155,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Fri Apr 26 2024 Kai Song 2.32.1-45.0.1 +- [Bugfix]:prlimit fix optional arguments parsing + * Wed Apr 17 2024 Weitao Zhou 2.32.1-44.0.1 - [Patch] hwclock: better compatibility for both glibc2.28 and glibc2.31 - [Patch] lscpu: add Neoverse-N2 to ARM identifiers tables (flin@linux.alibaba.com) -- Gitee