Skip to content
Snippets Groups Projects
Commit 8e553a41 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

runas: don't allow capabilities other than setuid/setgid

Add a compile time assertion that capabilities other than setuid
and setgid are never granted to run-as.

This is a compile time assertion only. No new capabilities are granted
or removed.

Change-Id: Ie86d651b539cdfb6f3eaafef0d5d3b716610a220
parent 21186a1f
Branches
Tags
No related merge requests found
......@@ -25,3 +25,11 @@ security_access_policy(runas)
selinux_check_context(runas) # validate context
allow runas self:process setcurrent;
allow runas non_system_app_set:process dyntransition; # setcon
###
### neverallow rules
###
# run-as cannot have capabilities other than CAP_SETUID and CAP_SETGID
neverallow runas self:capability ~{ setuid setgid };
neverallow runas self:capability2 *;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment