Skip to content

Commit

Permalink
Do not try to lchown new links when slave is unprivileged
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Sep 10, 2022
1 parent 607cabc commit f5664d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmirror.c
Original file line number Diff line number Diff line change
@@ -846,7 +846,8 @@ static void slave(char *slave_path) {
if (!quiet)
warn("ln -s %s %s\n", fi_want->target, filename);
fileop_symlink(fi_want->target, filename);
fileop_lchown(fi_want->uid, fi_want->gid, filename);
if (!slave_unprivileged)
fileop_lchown(fi_want->uid, fi_want->gid, filename);
fileop_lmtime(fi_want->mtime, filename);
} else {
if (!slave_unprivileged && (fi_is->uid != fi_want->uid || fi_is->gid != fi_want->gid)) {

0 comments on commit f5664d0

Please sign in to comment.