| 1 |
.TH "sepol_check_context" "3" "15 March 2005" "[email protected]" "SE Linux binary policy API documentation" |
| 2 |
.SH "NAME" |
| 3 |
sepol_check_context \- Check the validity of a security context against a binary policy. |
| 4 |
.SH "SYNOPSIS" |
| 5 |
.B #include <sepol/sepol.h> |
| 6 |
.sp |
| 7 |
.BI "int sepol_check_context(const char *" context ");" |
| 8 |
.sp |
| 9 |
.BI "int sepol_set_policydb_from_file(FILE *" fp ");" |
| 10 |
|
| 11 |
.SH "DESCRIPTION" |
| 12 |
.B sepol_check_context |
| 13 |
checks the validity of a security context against a binary policy |
| 14 |
previously loaded from a file via |
| 15 |
.B sepol_set_policydb_from_file. |
| 16 |
It is used by |
| 17 |
.B setfiles -c |
| 18 |
to validate a file contexts configuration against the binary policy |
| 19 |
upon policy builds. For validating a context against the active |
| 20 |
policy on a SELinux system, use |
| 21 |
.B security_check_context |
| 22 |
from libselinux instead. |
| 23 |
|
| 24 |
.SH "RETURN VALUE" |
| 25 |
Returns 0 on success or \-1 with errno set otherwise. |