Chromium Code Reviews| Index: remoting/host/remoting_me2me_host.cc |
| diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc |
| index 8242ee60224747655a30d4288cbe1a587f80cee0..8024f5fee154c7d5e93a38cba291ebffeca24abf 100644 |
| --- a/remoting/host/remoting_me2me_host.cc |
| +++ b/remoting/host/remoting_me2me_host.cc |
| @@ -724,6 +724,13 @@ void HostProcess::OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies) { |
| &string_value)) { |
| restart_required |= OnHostDomainPolicyUpdate(string_value); |
| } |
| + // The curtain mode policy should be handled before the username matching |
| + // setting. |
|
Wez
2013/04/15 19:01:35
Why? Requiring a specific ordering to policy appl
alexeypa (please no reviews)
2013/04/15 19:10:01
Done.
|
| + if (policies->GetBoolean( |
| + policy_hack::PolicyWatcher::kHostRequireCurtainPolicyName, |
| + &bool_value)) { |
| + restart_required |= OnCurtainPolicyUpdate(bool_value); |
| + } |
| if (policies->GetBoolean( |
| policy_hack::PolicyWatcher::kHostMatchUsernamePolicyName, |
| &bool_value)) { |
| @@ -738,11 +745,6 @@ void HostProcess::OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies) { |
| &string_value)) { |
| restart_required |= OnHostTalkGadgetPrefixPolicyUpdate(string_value); |
| } |
| - if (policies->GetBoolean( |
| - policy_hack::PolicyWatcher::kHostRequireCurtainPolicyName, |
| - &bool_value)) { |
| - restart_required |= OnCurtainPolicyUpdate(bool_value); |
| - } |
| std::string token_url_string, token_validation_url_string; |
| if (policies->GetString( |
| policy_hack::PolicyWatcher::kHostTokenUrlPolicyName, |
| @@ -794,6 +796,15 @@ bool HostProcess::OnUsernamePolicyUpdate(bool host_username_match_required) { |
| } |
| #endif |
| + // The RDP sessions make the connected user to enter the OS credential |
|
Wez
2013/04/15 19:01:35
nit: Suggest reword:
"Curtain-mode on Windows pre
alexeypa (please no reviews)
2013/04/15 19:10:01
Done.
|
| + // before he or she can access the machine meaning that the username |
| + // matching policy can be safely if the curtain is required. |
| +#if defined(OS_WIN) && defined(REMOTING_RDP_SESSION) |
| + if (curtain_required_) |
| + return false; |
| +#endif // defined(OS_WIN) && defined(REMOTING_RDP_SESSION) |
| + |
| + // Shutdown the host if the username does not match. |
| if (shutdown) { |
| LOG(ERROR) << "The host username does not match."; |
| ShutdownHost(kUsernameMismatchExitCode); |