| /* |
| * Check if given key name is compliant to recommended format. |
| */ |
| static vpd_err_t checkKeyName(const uint8_t *name) { |
| unsigned char c; |
| while ((c = *name++)) { |
| if (!(isalnum(c) || c == '_' || c == '.')) { |
| fprintf(stderr, "[ERROR] VPD key name does not allow char [%c].\n", c); |
| return VPD_ERR_PARAM; |
| } |
| } |
| return VPD_OK; |
--
--
Chromium OS discuss mailing list: chromium-os-discuss@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en
[ +hungte ]https://chromium-review.googlesource.com/454577workaround is trivial -- just grab an old vpd binary-mike
On Mon, Aug 21, 2017 at 11:59 AM, Grant Coles <gran...@gmail.com> wrote:
A change to VPD -s that went live on build 59 seems to have made it impossible to change Product_S/N. This is an issue, as when we do a motherboard replacement, we can no longer change Product_S/N to be what it was on the original device, which ruins our Auto-Enrollment. I know why this is. Commit aee401570c2584749f3003498810e7542aec8a3c added a char check system to make sure vpd keys were made up of only alphanumerics, underscores, or periods. Relevant code below:
/*
* Check if given key name is compliant to recommended format.
*/
static vpd_err_t checkKeyName(const uint8_t *name) {
unsigned char c;
while ((c = *name++)) {
if (!(isalnum(c) || c == '_' || c == '.')) {
fprintf(stderr, "[ERROR] VPD key name does not allow char [%c].\n", c);
return VPD_ERR_PARAM;
}
} }
return VPD_OK;
I am wondering if removed the ability to edit Product_S/N is intentional, or if this is something that was overlooked and may be address later. Also, if would be appreciated if someone had a work around, for now.
Thanks!
--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
Oh, I see you've added the dev who pushed the commit. Thanks! I'm pretty knew to this system.
On Monday, August 21, 2017 at 11:35:50 AM UTC-5, Grant Coles wrote:Using an old binary will more than likely be what we end up doing, however. I am just holding out hope that this will be address in the near future. Would you happen to know where I could submit this as a bug, so that my questions about why this was done could possibly be answered by the devs?
Thanks for the help!
Thiemo/mnissler, please correct me if I got something wrong about why Auto Enrollment would need to change Product_S/N here.
I don't actually have a way to access that page, sorry! But, if I understand correctly, if I put the Product_S/N into "serial_number", when Product_S/N is not in the hash table, it should trigger FRE?
On Tuesday, August 22, 2017 at 10:00:56 AM UTC-5, Igor Covganet wrote:This is the order of the keys taken as candidates for serial number:If you put in VPD serial_number to have the same value as Product_S/N while the first is missing, the FRE should trigger. Please let us know if that's not the case.
This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
Der Inhalt dieser E-Mail spiegelt den derzeitigen Stand der Verhandlungen wider und dient als Basis für weitere Gespräche. Er soll keine rechtlich verbindliche Verpflichtung begründen. Eine solche Verpflichtung wird allein durch einen zwischen allen beteiligten Parteien abgeschlossenen, schriftlichen Vertrag geschaffen.
we fix devices for a lot of schools and business, and I have no control over how they Enroll their systems.
What does the Forced Re-Enrollment system use to verify enrollment or to re-enroll?
that's an internal link that doesn't work for the public. here's the public link:-mike
we fix devices for a lot of schools and business, and I have no control over how they Enroll their systems.I see. That makes a lot of sense.What does the Forced Re-Enrollment system use to verify enrollment or to re-enroll?This is the code which generates the keys: https://chromium.googlesource.com/chromiumos/platform2/+/master/login_manager/server_backed_state_key_generator.cc#162For practical purposes you should be safe if you copy over all of the following (if existing):* stable_device_secret_DO_NOT_SHARE* Product_S/N* serial_numberTo address the problem of vpd syntax: In an offline conversation, Mattias has suggested to make an exception for "Product_S/N" which seems like a fair approach to me. Hung-Te, what do you think?
On Tue, Aug 22, 2017 at 5:03 PM, Mike Frysinger <vap...@chromium.org> wrote:
that's an internal link that doesn't work for the public. here's the public link:-mike
On Tue, Aug 22, 2017 at 11:00 AM, 'Igor Covganet' via Chromium OS discuss <chromium-...@chromium.org> wrote:
This is the order of the keys taken as candidates for serial number:If you put in VPD serial_number to have the same value as Product_S/N while the first is missing, the FRE should trigger. Please let us know if that's not the case.
--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
where could we store "serial_number"? If we were to replace "serial_number" with "Product_S/N" as suggested above, "serial_number" would lose the checksum at the end. Is this checksum required?
| // These are the machine serial number keys that we check in order until we |
| // find a non-empty serial number. The VPD spec says the serial number should be |
| // in the "serial_number" key for v2+ VPDs. However, legacy devices used a |
| // different key 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_SN", // Mario |
| "sn", // old ZGB devices (more recent ones use serial_number) |
Right, this is what was suggested above, more or less.
The only problem is that "serial_number" contains a checksum character at the end, whereas "Product_S/N" does not. So will not having that checksum cause issues anywhere else?