← Commit list

6554d0373

Denys Vlasenko
Denys Vlasenko
2014-02-24
SUCCESS Duration: 142s

Subject

sysctl: do not error out showing write-only data. Closes 6386

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

procps/sysctl.c+3 -0
@@ -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);