parent
347f43402c
commit
dff65e3e24
@ -0,0 +1,23 @@
|
|||||||
|
From 954ff2e2673cef48f0ed44668c466eab041db387 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Kopylov <pkopylov@cloudlinux.com>
|
||||||
|
Date: Wed, 17 May 2023 11:33:45 +0200
|
||||||
|
Subject: [PATCH] Fix an overflow which is still possible for some values.
|
||||||
|
diff --git a/common.c b/common.c
|
||||||
|
index 583a0ca..6d73b1b 100644
|
||||||
|
--- a/common.c
|
||||||
|
+++ b/common.c
|
||||||
|
@@ -1639,9 +1639,11 @@ int parse_values(char *strargv, unsigned char bitmap[], int max_val, const char
|
||||||
|
*/
|
||||||
|
void check_overflow(size_t val1, size_t val2, size_t val3)
|
||||||
|
{
|
||||||
|
- if ((unsigned long long) val1 *
|
||||||
|
- (unsigned long long) val2 *
|
||||||
|
- (unsigned long long) val3 > UINT_MAX) {
|
||||||
|
+if ((val1 != 0) && (val2 != 0) && (val3 != 0) &&
|
||||||
|
+ (((unsigned long long)UINT_MAX / (unsigned long long)val1 <
|
||||||
|
+ (unsigned long long)val2) ||
|
||||||
|
+ ((unsigned long long)UINT_MAX / ((unsigned long long)val1 *
|
||||||
|
+ (unsigned long long)val2) < (unsigned long long)val3))) {
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, "%s: Overflow detected (%llu). Aborting...\n",
|
||||||
|
__FUNCTION__,
|
@ -0,0 +1,34 @@
|
|||||||
|
From 370ad59826c2320288a1999ef9038e2a2655b8a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sebastien GODARD <sysstat@users.noreply.github.com>
|
||||||
|
Date: Thu, 22 Jun 2023 17:47:59 +0200
|
||||||
|
Subject: [PATCH] Add UMASK definition to sysstat(5) manual page (#362)
|
||||||
|
|
||||||
|
Explain UMASK variable in sysstat(5) manual page.
|
||||||
|
|
||||||
|
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
|
||||||
|
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
|
||||||
|
Upstream-commit: 370ad59826c2320288a1999ef9038e2a2655b8a0
|
||||||
|
---
|
||||||
|
man/sysstat.in | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/man/sysstat.in b/man/sysstat.in
|
||||||
|
index 6ce6b473..89bdd3f4 100644
|
||||||
|
--- a/man/sysstat.in
|
||||||
|
+++ b/man/sysstat.in
|
||||||
|
@@ -140,6 +140,15 @@ daily data files.
|
||||||
|
These options are used only when a new data file is created. They will be
|
||||||
|
ignored with an already existing one.
|
||||||
|
.TP
|
||||||
|
+.B UMASK
|
||||||
|
+.RB "The " "sa1" " and " "sa2"
|
||||||
|
+scripts generate system activity data and report files in the
|
||||||
|
+.IR /var/log/sa
|
||||||
|
+directory. By default the files are created with umask 0022
|
||||||
|
+and are therefore readable for all users. Change this variable to restrict
|
||||||
|
+the permissions on the files (e.g. use 0027 to adhere to more strict
|
||||||
|
+security standards).
|
||||||
|
+.TP
|
||||||
|
.B YESTERDAY
|
||||||
|
.RB "By default " "sa2"
|
||||||
|
script generates yesterday's summary, since the
|
Loading…
Reference in new issue