}
if (*p != '\0') continue;
+ /*
+ * Ignore config files generated by deb / rpm packaging updates.
+ */
+ len = strlen(dp->d_name);
+ if ((len > 10) && (strncmp(&dp->d_name[len - 10], ".dpkg-dist", 10) == 0)) {
+ pkg_file:
+ WARN("Ignoring packaging system produced file %s%s", value, dp->d_name);
+ continue;
+ }
+ if ((len > 9) && (strncmp(&dp->d_name[len - 9], ".dpkg-old", 9) == 0)) goto pkg_file;
+ if ((len > 7) && (strncmp(&dp->d_name[len - 7], ".rpmnew", 9) == 0)) goto pkg_file;
+ if ((len > 8) && (strncmp(&dp->d_name[len - 8], ".rpmsave", 10) == 0)) goto pkg_file;
+
slen = snprintf(buf2, sizeof(buf2), "%s%s",
value, dp->d_name);
if (slen >= (int) sizeof(buf2) || slen < 0) {