libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit 928b89a4beafd8647cc375186f9758c1e12174f0
parent 83598e591bcad195b2fcbb7e1a73060e337ee26f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 28 Oct 2015 18:48:16 +0000

-tolerate apparmor errors if not supported by Kernel

Diffstat:
Msrc/main/extractor_ipc_gnu.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/extractor_ipc_gnu.c b/src/main/extractor_ipc_gnu.c @@ -328,10 +328,15 @@ EXTRACTOR_IPC_channel_create_ (struct EXTRACTOR_PluginList *plugin, #if HAVE_SYS_APPARMOR_H #if HAVE_APPARMOR if (0 > aa_change_profile("libextractor")) + { + if (EINVAL != errno) { - perror("Failure changing profile -- aborting"); + fprintf (stderr, + "Failure changing profile: %s", + strerror (errno)); _exit(1); } + } #endif #endif EXTRACTOR_plugin_main_ (plugin, p1[0], p2[1]);