=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsync/receiver.c,v retrieving revision 1.28 retrieving revision 1.29 diff -c -r1.28 -r1.29 *** src/usr.bin/rsync/receiver.c 2021/06/30 13:10:04 1.28 --- src/usr.bin/rsync/receiver.c 2021/08/29 13:43:46 1.29 *************** *** 1,4 **** ! /* $OpenBSD: receiver.c,v 1.28 2021/06/30 13:10:04 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons --- 1,4 ---- ! /* $OpenBSD: receiver.c,v 1.29 2021/08/29 13:43:46 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons *************** *** 172,178 **** rsync_receiver(struct sess *sess, int fdin, int fdout, const char *root) { struct flist *fl = NULL, *dfl = NULL; ! size_t i, flsz = 0, dflsz = 0, excl; char *tofree; int rc = 0, dfd = -1, phase = 0, c; int32_t ioerror; --- 172,178 ---- rsync_receiver(struct sess *sess, int fdin, int fdout, const char *root) { struct flist *fl = NULL, *dfl = NULL; ! size_t i, flsz = 0, dflsz = 0; char *tofree; int rc = 0, dfd = -1, phase = 0, c; int32_t ioerror; *************** *** 184,205 **** if (pledge("stdio unix rpath wpath cpath dpath fattr chown getpw unveil", NULL) == -1) err(ERR_IPC, "pledge"); ! /* Client sends zero-length exclusions. */ ! if (!sess->opts->server && !io_write_int(sess, fdout, 0)) { ! ERRX1("io_write_int"); ! goto out; ! } ! ! if (sess->opts->server && sess->opts->del) { ! if (!io_read_size(sess, fdin, &excl)) { ! ERRX1("io_read_size"); ! goto out; ! } else if (excl != 0) { ! ERRX("exclusion list is non-empty"); ! goto out; ! } ! } /* * Start by receiving the file list and our mystery number. --- 184,196 ---- if (pledge("stdio unix rpath wpath cpath dpath fattr chown getpw unveil", NULL) == -1) err(ERR_IPC, "pledge"); ! /* Client sends exclusions. */ ! if (!sess->opts->server) ! send_rules(sess, fdout); ! /* Server receives exclusions if delete is on. */ ! if (sess->opts->server && sess->opts->del) ! recv_rules(sess, fdin); /* * Start by receiving the file list and our mystery number.