X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fsecurity.h;h=e20ad168451fd698f4ce2609c1db26959a861b68;hb=a8c340c8924f62c0dd2e4b712bee084ba4257adf;hp=d6d7d60a55c99743579cd937b9ad8a13ef67cc42;hpb=ebd6c0ec0ff47ac18af4ef918fd78fb8d9f19540;p=wimlib diff --git a/src/security.h b/src/security.h index d6d7d60a..e20ad168 100644 --- a/src/security.h +++ b/src/security.h @@ -1,10 +1,3 @@ -/* - * - * Macros and structures for security descriptors - * - * From Microsoft's public documentation and the WINE project - */ - #include "util.h" #include "rbtree.h" #include "sha1.h" @@ -12,18 +5,25 @@ #ifndef _WIMLIB_SECURITY_H #define _WIMLIB_SECURITY_H -#if defined(WITH_NTFS_3G) || defined(__CYGWIN__) || defined(__WIN32__) /* Red-black tree that maps SHA1 message digests of security descriptors to * security IDs, which are themselves indices into the table of security * descriptors in the 'struct wim_security_data'. */ struct sd_set { struct wim_security_data *sd; struct rb_root rb_root; + int32_t orig_num_entries; }; -void destroy_sd_set(struct sd_set *sd_set); -int lookup_sd(struct sd_set *set, const u8 hash[SHA1_HASH_SIZE]); -int sd_set_add_sd(struct sd_set *sd_set, const char descriptor[], - size_t size); -#endif +extern void +destroy_sd_set(struct sd_set *sd_set, bool rollback); + +extern int +lookup_sd(struct sd_set *set, const u8 hash[SHA1_HASH_SIZE]); + +extern int +sd_set_add_sd(struct sd_set *sd_set, const char descriptor[], + size_t size); + +extern int +init_sd_set(struct sd_set *sd_set, struct wim_security_data *sd); #endif /* _WIMLIB_SECURITY_H */