Index: chromeos/network/policy_applicator.cc |
diff --git a/chromeos/network/policy_applicator.cc b/chromeos/network/policy_applicator.cc |
index bc2315d21dd09f1f21d5b2792ebbc776a14f4c0b..1b6d95fb727f159b536718e8d6630208e10c20bf 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, |
+ ðernet); |
+ 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); |