Skip to content
Snippets Groups Projects
Commit 350d2ae9 authored by Robert Craig's avatar Robert Craig Committed by Android Git Automerger
Browse files

am 65d4f44c: Various policy updates.

* commit '65d4f44c':
  Various policy updates.
parents d0d06251 65d4f44c
Branches
Tags
No related merge requests found
...@@ -77,10 +77,12 @@ $(sepolicy_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS) ...@@ -77,10 +77,12 @@ $(sepolicy_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS)
$(sepolicy_policy.conf) : $(call build_policy, security_classes initial_sids access_vectors global_macros mls_macros mls policy_capabilities te_macros attributes *.te roles users initial_sid_contexts fs_use genfs_contexts port_contexts) $(sepolicy_policy.conf) : $(call build_policy, security_classes initial_sids access_vectors global_macros mls_macros mls policy_capabilities te_macros attributes *.te roles users initial_sid_contexts fs_use genfs_contexts port_contexts)
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(hide) m4 -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) -s $^ > $@ $(hide) m4 -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) -s $^ > $@
$(hide) sed '/dontaudit/d' $@ > $@.dontaudit
$(LOCAL_BUILT_MODULE) : $(sepolicy_policy.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy $(LOCAL_BUILT_MODULE) : $(sepolicy_policy.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $@ $< $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $@ $<
$(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $(dir $<)/$(notdir $@).dontaudit $<.dontaudit
built_sepolicy := $(LOCAL_BUILT_MODULE) built_sepolicy := $(LOCAL_BUILT_MODULE)
sepolicy_policy.conf := sepolicy_policy.conf :=
......
...@@ -26,3 +26,9 @@ allow bluetoothdomain bluetooth:unix_stream_socket { read write shutdown }; ...@@ -26,3 +26,9 @@ allow bluetoothdomain bluetooth:unix_stream_socket { read write shutdown };
# tethering # tethering
allow bluetooth self:{ tun_socket udp_socket } { ioctl create }; allow bluetooth self:{ tun_socket udp_socket } { ioctl create };
allow bluetooth efs_file:dir search; allow bluetooth efs_file:dir search;
# Talk to init over the property socket.
unix_socket_connect(bluetooth, property, init)
# proc access.
allow bluetooth proc_bluetooth_writable:file rw_file_perms;
...@@ -30,8 +30,10 @@ type qemu_device, dev_type; ...@@ -30,8 +30,10 @@ type qemu_device, dev_type;
type kmsg_device, dev_type; type kmsg_device, dev_type;
type null_device, dev_type, mlstrustedobject; type null_device, dev_type, mlstrustedobject;
type random_device, dev_type; type random_device, dev_type;
type sensors_device, dev_type;
type serial_device, dev_type; type serial_device, dev_type;
type socket_device, dev_type; type socket_device, dev_type;
type timerirq_device, dev_type;
type tty_device, dev_type; type tty_device, dev_type;
type urandom_device, dev_type; type urandom_device, dev_type;
type video_device, dev_type; type video_device, dev_type;
...@@ -46,6 +48,7 @@ type watchdog_device, dev_type; ...@@ -46,6 +48,7 @@ type watchdog_device, dev_type;
type uhid_device, dev_type; type uhid_device, dev_type;
type tun_device, dev_type, mlstrustedobject; type tun_device, dev_type, mlstrustedobject;
type usbaccessory_device, dev_type; type usbaccessory_device, dev_type;
type usb_device, dev_type;
# All devices have a uart for the hci # All devices have a uart for the hci
# attach service. The uart dev node # attach service. The uart dev node
......
...@@ -5,6 +5,7 @@ type sockfs, fs_type; ...@@ -5,6 +5,7 @@ type sockfs, fs_type;
type rootfs, fs_type; type rootfs, fs_type;
type proc, fs_type; type proc, fs_type;
type qtaguid_proc, fs_type, mlstrustedobject; type qtaguid_proc, fs_type, mlstrustedobject;
type proc_bluetooth_writable, fs_type;
type selinuxfs, fs_type; type selinuxfs, fs_type;
type cgroup, fs_type, mlstrustedobject; type cgroup, fs_type, mlstrustedobject;
type sysfs, fs_type, mlstrustedobject; type sysfs, fs_type, mlstrustedobject;
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
/dev/block/loop[0-9]* u:object_r:loop_device:s0 /dev/block/loop[0-9]* u:object_r:loop_device:s0
/dev/block/ram[0-9]* u:object_r:ram_device:s0 /dev/block/ram[0-9]* u:object_r:ram_device:s0
/dev/block/mtdblock5 u:object_r:radio_device:s0 /dev/block/mtdblock5 u:object_r:radio_device:s0
/dev/bus/usb(.*)? u:object_r:usb_device:s0
/dev/cam u:object_r:camera_device:s0 /dev/cam u:object_r:camera_device:s0
/dev/console u:object_r:console_device:s0 /dev/console u:object_r:console_device:s0
/dev/cpuctl(/.*)? u:object_r:cpuctl_device:s0 /dev/cpuctl(/.*)? u:object_r:cpuctl_device:s0
......
...@@ -49,4 +49,4 @@ allow mediaserver qtaguid_proc:file rw_file_perms; ...@@ -49,4 +49,4 @@ allow mediaserver qtaguid_proc:file rw_file_perms;
allow mediaserver qtaguid_device:chr_file r_file_perms; allow mediaserver qtaguid_device:chr_file r_file_perms;
# Allow abstract socket connection # Allow abstract socket connection
allow mediaserver rild:unix_stream_socket connectto; allow mediaserver rild:unix_stream_socket { connectto read write setopt };
...@@ -37,3 +37,5 @@ allow rild radio_prop:property_service set; ...@@ -37,3 +37,5 @@ allow rild radio_prop:property_service set;
# Read/Write to uart driver (for GPS) # Read/Write to uart driver (for GPS)
allow rild gps_device:chr_file rw_file_perms; allow rild gps_device:chr_file rw_file_perms;
allow rild tty_device:chr_file rw_file_perms;
...@@ -221,3 +221,10 @@ allow system backup_data_file:dir { relabelto relabelfrom }; ...@@ -221,3 +221,10 @@ allow system backup_data_file:dir { relabelto relabelfrom };
allow system cache_backup_file:file { relabelto relabelfrom }; allow system cache_backup_file:file { relabelto relabelfrom };
# LocalTransport creates and relabels /cache/backup # LocalTransport creates and relabels /cache/backup
allow system cache_backup_file:dir { relabelto relabelfrom create_dir_perms }; allow system cache_backup_file:dir { relabelto relabelfrom create_dir_perms };
# Allow system to talk to usb device
allow system usb_device:chr_file rw_file_perms;
allow system usb_device:dir r_dir_perms;
# Allow system to talk to sensors and timer irq
allow system { sensors_device timerirq_device }:chr_file rw_file_perms;
...@@ -37,3 +37,6 @@ allow zygote sdcard_type:dir { write search setattr create add_name mounton }; ...@@ -37,3 +37,6 @@ allow zygote sdcard_type:dir { write search setattr create add_name mounton };
dontaudit zygote self:capability fsetid; dontaudit zygote self:capability fsetid;
allow zygote tmpfs:dir { write create add_name setattr mounton search }; allow zygote tmpfs:dir { write create add_name setattr mounton search };
allow zygote tmpfs:filesystem mount; allow zygote tmpfs:filesystem mount;
# Handle --invoke-with command when launching Zygote with a wrapper command.
allow zygote zygote_exec:file { execute_no_trans open };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment