summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorrpcraig <rpcraig@tycho.ncsc.mil>2012-12-04 09:37:23 -0500
committerrpcraig <rpcraig@tycho.ncsc.mil>2012-12-04 10:26:33 -0500
commitebab0ae105f1a6df593a4bc2549fae3ee8b2ade4 (patch)
tree8b04ee2c806ee78e3245a3251e377595fda7885e /core
parent568f923ba4cf522f699837bee0d8cba318343345 (diff)
downloadframeworks_base-ebab0ae105f1a6df593a4bc2549fae3ee8b2ade4.zip
frameworks_base-ebab0ae105f1a6df593a4bc2549fae3ee8b2ade4.tar.gz
frameworks_base-ebab0ae105f1a6df593a4bc2549fae3ee8b2ade4.tar.bz2
BackupManagerService files need new security labeling.
Use restorecon to label files and directories specific to BMS. * /data/backup : provide default type labeling for all files/dirs used by BMS. * /data/secure/backup : provide default type labeling used by BMS when encrypted file system is enabled. * /cache/<package name>.{data|restore} : specifically target files opened and passed by BMS to apps that have backup capabilities. * /cache/backup : default labeling for the directory used by the LocalTransport that stores backup files for local testing. Change-Id: Id4d46e82cd13abc2e395e0c30c515f0a33df93e7 Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Diffstat (limited to 'core')
-rw-r--r--core/java/com/android/internal/backup/LocalTransport.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/com/android/internal/backup/LocalTransport.java b/core/java/com/android/internal/backup/LocalTransport.java
index eed3e67..eb2d1fe 100644
--- a/core/java/com/android/internal/backup/LocalTransport.java
+++ b/core/java/com/android/internal/backup/LocalTransport.java
@@ -27,6 +27,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
+import android.os.SELinux;
import android.util.Log;
import com.android.org.bouncycastle.util.encoders.Base64;
@@ -64,6 +65,10 @@ public class LocalTransport extends IBackupTransport.Stub {
public LocalTransport(Context context) {
mContext = context;
+ mDataDir.mkdirs();
+ if (!SELinux.restorecon(mDataDir)) {
+ Log.e(TAG, "SELinux restorecon failed for " + mDataDir);
+ }
}
public Intent configurationIntent() {