|
@@ -4,7 +4,6 @@ package aaparser
|
|
import (
|
|
import (
|
|
"fmt"
|
|
"fmt"
|
|
"os/exec"
|
|
"os/exec"
|
|
- "path/filepath"
|
|
|
|
"strconv"
|
|
"strconv"
|
|
"strings"
|
|
"strings"
|
|
)
|
|
)
|
|
@@ -26,7 +25,7 @@ func GetVersion() (int, error) {
|
|
// LoadProfile runs `apparmor_parser -r` on a specified apparmor profile to
|
|
// LoadProfile runs `apparmor_parser -r` on a specified apparmor profile to
|
|
// replace the profile.
|
|
// replace the profile.
|
|
func LoadProfile(profilePath string) error {
|
|
func LoadProfile(profilePath string) error {
|
|
- _, err := cmd("", "-r", filepath.Dir(profilePath))
|
|
|
|
|
|
+ _, err := cmd("", "-r", profilePath)
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|