summaryrefslogtreecommitdiff
path: root/mkfs/mkfs.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-28 21:40:31 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-28 23:34:17 +0200
commit9bcb6edfe419d390acddc2ed7d0c04d37b753ac3 (patch)
tree2d0ca53b10fa413f2e7e8934be11efa93430e548 /mkfs/mkfs.h
parentf415b29255819e19ffde16018fb9ad02cbbfd17c (diff)
Do the SELinux relabeling while generating the fstree
This commit splits the SELinux relabeling function up into 3 parts: - open the label file - apply relabeling rules to a given file - close the label file The relabeling is done while building the tree (if reading from an input directory) or in a post process step if reading from a desription file. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/mkfs.h')
-rw-r--r--mkfs/mkfs.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/mkfs/mkfs.h b/mkfs/mkfs.h
index f00898b..3a139a7 100644
--- a/mkfs/mkfs.h
+++ b/mkfs/mkfs.h
@@ -68,8 +68,15 @@ enum {
void process_command_line(options_t *opt, int argc, char **argv);
-int fstree_from_dir(fstree_t *fs, const char *path, unsigned int flags);
+int fstree_from_dir(fstree_t *fs, const char *path, void *selinux_handle,
+ unsigned int flags);
-int fstree_relabel_selinux(fstree_t *fs, const char *filename);
+
+void *selinux_open_context_file(const char *filename);
+
+int selinux_relable_node(void *sehnd, fstree_t *fs,
+ tree_node_t *node, const char *path);
+
+void selinux_close_context_file(void *sehnd);
#endif /* MKFS_H */