Skip to content

Commit

Permalink
Use new syntax for selinux options in quadlet
Browse files Browse the repository at this point in the history
Fixes: containers#23432

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Jul 30, 2024
1 parent 2316d91 commit 1c46686
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/systemd/quadlet/quadlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,12 +615,12 @@ func ConvertContainer(container *parser.UnitFile, names map[string]string, isUse

securityLabelDisable := container.LookupBooleanWithDefault(ContainerGroup, KeySecurityLabelDisable, false)
if securityLabelDisable {
podman.add("--security-opt", "label:disable")
podman.add("--security-opt", "label=disable")
}

securityLabelNested := container.LookupBooleanWithDefault(ContainerGroup, KeySecurityLabelNested, false)
if securityLabelNested {
podman.add("--security-opt", "label:nested")
podman.add("--security-opt", "label=nested")
}

pidsLimit, ok := container.Lookup(ContainerGroup, KeyPidsLimit)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/quadlet/disableselinux.container
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## assert-podman-final-args localhost/imagename
## assert-podman-args "--security-opt" "label:disable"
## assert-podman-args "--security-opt" "label=disable"

[Container]
Image=localhost/imagename
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/quadlet/nestedselinux.container
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## assert-podman-args "--security-opt" "label:nested"
## assert-podman-args "--security-opt" "label=nested"

[Container]
Image=localhost/imagename
Expand Down

0 comments on commit 1c46686

Please sign in to comment.