summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2014-09-26 14:26:13 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2014-09-26 14:26:13 +0800
commit4996f709fe4acc79f0f132fed3ac675e69219ff9 (patch)
treec3f7dfe601e28d807452ba9554632e6ca5253af1
parent07b5859ffbacf87e77d8f90dcc0ada8d30a9861e (diff)
downloadcommon-4996f709fe4acc79f0f132fed3ac675e69219ff9.tar.gz
eth0_dns.sh: change to use ndc command to set dns server
use "ndc resolver" command to make dns work on juno device, instead of using the "svc netd" command we added ourselves. Change-Id: I55095a89f5e495c87dd8ecc7e82d031bc6274e16 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--eth0_dns.sh3
-rw-r--r--sepolicy/shell.te4
2 files changed, 5 insertions, 2 deletions
diff --git a/eth0_dns.sh b/eth0_dns.sh
new file mode 100644
index 0000000..2317931
--- /dev/null
+++ b/eth0_dns.sh
@@ -0,0 +1,3 @@
+#!/system/bin/sh
+/system/bin/ndc resolver setdefaultif eth0
+/system/bin/ndc resolver setifdns eth0 '' 8.8.8.8
diff --git a/sepolicy/shell.te b/sepolicy/shell.te
index b4f6f1b..4069fc1 100644
--- a/sepolicy/shell.te
+++ b/sepolicy/shell.te
@@ -1,7 +1,7 @@
allow shell serial_device:chr_file rw_file_perms;
-# hack for running svc netd setdefaultifdns
-allow shell dalvikcache_data_file:file rw_file_perms;
+# allow to use ndc command to enable dns work
+allow shell netd_socket:sock_file write;
# hack for running netcfg eth0 dhcp/ifconfig/ping on console session
allow shell self:packet_socket create_socket_perms;