mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 13:58:22 +00:00
Create wip conditional policy
31
wip-conditional-policy.md
Normal file
31
wip-conditional-policy.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
Ideas around how to structure policy to make it easy to conditionally enable/disable via a GUI.
|
||||||
|
|
||||||
|
```
|
||||||
|
profile example {
|
||||||
|
|
||||||
|
include <conditional_camera>
|
||||||
|
include <conditional_microphone>
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
conditional_camera
|
||||||
|
```
|
||||||
|
# ??? some syntax to declare a dependency on $allow_camera, making it a user defined var ...
|
||||||
|
|
||||||
|
if $allow_camera {
|
||||||
|
include <camera>
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
camera
|
||||||
|
```
|
||||||
|
# set meta data for the rules
|
||||||
|
tag=camera {
|
||||||
|
# regular rules
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
??? hrmmm how to handle hot plug udev devices better
|
Reference in New Issue
Block a user