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

# selabel\_partial\_match(3)

determine whether a direct or partial match is possible on a file path - Only supported on file backend.

## NAME

selabel\_partial\_match - determine whether a direct or partial match is possible on a file path - Only supported on file backend.

## SYNOPSIS

**#include \<stdbool.h\>**\
 **#include \<selinux/selinux.h\>**\
 **#include \<selinux/label.h\>**

**bool selabel\_partial\_match(struct selabel\_handle \****hnd***,** **const char \****key***);**

## DESCRIPTION

**selabel\_partial\_match**() performs a partial match operation on the handle *hnd*, returning TRUE or FALSE. The *key* parameter is a file path to check for a direct or partial match.

## RETURN VALUE

TRUE is returned if a direct or partial match is found, FALSE if not.

## SEE ALSO

[**selabel\_open**(3)](/selabel_open/3.md), [**selabel\_stats**(3)](/selabel_stats/3.md), [**selinux\_set\_callback**(3)](/selinux_set_callback/3.md), [**selinux**(8)](/selinux/8.md), [**selabel\_file**(5)](/selabel_file/5.md)
