summaryrefslogtreecommitdiffstats
path: root/sandbox/mac/os_compatibility.h
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-16 02:05:42 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-16 02:05:42 +0000
commit795989f209fce2d73dd8dfda49bb13ba0c68f8d7 (patch)
treeece85ac18f91ebe14e9fcc043d69e936cf1f78ac /sandbox/mac/os_compatibility.h
parent83d82d4419b21feddd63fdec73c101881c077eb4 (diff)
downloadchromium_src-795989f209fce2d73dd8dfda49bb13ba0c68f8d7.zip
chromium_src-795989f209fce2d73dd8dfda49bb13ba0c68f8d7.tar.gz
chromium_src-795989f209fce2d73dd8dfda49bb13ba0c68f8d7.tar.bz2
Bootstrap Sandbox: Ensure swap_integer messages are read-only.
BUG=367863 Review URL: https://codereview.chromium.org/284153005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/mac/os_compatibility.h')
-rw-r--r--sandbox/mac/os_compatibility.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sandbox/mac/os_compatibility.h b/sandbox/mac/os_compatibility.h
index 2d9b096..aaedcb8c 100644
--- a/sandbox/mac/os_compatibility.h
+++ b/sandbox/mac/os_compatibility.h
@@ -21,6 +21,8 @@ namespace sandbox {
typedef std::string (*LookUp2GetRequestName)(const mach_msg_header_t*);
typedef void (*LookUp2FillReply)(mach_msg_header_t*, mach_port_t service_port);
+typedef bool (*SwapIntegerIsGetOnly)(const mach_msg_header_t*);
+
struct LaunchdCompatibilityShim {
// The msgh_id for look_up2.
mach_msg_id_t msg_id_look_up2;
@@ -35,6 +37,11 @@ struct LaunchdCompatibilityShim {
// A function to formulate a reply to a look_up2 message, given the reply
// message and the port to return as the service.
LookUp2FillReply look_up2_fill_reply;
+
+ // A function to take a swap_integer message and return true if the message
+ // is only getting the value of a key, neither setting it directly, nor
+ // swapping two keys.
+ SwapIntegerIsGetOnly swap_integer_is_get_only;
};
// Gets the compatibility shim for the launchd job subsystem.