Changeset 949 for branches


Ignore:
Timestamp:
Nov 19, 2006, 2:11:58 AM (13 years ago)
Author:
bruno
Message:

Should fix #63, , and add the required interface in mondorestore to handle the new way of dealing with ACLs and XATTRs

Location:
branches/stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/mindi

    r948 r949  
    10931093    AddFileToCfgIfExists $MINDI_TMP/BACKUP-MEDIA-TYPE backup-media-type $outfile
    10941094    AddFileToCfgIfExists $MINDI_TMP/DIFFERENTIAL      differential      $outfile
     1095    AddFileToCfgIfExists $MINDI_TMP/ACL      acl      $outfile
     1096    AddFileToCfgIfExists $MINDI_TMP/XATTR      xattr      $outfile
    10951097}
    10961098
  • branches/stable/mondo/src/common/libmondo-archive.c

    r948 r949  
    693693    /*@ buffer ************************************************************ */
    694694    char *tmp;
     695    char *tmp1 = NULL;
    695696    char *scratchdir;
    696697    char *command;
     
    959960    } else {
    960961        res += write_one_liner_data_file(tmp, "0");
     962    }
     963
     964    if (g_getfattr) {
     965        asprintf(&tmp1, "%s/XATTR", bkpinfo->tmpdir);
     966        if (write_one_liner_data_file(tmp1, "TRUE")) {
     967            log_msg(1, "%ld: Unable to write one-liner XATTR",
     968                __LINE__);
     969        }
     970        paranoid_free(tmp1);
     971    }
     972    if (g_getfacl) {
     973        asprintf(&tmp1, "%s/ACL", bkpinfo->tmpdir);
     974        if (write_one_liner_data_file(tmp1, "TRUE")) {
     975            log_msg(1, "%ld: Unable to write one-liner ACL",
     976                __LINE__);
     977        }
     978        paranoid_free(tmp1);
    961979    }
    962980
  • branches/stable/mondo/src/mondoarchive/mondo-cli.c

    r948 r949  
    356356    char *q;
    357357
    358     long itbs;
     358    long itbs = 0L;
    359359
    360360    struct stat buf;
     
    675675            asprintf(&g_getfacl,"getfacl");
    676676        }
    677     }
    678677    }
    679678
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.c

    r913 r949  
    161161extern int g_partition_table_locked_up;
    162162
     163/* Should we use or not extended attributes and acl when restoring */
     164char *g_getfattr = NULL;
     165char *g_getfacl = NULL;
     166
    163167/**
    164168 * @addtogroup restoreUtilityGroup
     
    10991103        bkpinfo->use_star = TRUE;
    11001104        log_msg(1, "Goody! ... bkpinfo->use_star is now true.");
     1105    }
     1106
     1107    read_cfg_var(cfg_file, "acl", value);
     1108    if (strstr(value, "TRUE")) {
     1109        asprintf(&g_getfacl,"setfacl");
     1110        log_msg(1, "We will restore ACLs");
     1111        if (! find_home_of_exe(setfacl)) {
     1112            log_msg(1, "Unable to restore ACLs as no setfacl found");
     1113        }
     1114    }
     1115    read_cfg_var(cfg_file, "xattr", value);
     1116    if (strstr(value, "TRUE")) {
     1117        asprintf(&g_getfattr,"setfattr");
     1118        log_msg(1, "We will restore XATTRs");
     1119        if (! find_home_of_exe(setfattr)) {
     1120            log_msg(1, "Unable to restore XATTRs as no setfattr found");
     1121        }
    11011122    }
    11021123
Note: See TracChangeset for help on using the changeset viewer.