Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Removed internet/socket
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed Feb 22, 2014
1 parent 6494ed8 commit 478c79d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Changelog
* Restrict all *view* actions, show parameters and whitelisting ([issue](/../../issues/1419))
* You might see a few more messages *Restricted by XPrivacy* because of this
* Improved usage data layout, option to copy parameters ([issue](/../../issues/1424))
* Removed *internet/socket*, since it passes *internet/connect* anyway

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)

Expand Down
1 change: 0 additions & 1 deletion res/values/functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
<string name="internet_isConnectedOrConnecting" translatable="false"><![CDATA[<a href="http://developer.android.com/reference/android/net/NetworkInfo.html#isConnectedOrConnecting()">Google documentation</a>]]></string>
<string name="internet_getConnectionInfo" translatable="false"><![CDATA[<a href="http://developer.android.com/reference/android/net/wifi/WifiManager.html#getConnectionInfo()">Google documentation</a>]]></string>
<string name="internet_connect" translatable="false"><![CDATA[Will restrict access to the internet]]></string>
<string name="internet_socket" translatable="false"><![CDATA[<a href="http://developer.android.com/reference/java/net/Socket.html">Google documentation</a>]]></string>
<!-- ipc -->
<string name="ipc_android_accounts_IAccountManager" translatable="false"><![CDATA[Will restrict direct inter-process calls to the <a href="http://developer.android.com/reference/android/accounts/AccountManager.html">account manager</a>]]></string>
<string name="ipc_android_app_IActivityManager" translatable="false"><![CDATA[Will restrict direct inter-process calls to the <a href="http://developer.android.com/reference/android/app/ActivityManager.html">activity manager</a>]]></string>
Expand Down
1 change: 0 additions & 1 deletion src/biz/bokhorst/xprivacy/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public static List<Hook> get() {
mListHook.add(new Hook("internet", "getConnectionInfo", null, 10, null, null));

mListHook.add(new Hook("internet", "connect", null, 1, "1.99.45", null).dangerous().whitelist(cWhitelistIPAddress));
mListHook.add(new Hook("internet", "socket", null, 1, "1.99.46", null).dangerous());

mListHook.add(new Hook("ipc", "android.accounts.IAccountManager", "", 1, "1.99.1", null));
mListHook.add(new Hook("ipc", "android.app.IActivityManager", "", 1, "1.99.1", null));
Expand Down
7 changes: 1 addition & 6 deletions src/biz/bokhorst/xprivacy/XIoBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public String getClassName() {
// @formatter:on

private enum Methods {
open, connect, socket
open, connect
};

public static List<XHook> getInstances() {
Expand All @@ -58,7 +58,6 @@ public static List<XHook> getInstances() {
listHook.add(new XIoBridge(Methods.open, PrivacyManager.cIdentification, "/system/build.prop"));
listHook.add(new XIoBridge(Methods.open, PrivacyManager.cIdentification, "/sys/block/.../cid"));
listHook.add(new XIoBridge(Methods.open, PrivacyManager.cIdentification, "/sys/class/.../cid"));
listHook.add(new XIoBridge(Methods.socket, PrivacyManager.cInternet));
return listHook;
}

Expand Down Expand Up @@ -123,10 +122,6 @@ protected void before(XParam param) throws Throwable {
}
}

} else if (mMethod == Methods.socket) {
if (isRestricted(param))
param.setThrowable(new SocketException("XPrivacy"));

} else
Util.log(this, Log.WARN, "Unknown method=" + param.method.getName());
}
Expand Down

0 comments on commit 478c79d

Please sign in to comment.