=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsync/downloader.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/rsync/downloader.c 2019/02/16 10:46:22 1.10 --- src/usr.bin/rsync/downloader.c 2019/02/16 10:47:20 1.11 *************** *** 1,4 **** ! /* $Id: downloader.c,v 1.10 2019/02/16 10:46:22 florian Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: downloader.c,v 1.11 2019/02/16 10:47:20 florian Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * *************** *** 299,305 **** int32_t idx, rawtok; const struct flist *f; size_t sz, tok; - mode_t perm; struct stat st; char *buf = NULL; unsigned char ourmd[MD4_DIGEST_LENGTH], --- 299,304 ---- *************** *** 423,444 **** if ((p->fd = mkstempat(p->rootfd, p->fname)) == -1) { 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; } --- 422,427 ----