-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[remoting][win][webauthn] Fix extension wakeup
The webauthn extension wakeup mechanism doesn't work on Windows. It turns out the problem is that RemoteWebAuthnExtensionNotifier::NotifyStateChange() is invoked from the network process, which does not have access to the LocalAppData directory, so the write to the extension wakeup file will fail. This CL fixes this problem by having the network process make an IPC to the high-privilege desktop process, which writes the wakeup file on the desktop process. (cherry picked from commit 2ad53d9) Bug: 1325523 Change-Id: I5ddc5beee14c038fd0713a3806578769ae588c20 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3650999 Commit-Queue: Yuwei Huang <yuweih@chromium.org> Reviewed-by: Ken Buchanan <kenrb@chromium.org> Reviewed-by: Joe Downing <joedow@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1004927} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3655244 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Yuwei Huang <yuweih@chromium.org> Commit-Queue: Ken Buchanan <kenrb@chromium.org> Cr-Commit-Position: refs/branch-heads/5060@{#125} Cr-Branched-From: b83393d-refs/heads/main@{#1002911}
- Loading branch information
Showing
21 changed files
with
173 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
remoting/host/webauthn/remote_webauthn_delegated_state_change_notifier.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2022 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "remoting/host/webauthn/remote_webauthn_delegated_state_change_notifier.h" | ||
|
||
namespace remoting { | ||
|
||
RemoteWebAuthnDelegatedStateChangeNotifier:: | ||
RemoteWebAuthnDelegatedStateChangeNotifier( | ||
const base::RepeatingClosure& notify_state_change) | ||
: notify_state_change_(notify_state_change) {} | ||
|
||
RemoteWebAuthnDelegatedStateChangeNotifier:: | ||
~RemoteWebAuthnDelegatedStateChangeNotifier() = default; | ||
|
||
void RemoteWebAuthnDelegatedStateChangeNotifier::NotifyStateChange() { | ||
notify_state_change_.Run(); | ||
} | ||
|
||
} // namespace remoting |
30 changes: 30 additions & 0 deletions
30
remoting/host/webauthn/remote_webauthn_delegated_state_change_notifier.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2022 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef REMOTING_HOST_WEBAUTHN_REMOTE_WEBAUTHN_DELEGATED_STATE_CHANGE_NOTIFIER_H_ | ||
#define REMOTING_HOST_WEBAUTHN_REMOTE_WEBAUTHN_DELEGATED_STATE_CHANGE_NOTIFIER_H_ | ||
|
||
#include "base/callback.h" | ||
#include "remoting/host/webauthn/remote_webauthn_state_change_notifier.h" | ||
|
||
namespace remoting { | ||
|
||
// A RemoteWebAuthnStateChangeNotifier implementation that simply calls | ||
// |notify_state_change| when NotifyStateChange() is called. | ||
class RemoteWebAuthnDelegatedStateChangeNotifier | ||
: public RemoteWebAuthnStateChangeNotifier { | ||
public: | ||
explicit RemoteWebAuthnDelegatedStateChangeNotifier( | ||
const base::RepeatingClosure& notify_state_change); | ||
~RemoteWebAuthnDelegatedStateChangeNotifier() override; | ||
|
||
void NotifyStateChange() override; | ||
|
||
protected: | ||
base::RepeatingClosure notify_state_change_; | ||
}; | ||
|
||
} // namespace remoting | ||
|
||
#endif // REMOTING_HOST_WEBAUTHN_REMOTE_WEBAUTHN_DELEGATED_STATE_CHANGE_NOTIFIER_H_ |
Oops, something went wrong.