Przeglądaj źródła

dpkg-deb: Change conffile name length warning into an error

Such packages will not be accepted by dpkg at install time anyway, so
catch this early on, and don't let it through.
Guillem Jover 12 lat temu
rodzic
commit
a363181bda
2 zmienionych plików z 5 dodań i 9 usunięć
  1. 2 0
      debian/changelog
  2. 3 9
      dpkg-deb/build.c

+ 2 - 0
debian/changelog

@@ -10,6 +10,8 @@ dpkg (1.17.6) UNRELEASED; urgency=low
   * Detect a missing sign-command in dpkg-buildpackage, before starting the
   * Detect a missing sign-command in dpkg-buildpackage, before starting the
     build, to avoid a failure at the end of the process.
     build, to avoid a failure at the end of the process.
   * Remove trailing newlines from dpkg-deb warning message.
   * Remove trailing newlines from dpkg-deb warning message.
+  * Change dpkg-deb conffile name length warning into an error, as dpkg will
+    reject those packages at install time anyway.
 
 
   [ Updated scripts translations ]
   [ Updated scripts translations ]
   * German (Helge Kreutzmann).
   * German (Helge Kreutzmann).

+ 3 - 9
dpkg-deb/build.c

@@ -295,15 +295,9 @@ check_conffiles(const char *dir)
     if (!n)
     if (!n)
       ohshite(_("empty string from fgets reading conffiles"));
       ohshite(_("empty string from fgets reading conffiles"));
 
 
-    if (conffilename[n - 1] != '\n') {
-      int c;
-
-      warning(_("conffile name '%.50s...' is too long, or missing final newline"),
-              conffilename);
-      while ((c = getc(cf)) != EOF && c != '\n');
-
-      continue;
-    }
+    if (conffilename[n - 1] != '\n')
+      ohshit(_("conffile name '%.50s...' is too long, or missing final newline"),
+             conffilename);
 
 
     conffilename[n - 1] = '\0';
     conffilename[n - 1] = '\0';
     varbuf_reset(&controlfile);
     varbuf_reset(&controlfile);