Changeset 912


Ignore:
Timestamp:
Nov 2, 2006, 1:22:57 AM (12 years ago)
Author:
bruno
Message:

Attempt to fix #66 (setfacl not existing => no error)

Location:
branches/stable/mondo/src
Files:
4 edited

Legend:

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

    r847 r912  
    645645
    646646
    647 /*
    648 int set_acl_list(char*masklist, char*acl_fname)
    649 {
    650   char*command;
    651   int retval=0;
    652  
    653   if (length_of_file(acl_fname) <= 0) { return(0); }
    654   log_msg(1, "FIXME - not using masklist"); 
    655   malloc_string(command);
    656   if (find_home_of_exe("setfacl"))
    657     {
    658       sprintf(command, "gzip -dc %s | setfacl --restore - 2>> %s", acl_fname, MONDO_LOGFILE);
    659       log_msg(1, "command = %s", command);
    660       retval = system(command);
    661     }
    662   paranoid_free(command);
    663   return(retval);
    664 }
    665 */
    666 
    667 
    668 
    669647int set_EXAT_list(char *orig_msklist, char *original_exat_fname,
    670648                  char *executable)
     
    820798int set_fattr_list(char *masklist, char *fattr_fname)
    821799{
    822     return (set_EXAT_list(masklist, fattr_fname, "setfattr"));
     800    if (find_home_of_exe("setfattr")) {
     801        return (set_EXAT_list(masklist, fattr_fname, "setfattr"));
     802    } else {
     803        log_msg(1, "ERROR: set_EXAT_list: setfattr doesn't exist");
     804        return(0);
     805    }
    823806}
    824807
     
    827810int set_acl_list(char *masklist, char *acl_fname)
    828811{
    829     return (set_EXAT_list(masklist, acl_fname, "setfacl"));
    830 }
    831 
    832 /*
    833   if (find_home_of_exe("setfattr"))
    834     {
    835       sprintf(command, "gzip -dc %s | setfattr --restore - 2>> %s", acl_fname, MONDO_LOGFILE);
    836       log_msg(1, "command = %s", command);
    837       retval = system(command);
    838     }
    839   paranoid_free(acl_subset_fname);
    840   paranoid_free(syscall_pin);
    841   paranoid_free(command);
    842   return(retval);
    843 */
    844 
    845 
    846 
    847 
     812    if (find_home_of_exe("setfacl")) {
     813        return (set_EXAT_list(masklist, acl_fname, "setfacl"));
     814    } else {
     815        log_msg(1, "ERROR: set_EXAT_list: setfacl doesn't exist");
     816        return(0);
     817    }
     818}
    848819
    849820
  • branches/stable/mondo/src/mondorestore/mondo-restore.c

    r911 r912  
    24562456        sprintf(acl_fname, ACL_BIGGLST_FNAME_RAW_SZ, ARCHIVES_PATH);
    24572457        sprintf(xattr_fname, XATTR_BIGGLST_FNAME_RAW_SZ, ARCHIVES_PATH);
    2458         if (length_of_file(acl_fname) > 0 && find_home_of_exe("setfacl")) {
     2458        if (length_of_file(acl_fname) > 0) {
    24592459            set_acl_list(biggies_whose_EXATs_we_should_set, acl_fname);
    24602460        }
    2461         if (length_of_file(xattr_fname) > 0
    2462             && find_home_of_exe("setfattr")) {
     2461        if (length_of_file(xattr_fname) > 0) {
    24632462            set_fattr_list(biggies_whose_EXATs_we_should_set, xattr_fname);
    24642463        }
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools-EXT.h

    r128 r912  
    1010extern int modify_rclocal_one_time(char *path);
    1111extern int mount_cdrom(struct s_bkpinfo *bkpinfo);
    12 extern int mount_device(char *, char *, char *, bool);
    1312extern int mount_all_devices(struct mountlist_itself *, bool);
    1413extern void protect_against_braindead_sysadmins(void);
  • branches/stable/mondo/src/mondorestore/mondo-rstr-tools.h

    r425 r912  
    1010int modify_rclocal_one_time(char *path);
    1111int mount_cdrom(struct s_bkpinfo *bkpinfo);
    12 int mount_device(char *, char *, char *, bool);
    1312int mount_all_devices(struct mountlist_itself *, bool);
    1413void protect_against_braindead_sysadmins(void);
Note: See TracChangeset for help on using the changeset viewer.