mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 13:58:22 +00:00
parser: make abi=<kenrel> respect the command line specied kernel features
Currently abi=<kernel> always grabs the kernels actual features but it should respect --kernel-features=. This is causing the simple tests to fail when abi=<kernel> is specified. Fix it so abi=<kernel> respects the kernel abi specified in the configs or on the command line. Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
64b920607b
commit
491def4385
@ -1780,9 +1780,13 @@ static int abi_features_base(struct aa_features **features, char *filename, bool
|
|||||||
bool cached;
|
bool cached;
|
||||||
|
|
||||||
if (search) {
|
if (search) {
|
||||||
if (strcmp(filename, "kernel") == 0)
|
if (strcmp(filename, "kernel") == 0) {
|
||||||
|
if (kernel_features) {
|
||||||
|
*features = aa_features_ref(kernel_features);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return aa_features_new_from_kernel(features);
|
return aa_features_new_from_kernel(features);
|
||||||
else if (strcmp(filename, "default") == 0) {
|
} else if (strcmp(filename, "default") == 0) {
|
||||||
return aa_features_new_from_string(features,
|
return aa_features_new_from_string(features,
|
||||||
default_features_abi,
|
default_features_abi,
|
||||||
strlen(default_features_abi));
|
strlen(default_features_abi));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user