run_shell.c: style fix

This commit is contained in:
Denis Vlasenko 2006-09-05 09:45:30 +00:00
parent d25a2645f5
commit 797b4d210d

View File

@ -41,27 +41,21 @@
#endif
#ifdef CONFIG_SELINUX
static security_context_t current_sid=NULL;
static security_context_t current_sid;
void
renew_current_security_context(void)
{
if (current_sid)
freecon(current_sid); /* Release old context */
getcon(&current_sid); /* update */
return;
}
void
set_current_security_context(security_context_t sid)
{
if (current_sid)
freecon(current_sid); /* Release old context */
current_sid = sid;
return;
}
#endif
@ -80,7 +74,7 @@ void run_shell ( const char *shell, int loginshell, const char *command, const c
for (args = additional_args; args && *args; args++)
additional_args_cnt++;
args = (const char **) xmalloc (sizeof (char *) * ( 4 + additional_args_cnt ));
args = xmalloc(sizeof(char*) * (4 + additional_args_cnt));
args[0] = bb_get_last_path_component(xstrdup(shell));
@ -95,9 +89,9 @@ void run_shell ( const char *shell, int loginshell, const char *command, const c
for (; *additional_args; ++additional_args)
args[argno++] = *additional_args;
}
args [argno] = 0;
args[argno] = NULL;
#ifdef CONFIG_SELINUX
if ( (current_sid) && (!setexeccon(current_sid)) ) {
if (current_sid && !setexeccon(current_sid)) {
freecon(current_sid);
execve(shell, (char **) args, environ);
} else