From 46d305834115b8d43a73338d903a659be8c1ae25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 24 Jan 2023 15:53:42 +0100 Subject: [PATCH] copydir: fix impl usage copydir.c: In function 'copy_dir': copydir.c:517:32: warning: passing argument 1 of 'copy_tree' from incompatible pointer type [-Wincompatible-pointer-types] 517 | return (copy_tree (src, dst, false, reset_selinux, | ^~~ | | | const struct path_info * In file included from copydir.c:20: ../lib/prototypes.h:108:35: note: expected 'const char *' but argument is of type 'const struct path_info *' 108 | extern int copy_tree (const char *src_root, const char *dst_root, | ~~~~~~~~~~~~^~~~~~~~ copydir.c:517:37: warning: passing argument 2 of 'copy_tree' from incompatible pointer type [-Wincompatible-pointer-types] 517 | return (copy_tree (src, dst, false, reset_selinux, | ^~~ | | | const struct path_info * ../lib/prototypes.h:108:57: note: expected 'const char *' but argument is of type 'const struct path_info *' 108 | extern int copy_tree (const char *src_root, const char *dst_root, | ~~~~~~~~~~~~^~~~~~~~ Fixes: 74c17c71 ("Add support for skeleton files from /usr/etc/skel") --- libmisc/copydir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmisc/copydir.c b/libmisc/copydir.c index c1740e58..c19d38af 100644 --- a/libmisc/copydir.c +++ b/libmisc/copydir.c @@ -514,7 +514,7 @@ static int copy_dir (const struct path_info *src, const struct path_info *dst, * but copy into it (recursively). */ if (fstatat(dst->dirfd, dst->name, &dst_sb, AT_SYMLINK_NOFOLLOW) == 0 && S_ISDIR(dst_sb.st_mode)) { - return (copy_tree (src, dst, false, reset_selinux, + return (copy_tree_impl (src, dst, false, reset_selinux, old_uid, new_uid, old_gid, new_gid) != 0); }