diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-14 22:02:04 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-14 22:02:04 +0000 |
commit | d793e5eba6a0881631fde7a9f7ee7552a1086de0 (patch) | |
tree | 662662ac215b8b4bba6360ea3aab64565f68baa9 | |
parent | 326b2a68292e239201292aa8fd038e29198dc86c (diff) | |
download | chromium_src-d793e5eba6a0881631fde7a9f7ee7552a1086de0.zip chromium_src-d793e5eba6a0881631fde7a9f7ee7552a1086de0.tar.gz chromium_src-d793e5eba6a0881631fde7a9f7ee7552a1086de0.tar.bz2 |
Merge 151557 - Prefer Product_S/N when reading the serial number for enterprise enrollment.
This is effectively a partial revert of http://codereview.chromium.org/10542072/ for Lumpy devices, all other models remain unaffected because they don't have both the serial_number and Product_S/N keys in VPD.
Background: The serial_number VPD key (which would be the right source in an ideal world) returns a checksum-suffixed serial number on Lumpy devices that includes a trailing checksum character. That unfortunately causes trouble with the server side, which uses the non-suffixed serial number.
BUG=chromium:142681, chromium-os:31652
TEST=Check serial number reported on enterprise enrollment and used for auto-enrollment on Lumpy.
Review URL: https://chromiumcodereview.appspot.com/10830316
TBR=mnissler@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10829329
git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@151577 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/policy/browser_policy_connector.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc index 080c5c9..3367ba3 100644 --- a/chrome/browser/policy/browser_policy_connector.cc +++ b/chrome/browser/policy/browser_policy_connector.cc @@ -79,9 +79,20 @@ const char kMachineInfoSystemHwqual[] = "hardware_class"; // in the "serial_number" key for v2+ VPDs. However, legacy devices used a // different keys to report their serial number, which we fall back to if // "serial_number" is not present. +// +// Product_S/N is still special-cased due to inconsistencies with serial +// numbers on Lumpy devices: On these devices, serial_number is identical to +// Product_S/N with an appended checksum. Unfortunately, the sticker on the +// packaging doesn't include that checksum either (the sticker on the device +// does though!). The former sticker is the source of the serial number used by +// device management service, so we prefer Product_S/N over serial number to +// match the server. +// +// TODO(mnissler): Move serial_number back to the top once the server side uses +// the correct serial number. const char* kMachineInfoSerialNumberKeys[] = { + "Product_S/N", // Lumpy/Alex devices "serial_number", // VPD v2+ devices - "Product_S/N", // Alex "Product_SN", // Mario "sn", // old ZGB devices (more recent ones use serial_number) }; |