diff options
author | Maciej Żenczykowski <maze@google.com> | 2022-06-21 09:40:04 -0700 |
---|---|---|
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | 2022-06-21 19:58:42 +0000 |
commit | a529b323afab9c3ef6ea2204d21b758b5cab4077 (patch) | |
tree | c66a20130302e4c057f21c8d1ee26c522aa1b0a7 | |
parent | 5ed96f4a1a7dfc7633400e97e719696997efd843 (diff) | |
download | bpf-a529b323afab9c3ef6ea2204d21b758b5cab4077.tar.gz |
disable bpfloader selinux_context support
(it requires bpfloader to be granted rename priv by selinux)
Bug: 218408035
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic27d0e5f3c6b78db39c6742fe9e1955f65d2b1f5
(cherry picked from commit a7a11bda004622534e4ed4ff07a23cf5024a218a)
Merged-In: Ic27d0e5f3c6b78db39c6742fe9e1955f65d2b1f5
-rw-r--r-- | libbpf_android/Loader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbpf_android/Loader.cpp b/libbpf_android/Loader.cpp index db00634..e5eb29a 100644 --- a/libbpf_android/Loader.cpp +++ b/libbpf_android/Loader.cpp @@ -792,6 +792,8 @@ static int createMaps(const char* elfPath, ifstream& elfFile, vector<unique_fd>& ALOGI("map %s selinux_context [%32s] -> %d -> '%s' (%s)", mapNames[i].c_str(), md[i].selinux_context, selinux_context, lookupSelinuxContext(selinux_context), lookupPinSubdir(selinux_context)); + // temp disable until selinux grants bpfloader 'rename' priv + selinux_context = domain::unspecified; } domain pin_subdir = getDomainFromPinSubdir(md[i].pin_subdir); @@ -1018,6 +1020,8 @@ static int loadCodeSections(const char* elfPath, vector<codeSection>& cs, const ALOGI("prog %s selinux_context [%32s] -> %d -> '%s' (%s)", name.c_str(), cs[i].prog_def->selinux_context, selinux_context, lookupSelinuxContext(selinux_context), lookupPinSubdir(selinux_context)); + // temp disable until selinux grants bpfloader 'rename' priv + selinux_context = domain::unspecified; } if (specified(pin_subdir)) { |