summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorBenedict Wong <benedictwong@google.com>2020-06-08 11:55:38 -0700
committerBenedict Wong <benedictwong@google.com>2020-06-08 14:33:01 -0700
commit212b7e9edbc04025b454ed8ab2189794bbf74614 (patch)
tree0264e7d7d20b397e396c0b9edc0d884e8426d149 /tools/aapt2/java/JavaClassGenerator.cpp
parent79100ffd9c82574af3b8a7dc19d0666b11d94d3b (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 Change-Id: Ic979dad73983d722365849fbfb0becfd432b894c
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions