Changeset 140
- Timestamp:
- 02/09/09 14:53:39 (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/devel/TODO
r122 r140 29 29 30 30 - The interface between reglookup.c and regfi.c is much better than it 31 used to be, but the iter2Stack function needs to be moved into the 32 library, which means the \xQQ quoting syntax will have to go with it. 33 This syntax will need to be more carefully documented if it's going 34 to be a part of the library. 31 used to be, but the parsing of data objects needs to be moved into the 32 library. The quoting syntax should stay in reglookup/reglookup-recover 33 but the basic parsing of data types into proper structures should 34 happen in the library so that they are accessible to other users of the 35 library. 35 36 36 - NK/VK/SK record caching. Right now, HBIN s and perhapsSK records are37 - NK/VK/SK record caching. Right now, HBIN metadata and SK records are 37 38 cached, but it's pretty haphazard, and NK/VK records are repeatedly 38 re-parsed. A generic caching library should be introduced which can 39 cache many of these records with a specific memory limit in mind. 40 I think this will speed things up greatly. 39 re-parsed. A generic caching library has been introduced but needs to 40 be applied to NK records at a minimum. Eventually, VK records and 41 data should also be cached separately and only be parsed when needed, 42 rather than when a key is loaded up front. Caching also needs 43 configurable object limits, preferrably configurable at build-time. 41 44 42 45 - It might be nice to have a way to filter results by security … … 47 50 lower-level functions of regfi.c. 48 51 49 - The stuff in smb_deps.h and smb_deps.c needs to be cleaned up. The 50 eventual goal is to have it all either integrated into regfi, or to 51 be eliminated, or broken out into small supporting libraries, as 52 necessary. It is currently just a jumble of old Samba code that I 53 haven't decided where to put yet. 52 - The smb_deps.h and smb_deps.c content is almost eliminated. Just need 53 to integrate parts that are being kept into regfi or other modules. 54 54 55 - At least one user reported that they use reglookup on a Windows host 56 through Cygwin, but after version 0.3.0 came out, the dependency on 57 libiconv caused that to break. libiconv seems to be a portability 58 issue on other platforms as well. However, it's interface is a POSIX 59 standard, and I think I'd like to keep it around. Perhaps it would 60 be nice if reglookup could be cross-compiled using MinGW. Then a 61 binary could be distributed for that platform. This app was never 62 meant for Windows though, so this isn't a high priority. 55 - Need to figure out a reasonably correct way to convert UTF-16LE charaters 56 to ASCII under Windows/MingW or other platforms that don't have proper 57 libiconv support yet. Then a build-time option or autodetection can 58 dictate which version of conversion function is used. 59 60 - It appears the registry may actually support UTF-16LE names on keys, 61 if the key type field is set appropriately. Once data parsing is 62 integrated into regfi, then the UTF-16LE handling routines (which 63 would then be built-in) should be used to properly handle this case. 63 64 64 65 - Grep through the source for 'XXX', and you'll find more. -
trunk/include/regfi.h
r139 r140 136 136 #if 0 137 137 /* Initial hypothesis of NK flags: */ 138 /***********************************/ 138 139 #define REGFI_NK_FLAG_LINK 0x0010 139 140 /* The name will be in ASCII if this next bit is set, otherwise UTF-16LE */ … … 332 333 */ 333 334 335 /* XXX: Some of these we have some clues about (major/minor version, etc). 336 * Should verify and update names accordingly. 337 */ 334 338 /* unknown data structure values */ 335 339 uint32 unknown1; … … 343 347 344 348 345 349 /* XXX: Should move all caching (SK records, HBINs, NKs, etc) to a single 350 * structure, probably REGFI_FILE. Once key caching is in place, 351 * convert key_positions stack to store just key offsets rather than 352 * whole keys. 353 */ 346 354 typedef struct 347 355 { -
trunk/lib/regfi.c
r139 r140 200 200 if(fo != ret_val) 201 201 fo[-1] = '\0'; 202 203 /* XXX: what was this old VI flag for??204 XXX: Is this check right? 0xF == 1|2|4|8, which makes it redundant...205 if (flags == 0xF) {206 if (some) strcat(flg_output, " ");207 some = 1;208 strcat(flg_output, "VI");209 }210 */211 202 212 203 return ret_val; … … 814 805 ret_val->magic[1] = sk_header[1]; 815 806 816 /* XXX: Can additional validation be added here? */817 807 ret_val->unknown_tag = SVAL(sk_header, 0x2); 818 808 ret_val->prev_sk_off = IVAL(sk_header, 0x4); … … 821 811 ret_val->desc_size = IVAL(sk_header, 0x10); 822 812 813 if(ret_val->prev_sk_off != (ret_val->prev_sk_off & 0xFFFFFFF8) 814 || ret_val->next_sk_off != (ret_val->next_sk_off & 0xFFFFFFF8)) 815 { 816 regfi_add_message(file, REGFI_MSG_WARN, "SK record's next/previous offsets" 817 " are not a multiple of 8 while parsing SK record at" 818 " offset 0x%.8X.", offset); 819 free(ret_val); 820 return NULL; 821 } 822 823 823 if(ret_val->desc_size + REGFI_SK_MIN_LENGTH > ret_val->cell_size) 824 824 { 825 regfi_add_message(file, REGFI_MSG_ ERROR, "Security descriptor too large for"825 regfi_add_message(file, REGFI_MSG_WARN, "Security descriptor too large for" 826 826 " cell while parsing SK record at offset 0x%.8X.", 827 827 offset); … … 886 886 if((num_values * sizeof(uint32)) > cell_length-sizeof(uint32)) 887 887 { 888 regfi_add_message(file, REGFI_MSG_ ERROR, "Too many values found"888 regfi_add_message(file, REGFI_MSG_WARN, "Too many values found" 889 889 " while parsing value list at offset 0x%.8X.", offset); 890 /* XXX: During non-strict, should reduce num_values appropriately and 891 * continue instead of bailing out. 892 */ 890 893 return NULL; 891 894 } … … 1080 1083 if(nk->subkeys == NULL) 1081 1084 { 1082 /* XXX: Should we free the key and bail out here instead? 1083 * During nonstrict? 1084 */ 1085 regfi_add_message(file, REGFI_MSG_WARN, "Could not load subkey list" 1086 " while parsing NK record at offset 0x%.8X.", offset); 1085 1087 nk->num_subkeys = 0; 1086 1088 } … … 1843 1845 || (strict && ret_val->cell_size != (ret_val->cell_size & 0xFFFFFFF8))) 1844 1846 { 1845 regfi_add_message(file, REGFI_MSG_ ERROR, "A length check failed while"1847 regfi_add_message(file, REGFI_MSG_WARN, "A length check failed while" 1846 1848 " parsing NK record at offset 0x%.8X.", offset); 1847 1849 free(ret_val); … … 1961 1963 offset); 1962 1964 } 1963 /* XXX: Should add this back and make it more strict? 1964 if(strict && ret_val->classname == NULL) 1965 return NULL; 1966 */ 1965 1966 if(ret_val->classname == NULL) 1967 { 1968 regfi_add_message(file, REGFI_MSG_WARN, "Could not parse class" 1969 " name while parsing NK record at offset 0x%.8X.", 1970 offset); 1971 return NULL; 1972 } 1967 1973 } 1968 1974 … … 2303 2309 2304 2310 if((cell_len == 0) || ((cell_len & 0xFFFFFFF8) != cell_len)) 2305 /* XXX: should report an error here. */ 2311 { 2312 regfi_add_message(file, REGFI_MSG_ERROR, "Bad cell length encountered" 2313 " while parsing unallocated cells at offset 0x%.8X.", 2314 hbin->file_off+curr_off); 2306 2315 break; 2307 2316 } 2317 2308 2318 /* for some reason the record_size of the last record in 2309 2319 an hbin block can extend past the end of the block -
trunk/src/reglookup.c
r138 r140 446 446 447 447 448 /* XXX: what if there is BOTH a value AND a key with that name?? */ 448 /* XXX: What if there is BOTH a value AND a key with that name?? 449 * What if there are multiple keys/values with the same name?? 450 */ 449 451 /* 450 452 * Returns 0 if path was not found.
Note: See TracChangeset
for help on using the changeset viewer.