Replace security_context_t type
security_context_t has been marked as deprecated in libselinux from
version 3.2. Update to the `char*` type.
Bug: 190808996
Test: m
Change-Id: I6f40e161251c79893d41e12c368715736578aacc
diff --git a/Utils.h b/Utils.h
index a3316c3..bb6615c 100644
--- a/Utils.h
+++ b/Utils.h
@@ -38,10 +38,10 @@
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 @@
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);