Fix pasto: broken storage of symbolic link long destinations in pax format
authorjca <jca@openbsd.org>
Tue, 16 Apr 2024 20:51:11 +0000 (20:51 +0000)
committerjca <jca@openbsd.org>
Tue, 16 Apr 2024 20:51:11 +0000 (20:51 +0000)
bin/pax/tar.c

index dff6684..212961f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: tar.c,v 1.82 2024/04/16 19:09:06 jca Exp $    */
+/*     $OpenBSD: tar.c,v 1.83 2024/04/16 20:51:11 jca Exp $    */
 /*     $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $      */
 
 /*-
@@ -1135,7 +1135,7 @@ wr_ustar_or_pax(ARCHD *arcn, int ustar)
                        return(1);
                }
 #ifndef SMALL
-               else if (xheader_add(&xhdr, "linkpath", arcn->name) == -1) {
+               else if (xheader_add(&xhdr, "linkpath", arcn->ln_name) == -1) {
                        paxwarn(1, "Link name too long for pax %s",
                            arcn->ln_name);
                        xheader_free(&xhdr);