Merge "Move qemud and /dev/qemu policy bits to emulator-specific sepolicy."

This commit is contained in:
Nick Kralevich 2014-02-25 21:54:39 +00:00 committed by Gerrit Code Review
commit e715487031
18 changed files with 52 additions and 1 deletions

View file

@ -77,6 +77,14 @@ TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy
BOARD_SEPOLICY_UNION += \
adbd.te \
bootanim.te \
device.te \
domain.te \
surfaceflinger.te
file.te \
file_contexts \
mediaserver.te \
qemud.te \
rild.te \
surfaceflinger.te \
system_server.te

View file

@ -0,0 +1 @@
allow adbd qemu_device:chr_file rw_file_perms;

View file

@ -0,0 +1 @@
type qemu_device, dev_type;

View file

@ -0,0 +1 @@
type qemud_socket, file_type;

View file

@ -0,0 +1,4 @@
/dev/qemu_.* u:object_r:qemu_device:s0
/dev/socket/qemud u:object_r:qemud_socket:s0
/system/bin/qemud u:object_r:qemud_exec:s0
/sys/qemu_trace(/.*)? -- u:object_r:sysfs_writable:s0

View file

@ -0,0 +1 @@
allow mediaserver qemu_device:chr_file rw_file_perms;

View file

@ -0,0 +1,6 @@
# qemu support daemon
type qemud, domain;
type qemud_exec, exec_type, file_type;
init_daemon_domain(qemud)
unconfined_domain(qemud)

View file

@ -0,0 +1,2 @@
allow rild qemu_device:chr_file rw_file_perms;
unix_socket_connect(rild, qemud, qemud)

View file

@ -0,0 +1,2 @@
unix_socket_connect(system_server, qemud, qemud)
allow system_server qemu_device:chr_file rw_file_perms;

View file

@ -45,8 +45,15 @@ TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
BOARD_SEPOLICY_DIRS += build/target/board/generic_x86/sepolicy
BOARD_SEPOLICY_UNION += \
adbd.te \
device.te \
domain.te \
file.te \
file_contexts \
healthd.te \
installd.te \
mediaserver.te \
qemud.te \
rild.te \
system_server.te \
zygote.te

View file

@ -0,0 +1 @@
allow adbd qemu_device:chr_file rw_file_perms;

View file

@ -0,0 +1 @@
type qemu_device, dev_type;

View file

@ -0,0 +1 @@
type qemud_socket, file_type;

View file

@ -0,0 +1,4 @@
/dev/qemu_.* u:object_r:qemu_device:s0
/dev/socket/qemud u:object_r:qemud_socket:s0
/system/bin/qemud u:object_r:qemud_exec:s0
/sys/qemu_trace(/.*)? -- u:object_r:sysfs_writable:s0

View file

@ -0,0 +1 @@
allow mediaserver qemu_device:chr_file rw_file_perms;

View file

@ -0,0 +1,6 @@
# qemu support daemon
type qemud, domain;
type qemud_exec, exec_type, file_type;
init_daemon_domain(qemud)
unconfined_domain(qemud)

View file

@ -0,0 +1,2 @@
allow rild qemu_device:chr_file rw_file_perms;
unix_socket_connect(rild, qemud, qemud)

View file

@ -1 +1,3 @@
allow system_server self:process execmem;
unix_socket_connect(system_server, qemud, qemud)
allow system_server qemu_device:chr_file rw_file_perms;