Add check for setkeycreatecon() when --with-selinux is specified.

This commit is contained in:
Todd C. Miller
2010-06-24 15:31:05 -04:00
parent d63f49bcac
commit 867ba48dbf
4 changed files with 64 additions and 14 deletions

View File

@@ -369,11 +369,13 @@ selinux_execve(const char *path, char *argv[], char *envp[])
return;
}
#ifdef HAVE_SETKEYCREATECON
if (setkeycreatecon(se_state.new_context)) {
warning("unable to set key creation context to %s", se_state.new_context);
if (se_state.enforcing)
return;
}
#endif /* HAVE_SETKEYCREATECON */
for (argc = 0; argv[argc] != NULL; argc++)
continue;