Changeset 125 for trunk/src


Ignore:
Timestamp:
08/15/08 21:21:54 (16 years ago)
Author:
tim
Message:

added early version of class name parsing. additional work still needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/reglookup.c

    r121 r125  
    4747
    4848/* XXX: A hack to share some functions with reglookup-recover.c.
    49  *      Should move these into a properly library at some point.
     49 *      Should move these into a proper library at some point.
    5050 */
    5151#include "common.c"
     
    295295  char* sacl = NULL;
    296296  char* dacl = NULL;
     297  char* quoted_classname;
    297298  char mtime[20];
    298299  time_t tmp_time[1];
     
    320321      dacl = empty_str;
    321322
    322     printf("%s,KEY,,%s,%s,%s,%s,%s\n", full_path, mtime,
    323            owner, group, sacl, dacl);
     323    if(k->classname != NULL)
     324      quoted_classname = quote_string(k->classname, key_special_chars);
     325    else
     326      quoted_classname = empty_str;
     327
     328    printf("%s,KEY,,%s,%s,%s,%s,%s,%s\n", full_path, mtime,
     329           owner, group, sacl, dacl, quoted_classname);
    324330
    325331    if(owner != empty_str)
     
    331337    if(dacl != empty_str)
    332338      free(dacl);
     339    if(quoted_classname != empty_str)
     340      free(quoted_classname);
    333341  }
    334342  else
     
    582590  {
    583591    if(print_security)
    584       printf("PATH,TYPE,VALUE,MTIME,OWNER,GROUP,SACL,DACL\n");
     592      printf("PATH,TYPE,VALUE,MTIME,OWNER,GROUP,SACL,DACL,CLASS\n");
    585593    else
    586594      printf("PATH,TYPE,VALUE,MTIME\n");
Note: See TracChangeset for help on using the changeset viewer.