From: Miroslav Grep <mgrepl@xxxxxxxxxx> 7a728e46 commit supposed to add a warning when a module name is different than a filename, but this warning is printed always. This commit fixes it. Fixes: $ semodule -X 400 -i testmod.pp Warning: SELinux userspace will refer to the module from testmod.pp as testmod rather than testmod Signed-off-by: Miroslav Grepl <mgrepl@xxxxxxxxxx> --- libsemanage/src/direct_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c index 4320f43..3719cb1 100644 --- a/libsemanage/src/direct_api.c +++ b/libsemanage/src/direct_api.c @@ -1619,7 +1619,9 @@ static int semanage_direct_install_file(semanage_handle_t * sh, if ((retval = parse_module_headers(sh, data, data_len, &module_name, &version)) != 0) goto cleanup; - fprintf(stderr, "Warning: SELinux userspace will refer to the module from %s as %s rather than %s\n", install_filename, module_name, filename); + if (strcmp(module_name, filename) != 0) + fprintf(stderr, "Warning: SELinux userspace will refer to the module from %s as %s rather than %s\n", install_filename, module_name, filename); + free(version); } retval = semanage_direct_install(sh, data, data_len, module_name, lang_ext); -- 1.8.3.1 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.