mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-13 22:47:30 +00:00
posture: propagate serial number from MDM on Android
Updates #16010 Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:

committed by
Anton Tolchanov

parent
8a3afa5963
commit
cc988596a2
@@ -1,13 +1,12 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// android: not implemented
|
||||
// js: not implemented
|
||||
// plan9: not implemented
|
||||
// solaris: currently unsupported by go-smbios:
|
||||
// https://github.com/digitalocean/go-smbios/pull/21
|
||||
|
||||
//go:build android || solaris || plan9 || js || wasm || tamago || aix || (darwin && !cgo && !ios)
|
||||
//go:build solaris || plan9 || js || wasm || tamago || aix || (darwin && !cgo && !ios)
|
||||
|
||||
package posture
|
||||
|
||||
|
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build android || ios
|
||||
|
||||
package posture
|
||||
|
||||
import (
|
||||
@@ -10,9 +12,9 @@ import (
|
||||
"tailscale.com/util/syspolicy"
|
||||
)
|
||||
|
||||
// GetSerialNumbers returns the serial number of the iOS/tvOS device as reported by an
|
||||
// GetSerialNumbers returns the serial number of the device as reported by an
|
||||
// MDM solution. It requires configuration via the DeviceSerialNumber system policy.
|
||||
// This is the only way to gather serial numbers on iOS and tvOS.
|
||||
// This is the only way to gather serial numbers on iOS, tvOS and Android.
|
||||
func GetSerialNumbers(_ logger.Logf) ([]string, error) {
|
||||
s, err := syspolicy.GetString(syspolicy.DeviceSerialNumber, "")
|
||||
if err != nil {
|
Reference in New Issue
Block a user