Vjacheslav writes:

> I tried adding --address=x.x.x.x to $Conf{RsyncArgs}, but it does not work.

Yes, that option is not supported in File::RsyncP.  Here's a pending
patch that adds this feature.

Craig

---------- Forwarded message ----------
To:   [EMAIL PROTECTED]
From: Ludovic Drolez <[EMAIL PROTECTED]>
Date: Fri, 1 Jun 2007 12:39:41 +0200
Subj: [EMAIL PROTECTED]: --address option support for libfile-rsyncp-perl]

Hello,

Laurenz Rettig sent me the following patch for perlrsync.
BTW, what about opening the bug tracker on SF ?

Best regards,
 
   Ludovic.

----- Forwarded message from Laurenz Rettig <[EMAIL PROTECTED]> -----

Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 15 May 2007 12:38:22 +0200
From: Laurenz Rettig <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: --address option support for libfile-rsyncp-perl

Hello,
we are using BackupPC at our department and wanted to use it with some 
service ip, which should be independent from the actual machine, the 
service is running on. Wen wanted the rsyncd clients to listen lo just 
this ip address for security resons. But as the current implementation 
of libfile-rsyncp-perl doesn't care about the --address option, it just 
uses the main ip of the server, not the service interface. So the 
clients reject the conntection. To fix this, I added a basic support for 
the --address option tu the libfile-rsyncp-perl package. I'm attaching 
the diff, maybe you have xome further improvements or could integrate 
the patch in teh next release.

Regards,

Laurenz Rettig

# Added Support for the --address option. Needed to use Backuppc with a 
specific service ip.
# 2007/05/09 Laurenz Rettig <[EMAIL PROTECTED]>

--- File-RsyncP-0.68/lib/File/RsyncP.pm 2006-11-19 06:47:33.000000000 +0100
+++ libfile-rsyncp-perl-0.68/lib/File/RsyncP.pm 2007-05-10 13:11:55.000000000 
+0200
@@ -123,6 +123,7 @@
     # Now process the rest of the arguments we care about
     #
     return if ( !$p->getoptions($rs->{rsyncOpts},
+                   "address=s",
                    "block-size=i",
                    "devices|D",
                     "from0|0",
@@ -229,6 +230,11 @@
     alarm($rs->{timeout}) if ( $rs->{timeout} );
     socket(FH, PF_INET, SOCK_STREAM, $proto)
                                    || return "inet socket: $!";
+    if ($rs->{rsyncOpts}{address}) {
+        my $laddr = inet_aton($rs->{rsyncOpts}{address})     || return 
"illegal address option: unknown host $rs->{rsyncOpts}{address}";
+       my $lpaddr = sockaddr_in(0, $laddr);
+       bind(FH, $lpaddr)|| return "illegal address option: $!";
+    }
     connect(FH, $paddr)             || return "inet connect: $!";
     $rs->{fh} = *FH;
     $rs->writeData("[EMAIL PROTECTED]: $rs->{protocol_version}\n", 1);


----- End forwarded message -----

-- 
Ludovic Drolez.

http://zaurus.palmopensource.com       - The Zaurus Open Source Portal
http://www.drolez.com      - Personal site - Linux, Zaurus and PalmOS stuff

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to