]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
copy: Copy symlink xattrs
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 13 Feb 2023 20:56:31 +0000 (21:56 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 Feb 2023 11:51:40 +0000 (12:51 +0100)
Symlinks can have xattrs as well, let's make sure we copy those
as well.

src/shared/copy.c

index 3e624d8844f28aaf659c7e839ce894079d7bf4fd..d15875739acb38f5e6210f4d49998fa89850b287 100644 (file)
@@ -504,6 +504,7 @@ static int fd_copy_symlink(
                      AT_SYMLINK_NOFOLLOW) < 0)
                 r = -errno;
 
+        (void) copy_xattr(df, from, dt, to, copy_flags);
         (void) utimensat(dt, to, (struct timespec[]) { st->st_atim, st->st_mtim }, AT_SYMLINK_NOFOLLOW);
         return r;
 }