Changeset 948 in MondoRescue for branches/stable/mondo/src/mondorestore
- Timestamp:
- Nov 19, 2006, 1:27:46 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/mondorestore/mondo-restore.c
r947 r948 2027 2027 2028 2028 if (filelist == NULL || matches > 0) { 2029 sprintf(xattr_fname, XATTR_LIST_FNAME_RAW_SZ, 2029 if (g_getfattr) { 2030 sprintf(xattr_fname, XATTR_LIST_FNAME_RAW_SZ, 2030 2031 MNT_CDROM "/archives", current_tarball_number); 2031 sprintf(acl_fname, ACL_LIST_FNAME_RAW_SZ, MNT_CDROM "/archives", 2032 } 2033 if (g_getfacl) { 2034 sprintf(acl_fname, ACL_LIST_FNAME_RAW_SZ, MNT_CDROM "/archives", 2032 2035 current_tarball_number); 2036 } 2033 2037 if (strstr(tarball_fname, ".bz2")) { 2034 2038 strcpy(executable, "bzip2"); … … 2095 2099 } 2096 2100 2097 log_msg(1, "Setting fattr list %s", xattr_fname); 2098 if (length_of_file(xattr_fname) > 0) { 2099 res = set_fattr_list(filelist_subset_fname, xattr_fname); 2100 if (res) { 2101 log_to_screen 2102 ("Errors occurred while setting extended attributes"); 2103 } else { 2104 log_msg(1, "I set xattr OK"); 2105 } 2106 retval += res; 2107 } 2108 if (length_of_file(acl_fname) > 0) { 2101 if (g_getfattr) { 2102 log_msg(1, "Setting fattr list %s", xattr_fname); 2103 if (length_of_file(xattr_fname) > 0) { 2104 res = set_fattr_list(filelist_subset_fname, xattr_fname); 2105 if (res) { 2106 log_to_screen 2107 ("Errors occurred while setting extended attributes"); 2108 } else { 2109 log_msg(1, "I set xattr OK"); 2110 } 2111 retval += res; 2112 } 2113 } 2114 if (g_getfacl) { 2109 2115 log_msg(1, "Setting acl list %s", acl_fname); 2110 res = set_acl_list(filelist_subset_fname, acl_fname); 2111 if (res) { 2112 log_to_screen 2113 ("Errors occurred while setting access control lists"); 2114 } else { 2115 log_msg(1, "I set ACL OK"); 2116 } 2117 retval += res; 2116 if (length_of_file(acl_fname) > 0) { 2117 res = set_acl_list(filelist_subset_fname, acl_fname); 2118 if (res) { 2119 log_to_screen 2120 ("Errors occurred while setting access control lists"); 2121 } else { 2122 log_msg(1, "I set ACL OK"); 2123 } 2124 retval += res; 2125 } 2118 2126 } 2119 2127 if (retval) { … … 2303 2311 paranoid_system(command); 2304 2312 2305 iamhere("Restoring xattr, acl stuff"); 2306 res = set_fattr_list(filelist_subset_fname, xattr_fname); 2307 if (res) { 2308 log_msg(1, "Errors occurred while setting xattr"); 2309 } else { 2310 log_msg(1, "I set xattr OK"); 2311 } 2312 retval += res; 2313 2314 res = set_acl_list(filelist_subset_fname, acl_fname); 2315 if (res) { 2316 log_msg(1, "Errors occurred while setting ACL"); 2317 } else { 2318 log_msg(1, "I set ACL OK"); 2319 } 2320 retval += res; 2313 if (g_getfattr) { 2314 iamhere("Restoring xattr stuff"); 2315 res = set_fattr_list(filelist_subset_fname, xattr_fname); 2316 if (res) { 2317 log_msg(1, "Errors occurred while setting xattr"); 2318 } else { 2319 log_msg(1, "I set xattr OK"); 2320 } 2321 retval += res; 2322 } 2323 2324 if (g_getfacl) { 2325 iamhere("Restoring acl stuff"); 2326 res = set_acl_list(filelist_subset_fname, acl_fname); 2327 if (res) { 2328 log_msg(1, "Errors occurred while setting ACL"); 2329 } else { 2330 log_msg(1, "I set ACL OK"); 2331 } 2332 retval += res; 2333 } 2321 2334 2322 2335 } else { … … 2459 2472 if (fbw) { 2460 2473 fclose(fbw); 2461 sprintf(acl_fname, ACL_BIGGLST_FNAME_RAW_SZ, ARCHIVES_PATH); 2462 sprintf(xattr_fname, XATTR_BIGGLST_FNAME_RAW_SZ, ARCHIVES_PATH); 2463 if (length_of_file(acl_fname) > 0) { 2464 set_acl_list(biggies_whose_EXATs_we_should_set, acl_fname); 2465 } 2466 if (length_of_file(xattr_fname) > 0) { 2467 set_fattr_list(biggies_whose_EXATs_we_should_set, xattr_fname); 2474 if (g_getfattr) { 2475 sprintf(xattr_fname, XATTR_BIGGLST_FNAME_RAW_SZ, ARCHIVES_PATH); 2476 if (length_of_file(xattr_fname) > 0) { 2477 set_fattr_list(biggies_whose_EXATs_we_should_set, xattr_fname); 2478 } 2479 } 2480 if (g_getfacl) { 2481 sprintf(acl_fname, ACL_BIGGLST_FNAME_RAW_SZ, ARCHIVES_PATH); 2482 if (length_of_file(acl_fname) > 0) { 2483 set_acl_list(biggies_whose_EXATs_we_should_set, acl_fname); 2484 } 2468 2485 } 2469 2486 } … … 2681 2698 total_slices = atol(tmp); 2682 2699 sprintf(tmp, "Reassembling large files "); 2683 sprintf(xattr_fname, XATTR_BIGGLST_FNAME_RAW_SZ, bkpinfo->tmpdir); 2684 sprintf(acl_fname, ACL_BIGGLST_FNAME_RAW_SZ, bkpinfo->tmpdir); 2700 if (g_getfattr) { 2701 sprintf(xattr_fname, XATTR_BIGGLST_FNAME_RAW_SZ, bkpinfo->tmpdir); 2702 } 2703 if (g_getfacl) { 2704 sprintf(acl_fname, ACL_BIGGLST_FNAME_RAW_SZ, bkpinfo->tmpdir); 2705 } 2685 2706 mvaddstr_and_log_it(g_currentY, 0, tmp); 2686 2707 sprintf(biggies_whose_EXATs_we_should_set, … … 2759 2780 if (length_of_file(biggies_whose_EXATs_we_should_set) > 2) { 2760 2781 iamhere("Setting biggie-EXATs"); 2761 if (length_of_file(acl_fname) > 0) { 2762 log_msg(1, "set_acl_list(%s,%s)", 2763 biggies_whose_EXATs_we_should_set, acl_fname); 2764 set_acl_list(biggies_whose_EXATs_we_should_set, acl_fname); 2765 } 2766 if (length_of_file(xattr_fname) > 0) { 2767 log_msg(1, "set_fattr_List(%s,%s)", 2782 if (g_getfattr) { 2783 if (length_of_file(xattr_fname) > 0) { 2784 log_msg(1, "set_fattr_List(%s,%s)", 2768 2785 biggies_whose_EXATs_we_should_set, xattr_fname); 2769 set_fattr_list(biggies_whose_EXATs_we_should_set,2786 set_fattr_list(biggies_whose_EXATs_we_should_set, 2770 2787 xattr_fname); 2788 } 2789 } 2790 if (g_getfacl) { 2791 if (length_of_file(acl_fname) > 0) { 2792 log_msg(1, "set_acl_list(%s,%s)", 2793 biggies_whose_EXATs_we_should_set, acl_fname); 2794 set_acl_list(biggies_whose_EXATs_we_should_set, acl_fname); 2795 } 2771 2796 } 2772 2797 } else { … … 2870 2895 while (ctrl_chr != BLK_STOP_AFIOBALLS) { 2871 2896 update_progress_form(progress_str); 2872 sprintf(xattr_fname, "%s/xattr-subset-%ld.tmp", bkpinfo->tmpdir, 2897 if (g_getfattr) { 2898 sprintf(xattr_fname, "%s/xattr-subset-%ld.tmp", bkpinfo->tmpdir, 2873 2899 current_afioball_number); 2874 sprintf(acl_fname, "%s/acl-subset-%ld.tmp", bkpinfo->tmpdir, 2900 unlink(xattr_fname); 2901 } 2902 if (g_getfacl) { 2903 sprintf(acl_fname, "%s/acl-subset-%ld.tmp", bkpinfo->tmpdir, 2875 2904 current_afioball_number); 2876 unlink(xattr_fname);2877 unlink(acl_fname);2905 unlink(acl_fname); 2906 } 2878 2907 if (ctrl_chr == BLK_START_EXTENDED_ATTRIBUTES) { 2879 2908 iamhere("Reading EXAT files from tape"); … … 2914 2943 res = 2915 2944 read_header_block_from_stream(&tmp_size, tmp_fname, &ctrl_chr); 2916 unlink(xattr_fname); 2917 unlink(acl_fname); 2945 if (g_getfattr) { 2946 unlink(xattr_fname); 2947 } 2948 if (g_getfacl) { 2949 unlink(acl_fname); 2950 } 2918 2951 } // next 2919 2952 log_msg(1, "All done with afioballs");
Note:
See TracChangeset
for help on using the changeset viewer.