--link-dest

Joe Batt Joe at soliddesign.net
Wed Nov 5 01:24:34 EST 2003


Why does --link-dest assume -ugp ?

This patch removes those assumptions allowing mortal users to use
--link-dest for back ups.  (I think...  I didn't look at the large
picture.)

Joe


*** generator.c Thu Aug 29 09:44:55 2002
--- ../generator.c      Tue Nov  4 09:12:59 2003
***************
*** 42,47 ****
--- 42,50 ----
  extern int modify_window;
  extern char *compare_dest;
  extern int link_dest;
+ extern int preserve_perms;
+ extern int preserve_uid;
+ extern int preserve_gid;
   
   
  /* choose whether to skip a particular file */
***************
*** 51,63 ****
        if (st->st_size != file->length) {
                return 0;
        }
!       if (link_dest) {
!               if((st->st_mode & ~_S_IFMT) !=  (file->mode & ~_S_IFMT))
{
!                       return 0;
!               }
!               if (st->st_uid != file->uid || st->st_gid != file->gid)
{
!                       return 0;
!               }
        }
   
   
--- 54,64 ----
        if (st->st_size != file->length) {
                return 0;
        }
!       if (link_dest
!           && ((preserve_perms && (st->st_mode & ~_S_IFMT) != 
(file->mode & ~_S_IFMT))
!               || (preserve_uid && st->st_uid != file->uid)
!               || (preserve_gid && st->st_gid != file->gid))) {
!               return 0;
        }





More information about the rsync mailing list