sepol_check_context(3)

sepol_check_context3

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

Usage

#include <sepol/sepol.h>

int sepol_check_context(const char *context);

int sepol_set_policydb_from_file(FILE *fp);

Overview

sepol_check_context checks the validity of a security context against a binary policy previously loaded from a file via sepol_set_policydb_from_file. It is used by 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 security_check_context from libselinux instead.

Return value

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

Releases

10 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0–7
  3. 8–12
  4. 13

From libsepol-dev 3.8.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.