---
name: "semanage_bool"
section: "3"
platform: "linux"
package: "libsemanage-dev"
version: "3.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/semanage_bool"
---

# semanage\_bool(3)

SELinux Policy Booleans Management API

## NAME

semanage\_bool - SELinux Policy Booleans Management API

## SYNOPSIS

**#include \<semanage/boolean\_record.h\>**\
 **#include \<semanage/booleans\_active.h\>**\
 **#include \<semanage/booleans\_policy.h\>**\
 **#include \<semanage/booleans\_local.h\>**

This object contains properties associated with a SELinux policy boolean

For details on a specific function, see its manual page.

## Record API Overview

**semanage\_bool\_create**(3)**-**\
 create a boolean

**semanage\_bool\_free**(3)**-**\
 release resources for this boolean

**semanage\_bool\_key\_create**(3)**-**\
 create a key, which can be used to identify a boolean

**semanage\_bool\_key\_free**(3)**-**\
 release resources for this boolean key

**semanage\_bool\_key\_extract**(3)**-**\
 create a key matching this boolean

**semanage\_bool\_clone**(3)**-**\
 create an identical boolean (deep-copy clone)

**semanage\_bool\_compare**(3)**-**\
 compare this boolean to the provided key

**semanage\_bool\_compare2**(3)**-**\
 compare this boolean to another

## Properties API Overview

**semanage\_bool\_get\_name**(3)**-**\
 return the name of this boolean

**semanage\_bool\_set\_name**(3)**-**\
 set the name of this boolean

**semanage\_bool\_get\_value**(3)**-**\
 return the value of this boolean

**semanage\_bool\_set\_value**(3)**-**\
 set the value of this boolean

## Record Store API Overview

[**semanage\_bool\_modify\_local**(3)](/semanage_bool_modify_local/3.md)**-**\
 add or update a boolean in the local store

[**semanage\_bool\_set\_active**(3)](/semanage_bool_set_active/3.md)**-**\
 update a boolean in the currently active policy

[**semanage\_bool\_del\_local**(3)](/semanage_bool_del_local/3.md)**-**\
 delete a boolean from the local store

[**semanage\_bool\_exists**(3)](/semanage_bool_exists/3.md)**-**\
 check if a boolean is defined in the persistent policy

[**semanage\_bool\_exists\_local**(3)](/semanage_bool_exists_local/3.md)**-**\
 check if a boolean is defined in the local store

[**semanage\_bool\_exists\_active**(3)](/semanage_bool_exists_active/3.md)**-**\
 check if a boolean is defined in the currently active policy

[**semanage\_bool\_query**(3)](/semanage_bool_query/3.md)**-**\
 query a boolean in the persistent policy

[**semanage\_bool\_query\_local**(3)](/semanage_bool_query_local/3.md)**-**\
 query a boolean in the local store

[**semanage\_bool\_query\_active**(3)](/semanage_bool_query_active/3.md)**-**\
 query a boolean in the currently active policy

[**semanage\_bool\_count**(3)](/semanage_bool_count/3.md)**-**\
 count the number of booleans defined in the persistent policy

[**semanage\_bool\_count\_local**(3)](/semanage_bool_count_local/3.md)**-**\
 count the number of booleans defined in the local store

[**semanage\_bool\_count\_active**(3)](/semanage_bool_count_active/3.md)**-**\
 count the number of booleans defined in the currently active policy

[**semanage\_bool\_iterate**(3)](/semanage_bool_iterate/3.md)**-**\
 execute a callback for each boolean in the persistent policy

[**semanage\_bool\_iterate\_local**(3)](/semanage_bool_iterate_local/3.md)**-**\
 execute a callback for each boolean in the local store

[**semanage\_bool\_iterate\_active**(3)](/semanage_bool_iterate_active/3.md)**-**\
 execute a callback for each boolean in the currently active policy

[**semanage\_bool\_list**(3)](/semanage_bool_list/3.md)**-**\
 return an array containing all booleans in the persistent policy

[**semanage\_bool\_list\_local**(3)](/semanage_bool_list_local/3.md)**-**\
 return an array containing all booleans in the local store

[**semanage\_bool\_list\_active**(3)](/semanage_bool_list_active/3.md)**-**\
 return an array containing all booleans in the currently active policy
