OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not enforce CONTROL_VPN for calls from lockdown VPN.
[android-x86/frameworks-base.git]
/
services
/
core
/
java
/
com
/
android
/
server
/
net
/
LockdownVpnTracker.java
diff --git
a/services/core/java/com/android/server/net/LockdownVpnTracker.java
b/services/core/java/com/android/server/net/LockdownVpnTracker.java
index
3a1e4a4
..
752614f
100644
(file)
--- a/
services/core/java/com/android/server/net/LockdownVpnTracker.java
+++ b/
services/core/java/com/android/server/net/LockdownVpnTracker.java
@@
-140,7
+140,7
@@
public class LockdownVpnTracker {
if (egressDisconnected || egressChanged) {
clearSourceRulesLocked();
mAcceptedEgressIface = null;
if (egressDisconnected || egressChanged) {
clearSourceRulesLocked();
mAcceptedEgressIface = null;
- mVpn.stopLegacyVpn();
+ mVpn.stopLegacyVpn
Privileged
();
}
if (egressDisconnected) {
hideNotification();
}
if (egressDisconnected) {
hideNotification();
@@
-163,7
+163,9
@@
public class LockdownVpnTracker {
mAcceptedEgressIface = egressProp.getInterfaceName();
try {
mAcceptedEgressIface = egressProp.getInterfaceName();
try {
- mVpn.startLegacyVpn(mProfile, KeyStore.getInstance(), egressProp);
+ // Use the privileged method because Lockdown VPN is initiated by the system, so
+ // no additional permission checks are necessary.
+ mVpn.startLegacyVpnPrivileged(mProfile, KeyStore.getInstance(), egressProp);
} catch (IllegalStateException e) {
mAcceptedEgressIface = null;
Slog.e(TAG, "Failed to start VPN", e);
} catch (IllegalStateException e) {
mAcceptedEgressIface = null;
Slog.e(TAG, "Failed to start VPN", e);
@@
-250,7
+252,7
@@
public class LockdownVpnTracker {
mAcceptedEgressIface = null;
mErrorCount = 0;
mAcceptedEgressIface = null;
mErrorCount = 0;
- mVpn.stopLegacyVpn();
+ mVpn.stopLegacyVpn
Privileged
();
try {
mNetService.setFirewallEgressDestRule(mProfile.server, 500, false);
mNetService.setFirewallEgressDestRule(mProfile.server, 4500, false);
try {
mNetService.setFirewallEgressDestRule(mProfile.server, 500, false);
mNetService.setFirewallEgressDestRule(mProfile.server, 4500, false);