]> wimlib.net Git - wimlib/blob - src/security.h
unix_apply.c, unix_capture.c: Add, fix copyright notices
[wimlib] / src / security.h
1 #include "util.h"
2 #include "rbtree.h"
3 #include "sha1.h"
4
5 #ifndef _WIMLIB_SECURITY_H
6 #define _WIMLIB_SECURITY_H
7
8 /* Red-black tree that maps SHA1 message digests of security descriptors to
9  * security IDs, which are themselves indices into the table of security
10  * descriptors in the 'struct wim_security_data'. */
11 struct sd_set {
12         struct wim_security_data *sd;
13         struct rb_root rb_root;
14         int32_t orig_num_entries;
15 };
16 extern void
17 destroy_sd_set(struct sd_set *sd_set, bool rollback);
18
19 extern int
20 lookup_sd(struct sd_set *set, const u8 hash[SHA1_HASH_SIZE]);
21
22 extern int
23 sd_set_add_sd(struct sd_set *sd_set, const char descriptor[],
24               size_t size);
25
26 extern int
27 init_sd_set(struct sd_set *sd_set, struct wim_security_data *sd);
28
29 #endif /* _WIMLIB_SECURITY_H */