Skip to content

Commit a5f5aeb

Browse files
ambr-eCQ Bot
authored andcommitted
[starnix] Remove kernel capability { dac_override } exception
Bug: 401196505 Change-Id: Ifbe7c9e6ba73134c82567d09216191d63e0c2bef Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1357724 Commit-Queue: Ambre Williams <[email protected]> Fuchsia-Auto-Submit: Ambre Williams <[email protected]> Reviewed-by: Wez <[email protected]> Reviewed-by: Nathaniel Manista <[email protected]>
1 parent fe22b1b commit a5f5aeb

File tree

1 file changed

+0
-7
lines changed
  • src/starnix/kernel/security/selinux_hooks

1 file changed

+0
-7
lines changed

src/starnix/kernel/security/selinux_hooks/task.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use selinux::{
1818
};
1919
use starnix_sync::{LockBefore, Locked, ThreadGroupLimits};
2020
use starnix_types::ownership::TempRef;
21-
use starnix_uapi::auth::CAP_DAC_OVERRIDE;
2221
use starnix_uapi::errors::Errno;
2322
use starnix_uapi::resource_limits::Resource;
2423
use starnix_uapi::signals::{SIGCHLD, SIGKILL, SIGSTOP, Signal};
@@ -713,12 +712,6 @@ pub(in crate::security) fn check_task_capable(
713712
capability: starnix_uapi::auth::Capabilities,
714713
) -> Result<(), Errno> {
715714
let sid = current_task_state(current_task).lock().current_sid;
716-
717-
// TODO: https://fxbug.dev/401196505 - Use "kernel act as" to eliminate this.
718-
if sid == InitialSid::Kernel.into() && capability == CAP_DAC_OVERRIDE {
719-
return Ok(());
720-
}
721-
722715
let permission = permission_from_capability(capability);
723716
check_self_permission(&permission_check, current_task, sid, permission, current_task.into())
724717
}

0 commit comments

Comments
 (0)