NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | SEE ALSO | COLOPHON |
|
|
selabel_digest(3) SELinux API documentation selabel_digest(3)
selabel_digest - Return digest of specfiles and list of files used
#include <selinux/selinux.h> #include <selinux/label.h> int selabel_digest(struct selabel_handle *hnd, unsigned char **digest, size_t *digest_len, char ***specfiles, size_t *num_specfiles);
selabel_digest() performs an operation on the handle hnd, returning the results of the SHA1 digest pointed to by digest, whose length will be digest_len. The list of specfiles used in the SHA1 digest calculation is returned in specfiles with the number of entries in num_specfiles. To enable selabel_digest() to return this information the SELABEL_OPT_DIGEST option must be enable in selabel_open(3). The result of selabel_digest() must not be used after selabel_close(3).
On success, zero is returned. On error, -1 is returned and errno is set appropriately.
EINVAL No digest available (returned if SELABEL_OPT_DIGEST option not enabled). ENOMEM An attempt to allocate memory failed.
selabel_open(3), selinux(8)
This page is part of the selinux (Security-Enhanced Linux user-
space libraries and tools) project. Information about the
project can be found at
⟨https://github.com/SELinuxProject/selinux/wiki⟩. If you have a
bug report for this manual page, see
⟨https://github.com/SELinuxProject/selinux/wiki/Contributing⟩.
This page was obtained from the project's upstream Git repository
⟨https://github.com/SELinuxProject/selinux⟩ on 2024-06-14. (At
that time, the date of the most recent commit that was found in
the repository was 2023-05-11.) If you discover any rendering
problems in this HTML version of the page, or you believe there
is a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
[email protected]
16 Sept 2015 selabel_digest(3)
Pages that refer to this page: selabel_open(3)