MCPcopy Index your code
hub / github.com/docker/cli / parseSystemPaths

Function parseSystemPaths

cli/command/container/opts.go:967–979  ·  view source on GitHub ↗

parseSystemPaths checks if `systempaths=unconfined` security option is set, and returns the `MaskedPaths` and `ReadonlyPaths` accordingly. An updated list of security options is returned with this option removed, because the `unconfined` option is handled client-side, and should not be sent to the d

(securityOpts []string)

Source from the content-addressed store, hash-verified

965// `unconfined` option is handled client-side, and should not be sent to the
966// daemon.
967func parseSystemPaths(securityOpts []string) (filtered, maskedPaths, readonlyPaths []string) {
968 filtered = securityOpts[:0]
969 for _, opt := range securityOpts {
970 if opt == "systempaths=unconfined" {
971 maskedPaths = []string{}
972 readonlyPaths = []string{}
973 } else {
974 filtered = append(filtered, opt)
975 }
976 }
977
978 return filtered, maskedPaths, readonlyPaths
979}
980
981// parses storage options per container into a map
982func parseStorageOpts(storageOpts []string) (map[string]string, error) {

Callers 2

TestParseSystemPathsFunction · 0.85
parseFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestParseSystemPathsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…