[Dbconfig-common-changes] [dbconfig-common] r446 - in trunk: debian internal

Sean Finney seanius at alioth.debian.org
Thu Apr 10 17:29:08 UTC 2008


tags 473131 pending
thanks

Author: seanius
Date: 2008-04-10 17:29:08 +0000 (Thu, 10 Apr 2008)
New Revision: 446

Modified:
   trunk/debian/changelog
   trunk/internal/mysql
   trunk/internal/pgsql
   trunk/internal/sqlite
Log:
import NMU and improve slightly

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-04-10 17:21:24 UTC (rev 445)
+++ trunk/debian/changelog	2008-04-10 17:29:08 UTC (rev 446)
@@ -1,6 +1,9 @@
 dbconfig-common (1.8.38) UNRELEASED; urgency=low
 
   * NOT RELEASED YET
+  * ACK NMU from Stephen Gran, thanks!
+  * slight changes to the NMU diff, namely using local variables and a fix
+    for a corner case where the umask might not be reset.
   * more bugs/fixes from Niko Tyni (thanks!)
     - fix for malformed log messages (closes: #472993).
     - fix for catching upgrade errors when calling dbc_dump (closes: #473026).
@@ -20,6 +23,13 @@
 
  -- Sean Finney <seanius at debian.org>  Thu, 27 Mar 2008 22:58:26 +0100
 
+dbconfig-common (1.8.37-0.1) unstable; urgency=low
+    
+  * Non-maintainer upload.
+  * Set umask before dump creation (closes: #473131)
+   
+ -- Stephen Gran <sgran at debian.org>  Sat, 05 Apr 2008 00:53:49 +0100
+  
 dbconfig-common (1.8.37) unstable; urgency=low
 
   * Fix from Niko Tyni for dpkg-reconfigure failures due to missing database

Modified: trunk/internal/mysql
===================================================================
--- trunk/internal/mysql	2008-04-10 17:21:24 UTC (rev 445)
+++ trunk/internal/mysql	2008-04-10 17:29:08 UTC (rev 446)
@@ -336,13 +336,16 @@
 ## perform mysqldump
 ##
 dbc_mysql_dump(){
-	local mycnf	dumperr db dumpfile
+	local mycnf dumperr db dumpfile old_umask
 	_dbc_sanity_check dbname dbadmin mysql || return 1
 	_dbc_mysql_check_connect || return 1
 	dumpfile=$1
 	dumperr=0
+	old_umask=`umask`
+	umask 0066
 	mycnf=`_dbc_generate_mycnf`
 	dbc_error=`mysqldump --defaults-file="$mycnf" $dbc_dbname 2>&1 >"$dumpfile"` || dumperr=1
+	umask $old_umask
 	rm -f "$mycnf"
 	return $dumperr
 }

Modified: trunk/internal/pgsql
===================================================================
--- trunk/internal/pgsql	2008-04-10 17:21:24 UTC (rev 445)
+++ trunk/internal/pgsql	2008-04-10 17:29:08 UTC (rev 446)
@@ -168,7 +168,7 @@
 }
 
 _dbc_pg_dump(){
-	local extra retval PGSSLMODE localuser _dbc_asuser dumpfile
+	local extra retval PGSSLMODE localuser _dbc_asuser dumpfile old_umask
 	dumpfile=$1
 	localuser=`_dbc_psql_local_username`
 	touch $dumpfile
@@ -177,10 +177,13 @@
 	retval=0
 	_dbc_psql_cmd_setup
 	if [ "$dbc_ssl" ]; then PGSSLMODE="require"; fi
+	old_umask=`umask`
+	umask 0066
 	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"
 	dbc_error=`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` || retval=$?
+	umask $old_umask
 	_dbc_psql_cmd_cleanup
 	return $retval
 }

Modified: trunk/internal/sqlite
===================================================================
--- trunk/internal/sqlite	2008-04-10 17:21:24 UTC (rev 445)
+++ trunk/internal/sqlite	2008-04-10 17:29:08 UTC (rev 446)
@@ -182,9 +182,13 @@
 ## dump a sqlite database 
 ##
 dbc_sqlite_dump(){
-	local dumpfile
+	local dumpfile ret old_umask
 	dumpfile=$1
+	old_umask=`umask`
 	_dbc_sanity_check dbname $dbc_dbtype || return 1
+	umask 0066
 	dbc_sqlite_exec_command ".dump" > "$dumpfile"
-	return $?
+	ret=$?
+	umask $old_umask
+	return $ret
 }




More information about the Dbconfig-common-changes mailing list