-/* $Id: flist.c,v 1.30 2021/03/22 11:26:44 claudio Exp $ */
+/* $Id: flist.c,v 1.31 2021/03/22 11:49:15 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2019 Florian Obser <florian@openbsd.org>
ERRX1("flist_append");
return 0;
}
- if (unveil(root, "r") == -1) {
- ERR("%s: unveil", root);
- return 0;
- }
return 1;
} else if (S_ISLNK(st.st_mode)) {
if (!sess->opts->preserve_links) {
ERRX1("flist_append");
return 0;
}
- if (unveil(root, "r") == -1) {
- ERR("%s: unveil", root);
- return 0;
- }
return 1;
} else if (!S_ISDIR(st.st_mode)) {
WARNX("%s: skipping special", root);
ERR("fts_read");
goto out;
}
- if (unveil(root, "r") == -1) {
- ERR("%s: unveil", root);
- goto out;
- }
LOG3("generated %zu filenames: %s", flsz, root);
rc = 1;
/* Add this file to our file-system worldview. */
- if (unveil(argv[i], "r") == -1) {
- ERR("%s: unveil", argv[i]);
- goto out;
- }
if (!flist_append(f, &st, argv[i])) {
ERRX1("flist_append");
goto out;
/* After scanning, lock our file-system view. */
- if (unveil(NULL, NULL) == -1) {
- ERR("unveil");
- return 0;
- }
if (!rc)
return 0;
-/* $Id: sender.c,v 1.26 2020/11/24 16:54:44 claudio Exp $ */
+/* $Id: sender.c,v 1.27 2021/03/22 11:49:15 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
* It queues requests for updates as soon as it receives them.
* Returns zero on failure, non-zero on success.
*
- * Pledges: stdio, rpath, unveil.
+ * Pledges: stdio, getpw, rpath.
*/
int
rsync_sender(struct sess *sess, int fdin,
size_t wbufpos = 0, wbufsz = 0, wbufmax = 0;
ssize_t ssz;
- if (pledge("stdio getpw rpath unveil", NULL) == -1) {
+ if (pledge("stdio getpw rpath", NULL) == -1) {
ERR("pledge");
return 0;
}