diff options
author | 2021-09-15 20:06:13 +0200 | |
---|---|---|
committer | 2021-09-15 20:06:13 +0200 | |
commit | 146ed6e84f1a41bc6ff1b00953aecc899539f460 (patch) | |
tree | f76a194720aef635c215cad795ca3d95a1408623 | |
parent | a3612f324c0d4c296930123ba07e915bbebb6dc2 (diff) |
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: Icd8aa61b0f5981aeb0c605652e3fafd4670d78f3
-rw-r--r-- | cmds/cmd/cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/cmd/cmd.cpp b/cmds/cmd/cmd.cpp index be2c702034..8f1c01ab2c 100644 --- a/cmds/cmd/cmd.cpp +++ b/cmds/cmd/cmd.cpp @@ -52,7 +52,7 @@ static int sort_func(const String16* lhs, const String16* rhs) } struct SecurityContext_Delete { - void operator()(security_context_t p) const { + void operator()(char* p) const { freecon(p); } }; @@ -108,7 +108,7 @@ public: } if (is_selinux_enabled() && seLinuxContext.size() > 0) { String8 seLinuxContext8(seLinuxContext); - security_context_t tmp = nullptr; + char* tmp = nullptr; getfilecon(fullPath.string(), &tmp); Unique_SecurityContext context(tmp); if (checkWrite) { |