Skip to content

Commit 624ff63

Browse files
committed
pkg/apparmor: clarify Godoc
Signed-off-by: Bjorn Neergaard <[email protected]> (cherry picked from commit d33a43c) Signed-off-by: Bjorn Neergaard <[email protected]>
1 parent 3a0a35b commit 624ff63

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

pkg/apparmor/apparmor.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
package apparmor
1818

19-
// HostSupports returns true if apparmor is enabled for the host, // On non-Linux returns false
20-
// On Linux returns true if apparmor_parser is enabled, and if we
19+
// HostSupports returns true if apparmor is enabled for the host:
20+
// - On Linux returns true if apparmor is enabled, apparmor_parser is
21+
// present, and if we are not running docker-in-docker.
22+
// - On non-Linux returns false.
2123
//
22-
// are not running docker-in-docker.
23-
//
24-
// It is a modified version of libcontainer/apparmor.IsEnabled(), which does not
25-
// check for apparmor_parser to be present, or if we're running docker-in-docker.
24+
// This is derived from libcontainer/apparmor.IsEnabled(), with the addition
25+
// of checks for apparmor_parser to be present and docker-in-docker.
2626
func HostSupports() bool {
2727
return hostSupports()
2828
}

pkg/apparmor/apparmor_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ var (
2929
// hostSupports returns true if apparmor is enabled for the host, if
3030
// apparmor_parser is enabled, and if we are not running docker-in-docker.
3131
//
32-
// It is a modified version of libcontainer/apparmor.IsEnabled(), which does not
33-
// check for apparmor_parser to be present, or if we're running docker-in-docker.
32+
// This is derived from libcontainer/apparmor.IsEnabled(), with the addition
33+
// of checks for apparmor_parser to be present and docker-in-docker.
3434
func hostSupports() bool {
3535
checkAppArmor.Do(func() {
3636
// see https://github.com/opencontainers/runc/blob/0d49470392206f40eaab3b2190a57fe7bb3df458/libcontainer/apparmor/apparmor_linux.go

0 commit comments

Comments
 (0)