Changeset 2572


Ignore:
Timestamp:
Feb 4, 2010, 2:16:02 PM (10 years ago)
Author:
bruno
Message:

setfacl doesn't need the -h option to restore physical paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-filelist.c

    r2563 r2572  
    536536    int i;
    537537    char *p, *q;
     538    char *tmp = NULL;
    538539    FILE *pin, *pout, *faclin;
    539540
     
    543544        || !does_file_exist(orig_msklist)) {
    544545        log_msg(1, "No masklist provided. I shall therefore set ALL attributes.");
    545         mr_asprintf(&command, "gzip -dc %s | %s -h --restore - 2>> %s", original_exat_fname, executable, MONDO_LOGFILE);
     546        if (strstr(executable,"acl")) {
     547            /*  setfacl needs no additional option for physical walk */
     548            mr_asprintf(tmp,"");
     549        } else {
     550            /*  setfattr needs option -h for physical walk */
     551            mr_asprintf(tmp,"-h");
     552        }
     553        mr_asprintf(&command, "gzip -dc %s | %s %s --restore - 2>> %s", original_exat_fname, executable, tmp, MONDO_LOGFILE);
     554        mr_free(tmp);
    546555        log_msg(1, "command = %s", command);
    547556        retval = system(command);
Note: See TracChangeset for help on using the changeset viewer.