From 4c0646b2d25849cac5229b2fb168bc43d2829167 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Wed, 30 Oct 2013 16:58:45 -0700 Subject: [PATCH] Bug 925571 - Build config for plugin_container windows sandboxing. r=bsmedberg --- ipc/app/Makefile.in | 10 +++++++++ ipc/glue/Makefile.in | 6 ++++++ security/sandbox/moz.build | 3 +++ .../sandbox/win/src/sandboxbroker/Makefile.in | 21 +++++++++++++++++++ .../sandbox/win/src/sandboxbroker/moz.build | 17 +++++++++++++++ toolkit/library/Makefile.in | 7 +++++++ 6 files changed, 64 insertions(+) create mode 100644 security/sandbox/win/src/sandboxbroker/Makefile.in create mode 100644 security/sandbox/win/src/sandboxbroker/moz.build diff --git a/ipc/app/Makefile.in b/ipc/app/Makefile.in index 935f9a45f320..6399fd2b3fb0 100644 --- a/ipc/app/Makefile.in +++ b/ipc/app/Makefile.in @@ -50,6 +50,16 @@ include $(topsrcdir)/config/rules.mk LDFLAGS += $(MOZ_ALLOW_HEAP_EXECUTE_FLAGS) ifeq ($(OS_ARCH),WINNT) #{ + +ifdef MOZ_CONTENT_SANDBOX +LIBS += ../../security/sandbox/$(LIB_PREFIX)sandbox_s.$(LIB_SUFFIX) +LIBS += $(NSPR_LIBS) +LOCAL_INCLUDES += \ + -I$(topsrcdir)/security/sandbox \ + -I$(topsrcdir)/security/ \ + $(NULL) +endif + # Note the manifest file exists in the tree, so we use the explicit filename # here. EXTRA_DEPS += plugin-container.exe.manifest diff --git a/ipc/glue/Makefile.in b/ipc/glue/Makefile.in index db14b2daa3a3..ca6b5ec22954 100644 --- a/ipc/glue/Makefile.in +++ b/ipc/glue/Makefile.in @@ -8,3 +8,9 @@ DEFINES += -DMOZ_CHILD_PROCESS_NAME=\"$(MOZ_CHILD_PROCESS_NAME)\" DEFINES += -DMOZ_CHILD_PROCESS_BUNDLE=\"$(MOZ_CHILD_PROCESS_BUNDLE)\" include $(topsrcdir)/config/rules.mk + +ifdef MOZ_CONTENT_SANDBOX +ifeq ($(OS_ARCH),WINNT) +LOCAL_INCLUDES += -I$(topsrcdir)/security/sandbox/win/src/sandboxbroker +endif +endif diff --git a/security/sandbox/moz.build b/security/sandbox/moz.build index 6b386953860f..28c144dda11e 100644 --- a/security/sandbox/moz.build +++ b/security/sandbox/moz.build @@ -13,6 +13,9 @@ elif CONFIG['OS_ARCH'] == 'WINNT': MODULE = 'sandbox' LIBRARY_NAME = 'sandbox_s' EXPORT_LIBRARY = True + FORCE_STATIC_LIB = True + + DIRS += ['win/src/sandboxbroker'] SOURCES += [ 'base/at_exit.cc', diff --git a/security/sandbox/win/src/sandboxbroker/Makefile.in b/security/sandbox/win/src/sandboxbroker/Makefile.in new file mode 100644 index 000000000000..5798c5244426 --- /dev/null +++ b/security/sandbox/win/src/sandboxbroker/Makefile.in @@ -0,0 +1,21 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +FORCE_SHARED_LIB = 1 +MOZ_GLUE_LDFLAGS = +STL_FLAGS = + +LOCAL_INCLUDES += \ + -I$(topsrcdir)/security \ + -I$(topsrcdir)/security/sandbox \ + $(NULL) + +SHARED_LIBRARY_LIBS += \ + ../../../$(LIB_PREFIX)sandbox_s.$(LIB_SUFFIX) \ + $(NSPR_LIBS) \ + $(NULL) + +OS_LIBS += $(call EXPAND_LIBNAME,dbghelp) + +DEFINES += -DUNICODE -D_UNICODE -DNS_NO_XPCOM -DNOMINMAX -DSANDBOX_EXPORTS diff --git a/security/sandbox/win/src/sandboxbroker/moz.build b/security/sandbox/win/src/sandboxbroker/moz.build new file mode 100644 index 000000000000..bad0179334d1 --- /dev/null +++ b/security/sandbox/win/src/sandboxbroker/moz.build @@ -0,0 +1,17 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +MODULE = 'sandboxbroker' +LIBRARY_NAME = 'sandboxbroker_s' +EXPORT_LIBRARY = True + +SOURCES += [ + 'sandboxBroker.cpp', +] + +EXPORTS += [ + 'sandboxBroker.h', +] diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 3746e7f20571..9f6177a42300 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -40,6 +40,13 @@ SHARED_LIBRARY_LIBS += \ $(NULL) endif +ifdef MOZ_CONTENT_SANDBOX +ifeq ($(OS_ARCH),WINNT) + LOCAL_INCLUDES += -I$(srcdir)/../sandboxbroker + SHARED_LIBRARY_LIBS += ../../security/sandbox/win/src/sandboxbroker/$(LIB_PREFIX)sandboxbroker_s.$(LIB_SUFFIX) +endif +endif + ifdef MOZ_XUL SHARED_LIBRARY_LIBS += $(DEPTH)/accessible/src/xul/$(LIB_PREFIX)accessibility_xul_s.$(LIB_SUFFIX) endif