]> git.pld-linux.org Git - packages/cpio.git/commitdiff
- fix infinite loop unpacking empty files with hard links (patch emptylink cpio-2_4_2-17
authorkloczek <kloczek@pld-linux.org>
Wed, 15 Sep 1999 21:47:40 +0000 (21:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  from rawhide),
- stdout chould contain progress information (patch stdout from rawhide).

Changed files:
    cpio-emptylink.patch -> 1.1
    cpio-stdout.patch -> 1.1

cpio-emptylink.patch [new file with mode: 0644]
cpio-stdout.patch [new file with mode: 0644]

diff --git a/cpio-emptylink.patch b/cpio-emptylink.patch
new file mode 100644 (file)
index 0000000..a7e22d1
--- /dev/null
@@ -0,0 +1,143 @@
+From jhpb@sarto.gaithersburg.md.us  Mon Jul 26 21:57:20 1999
+Return-Path: <jhpb@sarto.gaithersburg.md.us>
+Received: from mail.redhat.com (mail.redhat.com [199.183.24.239])
+       by developer.redhat.com (8.8.7/8.8.7) with ESMTP id VAA15169
+       for <bugzilla@developer.redhat.com>; Mon, 26 Jul 1999 21:57:20 -0400
+Received: from lacrosse.corp.redhat.com (root@lacrosse.corp.redhat.com [207.175.42.154])
+       by mail.redhat.com (8.8.7/8.8.7) with ESMTP id VAA21351
+       for <bugzilla@developer.redhat.com>; Mon, 26 Jul 1999 21:57:20 -0400
+Received: from mail.redhat.com (mail.redhat.com [199.183.24.239])
+       by lacrosse.corp.redhat.com (8.9.3/8.9.3) with ESMTP id VAA01496
+       for <bugzilla@lacrosse.redhat.com>; Mon, 26 Jul 1999 21:57:19 -0400
+Received: from sjc3-1.relay.mail.uu.net (sjc3-1.relay.mail.uu.net [199.171.54.122])
+       by mail.redhat.com (8.8.7/8.8.7) with ESMTP id VAA21342
+       for <bugzilla@redhat.com>; Mon, 26 Jul 1999 21:57:19 -0400
+Received: from uucp1.uu.net by sjc3sosrv11.alter.net with SMTP 
+       (peer crosschecked as: uucp1.uu.net [192.48.96.81])
+       id QQgzpn12816
+       for <bugzilla@redhat.com>; Tue, 27 Jul 1999 01:57:56 GMT
+Received: from sarto.UUCP by uucp1.uu.net with UUCP/RMAIL
+        ; Mon, 26 Jul 1999 21:55:38 -0400
+Received: from sarto.gaithersburg.md.us (IDENT:jhpb@altera.gaithersburg.md.us [10.10.10.11])
+       by altera.gaithersburg.md.us (8.9.3/8.9.3) with ESMTP id UAA02705
+       for <bugzilla@redhat.com>; Mon, 26 Jul 1999 20:51:35 -0400
+Sender: jhpb@sarto.gaithersburg.md.us
+Message-ID: <379D0297.ECEADA06@sarto.gaithersburg.md.us>
+Date: Mon, 26 Jul 1999 20:51:35 -0400
+From: "Joseph H. Buehler" <jhpb@sarto.gaithersburg.md.us>
+X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.5 i686)
+X-Accept-Language: en
+MIME-Version: 1.0
+To: bugzilla@redhat.com
+Subject: BUG ID #4208
+Content-Type: multipart/mixed;
+ boundary="------------747FAF18CE4E4F8E71D6ED66"
+
+This is a multi-part message in MIME format.
+--------------747FAF18CE4E4F8E71D6ED66
+Content-Type: text/plain; charset=us-ascii
+Content-Transfer-Encoding: 7bit
+
+The 2.4.2 version of GNU cpio goes into an infinite loop when unpacking
+cpio files that have empty files with hard links.  Duplicate as
+follows:
+
+rm -fr t &&
+mkdir t &&
+touch t/f1 &&
+ln t/f1 t/f2 &&
+find t | cpio -o -H newc > temp.cpio &&
+cpio -idmuv <temp.cpio &&
+true
+
+Also, cpio on systems without lchown() (probably not Redhat) will incorrectly
+set the permissions on files that symlinks point at, instead of the
+symlink itself.
+
+Patch is attached.
+
+Joe Buehler
+--------------747FAF18CE4E4F8E71D6ED66
+Content-Type: text/plain; charset=us-ascii;
+ name="cpio-2.4.2.patch"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="cpio-2.4.2.patch"
+
+*** cpio-2.4.2.redhat/copypass.c       Mon Jan  8 16:59:05 1996
+--- cpio-2.4.2/copypass.c      Wed Sep 11 21:22:04 1996
+***************
+*** 24,33 ****
+  #include "dstring.h"
+  #include "extern.h"
+  
+- #ifndef HAVE_LCHOWN
+- #define lchown chown
+- #endif
+- 
+  /* Copy files listed on the standard input into directory `directory_name'.
+     If `link_flag', link instead of copying.  */
+  
+--- 24,29 ----
+***************
+*** 360,371 ****
+--- 356,369 ----
+           }
+  
+         /* Set the attributes of the new link.  */
++ #ifdef HAVE_LCHOWN
+         if (!no_chown_flag)
+           if ((lchown (output_name.ds_string,
+                        set_owner_flag ? set_owner : in_file_stat.st_uid,
+                     set_group_flag ? set_group : in_file_stat.st_gid) < 0)
+               && errno != EPERM)
+             error (0, errno, "%s", output_name.ds_string);
++ #endif
+         free (link_name);
+       }
+  #endif
+*** cpio-2.4.2.redhat/copyin.c Wed Nov 30 17:49:06 1994
+--- cpio-2.4.2/copyin.c        Tue Sep 17 11:21:15 1996
+***************
+*** 29,38 ****
+  #include <fnmatch.h>
+  #endif
+  
+- #ifndef HAVE_LCHOWN
+- #define lchown chown
+- #endif
+- 
+  static void read_pattern_file ();
+  static void tape_skip_padding ();
+  static void defer_copyin ();
+--- 29,34 ----
+***************
+*** 982,993 ****
+--- 978,991 ----
+                   link_name = NULL;
+                   continue;
+                 }
++ #ifdef HAVE_LCHOWN
+               if (!no_chown_flag)
+                 if ((lchown (file_hdr.c_name,
+                              set_owner_flag ? set_owner : file_hdr.c_uid,
+                          set_group_flag ? set_group : file_hdr.c_gid) < 0)
+                     && errno != EPERM)
+                   error (0, errno, "%s", file_hdr.c_name);
++ #endif
+               free (link_name);
+               link_name = NULL;
+             }
+***************
+*** 1306,1312 ****
+    
+    for (d = deferments; d != NULL; d = d->next)
+      {
+-       d = deferments;
+        link_res = link_to_maj_min_ino (d->header.c_name, 
+                   d->header.c_dev_maj, d->header.c_dev_maj,
+                   d->header.c_ino);
+--- 1304,1309 ----
+
+--------------747FAF18CE4E4F8E71D6ED66--
+
diff --git a/cpio-stdout.patch b/cpio-stdout.patch
new file mode 100644 (file)
index 0000000..26d222a
--- /dev/null
@@ -0,0 +1,28 @@
+--- cpio-2.4.2/copyin.c.stdout Tue Aug 31 14:59:47 1999
++++ cpio-2.4.2/copyin.c        Tue Aug 31 15:00:52 1999
+@@ -999,9 +999,9 @@
+           }
+         if (verbose_flag)
+-          fprintf (stderr, "%s\n", file_hdr.c_name);
++          fprintf (stdout, "%s\n", file_hdr.c_name);
+         if (dot_flag)
+-          fputc ('.', stderr);
++          fputc ('.', stdout);
+       }
+     }
+--- cpio-2.4.2/copyout.c.stdout        Tue Aug 31 15:00:01 1999
++++ cpio-2.4.2/copyout.c       Tue Aug 31 15:02:27 1999
+@@ -492,9 +492,9 @@
+           }
+         if (verbose_flag)
+-          fprintf (stderr, "%s\n", input_name.ds_string);
++          fprintf (stdout, "%s\n", input_name.ds_string);
+         if (dot_flag)
+-          fputc ('.', stderr);
++          fputc ('.', stdout);
+       }
+     }
This page took 0.24097 seconds and 4 git commands to generate.