Control: tags -1 moreinfo

I assume the comments in bug 806247 for jessie-pu apply here as well.
Please let me know if it is to upload with the attached debdiff.

Paul
diff -Nru dbconfig-common-1.8.47+nmu1/debian/changelog 
dbconfig-common-1.8.47+nmu1+deb7u1/debian/changelog
--- dbconfig-common-1.8.47+nmu1/debian/changelog        2011-12-24 
09:26:16.000000000 +0100
+++ dbconfig-common-1.8.47+nmu1+deb7u1/debian/changelog 2016-01-15 
11:02:27.000000000 +0100
@@ -1,3 +1,13 @@
+dbconfig-common (1.8.47+nmu1+deb7u1) wheezy; urgency=medium
+
+  * Fix permission of PostgreSQL backup files, thanks Simon Ruderich
+    (Closes: #805638)
+  * Repair permissions of already created backups, but only when upgrading
+    from versions before this one (but not from versions after squeeze's
+    lts update).
+
+ -- Paul Gevers <elb...@debian.org>  Sun, 03 Jan 2016 11:14:55 +0100
+
 dbconfig-common (1.8.47+nmu1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru dbconfig-common-1.8.47+nmu1/debian/dbconfig-common.postinst 
dbconfig-common-1.8.47+nmu1+deb7u1/debian/dbconfig-common.postinst
--- dbconfig-common-1.8.47+nmu1/debian/dbconfig-common.postinst 2009-02-17 
23:05:34.000000000 +0100
+++ dbconfig-common-1.8.47+nmu1+deb7u1/debian/dbconfig-common.postinst  
2016-01-15 11:03:46.000000000 +0100
@@ -15,4 +15,18 @@
 
 dbc_write_global_config
 
+# Previously dumped databases in /var/cache/dbconfig-common/backups may
+# (depending on the local umask) be readable by everybody (bts: #805638). Limit
+# the permissions here on all files in that folder, but only if we are for the
+# first time upgrading to a fixed version:
+# jessie: 1.8.47+nmu3+deb8u1
+# wheezy: 1.8.47+nmu1+deb7u1
+# squeeze: 1.8.46+squeeze.1
+if dpkg --compare-versions "$2" lt "1.8.47+nmu1+deb7u1" && \
+        dpkg --compare-versions "$2" gt "1.8.46+squeezf~" ; then
+    if [ -d /var/cache/dbconfig-common/backups/ ] ; then
+        find /var/cache/dbconfig-common/backups/ -type f -exec chmod 600 {} \;
+    fi
+fi
+
 #DEBHELPER#
diff -Nru dbconfig-common-1.8.47+nmu1/internal/pgsql 
dbconfig-common-1.8.47+nmu1+deb7u1/internal/pgsql
--- dbconfig-common-1.8.47+nmu1/internal/pgsql  2010-03-28 12:11:37.000000000 
+0200
+++ dbconfig-common-1.8.47+nmu1+deb7u1/internal/pgsql   2016-01-10 
21:55:28.000000000 +0100
@@ -174,14 +174,14 @@
        local extra retval PGSSLMODE localuser _dbc_asuser dumpfile old_umask
        dumpfile=$1
        localuser=`_dbc_psql_local_username`
-       touch $dumpfile
-       chown $localuser $dumpfile
        PGSSLMODE="prefer"
        retval=0
        _dbc_psql_cmd_setup
        if [ "$dbc_ssl" ]; then PGSSLMODE="require"; fi
        old_umask=`umask`
        umask 0066
+       touch $dumpfile
+       chown $localuser $dumpfile
        extra=`_dbc_psql_cmd_args`
        extra="-f \"$dumpfile\" $extra"
        _dbc_debug "su -s /bin/sh $localuser -c \"env HOME='$_dbc_pgsql_tmpdir' 
PGPASSFILE='$_dbc_pgsql_tmpdir/.pgpass' PGSSLMODE='$PGSSLMODE' pg_dump $extra 
$dbc_dbname\" 2>&1"

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to