Changeset 160 for trunk/src/reglookup.c
- Timestamp:
- 12/06/09 20:00:58 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/reglookup.c
r159 r160 282 282 char* dacl = NULL; 283 283 char* quoted_classname; 284 char* error_msg = NULL;285 284 char mtime[20]; 286 285 time_t tmp_time[1]; … … 288 287 const REGFI_SK_REC* sk; 289 288 const REGFI_NK_REC* k = regfi_iterator_cur_key(iter); 289 REGFI_CLASSNAME* classname; 290 290 291 291 *tmp_time = nt_time_to_unix(&k->mtime); … … 308 308 dacl = empty_str; 309 309 310 if(k->classname != NULL) 311 { 312 quoted_classname = quote_unicode((uint8*)k->classname, k->classname_length, 313 key_special_chars, &error_msg); 310 classname = regfi_iterator_fetch_classname(iter, k); 311 printMsgs(iter->f); 312 if(classname != NULL) 313 { 314 if(classname->interpreted == NULL) 315 { 316 fprintf(stderr, "WARN: Could not convert class name" 317 " charset for key '%s'. Quoting raw...\n", full_path); 318 quoted_classname = quote_buffer(classname->raw, classname->size, 319 key_special_chars); 320 } 321 else 322 quoted_classname = quote_string(classname->interpreted, 323 key_special_chars); 324 314 325 if(quoted_classname == NULL) 315 326 { 316 if(error_msg == NULL) 317 fprintf(stderr, "ERROR: Could not quote classname" 318 " for key '%s' due to unknown error.\n", full_path); 319 else 320 { 321 fprintf(stderr, "ERROR: Could not quote classname" 322 " for key '%s' due to error: %s\n", full_path, error_msg); 323 free(error_msg); 324 } 325 } 326 else if (error_msg != NULL) 327 { 328 if(print_verbose) 329 fprintf(stderr, "INFO: While converting classname" 330 " for key '%s': %s.\n", full_path, error_msg); 331 free(error_msg); 327 fprintf(stderr, "ERROR: Could not quote classname" 328 " for key '%s' due to unknown error.\n", full_path); 329 quoted_classname = empty_str; 332 330 } 333 331 } 334 332 else 335 333 quoted_classname = empty_str; 334 regfi_free_classname(classname); 336 335 337 336 printMsgs(iter->f);
Note: See TracChangeset
for help on using the changeset viewer.