]> wimlib.net Git - wimlib/blob - src/security.h
Save original xml_data only when needed
[wimlib] / src / security.h
1 /*
2  *
3  * Macros and structures for security descriptors
4  *
5  * From Microsoft's public documentation and the WINE project
6  */
7
8 #include "util.h"
9 #include "rbtree.h"
10 #include "sha1.h"
11
12 #ifndef _WIMLIB_SECURITY_H
13 #define _WIMLIB_SECURITY_H
14
15 /* Red-black tree that maps SHA1 message digests of security descriptors to
16  * security IDs, which are themselves indices into the table of security
17  * descriptors in the 'struct wim_security_data'. */
18 struct sd_set {
19         struct wim_security_data *sd;
20         struct rb_root rb_root;
21 };
22 void destroy_sd_set(struct sd_set *sd_set);
23 int lookup_sd(struct sd_set *set, const u8 hash[SHA1_HASH_SIZE]);
24 int sd_set_add_sd(struct sd_set *sd_set, const char descriptor[],
25                   size_t size);
26
27 #endif /* _WIMLIB_SECURITY_H */