File: sepol_check_context.3

package info (click to toggle)
android-platform-external-libselinux 8.1.0%2Br23-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 33,252 kB
  • sloc: ansic: 142,533; python: 23,929; makefile: 1,760; yacc: 1,367; sh: 1,108; lex: 448; xml: 176
file content (25 lines) | stat: -rw-r--r-- 865 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.TH "sepol_check_context" "3" "15 March 2005" "sds@tycho.nsa.gov" "SE Linux binary policy API documentation"
.SH "NAME"
sepol_check_context \- Check the validity of a security context against a binary policy.
.SH "SYNOPSIS"
.B #include <sepol/sepol.h>
.sp
.BI "int sepol_check_context(const char *" context ");"
.sp
.BI "int sepol_set_policydb_from_file(FILE *" fp ");"

.SH "DESCRIPTION"
.B sepol_check_context
checks the validity of a security context against a binary policy
previously loaded from a file via
.B sepol_set_policydb_from_file.
It is used by 
.B setfiles -c
to validate a file contexts configuration against the binary policy
upon policy builds.  For validating a context against the active
policy on a SELinux system, use
.B security_check_context
from libselinux instead.

.SH "RETURN VALUE"
Returns 0 on success or \-1 with errno set otherwise.