[BACK]Return to downloader.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rsync

Diff for /src/usr.bin/rsync/downloader.c between version 1.10 and 1.11

version 1.10, 2019/02/16 10:46:22 version 1.11, 2019/02/16 10:47:20
Line 299 
Line 299 
         int32_t          idx, rawtok;          int32_t          idx, rawtok;
         const struct flist *f;          const struct flist *f;
         size_t           sz, tok;          size_t           sz, tok;
         mode_t           perm;  
         struct stat      st;          struct stat      st;
         char            *buf = NULL;          char            *buf = NULL;
         unsigned char    ourmd[MD4_DIGEST_LENGTH],          unsigned char    ourmd[MD4_DIGEST_LENGTH],
Line 423 
Line 422 
   
                 if ((p->fd = mkstempat(p->rootfd, p->fname)) == -1) {                  if ((p->fd = mkstempat(p->rootfd, p->fname)) == -1) {
                         ERR(sess, "%s: openat", p->fname);                          ERR(sess, "%s: openat", p->fname);
                         goto out;  
                 }  
   
                 /*  
                  * Inherit permissions from the source file if we're new  
                  * or specifically told with -p.  
                  */  
   
                 if (!sess->opts->preserve_perms)  
                         perm = -1 == p->ofd ? f->st.mode : st.st_mode;  
                 else  
                         perm = f->st.mode;  
   
                 if (fchmod(p->fd, perm) == -1) {  
                         ERR(sess, "%s: fchmod", p->fname);  
                         (void)unlinkat(p->rootfd, p->fname, 0);  
                         goto out;                          goto out;
                 }                  }
   

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11