Merge "Replace security_context_t type" am: 530329222f

Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1824052

Change-Id: Ie3c20ee9187f349c308798ec370f7aa754fdfa85
This commit is contained in:
Thiébaud Weksteen 2021-09-10 11:31:07 +00:00 committed by Automerger Merge Worker
commit cdbde55e7b
2 changed files with 11 additions and 11 deletions

View file

@ -68,10 +68,10 @@ using android::base::unique_fd;
namespace android {
namespace vold {
security_context_t sBlkidContext = nullptr;
security_context_t sBlkidUntrustedContext = nullptr;
security_context_t sFsckContext = nullptr;
security_context_t sFsckUntrustedContext = nullptr;
char* sBlkidContext = nullptr;
char* sBlkidUntrustedContext = nullptr;
char* sFsckContext = nullptr;
char* sFsckUntrustedContext = nullptr;
bool sSleepOnUnmount = true;
@ -702,7 +702,7 @@ static status_t ReadLinesFromFdAndLog(std::vector<std::string>* output,
}
status_t ForkExecvp(const std::vector<std::string>& args, std::vector<std::string>* output,
security_context_t context) {
char* context) {
auto argv = ConvertToArgv(args);
android::base::unique_fd pipe_read, pipe_write;

12
Utils.h
View file

@ -38,10 +38,10 @@ static const char* kVoldAppDataIsolationEnabled = "persist.sys.vold_app_data_iso
static const char* kExternalStorageSdcardfs = "external_storage.sdcardfs.enabled";
/* SELinux contexts used depending on the block device type */
extern security_context_t sBlkidContext;
extern security_context_t sBlkidUntrustedContext;
extern security_context_t sFsckContext;
extern security_context_t sFsckUntrustedContext;
extern char* sBlkidContext;
extern char* sBlkidUntrustedContext;
extern char* sFsckContext;
extern char* sFsckUntrustedContext;
// TODO remove this with better solution, b/64143519
extern bool sSleepOnUnmount;
@ -104,8 +104,8 @@ status_t ReadMetadataUntrusted(const std::string& path, std::string* fsType, std
std::string* fsLabel);
/* Returns either WEXITSTATUS() status, or a negative errno */
status_t ForkExecvp(const std::vector<std::string>& args, std::vector<std::string>* output = nullptr,
security_context_t context = nullptr);
status_t ForkExecvp(const std::vector<std::string>& args,
std::vector<std::string>* output = nullptr, char* context = nullptr);
pid_t ForkExecvpAsync(const std::vector<std::string>& args);