Skip to content
Snippets Groups Projects
Select Git revision
  • cedf09080ea2fd2d045dfc46f5170ea8fa17cfce
  • master default protected
  • android-7.1.2_r28_klist
  • pie-cts-release
  • pie-vts-release
  • pie-cts-dev
  • oreo-mr1-iot-release
  • sdk-release
  • oreo-m6-s4-release
  • oreo-m4-s12-release
  • pie-release
  • pie-r2-release
  • pie-r2-s1-release
  • oreo-vts-release
  • oreo-cts-release
  • oreo-dev
  • oreo-mr1-dev
  • pie-gsi
  • pie-platform-release
  • pie-dev
  • oreo-cts-dev
  • android-o-mr1-iot-release-1.0.4
  • android-9.0.0_r8
  • android-9.0.0_r7
  • android-9.0.0_r6
  • android-9.0.0_r5
  • android-8.1.0_r46
  • android-8.1.0_r45
  • android-n-iot-release-smart-display-r2
  • android-vts-8.1_r5
  • android-cts-8.1_r8
  • android-cts-8.0_r12
  • android-cts-7.1_r20
  • android-cts-7.0_r24
  • android-o-mr1-iot-release-1.0.3
  • android-cts-9.0_r1
  • android-8.1.0_r43
  • android-8.1.0_r42
  • android-n-iot-release-smart-display
  • android-p-preview-5
  • android-9.0.0_r3
41 results

dhcp.te

Blame
  • user avatar
    Nick Kralevich authored
    toolbox_exec is executed by dhcpcd-run-hooks.
    
    Addresses the following auditallow log spam:
    
      avc: granted { read open } for comm="dhcpcd-run-hook" path="/system/bin/toybox" dev="dm-0" ino=650 scontext=u:r:dhcp:s0 tcontext=u:object_r:toolbox_exec:s0 tclass=file
      avc: granted { read } for comm="setprop" name="toybox" dev="dm-0" ino=650 scontext=u:r:dhcp:s0 tcontext=u:object_r:toolbox_exec:s0 tclass=file
      avc: granted { execute } for comm="dhcpcd-run-hook" name="toybox" dev="dm-0" ino=650 scontext=u:r:dhcp:s0 tcontext=u:object_r:toolbox_exec:s0 tclass=file
      avc: granted { execute_no_trans } for comm="dhcpcd-run-hook" path="/system/bin/toybox" dev="dm-0" ino=650 scontext=u:r:dhcp:s0 tcontext=u:object_r:toolbox_exec:s0 tclass=file
      avc: granted { read execute } for comm="setprop" path="/system/bin/toybox" dev="dm-0" ino=639 scontext=u:r:dhcp:s0 tcontext=u:object_r:toolbox_exec:s0 tclass=file
    
    Change-Id: Ib83c291961a5573397830032a67a2f6861ae2e71
    c29b2fc4
    History
    dhcp.te 1.16 KiB
    type dhcp, domain, domain_deprecated;
    type dhcp_exec, exec_type, file_type;
    type dhcp_data_file, file_type, data_file_type;
    
    init_daemon_domain(dhcp)
    net_domain(dhcp)
    
    allow dhcp cgroup:dir { create write add_name };
    allow dhcp self:capability { setgid setuid net_admin net_raw net_bind_service };
    allow dhcp self:packet_socket create_socket_perms;
    allow dhcp self:netlink_route_socket nlmsg_write;
    allow dhcp shell_exec:file rx_file_perms;
    allow dhcp system_file:file rx_file_perms;
    
    # dhcpcd runs dhcpcd-hooks/*, which runs getprop / setprop (toolbox_exec)
    allow dhcp toolbox_exec:file rx_file_perms;
    
    # For /proc/sys/net/ipv4/conf/*/promote_secondaries
    allow dhcp proc_net:file write;
    
    set_prop(dhcp, dhcp_prop)
    set_prop(dhcp, pan_result_prop)
    
    type_transition dhcp system_data_file:{ dir file } dhcp_data_file;
    allow dhcp dhcp_data_file:dir create_dir_perms;
    allow dhcp dhcp_data_file:file create_file_perms;
    
    # PAN connections
    allow dhcp netd:fd use;
    allow dhcp netd:fifo_file rw_file_perms;
    allow dhcp netd:{ dgram_socket_class_set unix_stream_socket } { read write };
    allow dhcp netd:{ netlink_kobject_uevent_socket netlink_route_socket netlink_nflog_socket } { read write };