vold: Make asec sdcard dir a hidden dir

Signed-off-by: San Mehat <san@google.com>
gugelfrei
San Mehat 15 years ago
parent 3bb6020e46
commit 52c2ccb6d2

@ -61,7 +61,7 @@ const char *Volume::SEC_STGDIR = "/mnt/secure/staging";
* asec imagefiles. This path will be obscured before the mount is
* exposed to non priviledged users.
*/
const char *Volume::SEC_STG_SECIMGDIR = "/mnt/secure/staging/android_secure";
const char *Volume::SEC_STG_SECIMGDIR = "/mnt/secure/staging/.android_secure";
/*
* Path to where *only* root can access asec imagefiles
@ -328,6 +328,16 @@ int Volume::mountVol() {
int Volume::createBindMounts() {
unsigned long flags;
/*
* Rename old /android_secure -> /.android_secure
*/
if (!access("/mnt/secure/staging/android_secure", R_OK | X_OK) &&
access(SEC_STG_SECIMGDIR, R_OK | X_OK)) {
if (rename("/mnt/secure/staging/android_secure", SEC_STG_SECIMGDIR)) {
LOGE("Failed to rename legacy asec dir (%s)", strerror(errno));
}
}
/*
* Ensure that /android_secure exists and is a directory
*/

Loading…
Cancel
Save