Переглянути джерело

dpkg: Use the conffile name instead of the real pathname it might refer to

When activating file triggers on conffile purge, use the conffile name
instead of the real pathname it might refer to. This fixes a segfault
when using --instdir, or when the conffile has been moved around and
replaced with a symlink to the target.

Regression introduced in 2f065fc151ac4635ae40bd769d1be810e1222e05.

Closes: #830267
Stable-Candidate: 1.17.x
Guillem Jover 10 роки тому
батько
коміт
1b33c6611f
2 змінених файлів з 6 додано та 1 видалено
  1. 5 0
      debian/changelog
  2. 1 1
      src/remove.c

+ 5 - 0
debian/changelog

@@ -2,6 +2,11 @@ dpkg (1.18.10) UNRELEASED; urgency=medium
 
 
   [ Guillem Jover ]
   [ Guillem Jover ]
   * Fix a short-lived memory leak in dpkg archive argument parsing.
   * Fix a short-lived memory leak in dpkg archive argument parsing.
+  * When activating file triggers on conffile purge, use the conffile name
+    instead of the real pathname it might refer to. This fixes a segfault
+    when using --instdir, or when the conffile has been moved around and
+    replaced with a symlink to the target.
+    Regression introduced in dpkg 1.18.8. Closes: #830267
   * Perl modules:
   * Perl modules:
     - Disable fixdebugpath feature on unsafe characters in the path.
     - Disable fixdebugpath feature on unsafe characters in the path.
   * Documentation:
   * Documentation:

+ 1 - 1
src/remove.c

@@ -529,7 +529,7 @@ static void removal_bulk_remove_configfiles(struct pkginfo *pkg) {
       if (rc == -1)
       if (rc == -1)
         continue;
         continue;
 
 
-      namenode = findnamenode(fnvb.buf, fnn_nonew);
+      namenode = findnamenode(conff->name, 0);
       usenode = namenodetouse(namenode, pkg, &pkg->installed);
       usenode = namenodetouse(namenode, pkg, &pkg->installed);
 
 
       trig_path_activate(usenode, pkg);
       trig_path_activate(usenode, pkg);