1selabel_digest(3)          SELinux API documentation         selabel_digest(3)
2
3
4

NAME

6       selabel_digest - Return digest of specfiles and list of files used
7

SYNOPSIS

9       #include <selinux/selinux.h>
10       #include <selinux/label.h>
11
12       int selabel_digest(struct selabel_handle *hnd,
13                          unsigned char **digest, size_t *digest_len,
14                          char ***specfiles, size_t *num_specfiles);
15

DESCRIPTION

17       selabel_digest() performs an operation on the handle hnd, returning the
18       results of the SHA1 digest pointed to by digest, whose length  will  be
19       digest_len.   The list of specfiles used in the SHA1 digest calculation
20       is returned in specfiles with the number of entries in num_specfiles.
21
22       To  enable  selabel_digest()  to  return  this  information  the  SELA‐
23       BEL_OPT_DIGEST option must be enable in selabel_open(3).
24
25       The result of selabel_digest() must not be used after selabel_close(3).
26

RETURN VALUE

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

ERRORS

32       EINVAL No digest available (returned if SELABEL_OPT_DIGEST  option  not
33              enabled).
34
35       ENOMEM An attempt to allocate memory failed.
36

SEE ALSO

38       selabel_open(3), selinux(8)
39
40
41
42                                 16 Sept 2015                selabel_digest(3)
Impressum