Changeset 178 for trunk/src/reglookup.c
- Timestamp:
- 03/13/10 12:56:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/reglookup.c
r172 r178 296 296 char* sacl = NULL; 297 297 char* dacl = NULL; 298 char mtime[24]; 298 299 char* quoted_classname; 299 char mtime[20];300 time_t tmp_time[1];301 struct tm* tmp_time_s = NULL;302 300 const REGFI_SK_REC* sk; 303 301 const REGFI_NK_REC* k = regfi_iterator_cur_key(iter); 304 302 REGFI_CLASSNAME* classname; 305 303 306 *tmp_time = regfi_nt2unix_time(&k->mtime); 307 tmp_time_s = gmtime(tmp_time); 308 strftime(mtime, sizeof(mtime), "%Y-%m-%d %H:%M:%S", tmp_time_s); 304 formatTime(&k->mtime, mtime); 309 305 310 306 if(print_security && (sk=regfi_iterator_cur_sk(iter))) … … 563 559 char** path = NULL; 564 560 REGFI_ITERATOR* iter; 565 int retr_path_ret ;561 int retr_path_ret, fd; 566 562 uint32_t argi, arge; 567 563 … … 624 620 bailOut(REGLOOKUP_EXIT_OSERR, "ERROR: Memory allocation problem.\n"); 625 621 626 f = regfi_open(registry_file);627 if(f == NULL)622 fd = openHive(registry_file); 623 if(fd < 0) 628 624 { 629 625 fprintf(stderr, "ERROR: Couldn't open registry file: %s\n", registry_file); 630 626 bailOut(REGLOOKUP_EXIT_NOINPUT, ""); 627 } 628 629 f = regfi_alloc(fd); 630 if(f == NULL) 631 { 632 close(fd); 633 bailOut(REGLOOKUP_EXIT_NOINPUT, "ERROR: Failed to create REGFI_FILE structure.\n"); 631 634 } 632 635 … … 675 678 676 679 regfi_iterator_free(iter); 677 regfi_close(f); 680 regfi_free(f); 681 close(fd); 678 682 679 683 return 0;
Note: See TracChangeset
for help on using the changeset viewer.