summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-16 20:50:07 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-16 20:50:07 +0000
commit231805a8f19246d585401f991c06be133b43199a (patch)
tree6bb6e970161b77635dc5401574de53e35ecc2b7c /remoting/host
parent2876bd8a56ddf6e4007753554707207062b57d3a (diff)
downloadchromium_src-231805a8f19246d585401f991c06be133b43199a.zip
chromium_src-231805a8f19246d585401f991c06be133b43199a.tar.gz
chromium_src-231805a8f19246d585401f991c06be133b43199a.tar.bz2
Enable RDP integration by default when the curtain mode is enabled by the policy.
Collateral changes: - The username matching policy is ignored for RDP sessions. BUG=137696 Review URL: https://codereview.chromium.org/14234012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194443 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/remoting_me2me_host.cc28
1 files changed, 20 insertions, 8 deletions
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 8242ee6..217eb57 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -202,7 +202,8 @@ class HostProcess
void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies);
bool OnHostDomainPolicyUpdate(const std::string& host_domain);
- bool OnUsernamePolicyUpdate(bool username_match_required);
+ bool OnUsernamePolicyUpdate(bool curtain_required,
+ bool username_match_required);
bool OnNatPolicyUpdate(bool nat_traversal_enabled);
bool OnCurtainPolicyUpdate(bool curtain_required);
bool OnHostTalkGadgetPrefixPolicyUpdate(const std::string& talkgadget_prefix);
@@ -724,10 +725,16 @@ void HostProcess::OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies) {
&string_value)) {
restart_required |= OnHostDomainPolicyUpdate(string_value);
}
+ bool curtain_required = false;
+ if (policies->GetBoolean(
+ policy_hack::PolicyWatcher::kHostRequireCurtainPolicyName,
+ &curtain_required)) {
+ restart_required |= OnCurtainPolicyUpdate(curtain_required);
+ }
if (policies->GetBoolean(
policy_hack::PolicyWatcher::kHostMatchUsernamePolicyName,
&bool_value)) {
- restart_required |= OnUsernamePolicyUpdate(bool_value);
+ restart_required |= OnUsernamePolicyUpdate(curtain_required, bool_value);
}
if (policies->GetBoolean(policy_hack::PolicyWatcher::kNatPolicyName,
&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,
@@ -774,7 +776,8 @@ bool HostProcess::OnHostDomainPolicyUpdate(const std::string& host_domain) {
return false;
}
-bool HostProcess::OnUsernamePolicyUpdate(bool host_username_match_required) {
+bool HostProcess::OnUsernamePolicyUpdate(bool curtain_required,
+ bool host_username_match_required) {
// Returns false: never restart the host after this policy update.
DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
@@ -794,6 +797,15 @@ bool HostProcess::OnUsernamePolicyUpdate(bool host_username_match_required) {
}
#endif
+ // Curtain-mode on Windows presents the standard OS login prompt to the user
+ // for each connection, removing the need for an explicit user-name matching
+ // check.
+#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);