diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-13 22:06:07 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-13 22:06:07 +0000 |
commit | 2c56af1a6677c9b1141778173dcb1b3bdb63f14b (patch) | |
tree | 4f304305f2af8989b051cc139e0dc7a1ca222143 /sandbox/src/named_pipe_interception.cc | |
parent | 2e783a8979a41c25f76d58bacc6329d86936b6e0 (diff) | |
download | chromium_src-2c56af1a6677c9b1141778173dcb1b3bdb63f14b.zip chromium_src-2c56af1a6677c9b1141778173dcb1b3bdb63f14b.tar.gz chromium_src-2c56af1a6677c9b1141778173dcb1b3bdb63f14b.tar.bz2 |
Return the right error code when we proxy a call
to the broker.
IIRC we decided to always return access denied because
we did not want to leak the real error code, but this
is bogus for 2 reasons:
1. The broker will return access denied if it's not
allowed in the policy
2. The check to hide the return code is in the renderer,
so it would have been possible for a malicious user to see
it anyway.
I also added a test for it.
BUG:3965
Review URL: http://codereview.chromium.org/10615
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/named_pipe_interception.cc')
-rw-r--r-- | sandbox/src/named_pipe_interception.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sandbox/src/named_pipe_interception.cc b/sandbox/src/named_pipe_interception.cc index 0c3c653..fedb58e 100644 --- a/sandbox/src/named_pipe_interception.cc +++ b/sandbox/src/named_pipe_interception.cc @@ -57,8 +57,10 @@ HANDLE WINAPI TargetCreateNamedPipeW( if (SBOX_ALL_OK != code) break; + ::SetLastError(answer.win32_result); + if (ERROR_SUCCESS != answer.win32_result) - break; + return INVALID_HANDLE_VALUE; return answer.handle; } while (false); |