mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #28924 from xlgao-zju/fix-apparmor-load-profile
fix apparmor load profile
This commit is contained in:
commit
68a423304e
2 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,6 @@ package aaparser
|
|||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
@ -26,7 +25,7 @@ func GetVersion() (int, error) {
|
|||
// LoadProfile runs `apparmor_parser -r` on a specified apparmor profile to
|
||||
// replace the profile.
|
||||
func LoadProfile(profilePath string) error {
|
||||
_, err := cmd("", "-r", filepath.Dir(profilePath))
|
||||
_, err := cmd("", "-r", profilePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ profile {{.Name}} flags=(attach_disconnected,mediate_deleted) {
|
|||
|
||||
{{if ge .Version 208095}}
|
||||
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
|
||||
ptrace (trace,read) peer=docker-default,
|
||||
ptrace (trace,read) peer={{.Name}},
|
||||
{{end}}
|
||||
}
|
||||
`
|
||||
|
|
Loading…
Reference in a new issue