1selabel_digest(3) SELinux API documentation selabel_digest(3)
2
3
4
6 selabel_digest - Return digest of specfiles and list of files used
7
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
17 selabel_digest() performs an operation on the handle hnd, returning the
18 results of the SHA256 digest pointed to by digest, whose length will be
19 digest_len. The list of specfiles used in the SHA256 digest calcula‐
20 tion is returned in specfiles with the number of entries in num_spec‐
21 files.
22
23 To enable selabel_digest() to return this information the SELA‐
24 BEL_OPT_DIGEST option must be enable in selabel_open(3).
25
26 The result of selabel_digest() must not be used after selabel_close(3).
27
29 On success, zero is returned. On error, -1 is returned and errno is
30 set appropriately.
31
33 EINVAL No digest available (returned if SELABEL_OPT_DIGEST option not
34 enabled).
35
36 ENOMEM An attempt to allocate memory failed.
37
39 selabel_open(3), selinux(8)
40
41
42
43 16 Sept 2015 selabel_digest(3)