SELABEL_GET_DIGESTS_ALL_PARTIAL_MATCHES(3)
π selabel_get_digests_all_partial_matches β Library Functions Manual π
okay bestie, gather round, because we're talking about selabel_get_digests_all_partial_matches(3) and honestly? it's giving niche but iconic. β¨
πΈ 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 π
#include <stdbool.h>
#include <selinux/selinux.h>
#include <selinux/label.h>
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 π
so selabel_get_digests_all_partial_matches() goes and gets two things for you off the handle hnd: the file_contexts partial matches digest, and the xattr digest that applies to the path you hand it. two digests, one function, we love a two-for-one π«Ά
keyβ this is the path whose digests you want. drop the path here, that's it.calculated_digestβ a pointer to thekeycalculated file_contexts digest of all applicable partial matches, orNULLif none exist. and bestie, listen: the caller mustfree(3)the buffer. no leaks in this house. πxattr_digestβ a pointer to thekeyxattr(7) stored digest, orNULLif it does not exist. same rules, same energy: the caller mustfree(3)the buffer. π§digest_lenβ the length of the digests, which will always be returned (yes, even if both of them areNULL, she still shows up β¨). also, quick note: if both digests are returned, they will always be the same length. twin vibes, no cap.
π RETURN VALUE π
TRUE if the digests match, or FALSE if they do not β or if either or both are missing. it's a yes/no situation and she's very clear about it. periodt. π
π SEE ALSO π
and that's the whole page, bestie!! brought to you by the SELinux API documentation, dated 14 April 2019 β thanks for coming to my ted talk, now go free those buffers π β¨
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-devel 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- centos-stream 9: libselinux-devel 3.6-5.el9 Β· Public Domain
- debian bookworm: libselinux1-dev 3.4-1+b6
- debian trixie: libselinux1-dev 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 43: libselinux-devel 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-devel 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: libselinux-devel 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: libselinux1-dev 3.3-1build2
- ubuntu noble: libselinux1-dev 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: libselinux1-dev 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: libselinux1-dev 3.8.1-1build1
- ubuntu resolute: libselinux-dev 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: libselinux-dev 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms