summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorBenedict Wong <benedictwong@google.com>2020-06-15 17:54:29 +0000
committerBenedict Wong <benedictwong@google.com>2020-06-16 01:42:48 +0000
commit26d2378f5b3f1b2da5b897696988f3093df6ff57 (patch)
tree3883a7fa75e8137b449844e4c0259969d8920ca1 /tools/aapt2/java/JavaClassGenerator.cpp
parent87963f62070c354cca3b0b4e18fd5dcfa1abd79e (diff)
Set correct owner UID for VPN agentConnect()
This commit changes agentConnect to set the owner UID as the mOwnerUid field instead of the Binder.getCallingUid(). Binder.getCallingUid() can return incorrect results for platform VPNs, as agentConnect() is called under a clean calling UID. Additionally, this relaxes the ownerUid sanitization check to allow a VPN network's owner to see it's own ownership information. Vpn.mOwnerUid is guaranteed to be correct, as all VPNs MUST have called prepareInternal() at some previous point, which sets mOwnerUid as the package's UID (or SYSTEM_UID if this is legacy VPN). Bug: 150135470 Test: CTS tests showing ownership information Merged-In: Ic979dad73983d722365849fbfb0becfd432b894c Change-Id: Ic979dad73983d722365849fbfb0becfd432b894c (cherry picked from commit e29bf99a7fc1067c546d7fa6cbcb9001fb110d16)
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions