Explorar o código

dpkg: Fix file queue tail assignment in file queue pop

When we are popping a file from the files queue, we might end up messing
it up. To check for the side-effects on the file-system one should look
for files with .dpkg-new extension for packages that have been fully
configured and where those files are not listed as owned by them. These
packages will need to be reinstalled.

Closes: #823288
Guillem Jover %!s(int64=10) %!d(string=hai) anos
pai
achega
c931762286
Modificáronse 2 ficheiros con 5 adicións e 1 borrados
  1. 4 0
      debian/changelog
  2. 1 1
      src/archives.c

+ 4 - 0
debian/changelog

@@ -1,5 +1,9 @@
 dpkg (1.18.6) UNRELEASED; urgency=medium
 
+  * Fix file queue tail assignment on file queue pop during unpack. This
+    could mess up the file queue in some circumstances and leave behind
+    files in the filesystem as «pathname».dpkg-new after configuration
+    and without traces of the files in the dpkg database. Closes: #823288
   * Packaging:
     - Bump Standards-Version to 3.9.8 (no changes needed).
 

+ 1 - 1
src/archives.c

@@ -136,7 +136,7 @@ tar_filenamenode_queue_pop(struct filenamenode_queue *queue,
                            struct fileinlist *node)
 {
   tar_pool_free(node);
-  *queue->tail = *tail_prev;
+  queue->tail = tail_prev;
   *tail_prev = NULL;
 }