Changeset 2420


Ignore:
Timestamp:
Sep 24, 2009, 11:48:15 AM (9 years ago)
Author:
bruno
Message:
  • star only supports ACL when used with exustar mode. Fix #356.
  • Modify getfattr call to have all extended attributes, including non user ones. (patch from Kevin Ritzenthaler Kevin.Ritzenthaler_at_hp.com) and fix #357

(Backport from 2.2.9)

Location:
branches/2.2.10/mondo/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2407 r2420  
    213213    paranoid_free(tmp);
    214214
    215     mr_asprintf(command, "star H=star list=%s -c " STAR_ACL_SZ " file=%s", filelist, fname);
     215    mr_asprintf(command, "star H=exustar list=%s -c " STAR_ACL_SZ " file=%s", filelist, fname);
    216216    if (bkpinfo->use_lzo) {
    217217        mr_free(command);
  • branches/2.2.10/mondo/src/common/libmondo-filelist.c

    r2416 r2420  
    511511        mr_free(command);
    512512        retval =
    513             gen_aux_list(filelist, "getfattr --en=hex -P -d \"%s\"",
     513            gen_aux_list(filelist, "getfattr --en=hex -P -m - -d \"%s\"",
    514514                         fattr_fname);
    515515    }
  • branches/2.2.10/mondo/src/common/libmondo-fork.c

    r2405 r2420  
    3838    /*@ buffers ***************************************************** */
    3939    char *result = NULL;
    40     char *p = NULL;
     40    char *tmpf = NULL;
    4141
    4242    /*@ pointers **************************************************** */
     
    4747    assert_string_is_neither_NULL_nor_zerolength(call);
    4848
     49    mr_asprintf(tmpf, "%s/cpgll.out", bkpinfo->scratchdir);
     50    mr_strcat(call, " > %s", tmpf);
    4951    log_msg(4, "Calling command: %s", call);
    5052    /* By default return an empty string in any case */
    5153    mr_asprintf(result, "");
    5254
    53     /* popen seems to always return an empty line after the interesting last line result */
    54     if ((fin = popen(call, "r"))) {
     55    system(call);
     56    if ((fin = fopen(ftmp, "r"))) {
    5557        while (!feof(fin)) {
    56             mr_getline(p, fin);
    57             log_msg(9, "p: %s", p);
    58             if ((p != NULL) && (strlen(p) > 1)) {
    59                 mr_free(result);
    60                 mr_asprintf(result, "%s", p);
    61                 log_msg(9, "Result: %s", result);
    62             }
    63             mr_free(p);
    64         }
    65         log_msg(4, "Result: %s", result);
     58            mr_getline(result, fin);
     59            log_msg(9, "Loop result: %s", result);
     60        }
     61        log_msg(4, "Final Result: %s", result);
    6662        mr_strip_spaces(result);
    6763        paranoid_pclose(fin);
     
    6965        log_OS_error("Unable to popen call");
    7066    }
     67    mr_free(ftmp)
    7168    log_msg(4, "Returns: %s", result);
    7269    return(result);
  • branches/2.2.10/mondo/src/include/my-stuff.h

    r2405 r2420  
    77
    88// Extra info for ACLs and SELINUX users
    9 #define STAR_ACL_SZ "-xfflags -acl"
     9#define STAR_ACL_SZ "-xattr -acl"
    1010
    1111/**
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-compare.c

    r2405 r2420  
    291291    if (use_star) {
    292292        // doesn't use compressor_exe
    293         mr_asprintf(command, "%s -diff H=star file=%s >> %s 2>> %s", archiver_exe, tarball_fname, logfile, logfile);
     293        mr_asprintf(command, "%s -diff H=exustar file=%s >> %s 2>> %s", archiver_exe, tarball_fname, logfile, logfile);
    294294    } else {
    295295        mr_asprintf(command, "%s -r -b %ld -M 16m -c %ld %s %s >> %s 2>> %s", archiver_exe, TAPE_BLOCK_SIZE, BUFSIZE, compressor_exe, tarball_fname, logfile, logfile);
Note: See TracChangeset for help on using the changeset viewer.