Skip to content
Snippets Groups Projects
Select Git revision
  • android-7.1.2_r28_klist
  • master default protected
  • 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
40 results

shell.te

  • Stephen Smalley's avatar
    42fb824c
    Refactor the shell domains. · 42fb824c
    Stephen Smalley authored
    
    Originally we used the shell domain for ADB shell only and
    the init_shell domain for the console service, both transitioned
    via automatic domain transitions on sh.  So they originally
    shared a common set of rules.  Then init_shell started to be used
    for sh commands invoked by init.<board>.rc files, and we switched
    the console service to just use the shell domain via seclabel entry
    in init.rc.  Even most of the sh command instances in init.<board>.rc
    files have been converted to use explicit seclabel options with
    more specific domains (one lingering use is touch_fw_update service
    in init.grouper.rc).  The primary purpose of init_shell at this point
    is just to shed certain permissions from the init domain when init invokes
    a shell command.  And init_shell and shell are quite different in
    their permission requirements since the former is used now for
    uid-0 processes spawned by init whereas the latter is used for
    uid-shell processes spawned by adb or init.
    
    Given these differences, drop the shelldomain attribute and take those
    rules directly into shell.te.  init_shell was an unconfined_domain(),
    so it loses nothing from this change.  Also switch init_shell to
    permissive_or_unconfined() so that we can see its actual denials
    in the future in userdebug/eng builds.
    
    Change-Id: I6e7e45724d1aa3a6bcce8df676857bc8eef568f0
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
    42fb824c
    History
    Refactor the shell domains.
    Stephen Smalley authored
    
    Originally we used the shell domain for ADB shell only and
    the init_shell domain for the console service, both transitioned
    via automatic domain transitions on sh.  So they originally
    shared a common set of rules.  Then init_shell started to be used
    for sh commands invoked by init.<board>.rc files, and we switched
    the console service to just use the shell domain via seclabel entry
    in init.rc.  Even most of the sh command instances in init.<board>.rc
    files have been converted to use explicit seclabel options with
    more specific domains (one lingering use is touch_fw_update service
    in init.grouper.rc).  The primary purpose of init_shell at this point
    is just to shed certain permissions from the init domain when init invokes
    a shell command.  And init_shell and shell are quite different in
    their permission requirements since the former is used now for
    uid-0 processes spawned by init whereas the latter is used for
    uid-shell processes spawned by adb or init.
    
    Given these differences, drop the shelldomain attribute and take those
    rules directly into shell.te.  init_shell was an unconfined_domain(),
    so it loses nothing from this change.  Also switch init_shell to
    permissive_or_unconfined() so that we can see its actual denials
    in the future in userdebug/eng builds.
    
    Change-Id: I6e7e45724d1aa3a6bcce8df676857bc8eef568f0
    Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>