diff --git a/libcontainer/system/linux.go b/libcontainer/system/linux.go index f7260256047..eb301073cde 100644 --- a/libcontainer/system/linux.go +++ b/libcontainer/system/linux.go @@ -100,12 +100,12 @@ func RunningInUserNS() bool { // This kernel-provided file only exists if user namespaces are supported return } - inUserNS = UIDMapInUserNS(uidmap) + inUserNS = uidMapInUserNS(uidmap) }) return inUserNS } -func UIDMapInUserNS(uidmap []user.IDMap) bool { +func uidMapInUserNS(uidmap []user.IDMap) bool { /* * We assume we are in the initial user namespace if we have a full * range - 4294967295 uids starting at uid 0. diff --git a/libcontainer/system/linux_test.go b/libcontainer/system/linux_test.go index 4d613d8473d..08e2d6c3b92 100644 --- a/libcontainer/system/linux_test.go +++ b/libcontainer/system/linux_test.go @@ -37,7 +37,7 @@ func TestUIDMapInUserNS(t *testing.T) { if err != nil { t.Fatal(err) } - actual := UIDMapInUserNS(uidmap) + actual := uidMapInUserNS(uidmap) if c.expected != actual { t.Fatalf("expected %v, got %v for %q", c.expected, actual, c.s) } diff --git a/libcontainer/system/system_fuzzer.go b/libcontainer/system/system_fuzzer.go index c1d7630fefa..2354247ebef 100644 --- a/libcontainer/system/system_fuzzer.go +++ b/libcontainer/system/system_fuzzer.go @@ -10,6 +10,6 @@ import ( func FuzzUIDMap(data []byte) int { uidmap, _ := user.ParseIDMap(strings.NewReader(string(data))) - _ = UIDMapInUserNS(uidmap) + _ = uidMapInUserNS(uidmap) return 1 } diff --git a/libcontainer/system/unsupported.go b/libcontainer/system/unsupported.go index 0adf94012b3..829d9dac00e 100644 --- a/libcontainer/system/unsupported.go +++ b/libcontainer/system/unsupported.go @@ -12,8 +12,8 @@ func RunningInUserNS() bool { return false } -// UIDMapInUserNS is a stub for non-Linux systems +// uidMapInUserNS is a stub for non-Linux systems // Always returns false -func UIDMapInUserNS(uidmap []user.IDMap) bool { +func uidMapInUserNS(uidmap []user.IDMap) bool { return false }