new mac update for permission issues.
This commit is contained in:
@@ -349,14 +349,21 @@ func firstNonEmpty(values ...string) string {
|
||||
}
|
||||
|
||||
func deriveHWID() string {
|
||||
machineID := platformMachineID()
|
||||
if machineID != "" {
|
||||
h := sha256.New()
|
||||
h.Write([]byte(machineID))
|
||||
h.Write([]byte("|"))
|
||||
h.Write([]byte(runtime.GOOS))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
// fallback
|
||||
h := sha256.New()
|
||||
h.Write([]byte(hostname()))
|
||||
h.Write([]byte("|"))
|
||||
h.Write([]byte(os.Getenv("USERNAME")))
|
||||
h.Write([]byte("|"))
|
||||
h.Write([]byte(runtime.GOOS))
|
||||
h.Write([]byte("|"))
|
||||
h.Write([]byte(runtime.GOARCH))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user