From c7610f2aee2291584d92cad2184a34f4402ea000 Mon Sep 17 00:00:00 2001 From: Pat Erley Date: Wed, 13 Jan 2016 11:37:39 -0800 Subject: recovery: Fix recursive rm wipe of data Android 6 re-introduced MCS/MLS SELinux contexts. Unforunately, this broke our previous SELinux model for walking /data and unlinking everything but media. Fix this by mounting /data with a temporary SELinux context that works with the previous model. Ticket: CYNGNOS-1747 Change-Id: Id87ad3bb357102c3a8bd7c1417183d788ef858a0 --- roots.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'roots.h') diff --git a/roots.h b/roots.h index addb142..2140363 100644 --- a/roots.h +++ b/roots.h @@ -30,6 +30,8 @@ Volume* volume_for_path(const char* path); // success (volume is mounted). int ensure_volume_mounted(Volume* v, bool force_rw=false); int ensure_path_mounted(const char* path, bool force_rw=false); +// Above, plus override SELinux default context +int remount_for_wipe(const char* path); // Similar to ensure_path_mounted, but allows one to specify the mount_point. int ensure_path_mounted_at(const char* path, const char* mount_point, bool force_rw=false); -- cgit v1.1