Skip to content
Snippets Groups Projects
domain.te 34.5 KiB
Newer Older
  • Learn to ignore specific revisions
  •   domain
      -installd
      -profman
    } profman_exec:file no_x_file_perms;
    
    
    # Enforce restrictions on kernel module origin.
    # Do not allow kernel module loading except from system,
    # vendor, and boot partitions.
    
    neverallow * ~{ system_file vendor_file rootfs }:system module_load;
    
    
    # Only allow filesystem caps to be set at build time or
    # during upgrade by recovery.
    neverallow {
      domain
      -recovery
    } self:capability setfcap;
    
    
    # Enforce AT_SECURE for executing crash_dump.
    neverallow domain crash_dump:process noatsecure;
    
    
    # Do not permit non-core domains to register HwBinder services which are
    # guaranteed to be provided by core domains only.
    neverallow ~coredomain coredomain_hwservice:hwservice_manager add;
    
    # Do not permit the registeration of HwBinder services which are guaranteed to
    # be passthrough only (i.e., run in the process of their clients instead of a
    # separate server process).
    neverallow * same_process_hwservice:hwservice_manager add;