aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-18 22:44:16 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-18 22:44:16 +0200
commit4348024d220b1da6ad56d9a4da2e3fdca66574bf (patch)
treea9d8443def39eabd465176a67184c833d37b2576
parentbae438a7342e8e4bf80bb9093b38f68c4a602258 (diff)
downloadlibextractor-4348024d220b1da6ad56d9a4da2e3fdca66574bf.tar.gz
libextractor-4348024d220b1da6ad56d9a4da2e3fdca66574bf.zip
tolerate apparmor installation failure
-rw-r--r--src/main/extractor_ipc_gnu.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main/extractor_ipc_gnu.c b/src/main/extractor_ipc_gnu.c
index 7eedfc7..7bb8914 100644
--- 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,
339#if HAVE_APPARMOR 339#if HAVE_APPARMOR
340 if (0 > aa_change_profile("libextractor")) 340 if (0 > aa_change_profile("libextractor"))
341 { 341 {
342 if (EINVAL != errno) 342 int eno = errno;
343 { 343
344 fprintf (stderr, 344 if ( (EINVAL != eno) &&
345 "Failure changing profile: %s", 345 (ENOENT != eno) )
346 strerror (errno)); 346 {
347 fprintf (stderr,
348 "Failure changing AppArmor profile: %s\n",
349 strerror (errno));
347 _exit(1); 350 _exit(1);
348 } 351 }
349 } 352 }