From 6d8b4369698b6f173cdeaf8d4109862560ffbb6f Mon Sep 17 00:00:00 2001
From: Philip Withnall <philip.withnall@collabora.co.uk>
Date: Tue, 15 Mar 2016 18:47:12 +0000
Subject: [PATCH] ofono: Disable ril and rildev plugins when running ofonod
 manually

This matches the command used in ofono.service (minus the --nodetach,
because we want the process to detach so we can do other things in the
test). This eliminates some spurious AppArmor failures caused by the RIL
code, and allows ofono to work (the RIL plugin does not work on the
i.MX6).

Bug-Apertis: https://bugs.apertis.org/show_bug.cgi?id=681

Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Philip Withnall <philip.withnall@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D2278
---
 apparmor/ofono/ofonod | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apparmor/ofono/ofonod b/apparmor/ofono/ofonod
index cc13309f..6f74803a 100755
--- a/apparmor/ofono/ofonod
+++ b/apparmor/ofono/ofonod
@@ -26,9 +26,9 @@ systemctl stop ofono.service
 echo -e "ofonod_\0" > /proc/$$/comm
 
 if [[ $1 == "malicious" ]]; then
-    LD_PRELOAD="$CURDIR/libofonod-malicious-override.so" /usr/sbin/ofonod
+    LD_PRELOAD="$CURDIR/libofonod-malicious-override.so" /usr/sbin/ofonod -P ril,rildev
 else
-    /usr/sbin/ofonod
+    /usr/sbin/ofonod -P ril,rildev
 fi
 
 # Check it is actually confined.
-- 
GitLab