platform_system_sepolicy/public
Benjamin Gordon 9b2e0cbeea sepolicy: Add rules for non-init namespaces
In kernel 4.7, the capability and capability2 classes were split apart
from cap_userns and cap2_userns (see kernel commit
8e4ff6f228e4722cac74db716e308d1da33d744f). Since then, Android cannot be
run in a container with SELinux in enforcing mode.

This change applies the existing capability rules to user namespaces as
well as the root namespace so that Android running in a container
behaves the same on pre- and post-4.7 kernels.

This is essentially:
  1. New global_capability_class_set and global_capability2_class_set
     that match capability+cap_userns and capability2+cap2_userns,
     respectively.
  2. s/self:capability/self:global_capability_class_set/g
  3. s/self:capability2/self:global_capability2_class_set/g
  4. Add cap_userns and cap2_userns to the existing capability_class_set
     so that it covers all capabilities.  This set was used by several
     neverallow and dontaudit rules, and I confirmed that the new
     classes are still appropriate.

Test: diff new policy against old and confirm that all new rules add
      only cap_userns or cap2_userns;
      Boot ARC++ on a device with the 4.12 kernel.
Bug: crbug.com/754831

Change-Id: I4007eb3a2ecd01b062c4c78d9afee71c530df95f
2017-11-21 08:34:32 -07:00
..
adbd.te Moving adbd from rootdir to system/bin 2017-08-28 17:38:13 +08:00
asan_extract.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
attributes Start tracking platform/vendor data access violations 2017-10-17 13:07:54 -07:00
audioserver.te
blkid.te
blkid_untrusted.te
bluetooth.te
bootanim.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
bootstat.te Remove bootstat access to proc label. 2017-09-18 10:29:24 -07:00
bufferhubd.te SELinux policies for PDX services 2017-05-15 10:07:05 -07:00
cameraserver.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
charger.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
clatd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
cppreopts.te Grant cppreopts.sh permissions to cleanup if it fails 2017-08-23 16:00:23 +00:00
crash_dump.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
device.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
dex2oat.te Move domain_deprecated into private policy 2017-07-24 07:39:54 -07:00
dhcp.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
display_service_server.te Add fwk_display_hwservice. 2017-05-17 11:00:28 -07:00
dnsmasq.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
domain.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
drmserver.te No access to tee domain over Unix domain sockets 2017-04-03 11:26:01 -07:00
dumpstate.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
e2fs.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
ephemeral_app.te
file.te system_server: access to /proc/sys/fs/pipe-max-size 2017-11-16 12:30:53 -08:00
fingerprintd.te Remove fingerprintd access to sysfs_type and cgroup label. 2017-09-19 17:12:14 -07:00
fsck.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
fsck_untrusted.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
gatekeeperd.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
global_macros sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
hal_allocator.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_audio.te hal_audio: remove access to audiohal_data_file 2017-10-21 03:29:36 +00:00
hal_bluetooth.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
hal_bootctl.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_broadcastradio.te Move Broadcast Radio HAL to a separate binary. 2017-09-15 10:16:48 -07:00
hal_camera.te hal_camera: Don't allow access to /data/misc/camera 2017-11-10 14:15:04 -08:00
hal_cas.te Remove unnecessary HAL permissions 2017-10-09 15:50:10 -07:00
hal_configstore.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
hal_contexthub.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_drm.te Move platform/vendor data violations to device policy 2017-11-20 17:18:56 +00:00
hal_dumpstate.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_fingerprint.te Move platform/vendor data violations to device policy 2017-11-20 17:18:56 +00:00
hal_gatekeeper.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_gnss.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_graphics_allocator.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
hal_graphics_composer.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
hal_health.te hal_health_default: permissions for default impl 2017-10-31 15:11:23 -07:00
hal_ir.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_keymaster.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_light.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_lowpan.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
hal_memtrack.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_neuralnetworks.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
hal_neverallows.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
hal_nfc.te Move platform/vendor data violations to device policy 2017-11-20 17:18:56 +00:00
hal_oemlock.te Add missing sepolicies for OemLock HAL. 2017-05-31 15:22:05 +01:00
hal_power.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_sensors.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
hal_telephony.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_tetheroffload.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
hal_thermal.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_tv_cec.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_tv_input.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_usb.te Allow callers of uevent_kernel_*() access to /proc/sys/kernel/overflowuid 2017-11-08 01:39:28 +00:00
hal_vibrator.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_vr.te Restrict access to hwservicemanager 2017-04-21 09:54:53 -07:00
hal_weaver.te Add missing sepolicies for the Weaver HAL. 2017-05-31 15:17:11 +01:00
hal_wifi.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
hal_wifi_offload.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
hal_wifi_supplicant.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
healthd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
hwservice.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
hwservicemanager.te Add hwservice_contexts and support for querying it. 2017-04-12 18:07:12 -07:00
idmap.te sepolicy: restrict /vendor/overlay from most coredomains 2017-04-06 13:28:16 -07:00
incident.te
incidentd.te
init.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
inputflinger.te
install_recovery.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
installd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
ioctl_defines Fix TIOCSCTTY ioctl definition for mips 2017-08-31 18:16:46 +02:00
ioctl_macros
isolated_app.te
kernel.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
keystore.te Move domain_deprecated into private policy 2017-07-24 07:39:54 -07:00
lmkd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
logd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
logpersist.te
mdnsd.te
mediacodec.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
mediadrmserver.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
mediaextractor.te mediaextractor: ensure no direct open()s 2017-10-07 15:01:24 +00:00
mediametrics.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
mediaprovider.te Split mediaprovider as a separate domain from priv_app 2017-04-17 15:30:35 -07:00
mediaserver.te mediaserver: remove access to 'sysfs' type. 2017-11-16 17:34:14 -08:00
modprobe.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
mtp.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
net.te
netd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
netutils_wrapper.te add netutils_wrappers 2017-04-14 22:57:27 -07:00
neverallow_macros Ban socket connections between core and vendor 2017-03-27 08:49:13 -07:00
nfc.te Remove unnecessary rules from NFC HAL clients 2017-03-22 16:22:33 -07:00
otapreopt_chroot.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
otapreopt_slot.te Sepolicy: Give otapreopt_slot read on A/B artifact links 2017-04-07 20:19:41 -07:00
performanced.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
perfprofd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
platform_app.te
postinstall.te
postinstall_dexopt.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
ppp.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
preopt2cachename.te
priv_app.te
profman.te
property.te Revert "Revert "Put pm.* property in new pm_prop context"" 2017-11-16 05:28:14 +00:00
racoon.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
radio.te Allow vendor apps to use surfaceflinger_service 2017-11-09 15:41:37 +00:00
recovery.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
recovery_persist.te
recovery_refresh.te
rild.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
roles
runas.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
sdcardd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
service.te Allow vendor apps to use surfaceflinger_service 2017-11-09 15:41:37 +00:00
servicemanager.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
sgdisk.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
shared_relro.te Allow shared_relro to connect to activity_service. 2017-07-24 17:38:40 -04:00
shell.te shell: neverallow access to 'proc' label. 2017-11-17 18:39:07 +00:00
slideshow.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
su.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
surfaceflinger.te
system_app.te
system_server.te
te_macros sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
tee.te Move domain_deprecated into private policy 2017-07-24 07:39:54 -07:00
thermalserviced.te PowerUI access to thermalservice 2017-10-14 01:05:58 +00:00
tombstoned.te SEPolicy: Changes for new stack dumping scheme. 2017-05-31 10:01:48 +00:00
toolbox.te
tzdatacheck.te Allow the shell user to run tzdatacheck 2017-04-20 09:31:36 +00:00
ueventd.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
uncrypt.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
untrusted_app.te
untrusted_app_25.te
untrusted_v2_app.te
update_engine.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
update_engine_common.te Make /proc/sys/kernel/random available to everyone 2017-11-20 21:02:21 +00:00
update_verifier.te Create sysfs_dm label. 2017-10-10 14:42:24 -07:00
vdc.te Sync internal master and AOSP sepolicy. 2017-09-26 14:38:47 -07:00
vendor_init.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
vendor_shell.te vendor_shell: add sepolicy for vendor shell 2017-04-14 09:38:51 -07:00
vendor_toolbox.te Allow init to run vendor toybox for modprobe 2017-05-24 15:01:20 -07:00
virtual_touchpad.te Allow vr_hwc and virtual_touchpad to query for permissions 2017-04-21 17:15:03 -04:00
vndservice.te Add default label and mapping for vendor services 2017-04-28 14:56:57 -07:00
vndservicemanager.te Initial sepolicy for vndservicemanager. 2017-03-23 00:20:43 +00:00
vold.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
vold_prepare_subdirs.te Move most of public/vold_prepare_subdirs.te to private 2017-10-25 13:06:25 -07:00
vr_hwc.te SELinux policies for PDX services 2017-05-10 16:39:19 -07:00
watchdogd.te
webview_zygote.te
wificond.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
wpantund.te sepolicy: Add rules for non-init namespaces 2017-11-21 08:34:32 -07:00
zygote.te