mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Allow SELinux support to be disabled via the sudoers file.
Defaults to true if sudo is built with SELinux support and SELinux is not disabled on the system.
This commit is contained in:
@@ -839,11 +839,11 @@ sudoers_policy_store_result(bool accepted, char *argv[], char *envp[],
|
||||
}
|
||||
#endif /* HAVE_LOGIN_CAP_H */
|
||||
#ifdef HAVE_SELINUX
|
||||
if (user_role != NULL) {
|
||||
if (def_selinux && user_role != NULL) {
|
||||
if ((command_info[info_len++] = sudo_new_key_val("selinux_role", user_role)) == NULL)
|
||||
goto oom;
|
||||
}
|
||||
if (user_type != NULL) {
|
||||
if (def_selinux && user_type != NULL) {
|
||||
if ((command_info[info_len++] = sudo_new_key_val("selinux_type", user_type)) == NULL)
|
||||
goto oom;
|
||||
}
|
||||
|
Reference in New Issue
Block a user