Changeset 206 for trunk/src


Ignore:
Timestamp:
08/25/10 11:20:32 (14 years ago)
Author:
tim
Message:

simplified part of regfi API to move string encoding to the REGFI_FILE object

additional pyregfi implementation

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/common.c

    r203 r206  
    324324  char* ret_val;
    325325
    326   if(nk->keyname == NULL)
    327     ret_val = quote_buffer(nk->keyname_raw, nk->name_length, key_special_chars);
     326  if(nk->name == NULL)
     327    ret_val = quote_buffer(nk->name_raw, nk->name_length, key_special_chars);
    328328  else
    329     ret_val = quote_string(nk->keyname, key_special_chars);
     329    ret_val = quote_string(nk->name, key_special_chars);
    330330
    331331  return ret_val;
     
    337337  char* ret_val;
    338338
    339   if(vk->valuename == NULL)
    340     ret_val = quote_buffer(vk->valuename_raw, vk->name_length,
     339  if(vk->name == NULL)
     340    ret_val = quote_buffer(vk->name_raw, vk->name_length,
    341341                           key_special_chars);
    342342  else
    343     ret_val = quote_string(vk->valuename, key_special_chars);
     343    ret_val = quote_string(vk->name, key_special_chars);
    344344
    345345  return ret_val;
  • trunk/src/reglookup-recover.c

    r203 r206  
    832832    regfi_log_set_mask(REGFI_LOG_ERROR);
    833833
    834   f = regfi_alloc(fd);
     834  /* XXX: add command line option to choose output encoding */
     835  f = regfi_alloc(fd, REGFI_ENCODING_ASCII);
    835836  if(f == NULL)
    836837  {
  • trunk/src/reglookup.c

    r203 r206  
    7777  }
    7878 
    79   data = regfi_iterator_fetch_data(iter, vk);
     79  data = regfi_fetch_data(iter->f, vk);
    8080
    8181  printMsgs(iter->f);
     
    304304  formatTime(&key->mtime, mtime);
    305305
    306   if(print_security && (sk=regfi_iterator_cur_sk(iter)))
     306  if(print_security && (sk=regfi_fetch_sk(iter->f, key)))
    307307  {
    308308    owner = regfi_get_owner(sk->sec_desc);
     
    321321      dacl = empty_str;
    322322
    323     classname = regfi_iterator_fetch_classname(iter, key);
     323    classname = regfi_fetch_classname(iter->f, key);
    324324    printMsgs(iter->f);
    325325    if(classname != NULL)
     
    636636  }
    637637   
    638   f = regfi_alloc(fd);
     638  /* XXX: add command line option to choose output encoding */
     639  f = regfi_alloc(fd, REGFI_ENCODING_ASCII);
    639640  if(f == NULL)
    640641  {
     
    643644  }
    644645
    645 
    646   /* XXX: add command line option to choose output encoding */
    647   iter = regfi_iterator_new(f, REGFI_ENCODING_ASCII);
     646  iter = regfi_iterator_new(f);
    648647  if(iter == NULL)
    649648  {
Note: See TracChangeset for help on using the changeset viewer.