1 #ifndef _WIMLIB_SECURITY_H
2 #define _WIMLIB_SECURITY_H
4 #include "wimlib/types.h"
6 struct wim_security_data;
9 /* Map from SHA1 message digests of security descriptors to security IDs, which
10 * are themselves indices into the table of security descriptors in the 'struct
11 * wim_security_data'. */
13 struct wim_security_data *sd;
14 struct avl_tree_node *root;
18 /* Table of security descriptors for a WIM image. */
19 struct wim_security_data {
20 /* The total length of the security data, in bytes. If there are no
21 * security descriptors, this field, when read from the on-disk metadata
22 * resource, may be either 8 (which is correct) or 0 (which is
23 * interpreted as 8). */
26 /* The number of security descriptors in the array @descriptors. */
29 /* Array of sizes of the descriptors, in bytes, in the array
33 /* Array of pointers to the security descriptors in the
34 * SECURITY_DESCRIPTOR_RELATIVE format. */
39 rollback_new_security_descriptors(struct wim_sd_set *sd_set);
42 destroy_sd_set(struct wim_sd_set *sd_set);
45 sd_set_add_sd(struct wim_sd_set *sd_set, const char descriptor[],
49 init_sd_set(struct wim_sd_set *sd_set, struct wim_security_data *sd);
51 extern struct wim_security_data *
52 new_wim_security_data(void);
55 read_wim_security_data(const u8 *buf, size_t buf_len,
56 struct wim_security_data **sd_ret);
59 write_wim_security_data(const struct wim_security_data * restrict sd,
63 print_wim_security_data(const struct wim_security_data *sd);
66 free_wim_security_data(struct wim_security_data *sd);
68 #endif /* _WIMLIB_SECURITY_H */