]> wimlib.net Git - wimlib/blob - src/security.h
Win32 capture
[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 #if defined(WITH_NTFS_3G) || defined(__CYGWIN__) || defined(__WIN32__)
16 /* Red-black tree that maps SHA1 message digests of security descriptors to
17  * security IDs, which are themselves indices into the table of security
18  * descriptors in the 'struct wim_security_data'. */
19 struct sd_set {
20         struct wim_security_data *sd;
21         struct rb_root rb_root;
22 };
23 void destroy_sd_set(struct sd_set *sd_set);
24 int lookup_sd(struct sd_set *set, const u8 hash[SHA1_HASH_SIZE]);
25 int sd_set_add_sd(struct sd_set *sd_set, const char descriptor[],
26                   size_t size);
27 #endif
28
29 #endif /* _WIMLIB_SECURITY_H */