summaryrefslogtreecommitdiffstats
path: root/bdaddr_read
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2012-07-17 18:37:49 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-07-17 18:37:57 +0700
commitff3b568f2272ad91db8140b06b48e3caaed4ee9f (patch)
treeec04eef18bdc9bebbd2d826a9bdf519a48d87218 /bdaddr_read
parent6b97cba6613a838e51bcc13709b83186248894a0 (diff)
downloaddevice_samsung_aries-common-ff3b568f2272ad91db8140b06b48e3caaed4ee9f.zip
device_samsung_aries-common-ff3b568f2272ad91db8140b06b48e3caaed4ee9f.tar.gz
device_samsung_aries-common-ff3b568f2272ad91db8140b06b48e3caaed4ee9f.tar.bz2
aries-common: fix bluetooth address permission
services now have a default umask of 0077, so give ownership of the file to bluetooth so that it can be read. Change-Id: I2f424c681df33361d88e79b04d8bba11517fe474
Diffstat (limited to 'bdaddr_read')
-rw-r--r--bdaddr_read/bdaddr_read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bdaddr_read/bdaddr_read.c b/bdaddr_read/bdaddr_read.c
index b795e92..360cc74 100644
--- a/bdaddr_read/bdaddr_read.c
+++ b/bdaddr_read/bdaddr_read.c
@@ -48,6 +48,10 @@ int main() {
return -2;
}
write(fd, bdaddr, 18);
+
+ // Set bluetooth owner
+ fchown(fd, 1002, 1002);
+
close(fd);
property_set("ro.bt.bdaddr_path", BDADDR_PATH);
return 0;