frameworks/native
リビジョン | 792f8341e26a0eb5c6747cb713478459635d535a (tree) |
---|---|
日時 | 2020-04-14 23:37:03 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
コミッター | Chih-Wei Huang |
installd: a workaround for 9p filesystem
SELinux and getxattr seem not work on 9p filesystem.
Ignore the errors as a workaround.
TEST: be able to boot to Home on QEMU with shared 'data' folder.
@@ -317,7 +317,7 @@ static int restorecon_app_data_lazy(const std::string& path, const std::string& | ||
317 | 317 | } |
318 | 318 | if (selinux_android_restorecon_pkgdir(path.c_str(), seInfo.c_str(), uid, 0) < 0) { |
319 | 319 | PLOG(ERROR) << "Failed top-level restorecon for " << path; |
320 | - goto fail; | |
320 | + // goto fail; | |
321 | 321 | } |
322 | 322 | if (lgetfilecon(path.c_str(), &after) < 0) { |
323 | 323 | PLOG(ERROR) << "Failed after getfilecon for " << path; |
@@ -512,7 +512,7 @@ binder::Status InstalldNativeService::migrateAppData(const std::unique_ptr<std:: | ||
512 | 512 | auto target = (flags & FLAG_STORAGE_DE) ? de_path : ce_path; |
513 | 513 | auto source = (flags & FLAG_STORAGE_DE) ? ce_path : de_path; |
514 | 514 | |
515 | - if (getxattr(target.c_str(), kXattrDefault, nullptr, 0) == -1) { | |
515 | + if (getxattr(target.c_str(), kXattrDefault, nullptr, 0) == -1 && errno != ENODATA) { | |
516 | 516 | LOG(WARNING) << "Requested default storage " << target |
517 | 517 | << " is not active; migrating from " << source; |
518 | 518 | if (delete_dir_contents_and_dir(target) != 0) { |