summaryrefslogtreecommitdiff
path: root/selinux
diff options
context:
space:
mode:
Diffstat (limited to 'selinux')
-rw-r--r--selinux/chcon.c20
-rw-r--r--selinux/runcon.c10
-rw-r--r--selinux/sestatus.c2
-rw-r--r--selinux/setfiles.c19
4 files changed, 26 insertions, 25 deletions
diff --git a/selinux/chcon.c b/selinux/chcon.c
index 88d0cfe..f947c2c 100644
--- a/selinux/chcon.c
+++ b/selinux/chcon.c
@@ -92,7 +92,7 @@ static int FAST_FUNC change_filedir_context(
if (specified_context == NULL) {
context = set_security_context_component(file_context,
- user, role, type, range);
+ user, role, type, range);
if (!context) {
bb_error_msg("can't compute security context from %s", file_context);
goto skip;
@@ -121,15 +121,15 @@ static int FAST_FUNC change_filedir_context(
}
if ((option_mask32 & OPT_VERBOSE) || ((option_mask32 & OPT_CHANHES) && !fail)) {
printf(!fail
- ? "context of %s changed to %s\n"
- : "can't change context of %s to %s\n",
- fname, context_string);
+ ? "context of %s changed to %s\n"
+ : "can't change context of %s to %s\n",
+ fname, context_string);
}
if (!fail) {
rc = TRUE;
} else if ((option_mask32 & OPT_QUIET) == 0) {
bb_error_msg("can't change context of %s to %s",
- fname, context_string);
+ fname, context_string);
}
} else if (option_mask32 & OPT_VERBOSE) {
printf("context of %s retained as %s\n", fname, context_string);
@@ -181,7 +181,7 @@ int chcon_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_FEATURE_CHCON_LONG_OPTIONS
if (option_mask32 & OPT_REFERENCE) {
/* FIXME: lgetfilecon() should be used when '-h' is specified.
- But current implementation follows the original one. */
+ * But current implementation follows the original one. */
if (getfilecon(reference_file, &specified_context) < 0)
bb_perror_msg_and_die("getfilecon('%s') failed", reference_file);
} else
@@ -201,10 +201,10 @@ int chcon_main(int argc UNUSED_PARAM, char **argv)
fname[fname_len] = '\0';
if (recursive_action(fname,
- 1<<option_mask32 & OPT_RECURSIVE,
- change_filedir_context,
- change_filedir_context,
- NULL, 0) != TRUE)
+ 1<<option_mask32 & OPT_RECURSIVE,
+ change_filedir_context,
+ change_filedir_context,
+ NULL, 0) != TRUE)
errors = 1;
}
return errors;
diff --git a/selinux/runcon.c b/selinux/runcon.c
index 3183a22..27f2be3 100644
--- a/selinux/runcon.c
+++ b/selinux/runcon.c
@@ -56,7 +56,7 @@
#include "libbb.h"
static context_t runcon_compute_new_context(char *user, char *role, char *type, char *range,
- char *command, int compute_trans)
+ char *command, int compute_trans)
{
context_t con;
security_context_t cur_context;
@@ -69,9 +69,9 @@ static context_t runcon_compute_new_context(char *user, char *role, char *type,
if (getfilecon(command, &file_context) < 0)
bb_error_msg_and_die("can't retrieve attributes of '%s'",
- command);
+ command);
if (security_compute_create(cur_context, file_context,
- SECCLASS_PROCESS, &new_context))
+ SECCLASS_PROCESS, &new_context))
bb_error_msg_and_die("unable to compute a new context");
cur_context = new_context;
}
@@ -147,11 +147,11 @@ int runcon_main(int argc UNUSED_PARAM, char **argv)
if (security_check_context(context_str(con)))
bb_error_msg_and_die("'%s' is not a valid context",
- context_str(con));
+ context_str(con));
if (setexeccon(context_str(con)))
bb_error_msg_and_die("can't set up security context '%s'",
- context_str(con));
+ context_str(con));
BB_EXECVP_or_die(argv);
}
diff --git a/selinux/sestatus.c b/selinux/sestatus.c
index 0bd1a0d..e594318 100644
--- a/selinux/sestatus.c
+++ b/selinux/sestatus.c
@@ -41,7 +41,7 @@ static void display_boolean(void)
if (pending < 0)
goto skip;
printf(COL_FMT "%s",
- bools[i], active == 0 ? "off" : "on");
+ bools[i], active == 0 ? "off" : "on");
if (active != pending)
printf(" (%sactivate pending)", pending == 0 ? "in" : "");
bb_putchar('\n');
diff --git a/selinux/setfiles.c b/selinux/setfiles.c
index ca3fd93..0173db9 100644
--- a/selinux/setfiles.c
+++ b/selinux/setfiles.c
@@ -498,10 +498,11 @@ static int process_one(char *name)
if (S_ISDIR(sb.st_mode) && recurse) {
if (recursive_action(name,
- ACTION_RECURSE,
- apply_spec,
- apply_spec,
- NULL, 0) != TRUE) {
+ ACTION_RECURSE,
+ apply_spec,
+ apply_spec,
+ NULL, 0) != TRUE
+ ) {
bb_error_msg("error while labeling %s", name);
goto err;
}
@@ -584,7 +585,7 @@ int setfiles_main(int argc UNUSED_PARAM, char **argv)
flags = getopt32(argv, "de:f:ilnpqr:svo:FW"
IF_FEATURE_SETFILES_CHECK_OPTION("c:"),
&exclude_dir, &input_filename, &rootpath, &out_filename,
- IF_FEATURE_SETFILES_CHECK_OPTION(&policyfile,)
+ IF_FEATURE_SETFILES_CHECK_OPTION(&policyfile,)
&verbose);
}
argv += optind;
@@ -600,8 +601,8 @@ int setfiles_main(int argc UNUSED_PARAM, char **argv)
fclose(policystream);
/* Only process the specified file_contexts file, not
- any .homedirs or .local files, and do not perform
- context translations. */
+ * any .homedirs or .local files, and do not perform
+ * context translations. */
set_matchpathcon_flags(MATCHPATHCON_BASEONLY |
MATCHPATHCON_NOTRANS |
MATCHPATHCON_VALIDATE);
@@ -631,8 +632,8 @@ int setfiles_main(int argc UNUSED_PARAM, char **argv)
if (applet_name[0] == 's') { /* setfiles */
/* Use our own invalid context checking function so that
- we can support either checking against the active policy or
- checking against a binary policy file. */
+ * we can support either checking against the active policy or
+ * checking against a binary policy file. */
set_matchpathcon_canoncon(&canoncon);
if (!argv[0])
bb_show_usage();