Use a flag bit in struct command_details for selinux instead of a separate

field.
This commit is contained in:
Todd C. Miller
2010-06-09 16:25:44 -04:00
parent 4c1ef12648
commit 34613c8465
4 changed files with 7 additions and 7 deletions

View File

@@ -114,7 +114,7 @@ static int fork_cmnd(struct command_details *details, char *argv[],
if (details->closefrom >= 0)
closefrom(details->closefrom);
#ifdef HAVE_SELINUX
if (details->selinux_enabled)
if (ISSET(details->flags, CD_RBAC_ENABLED))
selinux_execve(details->command, argv, envp);
else
#endif
@@ -328,7 +328,7 @@ sudo_execve(struct command_details *details, char *argv[], char *envp[],
}
#ifdef HAVE_SELINUX
if (details->selinux_enabled) {
if (ISSET(details->flags, CD_RBAC_ENABLED)) {
/* This is probably not needed in log_io mode. */
if (selinux_restore_tty() != 0)
warningx("unable to restore tty label");