]> granicus.if.org Git - procps-ng/commitdiff
sysctl: Update previous patch for newlib
authorCraig Small <csmall@dropbear.xyz>
Wed, 15 Sep 2021 10:09:44 +0000 (20:09 +1000)
committerCraig Small <csmall@dropbear.xyz>
Wed, 15 Sep 2021 10:09:44 +0000 (20:09 +1000)
This change was cherry picked from old library branch but
missed the change to check the path.

References:
 commit 6389deca5bf667f5fab5912acde78ba8e0febbc7

sysctl.c

index 64676b2afc131e7e428a936d971b3b52d185408c..41806601dcf7f054a682224ac62ef4b835850b29 100644 (file)
--- 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) {