mirror of
https://github.com/docker/cli.git
synced 2026-01-23 15:21:32 +03:00
Merge pull request #27051 from tophj-ibm/fix-installing-apparmor
Fix apparmor profile installation Upstream-commit: 50856a2ce29a8cd4ecd22a3ba8f6274c2ba6977c Component: engine
This commit is contained in:
@@ -26,7 +26,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", filepath.Dir(profilePath))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ func macroExists(m string) bool {
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// InstallDefault generates a default profile and installs it in the
|
||||
// ProfileDirectory with `apparmor_parser`.
|
||||
// InstallDefault generates a default profile in a temp directory determined by
|
||||
// os.TempDir(), then loads the profile into the kernel using 'apparmor_parser'.
|
||||
func InstallDefault(name string) error {
|
||||
p := profileData{
|
||||
Name: name,
|
||||
|
||||
Reference in New Issue
Block a user