bpf: switch map/prog selinux_context field from storing 'fs_bpf_foo' to 'foo/'
This will eliminate the need for domain stuff.
After this:
git grep fs_bpf_
finds nothing but comments.
Test: TreeHugger
Flag: EXEMPT no-op
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie834e9b2b120ee772690b28457c1ff080cb914dd
diff --git a/bpf/loader/NetBpfLoad.cpp b/bpf/loader/NetBpfLoad.cpp
index 6ccd748..79583bd 100644
--- a/bpf/loader/NetBpfLoad.cpp
+++ b/bpf/loader/NetBpfLoad.cpp
@@ -151,12 +151,12 @@
constexpr const char* lookupSelinuxContext(const domain d) {
switch (d) {
case domain::unspecified: return "";
- case domain::tethering: return "fs_bpf_tethering";
- case domain::net_private: return "fs_bpf_net_private";
- case domain::net_shared: return "fs_bpf_net_shared";
- case domain::netd_readonly: return "fs_bpf_netd_readonly";
- case domain::netd_shared: return "fs_bpf_netd_shared";
- case domain::loader: return "fs_bpf_loader";
+ case domain::tethering: return "tethering/";
+ case domain::net_private: return "net_private/";
+ case domain::net_shared: return "net_shared/";
+ case domain::netd_readonly: return "netd_readonly/";
+ case domain::netd_shared: return "netd_shared/";
+ case domain::loader: return "loader/";
}
}