From a41a1e87182410ec6c2eeaddb0cd961ec554c404 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 3 Jan 2005 21:05:39 +0000 Subject: [PATCH] If there is no lchown(), don't try to set the user & group of a symlink. --- rsync.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rsync.c b/rsync.c index 47b49a6f..8ee09c7c 100644 --- a/rsync.c +++ b/rsync.c @@ -161,6 +161,11 @@ int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st, change_uid = am_root && preserve_uid && st->st_uid != file->uid; change_gid = preserve_gid && file->gid != GID_NONE && st->st_gid != file->gid; +#if !HAVE_LCHOWN + if (S_ISLNK(st->st_mode)) + ; + else +#endif if (change_uid || change_gid) { if (verbose > 2) { if (change_uid) { -- 2.34.1