Commit 8aaf836b authored by mnissler@chromium.org's avatar mnissler@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151557 0039d316-1c4b-4281-b951-d872f2087c98
parent 704f767d
...@@ -87,9 +87,20 @@ const char kMachineInfoSystemHwqual[] = "hardware_class"; ...@@ -87,9 +87,20 @@ const char kMachineInfoSystemHwqual[] = "hardware_class";
// in the "serial_number" key for v2+ VPDs. However, legacy devices used a // 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 // different keys to report their serial number, which we fall back to if
// "serial_number" is not present. // "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[] = { const char* kMachineInfoSerialNumberKeys[] = {
"Product_S/N", // Lumpy/Alex devices
"serial_number", // VPD v2+ devices "serial_number", // VPD v2+ devices
"Product_S/N", // Alex
"Product_SN", // Mario "Product_SN", // Mario
"sn", // old ZGB devices (more recent ones use serial_number) "sn", // old ZGB devices (more recent ones use serial_number)
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment