Skip to content

Commit e7fd383

Browse files
committed
libcontainer/system: un-export UIDMapInUserNS()
`UIDMapInUserNS()` is not used anywhere, only internally. so un-export it. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 249356a commit e7fd383

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

libcontainer/system/linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ func RunningInUserNS() bool {
100100
// This kernel-provided file only exists if user namespaces are supported
101101
return
102102
}
103-
inUserNS = UIDMapInUserNS(uidmap)
103+
inUserNS = uidMapInUserNS(uidmap)
104104
})
105105
return inUserNS
106106
}
107107

108-
func UIDMapInUserNS(uidmap []user.IDMap) bool {
108+
func uidMapInUserNS(uidmap []user.IDMap) bool {
109109
/*
110110
* We assume we are in the initial user namespace if we have a full
111111
* range - 4294967295 uids starting at uid 0.

libcontainer/system/linux_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestUIDMapInUserNS(t *testing.T) {
3737
if err != nil {
3838
t.Fatal(err)
3939
}
40-
actual := UIDMapInUserNS(uidmap)
40+
actual := uidMapInUserNS(uidmap)
4141
if c.expected != actual {
4242
t.Fatalf("expected %v, got %v for %q", c.expected, actual, c.s)
4343
}

libcontainer/system/system_fuzzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ import (
1010

1111
func FuzzUIDMap(data []byte) int {
1212
uidmap, _ := user.ParseIDMap(strings.NewReader(string(data)))
13-
_ = UIDMapInUserNS(uidmap)
13+
_ = uidMapInUserNS(uidmap)
1414
return 1
1515
}

libcontainer/system/unsupported.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ func RunningInUserNS() bool {
1212
return false
1313
}
1414

15-
// UIDMapInUserNS is a stub for non-Linux systems
15+
// uidMapInUserNS is a stub for non-Linux systems
1616
// Always returns false
17-
func UIDMapInUserNS(uidmap []user.IDMap) bool {
17+
func uidMapInUserNS(uidmap []user.IDMap) bool {
1818
return false
1919
}

0 commit comments

Comments
 (0)