From: claudio Date: Fri, 22 Oct 2021 09:59:35 +0000 (+0000) Subject: When reading the symlink value during the fts travers use ent->fts_accpath X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e812f350d0736e171432f40b4b6fc7f0b443cb3b;p=openbsd When reading the symlink value during the fts travers use ent->fts_accpath since the fts traverse does chdirs for performance reasons. OK deraadt@ --- diff --git a/usr.bin/rsync/flist.c b/usr.bin/rsync/flist.c index 392ba494423..ed3ccb6f470 100644 --- a/usr.bin/rsync/flist.c +++ b/usr.bin/rsync/flist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flist.c,v 1.34 2021/09/02 21:06:06 deraadt Exp $ */ +/* $OpenBSD: flist.c,v 1.35 2021/10/22 09:59:35 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * Copyright (c) 2019 Florian Obser @@ -992,7 +992,7 @@ flist_gen_dirent(struct sess *sess, char *root, struct flist **fl, size_t *sz, /* Optionally copy link information. */ if (S_ISLNK(ent->fts_statp->st_mode)) { - f->link = symlink_read(f->path); + f->link = symlink_read(ent->fts_accpath); if (f->link == NULL) { ERRX1("symlink_read"); goto out;