From 40639378a412299aa63e89678c601e76b63de646 Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Wed, 16 Dec 2015 15:42:39 +1100 Subject: i9300: moar selinux Change-Id: I6e059f68f4d1c7ef82762443af14a1230b12b2f6 --- selinux/vold.te | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selinux/vold.te b/selinux/vold.te index b39e3e3..ba429d6 100644 --- a/selinux/vold.te +++ b/selinux/vold.te @@ -2,7 +2,8 @@ allow vold kernel:process setsched; allow vold sdcardd_exec:file { read open execute execute_no_trans }; allow vold log_device:dir search; -allow vold storage_stub_file:dir { read open }; +allow vold storage_stub_file:dir { read open search write add_name }; +allow vold mnt_media_rw_stub_file:dir { read open }; allow vold blkid_exec:file { getattr execute read open execute_no_trans }; allow vold log_device:chr_file { write open }; -- cgit v1.1 From bc3ae2755ee6b8ffc0d98b9a07f41ba690746fa8 Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Wed, 16 Dec 2015 14:08:40 +1100 Subject: i9300: enable dlmalloc Change-Id: I492e1974e0e1a1c0e70467e30190908909b60451 --- BoardConfig.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BoardConfig.mk b/BoardConfig.mk index b296fd8..f10e0e4 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -19,6 +19,9 @@ -include device/samsung/smdk4412-common/BoardCommonConfig.mk +# Bionic +MALLOC_IMPL := dlmalloc + # RIL BOARD_PROVIDES_LIBRIL := true BOARD_MODEM_TYPE := xmm6262 -- cgit v1.1 From a484daf3ddc1326f985592a5d6dd7953294295bc Mon Sep 17 00:00:00 2001 From: Christian Balster Date: Mon, 15 Jun 2015 17:46:29 +0200 Subject: i9300: libsensors: fix possible overflow while setting delay Even though we changed the signature of the set_delay() methods, we can still get an overflow while actually writing the values to sysfs. Let's adapt sysfs_value_read() and sysfs_value_write() too. Change-Id: If8eda7204831f0edabec890d4e3127be520fa3bf --- libsensors/input.c | 10 +++++----- libsensors/smdk4x12_sensors.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libsensors/input.c b/libsensors/input.c index eef2a8d..da3d6d7 100644 --- a/libsensors/input.c +++ b/libsensors/input.c @@ -214,10 +214,10 @@ int sysfs_path_prefix(char *name, char *path_prefix) return -1; } -int sysfs_value_read(char *path) +int64_t sysfs_value_read(char *path) { char buffer[100]; - int value; + int64_t value; int fd = -1; int rc; @@ -232,7 +232,7 @@ int sysfs_value_read(char *path) if (rc <= 0) goto error; - value = atoi(buffer); + value = (int64_t)strtoimax(buffer, NULL, 10); goto complete; error: @@ -245,7 +245,7 @@ complete: return value; } -int sysfs_value_write(char *path, int value) +int sysfs_value_write(char *path, int64_t value) { char buffer[100]; int fd = -1; @@ -258,7 +258,7 @@ int sysfs_value_write(char *path, int value) if (fd < 0) goto error; - snprintf((char *) &buffer, sizeof(buffer), "%d\n", value); + snprintf((char *) &buffer, sizeof(buffer), "%" PRId64 "\n", value); rc = write(fd, buffer, strlen(buffer)); if (rc < (int) strlen(buffer)) diff --git a/libsensors/smdk4x12_sensors.h b/libsensors/smdk4x12_sensors.h index da3d173..7100334 100644 --- a/libsensors/smdk4x12_sensors.h +++ b/libsensors/smdk4x12_sensors.h @@ -83,8 +83,8 @@ int uinput_rel_create(const char *name); void uinput_destroy(int uinput_fd); int input_open(char *name); int sysfs_path_prefix(char *name, char *path_prefix); -int sysfs_value_read(char *path); -int sysfs_value_write(char *path, int value); +int64_t sysfs_value_read(char *path); +int sysfs_value_write(char *path, int64_t value); int sysfs_string_read(char *path, char *buffer, size_t length); int sysfs_string_write(char *path, char *buffer, size_t length); -- cgit v1.1 From 96cccc9f5d4c5908bbc9051242cf1fb43b8d0373 Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Mon, 21 Dec 2015 22:46:15 +1100 Subject: i9300: fix bluetooth denials Change-Id: I198c0eafcd6b554c826b3c0814be6955301835e4 --- selinux/bluetooth.te | 1 + 1 file changed, 1 insertion(+) diff --git a/selinux/bluetooth.te b/selinux/bluetooth.te index 9d11918..dbfbe0e 100644 --- a/selinux/bluetooth.te +++ b/selinux/bluetooth.te @@ -4,3 +4,4 @@ allow bluetooth firmware_exynos:dir { open read search }; allow bluetooth firmware_exynos:file { open read }; allow bluetooth sysfs:file write; allow bluetooth efs_device_file:dir search; +allow bluetooth wifi_data_file:file r_file_perms; -- cgit v1.1