Scroll to navigation

sepol_check_context(3) SE Linux binary policy API documentation sepol_check_context(3)

NAME

sepol_check_context - Check the validity of a security context against a binary policy.

SYNOPSIS

#include <sepol/sepol.h>

int sepol_check_context(const char *context);

int sepol_set_policydb_from_file(FILE *fp);

DESCRIPTION

sepol_check_contextchecks the validity of a security context against a binary policypreviously loaded from a file viasepol_set_policydb_from_file.It is used bysetfiles -cto validate a file contexts configuration against the binary policyupon policy builds. For validating a context against the activepolicy on a SELinux system, usesecurity_check_contextfrom libselinux instead.

RETURN VALUE

Returns 0 on success or -1 with errno set otherwise.

15 March 2005 stephen.smalley.work@gmail.com