Re: rsync 2.6.2 --daemon Problem

2004-05-05 Thread Paul Slootman
On Tue 04 May 2004, Gregory Symons wrote:
 
 I've got the exact same problem here. For me at least,it appears that rsync is 
 trying to bind to the same address twice. Below is an excerpt from 
 'strace rsync --daemon':
[snip]
 
 I haven't really done any network programming, so I'm not exactly sure what's going 
 on
 in this section of the code, but it looks like rsync tries to set a flag on the IPV6
 socket indicating that its only to be used for IPV6. In this case the IPV6 socket is 
 for

Setting that flag appears to fail on your system, because no IPV6 is
available perhaps? (It works on mine...)

If that's the root cause of the problem, skipping the IPV6 socket when
that call fails should suffice. Try the followng patch.


Paul Slootman


--- socket.c.orig   2004-04-14 18:51:48.0 +0200
+++ socket.c2004-05-05 10:00:11.0 +0200
@@ -379,8 +379,10 @@
 
 #ifdef IPV6_V6ONLY
if (resp-ai_family == AF_INET6) {
-   setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
-  (char *)one, sizeof one);
+   if(setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
+  (char *)one, sizeof one)  0) {
+   continue;
+   }
}
 #endif
 
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Bad address error

2004-05-05 Thread Sean M. Kaiser
I'm getting a bad address error which is causing my rsync process to
bomb out.

I'm running RsyncX 2.1, in daemon mode on the source machine, with a
script to pull the information to the backup server.  Both servers are
Xserves running OS X Server 10.2.8.  Rsync target is on an Xserve RAID. 
The RAID has 350GB free, so I'm not running into a disk full situation.

My command looks like:

/usr/local/bin/rsync -a --ignore-errors
--exclude-from=/Volumes/backups/extras/rsync/config/exclude.txt
--password-file=/etc/rsync/secure.txt --stats --eahfs --backup
--backup-dir=/Volumes/backups/archives/cougar/week/tue/Users/Staff/
--delete --bwlimit=2000 -z [EMAIL PROTECTED]::rsync/Users/Staff/
/Volumes/backups/current/cougar/Users/Staff/

The error that causes the process to stop, along with the rsync stop
message, is:

stat
/Volumes/backups/archives/cougar/week/tue/Users/Staff/bcooper/Documents/Desktop
Folder failed: No such file or directory
write failed on
/Volumes/backups/current/cougar/Users/Staff/bcooper/Documents/Desktop
Folder: Bad address
rsync error: error in file IO (code 11) at receiver.c(324)
rsync: connection unexpectedly closed (761151 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(189)

Any help is greatly appreciated.

Thanks,
Sean

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Bad address error

2004-05-05 Thread Kevin Alexander Boyd
RsyncX questions should be sent to:

[EMAIL PROTECTED]

Kevin Boyd
OS X Deployment Coordinator
Sys Adm UMIT Contract Services


On Wed, 5 May 2004, Sean M. Kaiser wrote:

 Date: Wed, 05 May 2004 08:10:59 -0400
 From: Sean M. Kaiser [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Bad address error

 I'm getting a bad address error which is causing my rsync process to
 bomb out.

 I'm running RsyncX 2.1, in daemon mode on the source machine, with a
 script to pull the information to the backup server.  Both servers are
 Xserves running OS X Server 10.2.8.  Rsync target is on an Xserve RAID.
 The RAID has 350GB free, so I'm not running into a disk full situation.

 My command looks like:

 /usr/local/bin/rsync -a --ignore-errors
 --exclude-from=/Volumes/backups/extras/rsync/config/exclude.txt
 --password-file=/etc/rsync/secure.txt --stats --eahfs --backup
 --backup-dir=/Volumes/backups/archives/cougar/week/tue/Users/Staff/
 --delete --bwlimit=2000 -z [EMAIL PROTECTED]::rsync/Users/Staff/
 /Volumes/backups/current/cougar/Users/Staff/

 The error that causes the process to stop, along with the rsync stop
 message, is:

 stat
 /Volumes/backups/archives/cougar/week/tue/Users/Staff/bcooper/Documents/Desktop
 Folder failed: No such file or directory
 write failed on
 /Volumes/backups/current/cougar/Users/Staff/bcooper/Documents/Desktop
 Folder: Bad address
 rsync error: error in file IO (code 11) at receiver.c(324)
 rsync: connection unexpectedly closed (761151 bytes read so far)
 rsync error: error in rsync protocol data stream (code 12) at io.c(189)

 Any help is greatly appreciated.

 Thanks,
 Sean

 --
 To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: [PATCH] fix read-batch SEGFAULT [WAS: --write-batch just hangs?]

2004-05-05 Thread Wayne Davison
On Tue, May 04, 2004 at 08:14:22PM -0400, Chris Shoemaker wrote:
 this patch does allow me to read a batch written locally.

Thanks, that insight makes a batch test I tried with 2.5.7 finally work
(i.e. I explicitly specify --no-whole-file in the options), so this bug
has been around for quite awhile.

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync 2.6.2 --daemon Problem

2004-05-05 Thread Wayne Davison
On Tue, May 04, 2004 at 09:25:17PM +0200, Martin Kjeldsen wrote:
 2004/05/04 21:15:10 [22369] rsyncd version 2.6.2 starting, listening on port 873
 2004/05/04 21:15:10 [22369] rsync error: error in socket IO (code 10) at 
 socket.c(466)

Rsync 2.6.2 now tries to listen on multiple interfaces, e.g. for systems
that want to accept connections on both the IPv4 and IPv6 interfaces.
The patch from Paul Slootman in this thread should take care of the case
where your system can't actually use the IPv6-only address.  If that
doesn't fix the problem, I can change the listen code to not bomb out
when one of the listen() calls fails as long as at least one of them
succeeds (though I'd have it log a warning if it failed to listen on all
of them).

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


rsync and Perl programming

2004-05-05 Thread Jim Salter
Hi everybody -

I'm trying to write a Perl wrapper for some rsync tasks that need doing. 
 Problem is, there's some sort of odd interaction going on between Perl 
and the daemon mode communication for the rsync client, and I'm at my 
wit's end in trying to figure it out.

Here's the Perl script:

#
#
#!/usr/bin/perl
$rsync_cmd = /usr/local/bin/rsync -a --progress 
--password-file=/usr/local/etc/rsyncd.passwd 
[EMAIL PROTECTED]::samba/rsynctestfiles /usr/share/smbshare/rsynctestfiles;

$pid = open(PH, $rsync_cmd 21 |); # with an openpipe
while (PH) {# plus a read
print $_;
}
print finished\n;

#
#


When I run the script, here is the output I get:

#
#
building file list ...
link_stat 
/usr/share/smbshare/Work/rsync-backup-v2/ph34r/rsynctestfiles failed: 
No such file or directory
0 files to consider

wrote 25 bytes  read 20 bytes  90.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files could not be transferred (code 23) at main.c(632)
finished
#
#
Now the odd thing is, I can run the rsync command in $rsync_cmd just 
fine from the shell - it rsyncs the directories in question without 
problem.  And if I set $rsync_cmd to something using a local path (no 
daemon-mode communication) for both source and target, it will run as 
expected in my Perl script too.

I'm only having the odd problem shown when using daemon mode in my Perl 
wrapper.  The system being used is running FreeBSD 5.1, and I have the 
problem when running either rsync 2.6.0 from FreeBSD's ports tree or 
2.6.2 downloaded straight from the rsync site and compiled.

Any ideas?  (Help me, help me obi-Wayne...)

Jim Salter
JRS Systems
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync and Perl programming

2004-05-05 Thread Jim Salter
I just checked, and if it helps anybody any, the exact same thing 
happens if I use backticks instead of opening a filehandle to fire off 
rsync from within the Perl script.

I know I COULD write a Bourne wrapper and run THAT from Perl - I've been 
using Bourne scripts from day one to automate my rsync tasks - but 
that's a pretty ugly hack.  I'm hoping somebody's got a simpler answer 
for what's getting b0rk3d...

Jim Salter
JRS Systems
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync and Perl programming

2004-05-05 Thread Jim Salter
BINGO.  Unintended interpolation of the @localhost as an array instead 
of as a literal string.  Thanks Brian!

Jim Salter
JRS Systems
 Brian Cross wrote:

Jim,

No idea's off hand, but set the -w debug option at the top of the script
and see if it gives you more information regarding the error.
#!/usr/bin/perl -w

Brian.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jim Salter
Sent: Wednesday, May 05, 2004 2:31 PM
To: [EMAIL PROTECTED]
Subject: rsync and Perl programming
Hi everybody -

I'm trying to write a Perl wrapper for some rsync tasks that need doing.

  Problem is, there's some sort of odd interaction going on between Perl

and the daemon mode communication for the rsync client, and I'm at my 
wit's end in trying to figure it out.

Here's the Perl script:

#
#
#!/usr/bin/perl
$rsync_cmd = /usr/local/bin/rsync -a --progress 
--password-file=/usr/local/etc/rsyncd.passwd 
[EMAIL PROTECTED]::samba/rsynctestfiles
/usr/share/smbshare/rsynctestfiles;

$pid = open(PH, $rsync_cmd 21 |); # with an openpipe
while (PH) {# plus a read
 print $_;
}
print finished\n;

#
#


When I run the script, here is the output I get:

#
#
building file list ...
link_stat 
/usr/share/smbshare/Work/rsync-backup-v2/ph34r/rsynctestfiles failed: 
No such file or directory
0 files to consider

wrote 25 bytes  read 20 bytes  90.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files could not be transferred (code 23) at
main.c(632)
finished
#
#
Now the odd thing is, I can run the rsync command in $rsync_cmd just 
fine from the shell - it rsyncs the directories in question without 
problem.  And if I set $rsync_cmd to something using a local path (no 
daemon-mode communication) for both source and target, it will run as 
expected in my Perl script too.

I'm only having the odd problem shown when using daemon mode in my Perl 
wrapper.  The system being used is running FreeBSD 5.1, and I have the 
problem when running either rsync 2.6.0 from FreeBSD's ports tree or 
2.6.2 downloaded straight from the rsync site and compiled.

Any ideas?  (Help me, help me obi-Wayne...)

Jim Salter
JRS Systems
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync and Perl programming

2004-05-05 Thread Tom Allen
You didn't escape your @localhost, for one.  Try $rsync_cmd = 'blah blah
blah'; instead.


--
Tom Allen   Email: [EMAIL PROTECTED]
Senior Open Systems EngineerPhone: 904-220-3627
10East Corp FAX: 904-384-1038

On Wed, 5 May 2004, Jim Salter wrote:

 Hi everybody -

 I'm trying to write a Perl wrapper for some rsync tasks that need doing.
   Problem is, there's some sort of odd interaction going on between Perl
 and the daemon mode communication for the rsync client, and I'm at my
 wit's end in trying to figure it out.

 Here's the Perl script:

 #
 #
 #!/usr/bin/perl
 $rsync_cmd = /usr/local/bin/rsync -a --progress
 --password-file=/usr/local/etc/rsyncd.passwd
 [EMAIL PROTECTED]::samba/rsynctestfiles /usr/share/smbshare/rsynctestfiles;

 $pid = open(PH, $rsync_cmd 21 |); # with an openpipe
 while (PH) {# plus a read
  print $_;
 }

 print finished\n;


 #
 #



 When I run the script, here is the output I get:


 #
 #

 building file list ...
 link_stat
 /usr/share/smbshare/Work/rsync-backup-v2/ph34r/rsynctestfiles failed:
 No such file or directory
 0 files to consider

 wrote 25 bytes  read 20 bytes  90.00 bytes/sec
 total size is 0  speedup is 0.00
 rsync error: some files could not be transferred (code 23) at main.c(632)
 finished


 #
 #

 Now the odd thing is, I can run the rsync command in $rsync_cmd just
 fine from the shell - it rsyncs the directories in question without
 problem.  And if I set $rsync_cmd to something using a local path (no
 daemon-mode communication) for both source and target, it will run as
 expected in my Perl script too.

 I'm only having the odd problem shown when using daemon mode in my Perl
 wrapper.  The system being used is running FreeBSD 5.1, and I have the
 problem when running either rsync 2.6.0 from FreeBSD's ports tree or
 2.6.2 downloaded straight from the rsync site and compiled.

 Any ideas?  (Help me, help me obi-Wayne...)

 Jim Salter
 JRS Systems
 --
 To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync 2.6.2 --daemon Problem

2004-05-05 Thread Gregory Symons
On Wed, 2004-05-05 at 04:02, Paul Slootman wrote:
[snip]
  I haven't really done any network programming, so I'm not exactly sure what's 
  going on
  in this section of the code, but it looks like rsync tries to set a flag on the 
  IPV6
  socket indicating that its only to be used for IPV6. In this case the IPV6 socket 
  is for
 
 Setting that flag appears to fail on your system, because no IPV6 is
 available perhaps? (It works on mine...)
 
 If that's the root cause of the problem, skipping the IPV6 socket when
 that call fails should suffice. Try the followng patch.

That patch solves the problem. However, the weird thing is that my
system _does_ have IPV6 available:

[EMAIL PROTECTED] # ls /proc/sys/net
802  core  ethernet  ipv4  ipv6  token-ring  unix

So it would seem to me that we're really just solving a symptom here. Of
course, more error handling never seems wrong to me:)

A quick search on google for ipv6 programming found this:

IPV6_V6ONLY socket option implementation by kernel versions

But in Linux, IPV6_V6ONLY socket option does not exist in kernel2.4.20
or earlier, except for USAGI kernels. Therefore, you can't do a bind(2)
of IPv4/IPv6 wildcard address to the same port. Therefore, you would
bind(2) only IPv6 wildcard address, and handle IPv4 traffic via
IPv4-mapped address with the same socket.

http://www.ipv6style.jp/en/apps/20030829/index.shtml

And I am indeed running a 2.4.20 kernel. So maybe the configure script
needs to detect whether or not this flag is actually available (which I
thought was the point of the #ifdef), rather than trusting the fact that
the macro itself is defined. Otherwise, if IPV6 _is_ available, but
IPV6_IPV6ONLY option is not, using the patch you sent would cause us to
skip any IPV6 addresses that we want to bind to.

Greg

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Compiling 2.6.2 on Solaris 9 fails

2004-05-05 Thread John Martinez
Went through some of the archives, but couldn't find any answers to 
this.

I'm trying to compile the latest rsync on Solaris 9 SPARC. I'm using 
gcc 2.95.3 supplied by Sun on the Companion CD.

I get the following error:

sun gmake
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c rsync.c -o rsync.o
In file included from rsync.c:23:
rsync.h:353: warning: no semicolon at end of struct or union
rsync.h:353: parse error before `inode'
rsync.h:354: parse error before `dev'
rsync.h:354: warning: type defaults to `int' in declaration of `dev'
rsync.h:354: warning: data definition has no type or storage class
gmake: *** [rsync.o] Error 1
TIA,
-john
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Compiling 2.6.2 on Solaris 9 fails

2004-05-05 Thread Albert Chin
On Wed, May 05, 2004 at 11:59:30AM -0700, John Martinez wrote:
 
 Went through some of the archives, but couldn't find any answers to 
 this.
 
 I'm trying to compile the latest rsync on Solaris 9 SPARC. I'm using 
 gcc 2.95.3 supplied by Sun on the Companion CD.
 
 I get the following error:
 
 sun gmake
 gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c rsync.c -o rsync.o
 In file included from rsync.c:23:
 rsync.h:353: warning: no semicolon at end of struct or union
 rsync.h:353: parse error before `inode'
 rsync.h:354: parse error before `dev'
 rsync.h:354: warning: type defaults to `int' in declaration of `dev'
 rsync.h:354: warning: data definition has no type or storage class
 gmake: *** [rsync.o] Error 1

Works fine with the Sun C compiler. Is your 2.95.3 build specifically
for Solaris 9? GCC include files are specific to the platform it was
built on.

-- 
albert chin ([EMAIL PROTECTED])
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync 2.6.2 --daemon Problem

2004-05-05 Thread Jan-Benedict Glaw
On Wed, 2004-05-05 14:44:49 -0400, Gregory Symons [EMAIL PROTECTED]
wrote in message [EMAIL PROTECTED]:
 On Wed, 2004-05-05 at 04:02, Paul Slootman wrote:

 But in Linux, IPV6_V6ONLY socket option does not exist in kernel2.4.20
 or earlier, except for USAGI kernels. Therefore, you can't do a bind(2)
 of IPv4/IPv6 wildcard address to the same port. Therefore, you would
 bind(2) only IPv6 wildcard address, and handle IPv4 traffic via
 IPv4-mapped address with the same socket.

Right, Linux' IPv6 implementation, especially in 2.4.x, is buggy.

 http://www.ipv6style.jp/en/apps/20030829/index.shtml
 
 And I am indeed running a 2.4.20 kernel. So maybe the configure script
 needs to detect whether or not this flag is actually available (which I
 thought was the point of the #ifdef), rather than trusting the fact that
 the macro itself is defined. Otherwise, if IPV6 _is_ available, but

Well, that depends...

 IPV6_IPV6ONLY option is not, using the patch you sent would cause us to
 skip any IPV6 addresses that we want to bind to.

rsync (as other programs) should ./configure to adopt it's host system's
libc API. That is, if libc offers IPV6_V6ONLY, rsync should accept that
fact and use it {properly,if needed}. So if there's a (detectable) bug,
let's complain about it, but please accept the presented API.

If really a workaround is needed, rsync should detect that error *at
runtime*, complain loudly and exit (offering some
--use-broken-linux-2.4.x-ipv6-stack) for allowing it to work properly.

Runtime check? Right. Think about distributions that offer both 2.4.x
and 2.6.x. For sure you won't like to deliver two rsync versions to your
users:) ...and because IPV6_V6ONLY exists in 2.4.21 upwards, I think
that's not a major problem. Hey, these kernels do have known root
exploits, so it's time for an update!

So if there's a but, don't hide it, but work towards fixing it.

MfG, JBG

-- 
   Jan-Benedict Glaw   [EMAIL PROTECTED]. +49-172-7608481
   Eine Freie Meinung in  einem Freien Kopf| Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH)  ~(NEW_COPYRIGHT_LAW | DRM | TCPA));


signature.asc
Description: Digital signature
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: rsync 2.6.2 --daemon Problem

2004-05-05 Thread Gregory Symons
On Wed, 2004-05-05 at 15:49, Jan-Benedict Glaw wrote:
 On Wed, 2004-05-05 14:44:49 -0400, Gregory Symons [EMAIL PROTECTED]
[snip]
  And I am indeed running a 2.4.20 kernel. So maybe the configure script
  needs to detect whether or not this flag is actually available (which I
  thought was the point of the #ifdef), rather than trusting the fact that
  the macro itself is defined. Otherwise, if IPV6 _is_ available, but
 
 Well, that depends...
 
  IPV6_IPV6ONLY option is not, using the patch you sent would cause us to
  skip any IPV6 addresses that we want to bind to.
 
 rsync (as other programs) should ./configure to adopt it's host system's
 libc API. That is, if libc offers IPV6_V6ONLY, rsync should accept that
 fact and use it {properly,if needed}. So if there's a (detectable) bug,
 let's complain about it, but please accept the presented API.

Which is why I didn't write my own patch:) I'm just starting to look at
stuff like this, so I don't necessarily know the best way to fix it. I'm
still working on the finding it part:).

 If really a workaround is needed, rsync should detect that error *at
 runtime*, complain loudly and exit (offering some
 --use-broken-linux-2.4.x-ipv6-stack) for allowing it to work properly.

 Runtime check? Right. Think about distributions that offer both 2.4.x
 and 2.6.x. For sure you won't like to deliver two rsync versions to your
 users:) ...and because IPV6_V6ONLY exists in 2.4.21 upwards, I think
 that's not a major problem. Hey, these kernels do have known root
 exploits, so it's time for an update!

Good point. That's the problem with gentoo... sometimes I lose sight of
the fact that not everyone's compiling their packages. I have to admit I
wasn't thinking that far ahead. And detecting the problem at runtime is
a perfectly acceptable way to handle the problem. My only concern is
that the patch as submitted will skip _every_ IPV6 socket on affected
systems, whether the user wanted to use them or not.

 
 So if there's a but, don't hide it, but work towards fixing it.
 

I agree. But at the same time, if that bug can be worked around, I think
it should be... not everyone can upgrade their
kernel/libraries/whatever.

I like the idea of dying loudly, though... it'd remind people to get off
those buggy kernel versions (which until today, I thought I had...
crossed it off the list, but never actually did it... good thing it's
just my home system, otherwise I'd be in big trouble:)

Greg

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync 2.6.2 --daemon Problem

2004-05-05 Thread Paul Slootman
On Wed 05 May 2004, Jan-Benedict Glaw wrote:
 
 Runtime check? Right. Think about distributions that offer both 2.4.x
 and 2.6.x. For sure you won't like to deliver two rsync versions to your
 users:) ...and because IPV6_V6ONLY exists in 2.4.21 upwards, I think
 that's not a major problem. Hey, these kernels do have known root
 exploits, so it's time for an update!

Yep, that was what I was thinking (talking with my Debian rsync
maintainer hat on).  The point about older kernels being insecure is a
good one. Unfortunately, it also possible to patch older kernels to fix
the security problems (like Debian does).  However, that's not really an
issue for me, as this version of rsync will only go into the new
distribution, not to the current stable one (which has the old kernels).

 So if there's a but, don't hide it, but work towards fixing it.

Agreed.


Paul Slootman
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync and Perl programming

2004-05-05 Thread Chuck Wolber
On Wed, 5 May 2004, Jim Salter wrote:

 Hi everybody -
 
 I'm trying to write a Perl wrapper for some rsync tasks that need doing.
   Problem is, there's some sort of odd interaction going on between Perl
 and the daemon mode communication for the rsync client, and I'm at my
 wit's end in trying to figure it out.

Try unbuffering your I/O in the script. Add the following line somewhere 
towards the top:

$| = 1;

Note: that's the pipe symbol after the dollar sign.

-Chuck

-- 
http://www.quantumlinux.com 
 Quantum Linux Laboratories, LLC.
 ACCELERATING Business with Open Technology

 The measure of the restoration lies in the extent to which we apply 
  social values more noble than mere monetary profit. - FDR

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Compiling 2.6.2 on Solaris 9 fails

2004-05-05 Thread John Martinez
On May 5, 2004, at 12:13 PM, Albert Chin wrote:
Works fine with the Sun C compiler. Is your 2.95.3 build specifically
for Solaris 9? GCC include files are specific to the platform it was
built on.
Thanks for replying. I installed GCC 3.3.3 from Blastwave and the 
compile worked.

-john

--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Error rsync 2.6.2 Solaris 9 over Sun SSH

2004-05-05 Thread John Martinez
Hello,

I'm using Sun SSH on Solaris 9 and am getting the following error when 
using rsync over ssh:

wrote 91628 bytes  read 116 bytes  16680.73 bytes/sec
total size is 293287825  speedup is 3196.81
rsync error: unexplained error (code 255) at main.c(633)
The command I am using is:

rsync -e ssh --rsync-path=/opt/rsync/bin/rsync -vazul /sample/path/ 
server:/sample/path/

When I change 'ssh' to be 'rsh', the error goes away. I have to do ugly 
things to make my destination insecure, of course.

Has anybody else seen this? Any ideas?

I haven't tried using OpenSSH instead of Sun SSH yet.

thanks,
-john
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Feature Request: Authentication enhancement

2004-05-05 Thread Razvan Popovici
 Rsync works great, but for many network administrators it is difficult to
 manage a secondary user database to secure the rsync paths.
 The proposal is to develop an option for the rsync (daemon and client) so
 they can load some security modules developed as dynamic libraries. This
 approach would keep the rsync itself  platform independent, while the
 security modules can be very platform dependent, since they would be able
to
 manage Windows, Radix, ldap or unix password file authentication.
 Actual password-file security system can be re-written as a build-in
default
 authentication module, of course platform idependent.
 I think this is according to the philosophy of the product, since rsync
 handles with file synchronisation it doesn't need to be also an expert in
 security.

 Sample:
 Let's assume that the daemon and the client are running on windows
machines.
 It is desired to implement a windows security approach, therefore any user
 that is able to read/write the main directory of the module should be
 allowed to write/read it.
 Server would be started with the projected option
 '--security-module=windows' so it will search for the
 'rsyncwindowsserver.dll' on start.
 On the client side, with the same option, the 'rsyncwindowsclient.dll'
would
 be loaded. If no username and password is given, the actual security token
 would be sent to the server as authentication, else the user and password
 given in command line. The rsync daemon would call the 'authenticate'
 function from the server DLL and based on the aswer of the function it will
 allow or deny the client access and it would elaborate an welcome/error
 message.

 I would be pleased to receive comments, improvements ideas and critics from
you.
 Since I am a programmer, I would be delighted to help writing this feature.

 Regards,
 Razvan


-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Extra warnings now in 2.6.2

2004-05-05 Thread Stuart Inglis
Hi Wayne,
Thanks for the rapid fix.
That looks like it mostly fixed it. I was getting 100's and 100's of 
mkdir warnings. Now I only get a single warning. The directory was a CVS 
directory but I doubt that matters. Maybe there is another case you missed?

cheers
Stuart
On Tue, May 04, 2004 at 01:41:04PM +1200, Stuart Inglis wrote:
mkdir -p a/b/c
then later on tries to create:
mkdir -p a/b

Thanks for the clarification.  I dug into this and I found that some of
the code paths try to call make_bak_dir() without first getting an
ENOENT error.  This can cause the code to try to create a directory that
already exists.  The attached patch should fix this for you.
..wayne..

--- backup.c	13 Mar 2004 20:18:03 -	1.28
+++ backup.c	4 May 2004 03:06:52 -
@@ -169,8 +169,9 @@ static int keep_backup(char *fname)
 	/* Check to see if this is a device file, or link */
 	if (IS_DEVICE(file-mode)) {
 		if (am_root  preserve_devices) {
-			make_bak_dir(backup_dir_buf);
-			if (do_mknod(backup_dir_buf, file-mode, file-u.rdev) != 0) {
+			if (do_mknod(backup_dir_buf, file-mode, file-u.rdev)  0
+			 (errno != ENOENT || make_bak_dir(backup_dir_buf)  0
+			 || do_mknod(backup_dir_buf, file-mode, file-u.rdev)  0)) {
 rprintf(FERROR, mknod %s failed: %s\n,
 	full_fname(backup_dir_buf), strerror(errno));
 			} else if (verbose  2) {
@@ -186,10 +187,14 @@ static int keep_backup(char *fname)
 
 	if (!kept  S_ISDIR(file-mode)) {
 		/* make an empty directory */
-		make_bak_dir(backup_dir_buf);
-		do_mkdir(backup_dir_buf, file-mode);
-		ret_code = do_rmdir(fname);
+		if (do_mkdir(backup_dir_buf, file-mode)  0
+		 (errno != ENOENT || make_bak_dir(backup_dir_buf)  0
+		 || do_mkdir(backup_dir_buf, file-mode)  0)) {
+			rprintf(FINFO, mkdir %s failed: %s\n,
+full_fname(backup_dir_buf), strerror(errno));
+		}
 
+		ret_code = do_rmdir(fname);
 		if (verbose  2) {
 			rprintf(FINFO, make_backup: RMDIR %s returns %i\n,
 full_fname(fname), ret_code);
@@ -207,8 +212,9 @@ static int keep_backup(char *fname)
 			}
 			kept = 1;
 		}
-		make_bak_dir(backup_dir_buf);
-		if (do_symlink(file-u.link, backup_dir_buf) != 0) {
+		if (do_symlink(file-u.link, backup_dir_buf)  0
+		 (errno != ENOENT || make_bak_dir(backup_dir_buf)  0
+		 || do_symlink(file-u.link, backup_dir_buf)  0)) {
 			rprintf(FERROR, link %s - %s : %s\n,
 full_fname(backup_dir_buf), file-u.link, strerror(errno));
 		}

--
Stuart Inglis, Ph.D.
Managing Director
Reel Two Ltd
Phone: +64 7 857 0700
Cell: +64 21 314 159
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


coder wanted

2004-05-05 Thread Web Hosting Network
Hi

I am using Rsync locally on some machines, however, there are a few machines that 
require me to backup over FTP, the current system
I have in place is very very slow, and I would like to hire someone on this list 
familiar with backups ($50 sound fine?) and having
it run of cron

To create me a backup script that works on Rsync to backup specific files/folders on 
server1 and ssh or ftp to server2

I am not familiar with Rsync or coding to do it myself

If your interested, please contact me at letsfly at www-hosting.net or letsfly at 
gci.net

I have a list of files and folders that I would like synced, so its just a matter of 
you plugging them into the script

(I will need this script within 24 hours if possible...) hit me on AIM AlaskanGreyFox

Thanks
Gary


-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


RE: coder wanted

2004-05-05 Thread Lets Fly Hosting
(not sure if this went though the 1st time...sorry if double)

Hi

I am using Rsync locally on some machines, however, there are a few machines that 
require me to backup over FTP, the current system
I have in place is very very slow, and I would like to hire someone on this list 
familiar with backups ($50 sound fine?) and having
it run of cron

To create me a backup script that works on Rsync to backup specific files/folders on 
server1 and ssh or ftp to server2

I am not familiar with Rsync or coding to do it myself

If your interested, please contact me at letsfly at www-hosting.net or letsfly at 
gci.net

I have a list of files and folders that I would like synced, so its just a matter of 
you plugging them into the script

(I will need this script within 24 hours if possible...) hit me on AIM AlaskanGreyFox

Thanks
Gary


-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Error rsync 2.6.2 Solaris 9 over Sun SSH

2004-05-05 Thread Wayne Davison
On Wed, May 05, 2004 at 03:45:55PM -0700, John Martinez wrote:
 wrote 91628 bytes  read 116 bytes  16680.73 bytes/sec
 total size is 293287825  speedup is 3196.81
 rsync error: unexplained error (code 255) at main.c(633)

When ssh exits, it returns an exit code.  Rsync reads the code, and
returns it back to you.  I'm assuming that is where this unexplained
error code is coming from.  You might try executing some other command
outside of rsync and seeing what the exit code is:

ssh host uptime ; echo $?

If there are no other rsync errors, then you may be able to just ignore
the failure coming from Sun's ssh.  However, switching to openssh may be
a better long-term option.

..wayne..
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Error rsync 2.6.2 Solaris 9 over Sun SSH

2004-05-05 Thread John Martinez
On May 5, 2004, at 8:53 PM, Wayne Davison wrote:
ssh host uptime ; echo $?
Thanks, I'll check that out.
-john
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


CVS update: rsync

2004-05-05 Thread Wayne Davison

Date:   Wed May  5 17:15:03 2004
Author: wayned

Update of /data/cvs/rsync
In directory dp.samba.org:/tmp/cvs-serv5841

Modified Files:
generator.c 
Log Message:
Added missing extern for read_batch.


Revisions:
generator.c 1.80 = 1.81
http://www.samba.org/cgi-bin/cvsweb/rsync/generator.c.diff?r1=1.80r2=1.81
___
rsync-cvs mailing list
[EMAIL PROTECTED]
http://lists.samba.org/mailman/listinfo/rsync-cvs