summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Small <csmall@dropbear.xyz>2021-09-15 20:09:44 +1000
committerCraig Small <csmall@dropbear.xyz>2021-09-15 20:09:44 +1000
commit2a7c909a1b2b35603dcfe7b39ce9dc809ee2d8be (patch)
tree11df0a4078e57a37b1d4b676a30b726b9875233b
parent6389deca5bf667f5fab5912acde78ba8e0febbc7 (diff)
downloadprocps-ng-2a7c909a1b2b35603dcfe7b39ce9dc809ee2d8be.tar.gz
sysctl: Update previous patch for newlib
This change was cherry picked from old library branch but missed the change to check the path. References: commit 6389deca5bf667f5fab5912acde78ba8e0febbc7
-rw-r--r--sysctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sysctl.c b/sysctl.c
index 64676b2..4180660 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -543,9 +543,8 @@ static int WriteSetting(
return rc;
}
- if (!is_proc_path(tmpname)) {
- rc = -1;
- goto out;
+ if (!is_proc_path(path)) {
+ return EXIT_FAILURE;
}
if ((ts.st_mode & S_IWUSR) == 0) {