Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9048)

Unified Diff: chromeos/network/policy_applicator.cc

Issue 23451044: Add an Ethernet EAP policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/network/policy_applicator.cc
diff --git a/chromeos/network/policy_applicator.cc b/chromeos/network/policy_applicator.cc
index 33fa703283a46591e338bdc94659b948e7c49363..6a6e5c5929804eb43e03a745f4dcc25c8b097315 100644
--- a/chromeos/network/policy_applicator.cc
+++ b/chromeos/network/policy_applicator.cc
@@ -209,6 +209,22 @@ void PolicyApplicator::CreateAndWriteNewShillConfiguration(
const std::string& guid,
const base::DictionaryValue& policy,
const base::DictionaryValue* user_settings) {
+ // Ethernet (non EAP) settings, like GUID or UIData, cannot be stored per
+ // user. Abort in that case.
+ std::string type;
+ policy.GetStringWithoutPathExpansion(onc::network_config::kType, &type);
+ if (type == onc::network_type::kEthernet &&
+ profile_.type() == NetworkProfile::TYPE_USER) {
+ const base::DictionaryValue* ethernet = NULL;
+ policy.GetDictionaryWithoutPathExpansion(onc::network_config::kEthernet,
+ &ethernet);
+ std::string auth;
+ ethernet->GetStringWithoutPathExpansion(onc::ethernet::kAuthentication,
+ &auth);
+ if (auth == onc::ethernet::kNone)
+ return;
+ }
+
scoped_ptr<base::DictionaryValue> shill_dictionary =
policy_util::CreateShillConfiguration(
profile_, guid, &policy, user_settings);

Powered by Google App Engine
This is Rietveld 408576698