- Some SMACK rules are dynamically added while launching apps.
- To compare all SMACK rules, launching all apps before running security test.
Change-Id: I562d2bafaab0ea2dffdeaecfc41f85bfb8e04e09
rm $log_file
fi
+# Run all apps to load all SMACK rules
+sqlite3 /opt/dbspace/.security-manager.db "select name from app" | xargs -i sh -c 'app_launcher -s {} | true'
+
# Copy original SMACK rules
cat /sys/fs/smackfs/load2 | sort > $tmp_current_rule
smackctl apply
security-manager-rules-loader
+# Re-run all apps
+sqlite3 /opt/dbspace/.security-manager.db "select name from app" | xargs -i sh -c 'app_launcher -k {} | true'
+sqlite3 /opt/dbspace/.security-manager.db "select name from app" | xargs -i sh -c 'app_launcher -s {} | true'
+
# Copy calculated SMACK rules
cat /sys/fs/smackfs/load2 | sort > $tmp_calculated_rule