diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-11 00:27:06 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-19 14:27:34 +0200 |
commit | 0bbd84e31ec8bbe8d1e28e981c577fd56c8b8664 (patch) | |
tree | 67fa887d11c60c126ab04e66f4f970e2dfb66dc0 /include/fstree.h | |
parent | 7097dda129654a5e054c1d64e72bfd189b4964b2 (diff) |
Add SELinux labeling to fstree code
Use libselinux to lookup the context attributes from a file.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/fstree.h')
-rw-r--r-- | include/fstree.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fstree.h b/include/fstree.h index 64541a3..a7d19c2 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -388,4 +388,16 @@ int fstree_from_file(fstree_t *fs, const char *filename); */ void fstree_sort(fstree_t *fs); +/** + * @brief Add labels from an SELinux labeling file to all tree nodes + * + * @memberof fstree_t + * + * @param fs A pointer to an fstree object + * @param filename The name of the SELinux context file + * + * @return Zero on success, -1 on failure + */ +int fstree_relabel_selinux(fstree_t *fs, const char *filename); + #endif /* FSTREE_H */ |