svn commit: trunk/busybox/libbb
vda at busybox.net
vda at busybox.net
Mon Sep 10 17:17:03 UTC 2007
Author: vda
Date: 2007-09-10 10:17:01 -0700 (Mon, 10 Sep 2007)
New Revision: 19814
Log:
run_shell: code shrink for selinux
Modified:
trunk/busybox/libbb/run_shell.c
Changeset:
Modified: trunk/busybox/libbb/run_shell.c
===================================================================
--- trunk/busybox/libbb/run_shell.c 2007-09-10 13:15:28 UTC (rev 19813)
+++ trunk/busybox/libbb/run_shell.c 2007-09-10 17:17:01 UTC (rev 19814)
@@ -39,15 +39,13 @@
void
renew_current_security_context(void)
{
- if (current_sid)
- freecon(current_sid); /* Release old context */
+ freecon(current_sid); /* Release old context */
getcon(¤t_sid); /* update */
}
void
set_current_security_context(security_context_t sid)
{
- if (current_sid)
- freecon(current_sid); /* Release old context */
+ freecon(current_sid); /* Release old context */
current_sid = sid;
}
@@ -84,10 +82,10 @@
}
args[argno] = NULL;
#if ENABLE_SELINUX
- if (current_sid && !setexeccon(current_sid)) {
+ if (current_sid)
+ setexeccon(current_sid);
+ if (ENABLE_FEATURE_CLEAN_UP)
freecon(current_sid);
- execve(shell, (char **) args, environ);
- } else
#endif
execv(shell, (char **) args);
bb_perror_msg_and_die("cannot run %s", shell);
More information about the busybox-cvs
mailing list