procps/0024-sysctl-system-loads-default-config-file.patch

42 lines
1.1 KiB
Diff
Raw Normal View History

From 7f6efed9bb85d1e212e06985ea3e06720f6ca949 Mon Sep 17 00:00:00 2001
From: Craig Small <csmall@enc.com.au>
Date: Fri, 27 Dec 2013 23:08:14 +1100
Subject: [PATCH] sysctl --system loads default config file
Commit cdca71e94506fbb921ab2c626be3ad05c4287498 fixed
the loading the sysctl.conf file, but had the logic
for checking the file exists reversed incorrectly.
---
NEWS | 4 ++++
sysctl.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git NEWS NEWS
index 287f867..1c710a3 100644
--- NEWS
+++ NEWS
@@ -1,3 +1,7 @@
+procps-ng-3.3.10
+----------------
+ * sysctl --system loads default config file - Debian #732920
+
procps-ng-3.3.9
---------------
* kernel namespaces support added to skill, pgrep, ps and top
diff --git sysctl.c sysctl.c
index bb3e6b7..33c9403 100644
--- sysctl.c
+++ sysctl.c
@@ -640,7 +640,7 @@ static int PreloadSystem(void)
}
- if (stat(DEFAULT_PRELOAD, &ts) < 0 && S_ISREG(ts.st_mode)) {
+ if (stat(DEFAULT_PRELOAD, &ts) < 0 || S_ISREG(ts.st_mode)) {
if (!Quiet)
printf(_("* Applying %s ...\n"), DEFAULT_PRELOAD);
rc |= Preload(DEFAULT_PRELOAD);
--
1.7.9.2