diff options
author | Carsten Hey <carsten@debian.org> | 2016-02-19 11:00:23 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2016-02-27 00:19:10 +0100 |
commit | 9fb91dd0a2629f605f2a6d1aed7a6e8b96f90670 (patch) | |
tree | d68c1faa86690c39b1939dce4153ffdb380fb6c8 | |
parent | 6143e43239bd1e36652ad7a3fac850edbc8c76a7 (diff) | |
download | dpkg-9fb91dd0a2629f605f2a6d1aed7a6e8b96f90670.tar.gz |
dpkg-maintscript-helper: Use fixed string matching for pathnames
Signed-off-by: Guillem Jover <guillem@debian.org>
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | scripts/dpkg-maintscript-helper.sh | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 919ecf1cd..10faa9378 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,8 @@ dpkg (1.18.5) UNRELEASED; urgency=medium * Add MIPS R6 architectures to arch tables. Closes: #807340 Thanks to YunQiang Su <wzssyqa@gmail.com>. * Fix memory leak when unpacking conffiles. + * Use fixed string matching for pathnames in dpkg-maintscript-helper. + Thanks to Carsten Hey <carsten@debian.org>. * Portability: - Move DPKG_ADMINDIR environment variable name out from update-alternatives code, to make life easier for non-dpkg-based systems. diff --git a/scripts/dpkg-maintscript-helper.sh b/scripts/dpkg-maintscript-helper.sh index bd983a85a..667a15b6c 100755 --- a/scripts/dpkg-maintscript-helper.sh +++ b/scripts/dpkg-maintscript-helper.sh @@ -401,7 +401,7 @@ prepare_dir_to_symlink() find "$PATHNAME" -print0 | xargs -0 -n1 sh -c ' package="$1" file="$2" - if ! dpkg-query -L "$package" | grep -q -x "$file"; then + if ! dpkg-query -L "$package" | grep -F -q -x "$file"; then exit 1 fi exit 0 @@ -481,7 +481,7 @@ ensure_package_owns_file() { local PACKAGE="$1" local FILE="$2" - if ! dpkg-query -L "$PACKAGE" | grep -q -x "$FILE"; then + if ! dpkg-query -L "$PACKAGE" | grep -F -q -x "$FILE"; then debug "File '$FILE' not owned by package " \ "'$PACKAGE', skipping $command" return 1 |