libcontainer/system: un-export UIDMapInUserNS()

`UIDMapInUserNS()` is not used anywhere, only internally. so un-export it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2021-03-22 14:40:52 +01:00
parent 249356a1a4
commit e7fd383bce
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -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)
}
+1 -1
View File
@@ -10,6 +10,6 @@ import (
func FuzzUIDMap(data []byte) int {
uidmap, _ := user.ParseIDMap(strings.NewReader(string(data)))
_ = UIDMapInUserNS(uidmap)
_ = uidMapInUserNS(uidmap)
return 1
}
+2 -2
View File
@@ -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
}