[mirrorbrain-commits] [opensuse-svn] r7506 - trunk/tools/download-redirector-v2/tools

From: Novell Forge SVN <noreply_at_novell.com>
Date: Fri, 5 Jun 2009 09:12:41 -0600 (MDT)
Author: lrupp
Date: 2009-06-05 09:12:38 -0600 (Fri, 05 Jun 2009)
New Revision: 7506

Modified:
   trunk/tools/download-redirector-v2/tools/scanner.pl
Log:
fix rsync auth in scanner

Modified: trunk/tools/download-redirector-v2/tools/scanner.pl
===================================================================
--- trunk/tools/download-redirector-v2/tools/scanner.pl	2009-06-05 12:21:42 UTC (rev 7505)
+++ trunk/tools/download-redirector-v2/tools/scanner.pl	2009-06-05 15:12:38 UTC (rev 7506)
_at_@ -1091,8 +1091,10 @@
     die("$identifier: $buf\n") if $buf =~ /^\_at_ERROR/s;
     if($buf =~ /^\_at_RSYNCD: AUTHREQD /) {
       die("$identifier: '$module' needs authentification, but Digest::MD4 is not installed\n") unless $peer->{have_md4};
-      my $user = "nobody" if !defined($peer->{user}) || $peer->{user} eq '';
-      my $password = '' unless defined $peer->{password};
+      my ($user,$password)='';
+      # my $user = "nobody"; is not needed IMO
+      $user = $peer->{user} if defined $peer->{user};
+      $password = $peer->{pass} if defined $peer->{pass};
       my $digest = "$user ".Digest::MD4::md4_base64("\0\0\0\0$password".substr($buf, 18))."\n";
       swrite(*S, $digest);
       next;

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Fri Jun 05 2009 - 15:13:18 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT