!99 fix optional arguments parsing
From: @shangyibin Reviewed-by: @openeuler-basic Signed-off-by: @openeuler-basic
This commit is contained in:
commit
25ff99442f
31
backport-prlimit-fix-optional-arguments-parsing.patch
Normal file
31
backport-prlimit-fix-optional-arguments-parsing.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 1ad8db5521ec03d41a058674437f648d15ef8344 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Karel Zak <kzak@redhat.com>
|
||||||
|
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 <kzak@redhat.com>
|
||||||
|
---
|
||||||
|
sys-utils/prlimit.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
|
||||||
|
index 6078490..17db3d8 100644
|
||||||
|
--- a/sys-utils/prlimit.c
|
||||||
|
+++ b/sys-utils/prlimit.c
|
||||||
|
@@ -451,6 +451,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);
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: util-linux
|
Name: util-linux
|
||||||
Version: 2.35.2
|
Version: 2.35.2
|
||||||
Release: 10
|
Release: 11
|
||||||
Summary: A random collection of Linux utilities
|
Summary: A random collection of Linux utilities
|
||||||
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
|
||||||
URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
|
URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
|
||||||
@ -61,6 +61,7 @@ Patch6000: backport-CVE-2021-37600.patch
|
|||||||
Patch6001: backport-add-ul_strtou64.patch
|
Patch6001: backport-add-ul_strtou64.patch
|
||||||
Patch6002: backport-CVE-2021-3995.patch
|
Patch6002: backport-CVE-2021-3995.patch
|
||||||
Patch6003: backport-CVE-2021-3996.patch
|
Patch6003: backport-CVE-2021-3996.patch
|
||||||
|
Patch6004: backport-prlimit-fix-optional-arguments-parsing.patch
|
||||||
|
|
||||||
Patch9000: Add-check-to-resolve-uname26-version-test-failed.patch
|
Patch9000: Add-check-to-resolve-uname26-version-test-failed.patch
|
||||||
Patch9001: modify-rescuemode-chinese-error.patch
|
Patch9001: modify-rescuemode-chinese-error.patch
|
||||||
@ -410,7 +411,13 @@ fi
|
|||||||
%{_mandir}/man8/{swapoff.8*,swapon.8*,switch_root.8*,umount.8*,wdctl.8.gz,wipefs.8*,zramctl.8*}
|
%{_mandir}/man8/{swapoff.8*,swapon.8*,switch_root.8*,umount.8*,wdctl.8.gz,wipefs.8*,zramctl.8*}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Feb 15 2021 shangyibin<shangyibin1@h-partners.com> - 2.35.2-10
|
* Wed Mar 16 2022 shangyibin<shangyibin1@h-partners.com> - 2.35.2-11
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:prlimit fix optional arguments parsing
|
||||||
|
|
||||||
|
* Tue Feb 15 2022 shangyibin<shangyibin1@h-partners.com> - 2.35.2-10
|
||||||
- Type:CVE
|
- Type:CVE
|
||||||
- ID:CVE-2021-3995 CVE-2021-3996
|
- ID:CVE-2021-3995 CVE-2021-3996
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user