From: Denys Vlasenko Date: Mon, 24 Feb 2014 16:28:43 +0000 (+0100) Subject: sysctl: do not error out showing write-only data. Closes 6386 X-Git-Tag: 1_23_0~180 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6554d03735e394c613ebacfe6b8d7b239e164310;p=oweals%2Fbusybox.git sysctl: do not error out showing write-only data. Closes 6386 Signed-off-by: Denys Vlasenko --- 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) if (fd < 0) { switch (errno) { + case EACCES: + /* Happens for write-only settings, e.g. net.ipv6.route.flush */ + goto end; case ENOENT: if (option_mask32 & FLAG_SHOW_KEY_ERRORS) bb_error_msg("error: '%s' is an unknown key", outname);