Changeset 53 for trunk/include
- Timestamp:
- 09/04/05 17:04:58 (19 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/regfio.h
r41 r53 102 102 struct regf_hbin; 103 103 typedef struct regf_hbin { 104 struct regf_hbin *prev, *next; 105 uint32 file_off; /* my offset in the registry file */ 106 uint32 free_off; /* offset to free space within the hbin record */ 107 uint32 free_size; /* amount of data left in the block */ 108 int ref_count; /* how many active records are pointing to this block (not used currently) */ 104 struct regf_hbin* prev; 105 struct regf_hbin* next; 106 uint32 file_off; /* my offset in the registry file */ 107 uint32 free_off; /* offset to free space within the hbin record */ 108 uint32 free_size; /* amount of data left in the block */ 109 int ref_count; /* how many active records are pointing to this block (not used currently) */ 109 110 110 char header[HBIN_HDR_SIZE]; /* "hbin" */ 111 uint32 first_hbin_off; /* offset from first hbin block */ 112 uint32 block_size; /* block size of this blockually a multiple of 4096Kb) */ 113 114 prs_struct ps; /* data */ 115 116 bool dirty; /* has this hbin block been modified? */ 111 uint8 header[HBIN_HDR_SIZE]; /* "hbin" */ 112 uint32 first_hbin_off; /* offset from first hbin block */ 113 uint32 block_size; /* block size of this blockually a multiple of 4096Kb) */ 114 prs_struct ps; /* data */ 115 bool dirty; /* has this hbin block been modified? */ 117 116 } REGF_HBIN; 118 117 … … 120 119 121 120 typedef struct { 122 123 121 uint32 nk_off; 122 uint8 keycheck[sizeof(uint32)]; 124 123 } REGF_HASH_REC; 125 124 126 125 typedef struct { 127 128 129 130 131 charheader[REC_HDR_SIZE];132 133 126 REGF_HBIN *hbin; /* pointer to HBIN record (in memory) containing this nk record */ 127 uint32 hbin_off; /* offset from beginning of this hbin block */ 128 uint32 rec_size; /* ((start_offset - end_offset) & 0xfffffff8) */ 129 130 uint8 header[REC_HDR_SIZE]; 131 uint16 num_keys; 132 REGF_HASH_REC *hashes; 134 133 } REGF_LF_REC; 135 134 … … 137 136 138 137 typedef struct { 139 140 141 142 143 144 charheader[REC_HDR_SIZE];145 char *valuename;146 147 148 uint8 *data;149 150 138 REGF_HBIN *hbin; /* pointer to HBIN record (in memory) containing this nk record */ 139 uint32 hbin_off; /* offset from beginning of this hbin block */ 140 uint32 rec_size; /* ((start_offset - end_offset) & 0xfffffff8) */ 141 uint32 rec_off; /* offset stored in the value list */ 142 143 uint8 header[REC_HDR_SIZE]; 144 char* valuename; 145 uint32 data_size; 146 uint32 data_off; 147 uint8* data; 148 uint32 type; 149 uint16 flag; 151 150 } REGF_VK_REC; 152 151 … … 156 155 157 156 typedef struct _regf_sk_rec { 158 159 160 161 162 163 157 struct _regf_sk_rec *next, *prev; 158 REGF_HBIN *hbin; /* pointer to HBIN record (in memory) containing this nk record */ 159 uint32 hbin_off; /* offset from beginning of this hbin block */ 160 uint32 rec_size; /* ((start_offset - end_offset) & 0xfffffff8) */ 161 162 uint32 sk_off; /* offset parsed from NK record used as a key 164 163 to lookup reference to this SK record */ 165 166 charheader[REC_HDR_SIZE];167 168 169 170 171 164 165 uint8 header[REC_HDR_SIZE]; 166 uint32 prev_sk_off; 167 uint32 next_sk_off; 168 uint32 ref_count; 169 uint32 size; 170 SEC_DESC *sec_desc; 172 171 } REGF_SK_REC; 173 172 … … 175 174 176 175 typedef struct { 177 178 179 180 181 182 183 184 charheader[REC_HDR_SIZE];185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 176 REGF_HBIN *hbin; /* pointer to HBIN record (in memory) containing this nk record */ 177 uint32 hbin_off; /* offset from beginning of this hbin block */ 178 uint32 subkey_index; /* index to next subkey record to return */ 179 uint32 rec_size; /* ((start_offset - end_offset) & 0xfffffff8) */ 180 181 /* header information */ 182 183 uint8 header[REC_HDR_SIZE]; 184 uint16 key_type; 185 NTTIME mtime; 186 uint32 parent_off; /* back pointer in registry hive */ 187 uint32 classname_off; 188 char *classname; 189 char *keyname; 190 191 /* max lengths */ 192 193 uint32 max_bytes_subkeyname; /* max subkey name * 2 */ 194 uint32 max_bytes_subkeyclassname; /* max subkey classname length (as if) */ 195 uint32 max_bytes_valuename; /* max valuename * 2 */ 196 uint32 max_bytes_value; /* max value data size */ 197 198 /* unknowns */ 199 200 uint32 unk_index; /* nigel says run time index ? */ 201 202 /* children */ 203 204 uint32 num_subkeys; 205 uint32 subkeys_off; /* hash records that point to NK records */ 206 uint32 num_values; 207 uint32 values_off; /* value lists which point to VK records */ 208 uint32 sk_off; /* offset to SK record */ 209 210 /* link in the other records here */ 211 212 REGF_LF_REC subkeys; 213 REGF_VK_REC *values; 214 REGF_SK_REC *sec_desc; 216 215 217 216 } REGF_NK_REC; … … 220 219 221 220 typedef struct { 222 /* run time information */ 223 224 int fd; /* file descriptor */ 225 int open_flags; /* flags passed to the open() call */ 226 void *mem_ctx; /* memory context for run-time file access information */ 227 REGF_HBIN *block_list; /* list of open hbin blocks */ 228 229 /* file format information */ 230 231 char header[REGF_HDR_SIZE]; /* "regf" */ 232 uint32 data_offset; /* offset to record in the first (or any?) hbin block */ 233 uint32 last_block; /* offset to last hbin block in file */ 234 uint32 checksum; /* XOR of bytes 0x0000 - 0x01FB */ 235 NTTIME mtime; 236 237 REGF_SK_REC *sec_desc_list; /* list of security descriptors referenced by NK records */ 238 239 /* unknowns used to simply writing */ 240 241 uint32 unknown1; 242 uint32 unknown2; 243 uint32 unknown3; 244 uint32 unknown4; 245 uint32 unknown5; 246 uint32 unknown6; 247 221 /* run time information */ 222 223 int fd; /* file descriptor */ 224 int open_flags; /* flags passed to the open() call */ 225 void *mem_ctx; /* memory context for run-time file access information */ 226 REGF_HBIN *block_list; /* list of open hbin blocks */ 227 228 /* file format information */ 229 230 uint8 header[REGF_HDR_SIZE]; /* "regf" */ 231 uint32 data_offset; /* offset to record in the first (or any?) hbin block */ 232 uint32 last_block; /* offset to last hbin block in file */ 233 uint32 checksum; /* XOR of bytes 0x0000 - 0x01FB */ 234 NTTIME mtime; 235 236 REGF_SK_REC *sec_desc_list; /* list of security descriptors referenced by NK records */ 237 238 /* unknowns used to simply writing */ 239 240 uint32 unknown1; 241 uint32 unknown2; 242 uint32 unknown3; 243 uint32 unknown4; 244 uint32 unknown5; 245 uint32 unknown6; 248 246 } REGF_FILE; 247 249 248 250 249 /* Function Declarations */ … … 253 252 int regfio_type_str2val(const char* str); 254 253 254 char* regfio_get_sacl(SEC_DESC *sec_desc); 255 char* regfio_get_dacl(SEC_DESC *sec_desc); 256 char* regfio_get_owner(SEC_DESC *sec_desc); 257 char* regfio_get_group(SEC_DESC *sec_desc); 258 255 259 REGF_FILE* regfio_open( const char *filename ); 256 260 int regfio_close( REGF_FILE *r ); -
trunk/include/smb_deps.h
r42 r53 184 184 uint16 *data16, uint32 ptr_uint16, uint32 start_offset); 185 185 bool prs_uint8(const char *name, prs_struct *ps, int depth, uint8 *data8); 186 bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint8 *data8s, int len); 186 bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, 187 uint8* data8s, int len); 187 188 bool prs_set_offset(prs_struct *ps, uint32 offset); 188 189
Note: See TracChangeset
for help on using the changeset viewer.