Changeset 948 in MondoRescue
- Timestamp:
- Nov 19, 2006, 1:27:46 AM (18 years ago)
- Location:
- branches/stable
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/mindi
r941 r948 463 463 [ "$my_partitions" != "" ] && umount $my_partitions 464 464 # Clean temporary files only when standalone mindi 465 if [ $MINDI_TMP != $MONDO_TMP]; then465 if [ _"$MINDI_TMP" != _"$MONDO_TMP" ]; then 466 466 rm -Rf $MINDI_TMP 467 467 fi -
branches/stable/mondo-doc/mondoarchive.8
r907 r948 322 322 Specify the loglevel. Use 99 for full debug. Standard debug level is 4. 323 323 324 .TP 325 .BI "-z " 326 Use extended attributes and acl for each file and store them in the backup media. Use this option if you use SElinux e.g. but it will slow down backup and restore time of course. 327 324 328 325 329 .SH DIAGNOSTICS -
branches/stable/mondo/src/common/libmondo-archive.c
r911 r948 234 234 extern bool g_cd_recovery; 235 235 extern char *g_serial_string; 236 237 extern char *g_getfacl; 238 extern char *g_getfattr; 239 240 236 241 237 242 /** … … 1112 1117 char *archiving_filelist_fname; 1113 1118 char *archiving_afioball_fname; 1114 char *curr_xattr_list_fname ;1119 char *curr_xattr_list_fname = NULL; 1115 1120 char *curr_acl_list_fname; 1116 1121 … … 1185 1190 log_msg(4, "%s[%d:%d] - EXATing %d...", FORTY_SPACES, getpid(), 1186 1191 this_thread_no, archiving_set_no); 1187 sprintf(curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 1192 if (g_getfattr) { 1193 sprintf(curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 1188 1194 bkpinfo->tmpdir, archiving_set_no); 1189 sprintf(curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 1195 get_fattr_list(archiving_filelist_fname, curr_xattr_list_fname); 1196 } 1197 if (g_getfacl) { 1198 sprintf(curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 1190 1199 bkpinfo->tmpdir, archiving_set_no); 1191 get_fattr_list(archiving_filelist_fname, curr_xattr_list_fname);1192 get_acl_list(archiving_filelist_fname, curr_acl_list_fname);1200 get_acl_list(archiving_filelist_fname, curr_acl_list_fname); 1201 } 1193 1202 1194 1203 log_msg(4, "%s[%d:%d] - archiving %d...", FORTY_SPACES, getpid(), … … 1589 1598 int noof_threads; 1590 1599 int i; 1591 char *curr_xattr_list_fname ;1600 char *curr_xattr_list_fname = NULL; 1592 1601 char *curr_acl_list_fname; 1593 1602 int misc_counter_that_is_not_important = 0; … … 1676 1685 sprintf(storing_afioball_fname, AFIOBALL_FNAME_RAW_SZ, 1677 1686 bkpinfo->tmpdir, storing_set_no, bkpinfo->zip_suffix); 1678 sprintf(curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 1687 if (g_getfattr) { 1688 sprintf(curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 1679 1689 bkpinfo->tmpdir, storing_set_no); 1680 sprintf(curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 1690 } 1691 if (g_getfacl) { 1692 sprintf(curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 1681 1693 bkpinfo->tmpdir, storing_set_no); 1694 } 1682 1695 1683 1696 log_msg(2, "Storing set %d", storing_set_no); … … 1707 1720 NULL); 1708 1721 } else { 1709 res = 1710 move_files_to_cd(bkpinfo, storing_filelist_fname, 1722 if (g_getfacl) { 1723 if (g_getfattr) { 1724 res = move_files_to_cd(bkpinfo, storing_filelist_fname, 1711 1725 curr_xattr_list_fname, 1712 1726 curr_acl_list_fname, 1713 1727 storing_afioball_fname, NULL); 1728 } else { 1729 res = move_files_to_cd(bkpinfo, storing_filelist_fname, 1730 curr_acl_list_fname, 1731 storing_afioball_fname, NULL); 1732 } 1733 } else { 1734 if (g_getfattr) { 1735 res = move_files_to_cd(bkpinfo, storing_filelist_fname, 1736 curr_xattr_list_fname, 1737 storing_afioball_fname, NULL); 1738 } else { 1739 res = move_files_to_cd(bkpinfo, storing_filelist_fname, 1740 storing_afioball_fname, NULL); 1741 } 1742 } 1714 1743 } 1715 1744 retval += res; … … 2370 2399 2371 2400 log_msg(1, "EXAT'g set %ld", curr_set_no); 2372 sprintf(curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 2401 if (g_getfattr) { 2402 sprintf(curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 2373 2403 bkpinfo->tmpdir, curr_set_no); 2374 sprintf(curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 2404 get_fattr_list(curr_filelist_fname, curr_xattr_list_fname); 2405 } 2406 if (g_getfacl) { 2407 sprintf(curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 2375 2408 bkpinfo->tmpdir, curr_set_no); 2376 get_fattr_list(curr_filelist_fname, curr_xattr_list_fname);2377 get_acl_list(curr_filelist_fname, curr_acl_list_fname);2409 get_acl_list(curr_filelist_fname, curr_acl_list_fname); 2410 } 2378 2411 2379 2412 log_msg(1, "Archiving set %ld", curr_set_no); … … 2404 2437 res = move_files_to_stream(bkpinfo, curr_afioball_fname, NULL); 2405 2438 } else { 2406 res = 2407 move_files_to_cd(bkpinfo, curr_filelist_fname, 2408 curr_xattr_list_fname, 2409 curr_acl_list_fname, curr_afioball_fname, 2410 NULL); 2439 if (g_getfacl) { 2440 if (g_getfattr) { 2441 res = move_files_to_cd(bkpinfo, curr_filelist_fname, 2442 curr_xattr_list_fname, 2443 curr_acl_list_fname, 2444 curr_afioball_fname, NULL); 2445 } else { 2446 res = move_files_to_cd(bkpinfo, curr_filelist_fname, 2447 curr_acl_list_fname, 2448 curr_afioball_fname, NULL); 2449 } 2450 } else { 2451 if (g_getfattr) { 2452 res = move_files_to_cd(bkpinfo, curr_filelist_fname, 2453 curr_xattr_list_fname, 2454 curr_afioball_fname, NULL); 2455 } else { 2456 res = move_files_to_cd(bkpinfo, curr_filelist_fname, 2457 curr_afioball_fname, NULL); 2458 } 2459 } 2411 2460 } 2412 2461 retval += res; … … 2520 2569 "Archiving large files to media "); 2521 2570 sprintf(biggielist, "%s/archives/biggielist.txt", bkpinfo->scratchdir); 2522 sprintf(xattr_fname, XATTR_BIGGLST_FNAME_RAW_SZ, bkpinfo->tmpdir); 2523 sprintf(acl_fname, ACL_BIGGLST_FNAME_RAW_SZ, bkpinfo->tmpdir); 2571 if (g_getfattr) { 2572 sprintf(xattr_fname, XATTR_BIGGLST_FNAME_RAW_SZ, bkpinfo->tmpdir); 2573 } 2574 if (g_getfacl) { 2575 sprintf(acl_fname, ACL_BIGGLST_FNAME_RAW_SZ, bkpinfo->tmpdir); 2576 } 2524 2577 2525 2578 sprintf(command, "cp %s/biggielist.txt %s", bkpinfo->tmpdir, … … 2533 2586 } 2534 2587 2535 get_fattr_list(biggielist, xattr_fname);2536 get_acl_list(biggielist, acl_fname);2537 sprintf(command, "cp %s %s/archives/", xattr_fname,2588 if (g_getfattr) { 2589 get_fattr_list(biggielist, xattr_fname); 2590 sprintf(command, "cp %s %s/archives/", xattr_fname, 2538 2591 bkpinfo->scratchdir); 2539 paranoid_system(command); 2540 sprintf(command, "cp %s %s/archives/", acl_fname, bkpinfo->scratchdir); 2541 paranoid_system(command); 2592 paranoid_system(command); 2593 } 2594 if (g_getfacl) { 2595 get_acl_list(biggielist, acl_fname); 2596 sprintf(command, "cp %s %s/archives/", acl_fname, bkpinfo->scratchdir); 2597 paranoid_system(command); 2598 } 2542 2599 2543 2600 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { -
branches/stable/mondo/src/common/libmondo-stream.c
r684 r948 115 115 extern bool g_sigpipe; 116 116 extern int g_tape_buffer_size_MB; 117 118 extern char *g_getfacl; 119 extern char *g_getfattr; 117 120 118 121 /** … … 443 446 444 447 // xattr 445 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 446 if (*pctrl_chr != BLK_START_EXAT_FILE) { 447 wrong_marker(BLK_START_EXAT_FILE, *pctrl_chr); 448 } 449 if (!strstr(tmp_fname, "xattr")) { 450 fatal_error("Wrong order, sunshine."); 451 } 452 read_file_from_stream_to_file(bkpinfo, xattr_fname, *ptmp_size); 453 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 454 if (*pctrl_chr != BLK_STOP_EXAT_FILE) { 455 wrong_marker(BLK_STOP_EXAT_FILE, *pctrl_chr); 448 if (g_getfattr) { 449 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 450 if (*pctrl_chr != BLK_START_EXAT_FILE) { 451 wrong_marker(BLK_START_EXAT_FILE, *pctrl_chr); 452 } 453 if (!strstr(tmp_fname, "xattr")) { 454 fatal_error("Wrong order, sunshine."); 455 } 456 read_file_from_stream_to_file(bkpinfo, xattr_fname, *ptmp_size); 457 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 458 if (*pctrl_chr != BLK_STOP_EXAT_FILE) { 459 wrong_marker(BLK_STOP_EXAT_FILE, *pctrl_chr); 460 } 461 log_msg(1, "Got xattr"); 456 462 } 457 463 // acl 458 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 459 if (!strstr(tmp_fname, "acl")) { 460 fatal_error("Wrong order, sunshine."); 461 } 462 if (*pctrl_chr != BLK_START_EXAT_FILE) { 463 wrong_marker(BLK_START_EXAT_FILE, *pctrl_chr); 464 } 465 read_file_from_stream_to_file(bkpinfo, acl_fname, *ptmp_size); 466 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 467 if (*pctrl_chr != BLK_STOP_EXAT_FILE) { 468 wrong_marker(BLK_STOP_EXAT_FILE, *pctrl_chr); 469 } 470 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 471 if (*pctrl_chr != BLK_STOP_EXTENDED_ATTRIBUTES) { 472 wrong_marker(BLK_STOP_EXTENDED_ATTRIBUTES, *pctrl_chr); 464 if (g_getfacl) { 465 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 466 if (!strstr(tmp_fname, "acl")) { 467 fatal_error("Wrong order, sunshine."); 468 } 469 if (*pctrl_chr != BLK_START_EXAT_FILE) { 470 wrong_marker(BLK_START_EXAT_FILE, *pctrl_chr); 471 } 472 read_file_from_stream_to_file(bkpinfo, acl_fname, *ptmp_size); 473 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 474 if (*pctrl_chr != BLK_STOP_EXAT_FILE) { 475 wrong_marker(BLK_STOP_EXAT_FILE, *pctrl_chr); 476 } 477 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 478 if (*pctrl_chr != BLK_STOP_EXTENDED_ATTRIBUTES) { 479 wrong_marker(BLK_STOP_EXTENDED_ATTRIBUTES, *pctrl_chr); 480 } 481 log_msg(1, "Got acl"); 473 482 } 474 483 // tarball itself 475 484 res = read_header_block_from_stream(ptmp_size, tmp_fname, pctrl_chr); 476 log_msg(1, " Got xattr and acl;now looking for afioball");485 log_msg(1, "now looking for afioball"); 477 486 return (retval); 478 487 } … … 483 492 { 484 493 int res = 0; 485 // EXATs 486 write_header_block_to_stream(length_of_file(xattr_fname), xattr_fname, 487 BLK_START_EXTENDED_ATTRIBUTES); 494 if (g_getfattr) { 488 495 // xattr 489 write_header_block_to_stream(length_of_file(xattr_fname), xattr_fname, 490 BLK_START_EXAT_FILE); 491 write_file_to_stream_from_file(bkpinfo, xattr_fname); 492 write_header_block_to_stream((off_t)-1, xattr_fname, BLK_STOP_EXAT_FILE); 496 write_header_block_to_stream(length_of_file(xattr_fname), xattr_fname, 497 BLK_START_EXTENDED_ATTRIBUTES); 498 write_header_block_to_stream(length_of_file(xattr_fname), xattr_fname, 499 BLK_START_EXAT_FILE); 500 write_file_to_stream_from_file(bkpinfo, xattr_fname); 501 write_header_block_to_stream((off_t)-1, xattr_fname, BLK_STOP_EXAT_FILE); 502 } 503 if (g_getfacl) { 493 504 // acl 494 write_header_block_to_stream(length_of_file(acl_fname), acl_fname, 495 BLK_START_EXAT_FILE); 496 write_file_to_stream_from_file(bkpinfo, acl_fname); 497 write_header_block_to_stream((off_t)-1, acl_fname, BLK_STOP_EXAT_FILE); 498 write_header_block_to_stream(length_of_file(xattr_fname), xattr_fname, 499 BLK_STOP_EXTENDED_ATTRIBUTES); 505 write_header_block_to_stream(length_of_file(acl_fname), acl_fname, 506 BLK_START_EXAT_FILE); 507 write_file_to_stream_from_file(bkpinfo, acl_fname); 508 write_header_block_to_stream((off_t)-1, acl_fname, BLK_STOP_EXAT_FILE); 509 write_header_block_to_stream(length_of_file(xattr_fname), xattr_fname, 510 BLK_STOP_EXTENDED_ATTRIBUTES); 511 } 500 512 return (res); 501 513 } -
branches/stable/mondo/src/common/libmondo-verify.c
r911 r948 124 124 int g_last_afioball_number = -1; 125 125 126 extern char *g_getfacl; 127 extern char *g_getfattr; 126 128 127 129 /** … … 807 809 malloc_string(curr_acl_list_fname); 808 810 809 sprintf(curr_xattr_list_fname, XATTR_BIGGLST_FNAME_RAW_SZ, 811 if (g_getfattr) { 812 sprintf(curr_xattr_list_fname, XATTR_BIGGLST_FNAME_RAW_SZ, 810 813 bkpinfo->tmpdir); 811 sprintf(curr_acl_list_fname, ACL_BIGGLST_FNAME_RAW_SZ, 814 } 815 if (g_getfacl) { 816 sprintf(curr_acl_list_fname, ACL_BIGGLST_FNAME_RAW_SZ, 812 817 bkpinfo->tmpdir); 818 } 813 819 log_to_screen("Verifying regular archives on tape"); 814 820 total_afioballs = get_last_filelist_number(bkpinfo) + 1; … … 835 841 ctrl_chr != BLK_STOP_AFIOBALLS; 836 842 res = read_header_block_from_stream(&size, fname, &ctrl_chr)) { 837 sprintf(curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 843 if (g_getfattr) { 844 sprintf(curr_xattr_list_fname, XATTR_LIST_FNAME_RAW_SZ, 838 845 bkpinfo->tmpdir, current_afioball_number); 839 sprintf(curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 846 } 847 if (g_getfacl) { 848 sprintf(curr_acl_list_fname, ACL_LIST_FNAME_RAW_SZ, 840 849 bkpinfo->tmpdir, current_afioball_number); 850 } 841 851 if (ctrl_chr == BLK_START_EXTENDED_ATTRIBUTES) { 842 852 iamhere("Reading EXAT files from tape"); … … 915 925 malloc_string(curr_acl_list_fname); 916 926 917 sprintf(curr_xattr_list_fname, XATTR_BIGGLST_FNAME_RAW_SZ, 927 if (g_getfattr) { 928 sprintf(curr_xattr_list_fname, XATTR_BIGGLST_FNAME_RAW_SZ, 918 929 bkpinfo->tmpdir); 919 sprintf(curr_acl_list_fname, ACL_BIGGLST_FNAME_RAW_SZ, 930 } 931 if (g_getfacl) { 932 sprintf(curr_acl_list_fname, ACL_BIGGLST_FNAME_RAW_SZ, 920 933 bkpinfo->tmpdir); 934 } 921 935 sprintf(comment, "Verifying all bigfiles."); 922 936 log_to_screen(comment); -
branches/stable/mondo/src/mondoarchive/main.c
r945 r948 142 142 char *ps_options = "auxww"; 143 143 char *ps_proc_id = "$2"; 144 char *g_getfacl = NULL;145 char *g_getfattr = NULL;146 144 147 145 extern t_bkptype g_backup_media_type; … … 458 456 bkpinfo->scratchdir); 459 457 460 if (find_home_of_exe("getfacl")) {461 asprintf(&g_getfacl,"getfacl");462 }463 if (find_home_of_exe("getfattr")) {464 asprintf(&g_getfattr,"getfattr");465 }466 467 458 /* If we're meant to backup then backup */ 468 459 if (bkpinfo->backup_data) { -
branches/stable/mondo/src/mondoarchive/mondo-cli.c
r910 r948 202 202 203 203 extern double g_kernel_version; 204 205 204 extern int g_current_media_number; 206 207 208 209 205 extern pid_t g_main_pid; 210 211 212 213 214 206 extern char *resolve_softlinks_to_get_to_actual_device_file(char *); 215 207 216 208 /* Do we use extended attributes and acl ? 209 * By default no, use --acl & --attr options to force their usage */ 210 char *g_getfacl = NULL; 211 char *g_getfattr = NULL; 217 212 218 213 /** … … 673 668 bkpinfo->backup_media_type = cdrw; 674 669 } 670 if (flag_set['z']) { 671 if (find_home_of_exe("getfattr")) { 672 asprintf(&g_getfattr,"getfattr"); 673 } 674 if (find_home_of_exe("getfacl")) { 675 asprintf(&g_getfacl,"getfacl"); 676 } 677 } 678 } 675 679 676 680 /* optional, popular */ … … 1021 1025 while ((opt = 1022 1026 getopt(argc, argv, 1023 "0123456789A:B:C:DE:FHI:J:K:LNOP:QRS:T:VWb:c:d:ef:gik:l:mn:op:rs:tuw:x: "))1027 "0123456789A:B:C:DE:FHI:J:K:LNOP:QRS:T:VWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z")) 1024 1028 != -1) { 1025 1029 if (opt == '?') { -
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.