---
name: "security_load_policy"
section: "2"
platform: "linux"
package: "libselinux-dev"
version: "2002031409-4"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/security_load_policy"
---

# security\_load\_policy(2)

Load a new policy configuration

## NAME

security\_load\_policy - Load a new policy configuration

## SYNOPSIS

**#include \<ss.h\>**

**int security\_load\_policy(const char \*** *path***, \_\_u32** *pathlen***);**

## DESCRIPTION

The  **security\_load\_policy** call is used to load a new policy configuration from a file containing a binary representation of the configuration. The  *pathlen* parameter specifies the length of the pathname, including the terminating NULL character.  If  *pathlen* is zero, then the default policy configuration file is reloaded.

## RETURN VALUE

A zero is returned on success.  On error, -1 is returned, and   *errno* is set appropriately.

## ERRORS

- **EINVAL**

  The configuration was invalid.

- **EACCES**

  The process is not authorized to invoke this call on this file.

## SEE ALSO

[**security\_compute\_av**(2)](/security_compute_av/2.md), [**security\_sid\_to\_context**(2)](/security_sid_to_context/2.md), [**security\_context\_to\_sid**(2)](/security_context_to_sid/2.md), [**security\_transition\_sid**(2)](/security_transition_sid/2.md), [**security\_member\_sid**(2)](/security_member_sid/2.md), [**security\_load\_policy**(2)](/security_load_policy/2.md), [**security\_notify\_perm**(2)](/security_notify_perm/2.md), [**security\_get\_sids**(2)](/security_get_sids/2.md)
