Skip to content

Commit 5213014

Browse files
committed
Fix parsing of paths for unmask
This fixes an issue where multiple paths separated by a colon were treated as a single path, contrary to what docs say and unlike how mask option works. Signed-off-by: ver4a <[email protected]>
1 parent e656872 commit 5213014

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/specgenutil/specgen.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions
735735
return fmt.Errorf("invalid systempaths option %q, only `unconfined` is supported", val)
736736
}
737737
case "unmask":
738-
if hasVal {
739-
s.ContainerSecurityConfig.Unmask = append(s.ContainerSecurityConfig.Unmask, val)
740-
}
738+
s.ContainerSecurityConfig.Unmask = append(s.ContainerSecurityConfig.Unmask, strings.Split(val, ":")...)
741739
case "no-new-privileges":
742740
noNewPrivileges := true
743741
if hasVal {

0 commit comments

Comments
 (0)