libextractor

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

commit 4348024d220b1da6ad56d9a4da2e3fdca66574bf
parent bae438a7342e8e4bf80bb9093b38f68c4a602258
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 18 Jun 2018 22:44:16 +0200

tolerate apparmor installation failure

Diffstat:
Msrc/main/extractor_ipc_gnu.c | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/main/extractor_ipc_gnu.c b/src/main/extractor_ipc_gnu.c @@ -339,11 +339,14 @@ EXTRACTOR_IPC_channel_create_ (struct EXTRACTOR_PluginList *plugin, #if HAVE_APPARMOR if (0 > aa_change_profile("libextractor")) { - if (EINVAL != errno) - { - fprintf (stderr, - "Failure changing profile: %s", - strerror (errno)); + int eno = errno; + + if ( (EINVAL != eno) && + (ENOENT != eno) ) + { + fprintf (stderr, + "Failure changing AppArmor profile: %s\n", + strerror (errno)); _exit(1); } }