← Commit list

8f1ae2563

sagivd
sagivd
2018-09-03
SUCCESS Duration: 147s

Subject

chcon: fix issues with recurse and retval for retained files

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 →

selinux/chcon.c+5 -3
@@ -131,8 +131,10 @@ static int FAST_FUNC change_filedir_context(
bb_error_msg("can't change context of %s to %s",
fname, context_string);
}
- } else if (option_mask32 & OPT_VERBOSE) {
- printf("context of %s retained as %s\n", fname, context_string);
+ } else {
+ if (option_mask32 & OPT_VERBOSE) {
+ printf("context of %s retained as %s\n", fname, context_string);
+ }
rc = TRUE;
}
skip:
@@ -202,7 +204,7 @@ int chcon_main(int argc UNUSED_PARAM, char **argv)
fname[fname_len] = '\0';
if (recursive_action(fname,
- 1<<option_mask32 & OPT_RECURSIVE,
+ ((option_mask32 & OPT_RECURSIVE) ? ACTION_RECURSIVE : 0),
change_filedir_context,
change_filedir_context,
NULL, 0) != TRUE)