Skip to content

Commit 80d8cfc

Browse files
author
May Lippert
committed
Remove enrolled device check for saving login password.
Allow managed users logging into their own device to use their login password for automatically authenticating to networks. BUG=chromium:386606 TEST=run unit tests, manual test on kevin Change-Id: I023472e12abaa39a03ea445358f68a7c1afa9391 Reviewed-on: https://chromium-review.googlesource.com/1058598 Reviewed-by: Mattias Nissler <[email protected]> Reviewed-by: Achuith Bhandarkar <[email protected]> Commit-Queue: May Lippert <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#563155}(cherry picked from commit ea3a9c7) Reviewed-on: https://chromium-review.googlesource.com/1081070 Reviewed-by: May Lippert <[email protected]> Cr-Commit-Position: refs/branch-heads/3440@{#66} Cr-Branched-From: 010ddcf-refs/heads/master@{#561733}
1 parent 65df807 commit 80d8cfc

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

chrome/browser/chromeos/login/session/user_session_manager.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,17 +1082,6 @@ void UserSessionManager::StartCrosSession() {
10821082
}
10831083

10841084
void UserSessionManager::OnUserNetworkPolicyParsed(bool send_password) {
1085-
// Sanity check that we only send the password for enterprise users. See
1086-
// https://crbug.com/386606.
1087-
const bool is_enterprise_managed = g_browser_process->platform_part()
1088-
->browser_policy_connector_chromeos()
1089-
->IsEnterpriseManaged();
1090-
if (!is_enterprise_managed) {
1091-
LOG(WARNING) << "Attempting to save user password for non enterprise user.";
1092-
user_context_.GetMutablePasswordKey()->ClearSecret();
1093-
return;
1094-
}
1095-
10961085
if (send_password) {
10971086
if (user_context_.GetPasswordKey()->GetSecret().size() > 0) {
10981087
DBusThreadManager::Get()->GetSessionManagerClient()->SaveLoginPassword(

chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -747,13 +747,9 @@ void GaiaScreenHandler::HandleCompleteAuthentication(
747747
UserContext user_context(user_type,
748748
GetAccountId(email, gaia_id, AccountType::GOOGLE));
749749
user_context.SetKey(Key(password));
750-
// Only save the password for enterprise users. See https://crbug.com/386606.
751-
const bool is_enterprise_managed = g_browser_process->platform_part()
752-
->browser_policy_connector_chromeos()
753-
->IsEnterpriseManaged();
754-
if (is_enterprise_managed) {
755-
user_context.SetPasswordKey(Key(password));
756-
}
750+
// Save the user's plaintext password for possible authentication to a
751+
// network. See https://crbug.com/386606 for details.
752+
user_context.SetPasswordKey(Key(password));
757753
user_context.SetAuthCode(auth_code);
758754
user_context.SetAuthFlow(using_saml
759755
? UserContext::AUTH_FLOW_GAIA_WITH_SAML

chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,13 +1229,9 @@ void SigninScreenHandler::HandleAuthenticateUser(const AccountId& account_id,
12291229
user_context = UserContext(*user);
12301230
}
12311231
user_context.SetKey(Key(password));
1232-
// Only save the password for enterprise users. See https://crbug.com/386606.
1233-
const bool is_enterprise_managed = g_browser_process->platform_part()
1234-
->browser_policy_connector_chromeos()
1235-
->IsEnterpriseManaged();
1236-
if (is_enterprise_managed) {
1237-
user_context.SetPasswordKey(Key(password));
1238-
}
1232+
// Save the user's plaintext password for possible authentication to a
1233+
// network. See https://crbug.com/386606 for details.
1234+
user_context.SetPasswordKey(Key(password));
12391235
user_context.SetIsUsingPin(authenticated_by_pin);
12401236
if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY &&
12411237
(user_context.GetUserType() !=

0 commit comments

Comments
 (0)