Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1396)

Unified Diff: content/zygote/zygote_linux.cc

Issue 14771026: Linux: remove unmaintained SELinux code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/zygote/zygote_main_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/zygote/zygote_linux.cc
diff --git a/content/zygote/zygote_linux.cc b/content/zygote/zygote_linux.cc
index 5d26a0535619971c950e0ed454b53b555f9d24ce..893002281218e863a33bfeca97cab5f949d23efe 100644
--- a/content/zygote/zygote_linux.cc
+++ b/content/zygote/zygote_linux.cc
@@ -30,11 +30,6 @@
#include "ipc/ipc_channel.h"
#include "ipc/ipc_switches.h"
-#if defined(CHROMIUM_SELINUX)
-#include <selinux/context.h>
-#include <selinux/selinux.h>
-#endif
-
// See http://code.google.com/p/chromium/wiki/LinuxZygote
namespace content {
@@ -45,26 +40,6 @@ namespace {
void SIGCHLDHandler(int signal) {
}
-#if defined(CHROMIUM_SELINUX)
-void SELinuxTransitionToTypeOrDie(const char* type) {
- security_context_t security_context;
- if (getcon(&security_context))
- LOG(FATAL) << "Cannot get SELinux context";
-
- context_t context = context_new(security_context);
- context_type_set(context, type);
- const int r = setcon(context_str(context));
- context_free(context);
- freecon(security_context);
-
- if (r) {
- LOG(FATAL) << "dynamic transition to type '" << type << "' failed. "
- "(this binary has been built with SELinux support, but maybe "
- "the policies haven't been loaded into the kernel?)";
- }
-}
-#endif // CHROMIUM_SELINUX
-
} // namespace
const int Zygote::kMagicSandboxIPCDescriptor;
@@ -441,10 +416,6 @@ base::ProcessId Zygote::ReadArgsAndFork(const Pickle& pickle,
close(kZygoteIdFd); // Another socket from the browser.
base::GlobalDescriptors::GetInstance()->Reset(mapping);
-#if defined(CHROMIUM_SELINUX)
- SELinuxTransitionToTypeOrDie("chromium_renderer_t");
-#endif
-
// Reset the process-wide command line to our new command line.
CommandLine::Reset();
CommandLine::Init(0, NULL);
« no previous file with comments | « content/content_tests.gypi ('k') | content/zygote/zygote_main_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698