mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
The standardized textual representation of UUIDs according to RFC 4122
and ISO/IEC-9834-8:2005 is with LOWER-CASE hexadecimal characters only, so translate the (usually upper-case and this way not conforming) representation of the BIOS UUID when reading it. Also be more strict about the valid characters in the textual representation by checking for just the hexadecimal characters.
This commit is contained in:
parent
9382f00b46
commit
a8698e63bb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169818
@ -56,8 +56,8 @@ hostid_set()
|
||||
|
||||
hostid_hardware()
|
||||
{
|
||||
uuid=`kenv smbios.system.uuid 2>/dev/null`
|
||||
x="[0-9a-zA-Z]"
|
||||
uuid=`kenv smbios.system.uuid 2>/dev/null | tr '[:upper:]' '[:lower:]'`
|
||||
x="[0-9a-f]"
|
||||
y=$x$x$x$x
|
||||
case "${uuid}" in
|
||||
$y$y-$y-$y-$y-$y$y$y)
|
||||
|
Loading…
Reference in New Issue
Block a user