From 802cfe0f3d959f24d7c9c02785912c7e5ee58a1a Mon Sep 17 00:00:00 2001
From: Narayan Kamath <narayan@google.com>
Date: Thu, 17 Jan 2019 13:38:05 +0000
Subject: [PATCH] Allow installd sufficient permissions to rollback_data_file.

Used to capture and restore app data snapshots as implemented in change
I3e4d36c11e52fb885b585b1946e215cf986206fd.

Test: make, manual
Bug: 112431924

Change-Id: I1cd1ec3f9c93c4af65b662a5ada582299b595a8f
---
 private/installd.te | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/private/installd.te b/private/installd.te
index 26d5ef66b..0b7ec4e74 100644
--- a/private/installd.te
+++ b/private/installd.te
@@ -23,3 +23,8 @@ allow installd dumpstate:fifo_file r_file_perms;
 
 # Delete /system/bin/bcc generated artifacts
 allow installd app_exec_data_file:file unlink;
+
+# Capture userdata snapshots to /data/misc_[ce|de]/rollback and
+# subsequently restore them.
+allow installd rollback_data_file:dir create_dir_perms;
+allow installd rollback_data_file:file create_file_perms;
-- 
GitLab