MCPcopy
hub / github.com/opencontainers/runc / devValidName

Function devValidName

libcontainer/configs/validate/validator.go:75–86  ·  view source on GitHub ↗

https://elixir.bootlin.com/linux/v6.12/source/net/core/dev.c#L1066

(name string)

Source from the content-addressed store, hash-verified

73
74// https://elixir.bootlin.com/linux/v6.12/source/net/core/dev.c#L1066
75func devValidName(name string) bool {
76 if len(name) == 0 || len(name) > unix.IFNAMSIZ {
77 return false
78 }
79 if name == "." || name == ".." {
80 return false
81 }
82 if strings.ContainsAny(name, "/: ") {
83 return false
84 }
85 return true
86}
87
88func netdevices(config *configs.Config) error {
89 if len(config.NetDevices) == 0 {

Callers 2

netdevicesFunction · 0.85
TestDevValidNameFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDevValidNameFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…