mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
Use seccomp_profile as default profile if defined in containers.conf
Edits `podman info` to provide the default seccomp profile detected in the output Signed-off-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
This commit is contained in:
@ -194,7 +194,15 @@ func programVersion(mountProgram string) (string, error) {
|
||||
// if it exists, first it checks OverrideSeccomp and then default.
|
||||
// If neither exist function returns ""
|
||||
func DefaultSeccompPath() (string, error) {
|
||||
_, err := os.Stat(config.SeccompOverridePath)
|
||||
def, err := config.Default()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if def.Containers.SeccompProfile != "" {
|
||||
return def.Containers.SeccompProfile, nil
|
||||
}
|
||||
|
||||
_, err = os.Stat(config.SeccompOverridePath)
|
||||
if err == nil {
|
||||
return config.SeccompOverridePath, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user