Bug 804592 - "CreatePipe from Chromium IPC requires Logon Session, fails otherwise" [r=jones.chris.g]

This commit is contained in:
2012-10-24 08:11:00 -04:00
parent 70bb650cf8
commit bb8432ec40

View File

@ -144,15 +144,6 @@ bool Channel::ChannelImpl::CreatePipe(const std::wstring& channel_id,
DCHECK(pipe_ == INVALID_HANDLE_VALUE);
const std::wstring pipe_name = PipeName(channel_id);
if (mode == MODE_SERVER) {
SECURITY_ATTRIBUTES security_attributes = {0};
security_attributes.bInheritHandle = FALSE;
security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES);
if (!win_util::GetLogonSessionOnlyDACL(
reinterpret_cast<SECURITY_DESCRIPTOR**>(
&security_attributes.lpSecurityDescriptor))) {
NOTREACHED();
}
pipe_ = CreateNamedPipeW(pipe_name.c_str(),
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED |
FILE_FLAG_FIRST_PIPE_INSTANCE,
@ -163,8 +154,7 @@ bool Channel::ChannelImpl::CreatePipe(const std::wstring& channel_id,
// input buffer size (XXX tune)
Channel::kReadBufferSize,
5000, // timeout in milliseconds (XXX tune)
&security_attributes);
LocalFree(security_attributes.lpSecurityDescriptor);
NULL);
} else {
pipe_ = CreateFileW(pipe_name.c_str(),
GENERIC_READ | GENERIC_WRITE,