Use a flag bit in struct command_details for selinux instead of a separate
field.
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user