[Pkg-backup-mngr-commits] r76 - trunk/debian/patches

sukria at alioth.debian.org sukria at alioth.debian.org
Thu Aug 30 16:26:52 UTC 2007


Author: sukria
Date: 2007-08-30 16:26:52 +0000 (Thu, 30 Aug 2007)
New Revision: 76

Added:
   trunk/debian/patches/05_security_439392.dpatch
Log:
adding patch

Added: trunk/debian/patches/05_security_439392.dpatch
===================================================================
--- trunk/debian/patches/05_security_439392.dpatch	                        (rev 0)
+++ trunk/debian/patches/05_security_439392.dpatch	2007-08-30 16:26:52 UTC (rev 76)
@@ -0,0 +1,58 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_security_439392.dpatch by Alexis Sukrieh <sukria at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Backport from the stable upstream version for closing bug #173 (upstream)
+
+ at DPATCH@
+diff -urNad trunk~/backup-manager-upload trunk/backup-manager-upload
+--- trunk~/backup-manager-upload	2007-05-07 18:45:11.000000000 +0200
++++ trunk/backup-manager-upload	2007-08-30 18:20:50.000000000 +0200
+@@ -906,13 +906,24 @@
+ }
+ 
+ if ($g_protocol eq 'ftp' and not defined $g_pass) {
+-	print $BackupManager::Config::usage, "\n";
+-	exit E_INVALID;
++    # try to read the password from the environment
++    if (defined $ENV{BM_UPLOAD_FTP_PASSWORD}) {
++        $g_pass = $ENV{BM_UPLOAD_FTP_PASSWORD};
++    }
++    else {
++    	print $BackupManager::Config::usage, "\n";
++    	exit E_INVALID;
++    }
+ }
+ 
+ if ($g_protocol eq 's3' and (not defined $g_bucket or not defined $g_pass)) {
+-	print $BackupManager::Config::usage, "\n";
+-	exit E_INVALID;
++    if (! defined $g_pass && defined $ENV{BM_UPLOAD_S3_SECRET_KEY}) {
++        $g_pass = $ENV{BM_UPLOAD_S3_SECRET_KEY};
++    }
++    else {
++	    print $BackupManager::Config::usage, "\n";
++	    exit E_INVALID;
++    }
+ }
+ 
+ if ($g_protocol eq 'ssh-gpg' and (not defined $g_gpg_recipient)) {        
+diff -urNad trunk~/lib/upload-methods.sh trunk/lib/upload-methods.sh
+--- trunk~/lib/upload-methods.sh	2006-09-04 09:24:42.000000000 +0200
++++ trunk/lib/upload-methods.sh	2007-08-30 18:19:48.000000000 +0200
+@@ -133,7 +133,6 @@
+         -m="ftp" \
+         -h="$bm_upload_hosts" \
+         -u="$BM_UPLOAD_FTP_USER" \
+-        -p="$BM_UPLOAD_FTP_PASSWORD" \
+         -d="$BM_UPLOAD_FTP_DESTINATION" \
+         -r="$BM_REPOSITORY_ROOT" today 2>$logfile|| 
+     error "Error reported by backup-manager-upload for method \"ftp\", check \"\$logfile\"."
+@@ -164,7 +163,6 @@
+         -m="s3" \
+         -h="$bm_upload_hosts" \
+         -u="$BM_UPLOAD_S3_ACCESS_KEY" \
+-        -p="$BM_UPLOAD_S3_SECRET_KEY" \
+         -b="$BM_UPLOAD_S3_DESTINATION" \
+         -r="$BM_REPOSITORY_ROOT" today 2>$logfile || 
+     error "Error reported by backup-manager-upload for method \"s3\", check \"\$logfile\"."


Property changes on: trunk/debian/patches/05_security_439392.dpatch
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-backup-mngr-commits mailing list