diff options
Diffstat (limited to 'selinux/chcon.c')
-rw-r--r-- | selinux/chcon.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/selinux/chcon.c b/selinux/chcon.c index 88d0cfec6..f947c2c12 100644 --- a/selinux/chcon.c +++ b/selinux/chcon.c | |||
@@ -92,7 +92,7 @@ static int FAST_FUNC change_filedir_context( | |||
92 | 92 | ||
93 | if (specified_context == NULL) { | 93 | if (specified_context == NULL) { |
94 | context = set_security_context_component(file_context, | 94 | context = set_security_context_component(file_context, |
95 | user, role, type, range); | 95 | user, role, type, range); |
96 | if (!context) { | 96 | if (!context) { |
97 | bb_error_msg("can't compute security context from %s", file_context); | 97 | bb_error_msg("can't compute security context from %s", file_context); |
98 | goto skip; | 98 | goto skip; |
@@ -121,15 +121,15 @@ static int FAST_FUNC change_filedir_context( | |||
121 | } | 121 | } |
122 | if ((option_mask32 & OPT_VERBOSE) || ((option_mask32 & OPT_CHANHES) && !fail)) { | 122 | if ((option_mask32 & OPT_VERBOSE) || ((option_mask32 & OPT_CHANHES) && !fail)) { |
123 | printf(!fail | 123 | printf(!fail |
124 | ? "context of %s changed to %s\n" | 124 | ? "context of %s changed to %s\n" |
125 | : "can't change context of %s to %s\n", | 125 | : "can't change context of %s to %s\n", |
126 | fname, context_string); | 126 | fname, context_string); |
127 | } | 127 | } |
128 | if (!fail) { | 128 | if (!fail) { |
129 | rc = TRUE; | 129 | rc = TRUE; |
130 | } else if ((option_mask32 & OPT_QUIET) == 0) { | 130 | } else if ((option_mask32 & OPT_QUIET) == 0) { |
131 | bb_error_msg("can't change context of %s to %s", | 131 | bb_error_msg("can't change context of %s to %s", |
132 | fname, context_string); | 132 | fname, context_string); |
133 | } | 133 | } |
134 | } else if (option_mask32 & OPT_VERBOSE) { | 134 | } else if (option_mask32 & OPT_VERBOSE) { |
135 | printf("context of %s retained as %s\n", fname, context_string); | 135 | printf("context of %s retained as %s\n", fname, context_string); |
@@ -181,7 +181,7 @@ int chcon_main(int argc UNUSED_PARAM, char **argv) | |||
181 | #if ENABLE_FEATURE_CHCON_LONG_OPTIONS | 181 | #if ENABLE_FEATURE_CHCON_LONG_OPTIONS |
182 | if (option_mask32 & OPT_REFERENCE) { | 182 | if (option_mask32 & OPT_REFERENCE) { |
183 | /* FIXME: lgetfilecon() should be used when '-h' is specified. | 183 | /* FIXME: lgetfilecon() should be used when '-h' is specified. |
184 | But current implementation follows the original one. */ | 184 | * But current implementation follows the original one. */ |
185 | if (getfilecon(reference_file, &specified_context) < 0) | 185 | if (getfilecon(reference_file, &specified_context) < 0) |
186 | bb_perror_msg_and_die("getfilecon('%s') failed", reference_file); | 186 | bb_perror_msg_and_die("getfilecon('%s') failed", reference_file); |
187 | } else | 187 | } else |
@@ -201,10 +201,10 @@ int chcon_main(int argc UNUSED_PARAM, char **argv) | |||
201 | fname[fname_len] = '\0'; | 201 | fname[fname_len] = '\0'; |
202 | 202 | ||
203 | if (recursive_action(fname, | 203 | if (recursive_action(fname, |
204 | 1<<option_mask32 & OPT_RECURSIVE, | 204 | 1<<option_mask32 & OPT_RECURSIVE, |
205 | change_filedir_context, | 205 | change_filedir_context, |
206 | change_filedir_context, | 206 | change_filedir_context, |
207 | NULL, 0) != TRUE) | 207 | NULL, 0) != TRUE) |
208 | errors = 1; | 208 | errors = 1; |
209 | } | 209 | } |
210 | return errors; | 210 | return errors; |