mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
TechnicalDocs: fix up c syntxa highlighting
parent
0ef9fbbb69
commit
d88003c65b
3 changed files with 6 additions and 4 deletions
|
@ -73,7 +73,7 @@ General points to consider
|
|||
- AppArmor's interface to the LSM is in the file **security/apparmor/lsm.c**
|
||||
|
||||
|
||||
```C
|
||||
```c
|
||||
static struct security_operations apparmor_ops = {
|
||||
.name = "apparmor",
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ match (present, not present, don't care) against a bit set.
|
|||
|
||||
The mnt flags set follows the kernel mount flag set, that is a 32
|
||||
bit mask in the same numerical order as stored in the Linux kernel.
|
||||
```C
|
||||
|
||||
```c
|
||||
#define MS_RDONLY (1 << 0)
|
||||
#define MS_RW (0 << 0)
|
||||
#define MS_NOSUID (1 << 1)
|
||||
|
@ -100,7 +101,8 @@ bits. That is for a bit set (MS\_RDONLY|MS\_NODEV) only the character
|
|||
in that order.
|
||||
|
||||
E.G. the dfa state matching for (MS\_RDONLY|MS\_NODEV) is
|
||||
```C
|
||||
|
||||
```c
|
||||
next_state = dfa_match(state, MS_RD_ONLY shift + 1)
|
||||
next_state = dfa_match(next_state, MS_NODEV + 1)
|
||||
```
|
||||
|
|
|
@ -33,7 +33,7 @@ and eventually a match that can be used to determine permissions.
|
|||
|
||||
Example: doing
|
||||
|
||||
```C
|
||||
```c
|
||||
file_rules_start_state = next_state(PolicyDB, start_state, AA_FILE_TYPE)
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue