diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-02-24 17:28:43 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-02-24 17:28:43 +0100 |
commit | 6554d03735e394c613ebacfe6b8d7b239e164310 (patch) | |
tree | e9cbf34063d2350aa1da8aeec4d9c53b13216ab7 | |
parent | a2796223cb1ffce77fdf75754b6052be32425692 (diff) | |
download | busybox-w32-6554d03735e394c613ebacfe6b8d7b239e164310.tar.gz busybox-w32-6554d03735e394c613ebacfe6b8d7b239e164310.tar.bz2 busybox-w32-6554d03735e394c613ebacfe6b8d7b239e164310.zip |
sysctl: do not error out showing write-only data. Closes 6386
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | procps/sysctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/procps/sysctl.c b/procps/sysctl.c index c6a1de21d..f0883f054 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c | |||
@@ -129,6 +129,9 @@ static int sysctl_act_on_setting(char *setting) | |||
129 | 129 | ||
130 | if (fd < 0) { | 130 | if (fd < 0) { |
131 | switch (errno) { | 131 | switch (errno) { |
132 | case EACCES: | ||
133 | /* Happens for write-only settings, e.g. net.ipv6.route.flush */ | ||
134 | goto end; | ||
132 | case ENOENT: | 135 | case ENOENT: |
133 | if (option_mask32 & FLAG_SHOW_KEY_ERRORS) | 136 | if (option_mask32 & FLAG_SHOW_KEY_ERRORS) |
134 | bb_error_msg("error: '%s' is an unknown key", outname); | 137 | bb_error_msg("error: '%s' is an unknown key", outname); |