selabel\_get\_digests\_all\_partial\_matches(3) Library Functions Manual selabel\_get\_digests\_all\_partial\_matches(3)

# [NAME](#NAME)

selabel\_get\_digests\_all\_partial\_matches - retrieve the partial matches digest and the xattr digest that applies to the supplied path - Only supported on file backend.

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;stdbool.h&gt;**  
**#include &lt;selinux/selinux.h&gt;**  
**#include &lt;selinux/label.h&gt;**

**bool selabel\_get\_digests\_all\_partial\_matches(**  
**struct selabel\_handle \*hnd,**  
**const char \*key,**  
**uint8\_t \*\*calculated\_digest,**  
**uint8\_t \*\*xattr\_digest,**  
**size\_t \*digest\_len);**

# [DESCRIPTION](#DESCRIPTION)

**selabel\_get\_digests\_all\_partial\_matches**() retrieves the file\_contexts partial matches digest and the xattr digest that applies to the supplied path on the handle *hnd*.  
The *key* parameter is the path to retrieve the digests.  
The *calculated\_digest* is a pointer to the *key* calculated file\_contexts digest of all applicable partial matches, or NULL if none exist. The caller must [**free**(3)](/man/os/libselinux/free.3) the buffer.  
The *xattr\_digest* is a pointer to the *key* [**xattr**(7)](/man/os/libselinux/xattr.7) stored digest, or NULL if it does not exist. The caller must [**free**(3)](/man/os/libselinux/free.3) the buffer.  
The *digest\_len* is the length of the digests that will always be returned (even if both are NULL). Note that if both digests are returned, they will always be the same length.

# [RETURN VALUE](#RETURN_VALUE)

TRUE if the digests match or FALSE if they do not or either or both are missing.

# [SEE ALSO](#SEE_ALSO)

[**selinux\_restorecon**(3)](/man/os/libselinux/selinux_restorecon.3), [**selabel\_partial\_match**(3)](/man/os/libselinux/selabel_partial_match.3), [**selabel\_open**(3)](/man/os/libselinux/selabel_open.3), [**selinux**(8)](/man/os/libselinux/selinux.8), [**selabel\_file**(5)](/man/os/libselinux/selabel_file.5)

14 April 2019 SELinux API documentation

---

Document: selabel_get_digests_all_partial_matches(3) from libselinux 3.11-r2 (Chainguard OS)
Source: https://github.com/SELinuxProject/selinux.git
