InstanceNamespaceName returns the instance's AppArmor namespace.
(inst instance)
| 43 | |
| 44 | // InstanceNamespaceName returns the instance's AppArmor namespace. |
| 45 | func InstanceNamespaceName(inst instance) string { |
| 46 | // Unlike in profile names, / isn't an allowed character so replace with a -. |
| 47 | path := strings.ReplaceAll(strings.Trim(internalUtil.VarPath(""), "/"), "/", "-") |
| 48 | name := fmt.Sprintf("%s_<%s>", project.Instance(inst.Project().Name, inst.Name()), path) |
| 49 | return profileName("", name) |
| 50 | } |
| 51 | |
| 52 | // instanceProfileFilename returns the name of the on-disk profile name. |
| 53 | func instanceProfileFilename(inst instance) string { |
no test coverage detected
searching dependent graphs…