selabel_digest(3) — Linux manual page


selabel_digest(3)       SELinux API documentation      selabel_digest(3)

NAME         top

       selabel_digest - Return digest of specfiles and list of files

SYNOPSIS         top

       #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);

DESCRIPTION         top

       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

RETURN VALUE         top

       On success, zero is returned.  On error, -1 is returned and errno
       is set appropriately.

ERRORS         top

       EINVAL No digest available (returned if SELABEL_OPT_DIGEST option
              not enabled).

       ENOMEM An attempt to allocate memory failed.

SEE ALSO         top

       selabel_open(3), selinux(8)

COLOPHON         top

       This page is part of the selinux (Security-Enhanced Linux user-
       space libraries and tools) project.  Information about the
       project can be found at 
       ⟨⟩.  If you have a
       bug report for this manual page, see
       This page was obtained from the project's upstream Git repository
       ⟨⟩ 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

                              16 Sept 2015             selabel_digest(3)

Pages that refer to this page: selabel_open(3)