Re: Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin

2002-05-10 Thread Max Bowsher

Martin Pool [EMAIL PROTECTED] wrote:
 Sorry, I've been out of town this week.

No problem.

 This is the shutdown one, right?  I wanted to check about portability
 before we put it in.  Snader's Effective TCP/IP Programming says that

   shutdown(fd, 1);

 is OK on both Unix and Windows and will avoid errors from closing the
 socket.  So I think it's OK to put it in.  Winsock misinterprets other
 values of the second parameter so we can't use them.

Yes, this is the shutdown one. This issue certainly does not require any other
shutdown second parameter, so we are safe there.

 I don't understand why you need to only insert this call here and
 not in every case where a socket is closed.  If there's no specific
 reason we should have a common shutdownsocket() routine and call it;
 if there is a reason we should document it.

Kludginess. I did the quickest fix to the immediate problem I had, which didn't
require me to trace through the lifetime of all socket handles used everywhere
in rsync. The problem was especially severe here, because rsync didn't even
close the socket in these cases - it would write its last data, then return a
couple of times, and exit().

We could have a shutdownsocket(). Is it worth it for just for 2 lines of code?
shutdown(fd, SHUT_WR);
close(fd);

If you say yes, then fair enough.

In any case, I will study the rsync code in greater detail, and produce a patch
covering every case a socket is closed.

Max.

PS: Someone mentioned that 2.5.6 has branched in CVS. I'm a bit of a CVS newbie
unfortunately - what is the command for 'what branches exist in the repository?'



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



Margie has sent you a card

2002-05-10 Thread Margie




PLEASE TAKE NOTICE THIS IS A LINK TO A SITE THAT CONTAINS ADULT MATERIAL.
IF YOU ARE UNDER 18 THEN PLEASE DELETE THIS EMAIL AT ONCE.
Parents, this email was sent by Margie NOT BY HORNEYCARDS.COM If this is an inappropriate correspondence
please take it up with Margie.
Hi, Margie has sent you a Horney card.
 To pickup your card, just Click Here, or copy and
paste the URL below it into your browser address bar:
http://www.horneycards.com/ecards/pickup.php?message_id0508000526rZL0lSRKfzWT
AOL Users: Click Here. 
www.horneycards.com



  

















  







rsync cron

2002-05-10 Thread Jiri Cvrk



hello,

when I use rsync from commandline (RH 7.2, ssh2), 
it works fine.
rsync -e ssh -a -v [EMAIL PROTECTED]:/home/samba/m/aaa.txt 
/home/m/aaa.txt
but 
when I try to use it in crontab such as
33 11 * * * rsync -e ssh -a -v [EMAIL PROTECTED]:/home/samba/m/aaa.txt 
/home/m/aaa.txt/dev/null
or
33 11 * * * rsync -e ssh -a -v [EMAIL PROTECTED]:/home/samba/m/aaa.txt 
/home/m/aaa.txt

I have also tried this rsync command in script.. 
and always I get the following.

Aborted by user!unexpected EOF in 
read_timeout.

What should be wrong?

Thank you for any help.
--Jiri Cvrk (CZ)http://digital.zde.cz


Using rsync to sync up password file

2002-05-10 Thread Bove, Lui
Title: Using rsync to sync up password file





Is it possible to use rsync to synchronize the /etc/passwd, /etc/shadow, /etc/shadow- files under linux?


Lui Bove
AIM Funds Management Inc.
5140 Yonge St.
Toronto, Ont. M2N 6X7
Tel: 416-228-3664
Fax: 416-590-7742
Email: [EMAIL PROTECTED]





Re: openssh 3.1 and rsync dont work

2002-05-10 Thread Mark Pitt




Bug seems to have been fixed in -current release ( SSH Bug 182 )  not sure
when this will be available/official.

Going to stick to 2.9.9 on the one machine until resolved.

Mark Pitt
SP Administrator
IBM, Campus Winterthur
058-333-1542



Dave Dykstra [EMAIL PROTECTED] on 09.05.2002 16:34:57

Please respond to Dave Dykstra [EMAIL PROTECTED]

To:Mark Pitt/Switzerland/Contr/IBM@IBMCH
cc:[EMAIL PROTECTED]
Subject:Re: openssh 3.1 and rsync dont work


I want to fix this in rsync too.  I developed what I think is a good fix
and now I'm trying to reproduce the problem so I can test whether or not
the fix worked.  The trouble is, I can't reproduce it with -e ssh even
though I'm sure I'm running openssh 3.1p1 on solaris where it's running the
ssh-rand-helper.  truss doesn't show rsync setting SIGCHLD to SIG_IGN.  I
found that there is one place in the rsync 2.5.5 code that sets SIGCHLD to
SIG_IGN, but it appears to only be in rsync --daemon mode, and it wouldn't
call ssh from there.

What version of rsync did you have the problem in, and what was the command
line you used?

- Dave Dykstra

On Tue, May 07, 2002 at 10:30:44AM +0200, Mark Pitt wrote:

 Maybe this is a ssh problem - but are you aware of the general issue ?

 http://bugzilla.mindrot.org/show_bug.cgi?id=182

Summary: ssh should still force SIGCHLD to be SIG_DFL when
 calling ssh-rand-helper
Product: Portable OpenSSH
Version: 3.1p1
   Platform: ix86
 OS/Version: All
 Status: NEW
   Severity: normal
   Priority: P3
  Component: ssh
 AssignedTo: [EMAIL PROTECTED]


 Programs that set a SIGCHLD handler before calling ssh wreak havoc on the
 waitpid() calls within entropy.c and ssh-rand-helper. Entropy.c should
set
 the
 SIGCHLD handler to SIG_DFL before calling ssh-rand-helper to avoid
SIGCHLD
 conflicts.

 This was noticed when our ssh version was upgraded to 3.1.  Our local
rsync
 processes were failing with the following output from SSH:

 Couldn't wait for child 'ls -alni /usr/adm' completion: No child
processes
 Couldn't wait for child 'ls -alni /usr/mail' completion: No child
processes
 Couldn't wait for child 'netstat -an' completion: No child processes
 Couldn't wait for child 'netstat -in' completion: No child processes
 Couldn't wait for child 'netstat -rn' completion: No child processes
 Couldn't wait for child 'netstat -ia' completion: No child processes
 Couldn't wait for child 'netstat -s' completion: No child processes
 Couldn't wait for child 'netstat -is' completion: No child processes
 Couldn't wait for child 'arp -a -n' completion: No child processes
 Couldn't wait for child 'ifconfig -a' completion: No child processes
 Couldn't wait for child 'ps -al' completion: No child processes
 Couldn't wait for child 'ps -efl' completion: No child processes
 Couldn't wait for child 'last' completion: No child processes
 Couldn't wait for child 'sar -d' completion: No child processes
 Couldn't wait for child 'uptime' completion: No child processes
 Couldn't wait for child 'ipcs -a' completion: No child processes
 Not enough entropy in RNG
 ssh-rand-helper child produced insufficient data
 unexpected EOF in read_timeout

 It was discovered that rsync had set SIGCHLD to SIG_IGN prior to calling
 ssh.
 Setting SIGCHLD to SIG_DFL prior to forking ssh-rand-helper (seed_rng()
in
 entropy.c) solved this problem.



 --- You are receiving this mail because: ---
 You are the assignee for the bug, or are watching the assignee.
 ___
 [EMAIL PROTECTED] mailing list
 http://www.mindrot.org/mailman/listinfo/openssh-unix-dev
 [prev in list] [next in list] [prev in thread] [next in thread]

 Mark Pitt
 SP Administrator
 IBM, Campus Winterthur
 058-333-1542



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





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



Re: Using rsync to sync up password file

2002-05-10 Thread Michael Zimmermann

At Friday 10 May 2002 14:15 Bove, Lui wrote:
 Is it possible to use rsync to synchronize the /etc/passwd, /etc/shadow,
 /etc/shadow- files under linux?

If you dare to, why not? .o)
-- 
Michael Zimmermann (Vegaa Safety and Security for Internet Services)
[EMAIL PROTECTED]   phone +49 89 6283 7632hotline +49 163 823 1195
Key fingerprint = 1E47 7B99 A9D3 698D 7E35  9BB5 EF6B EEDB 696D 5811


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



Preserve TARGET perms, user and group would be nice

2002-05-10 Thread Mark Pitt




Using --existing, I would like to transfer files created by root to home
dirs, where the files would be updated, but leave the user,group and perms
as they were.  ie root creates a new file on the sending system, rsyncs it
to the home dir of the user, leaving the perms untouched.

Seems there is no option for this - the users are not defined on the
sending system.   I cant do it backwards due to firewall regulations.




Mark Pitt
SP Administrator
IBM, Campus Winterthur
058-333-1542




 Mark Pitt
 SP Administrator
 IBM, Campus Winterthur
 058-333-1542



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





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



Avoid 'Connection reset by peer' on cygwin - agree hold until after 2.5.6 and note to Lapo Luchini

2002-05-10 Thread Max Bowsher

 I think it might be too risky for 2.5.6 and perhaps should wait to 2.6.0.

 - Dave

Yes, now the small fix has turned into a multi-source file minor redesign, lets
hold it until after 2.5.6 - at least for the standard release.

To Lapo Luchini: Maybe this could go into the cygwin 2.5.6-1 as a temporary
measure until it is put into mainline rsync? (It is a patch to solve the Daemon
mode sometimes produces read error: Connection reset by peer at the very end
of transfer. problem)


Max.



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



Re: Avoid 'Connection reset by peer' on cygwin - agree hold untilafter 2.5.6 and note to Lapo Luchini

2002-05-10 Thread Lapo Luchini

  Max Bowsher wrote:

I think it might be too risky for 2.5.6 and perhaps should wait to 2.6.0.

- Dave



Yes, now the small fix has turned into a multi-source file minor redesign, lets
hold it until after 2.5.6 - at least for the standard release.

To Lapo Luchini: Maybe this could go into the cygwin 2.5.6-1 as a temporary
measure until it is put into mainline rsync? (It is a patch to solve the Daemon
mode sometimes produces read error: Connection reset by peer at the very end
of transfer. problem)
  

Yes, of course.
I'm glad someone had the time to do it ^_^

-- 
Lapo 'Raist' Luchini
[EMAIL PROTECTED] (PGP  X.509 keys available)
http://www.lapo.it (ICQ UIN: 529796)





smime.p7s
Description: S/MIME Cryptographic Signature


Re: openssh 3.1 and rsync dont work

2002-05-10 Thread Dave Dykstra

I took a look in the rsync CVS; the change to rsync that (unintentionally)
prevented this problem was put into version 2.4.6 by Andrew Tridgell:

http://cvs.samba.org/cgi-bin/cvsweb/rsync/main.c.diff?r1=1.126r2=1.124

I'm still concerned that we might run into a problem with ignored signals
being inherited by child programs, however, and I think maybe we should put
in some preventative code.  SIGPIPE is currently the only signal that is
completely ignored.  However, the current signal handler for SIGCHLD has
caused another problem:

http://lists.samba.org/pipermail/rsync/2002-March/006611.html

and we may end up ignoring SIGCHLD again to fix this, I'm not sure.

- Dave Dykstra

On Thu, May 09, 2002 at 04:13:45PM -0400, Jim Ogilvie wrote:
 
 When we first switched to openssh 3.1 with rsync 2.3.1 we had the same
 error from ssh-rand-helper. But after switching to rsync 2.5.5rc1 the
 problem went away. (this is on AIX).
 
 --
 Jim Ogilvie
 
 On Thu, 9 May 2002 09:34:57, Dave Dykstra wrote:
 
  I want to fix this in rsync too.  I developed what I think is a good fix
  and now I'm trying to reproduce the problem so I can test whether or not
  the fix worked.  The trouble is, I can't reproduce it with -e ssh even
  though I'm sure I'm running openssh 3.1p1 on solaris where it's running
 the
  ssh-rand-helper.  truss doesn't show rsync setting SIGCHLD to SIG_IGN.  I
  found that there is one place in the rsync 2.5.5 code that sets SIGCHLD
 to
  SIG_IGN, but it appears to only be in rsync --daemon mode, and it
 wouldn't
  call ssh from there.
 
  What version of rsync did you have the problem in, and what was the
 command
  line you used?
 
  - Dave Dykstra
 
 
 
 -- 
 To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
 Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

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



Re: wildcards (was Re: a problem I'm having with rsync-4.5.4)

2002-05-10 Thread Dave Dykstra

On Thu, May 09, 2002 at 05:42:41PM -0700, Wayne Davison wrote:
 On Thu, 9 May 2002, Dave Dykstra wrote:
  How many times would you have to call fnmatch for every file?
 
 We'd call fnmatch() an extra time for every slash in the path.  However,
 the performance hit of this new loop on the pattern foo/* would be the
 same as using the two patterns /**/foo/*  /foo/* (_except_ that the
 trailing '*' would work right in the first pattern) -- this is because
 ** already has to do a recursive match iteration, and that's kind of
 what our new loop would be doing outside of fnmatch() (we'd actually be
 doing less recursive calls, since fnmatch() would call itself an extra
 time for every character in the path, but our loop would only call for
 every character after a slash).
 
 So yes, this is slightly less efficient for unanchored patterns.  It
 would make the code work as advertised, though, and any pattern that was
 anchored with a leading slash would be entirely unaffected.

If you dynamically created a */*/*/foo/* pattern with the number of */ to
match the current path it would only have to call fnmatch once.  How about
that?

 On the
 downside, it could cause some people who use unanchored patterns as if
 they were actually anchored to be surprised by the change in behavior.

I wouldn't worry about that.

- Dave

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



Re: Preserve TARGET perms, user and group would be nice

2002-05-10 Thread Dave Dykstra

I'm sorry, I don't understand what you're asking for.  Please give a simple
example, including the rsync command line you use that gives you the
undesired results.

- Dave Dykstra

On Fri, May 10, 2002 at 02:26:17PM +0200, Mark Pitt wrote:
 
 
 
 Using --existing, I would like to transfer files created by root to home
 dirs, where the files would be updated, but leave the user,group and perms
 as they were.  ie root creates a new file on the sending system, rsyncs it
 to the home dir of the user, leaving the perms untouched.
 
 Seems there is no option for this - the users are not defined on the
 sending system.   I cant do it backwards due to firewall regulations.
 
 
 
 
 Mark Pitt
 SP Administrator
 IBM, Campus Winterthur
 058-333-1542

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



Re: wildcards

2002-05-10 Thread Wayne Davison

On Fri, 10 May 2002, Dave Dykstra wrote:
 If you dynamically created a */*/*/foo/* pattern with the number of */
 to match the current path it would only have to call fnmatch once.

That's assuming the pattern doesn't contain an interior/trailing **
(which could only use the try-after-each-slash loop).  Also, there's no
need to tweak the pattern -- it would be the same amount of work to just
figure out where in the filename your prefix of */*/*/ represents and
match at that position (since we'd have to count slashes anyway).  We'd
also have to be careful to ensure that there aren't any exceptional
patterns that could lead to problematical positioning.

A useful question at this point would be:  Does the extra complexity
make a big enough difference to be worth it?  With all of the file I/O
going on, I'm wondering if it would even be noticed.

..wayne..


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



bug report

2002-05-10 Thread terrell Larson

I'm new to this list and I hope this is the proper way to submit a bug.  If not then 
please advise.  Also I'm not a list subscriber so please email me directly and cc the 
list if appropriate.

I beleive I have found a bug in rsync.  It is reproducable and easy to confirm.

summary:
===

If rsync is directed to copy a directory tree into another machine and the target 
directory does not exist then rsync will not create the required path and instead 
issues this message:

mkdir failure:  No such file or directory

example:
===

rsync -av --progress -e ssh -1 /etc/   $1:/altsync/$HOSTNAME/etc

This example is being called from a bash shell.  $1 is the name of the target machine 
and the idea is that several machines will be backed up to the chosen target with the 
following directory 
structure:

/altsync/hostname1/etc
/altsync/hostname2/etc
/altsync/hostname3/etc

If the target hostname directory exists, then rsync runs.  If the target hostname 
directory does not exist, rather than creating it, rsync bombs because the mkdir for 
~/hostname/etc fails.

reproducable:
==

Yes

--

documentation shortcomming:

The above form of the -e option is not documented.   IMHO it should be.





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



Possible exclude bug in 2.5.5 in rsyncd.conf

2002-05-10 Thread pyxl

Hello all,

I've found some behavior in 2.5.5 that is contrary to the documentation 
in the man page.

Specifically, I'm running an rsync server (i.e. from inetd with 
--daemon),and in the module definition I'm specifying the line exclude 
nosyncdir.  The documentation for rsyncd.conf indicates that this is 
exactly equivalent to using --exclude nosyncdir on the client side. 
 I'm finding, however, that if I specify it on the server side, it's 
ignored, and the dir structure of nosyncdir and below is transferred. 
 If I use the client side option however, it works as expected, that 
being the nosyncdir dir structure is not transferred.

I've tried the variations *nosyncdir*, *nosyncdir/*, nosyncdir, 
nosyncdir/* and nosyncdir* - none of them work on the server side.

Hopefully someone can shine some light on this, either to confirm that 
it's a bug or correct my syntax if it's off.

Scott


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



Regarding possible bug rsyncd.conf 2.5.5

2002-05-10 Thread pyxl

Please ignore that email.  I just realized my error - missing the all 
important = on the line.

DUH.

*shakes head*

Sorry folks.

Scott


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



bug in rsyncd.conf - email #3

2002-05-10 Thread pyxl

And today is apparently my day to put *both* feet in my mouth concurrently.

The behavior is still being evinced on the server side, even with a 
correctly syntaxed exclude line.

*sigh*

Oh well.  At this point, I'm going to stop posting to the list about this.


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



Parsing output, separating motd and module-list

2002-05-10 Thread Niels Andersen

I'm working on a frontend to rsync, and I've got a problem.

It's easy to get a list of files and directories from a specific path on an 
rsync server. But from the root, I've found it very difficult to get a list 
of modules.

I cannot see when the modt stops, and when the list begins. Can anybody help?

-- 
Mvh.

Niels Andersen

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



http://rsync.samba.org/rsync/ 404 not found

2002-05-10 Thread Dave Barnett

136 BUG REPORTS
137 ---
138
139 If you have web access then please look at
140 http://rsync.samba.org/rsync/
141
142 This will give you access to the bug tracking system used by the
143 developers of rsync and will allow you to look at other bug reports or
144 submit a new bug report.
145
146 If you don't have web access then mail bug reports to [EMAIL PROTECTED]


Attempts to access the web page listed on line 140 of the README for version 
2.5.5 returns the message:
Not Found
The requested URL /rsync/ was not found on this server.
Apache/1.3.9 Server at rsync.samba.org Port 80

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



Re: bug report

2002-05-10 Thread jw schultz

On Fri, May 10, 2002 at 12:50:59PM -0700, Wayne Davison wrote:
 On Fri, 10 May 2002, terrell Larson wrote:
  The [option-specifying form] of the -e option is not documented.
  IMHO it should be.
 
 I agree.  I've whipped up the following patch for rsync.yo, which I
 will commit to CVS in a moment:
 
 Index: rsync.yo
 --- rsync.yo  2002/05/09 21:44:46 1.99
 +++ rsync.yo  2002/05/10 19:47:05
 @@ -515,6 +515,13 @@
  remote copies of rsync. Typically, rsync is configured to use rsh by
  default, but you may prefer to use ssh because of its high security.
  
 +Feel free to include options in the COMMAND.  For instance:
 +
 +quote(-e ssh -1 -l joe)
 +
 +(Note that ssh users can alternately store off site-specific connect
 +options in their .ssh/config file.)
 +
  You can also choose the remote shell program using the RSYNC_RSH
  environment variable.
 

I concur about the current manpage but the patch is perhaps
a little to chatty for me.  Also the example is an odd one.

Perhaps something more like
+Command-line arguments are permitted in COMMAND provided
+that COMMAND is presented to rsync as a single argument.
+Quotes may be used to preserve whitespace.  For example:
+
+quote(-e ssh -p 2234)
+
 You can also choose the remote shell program using the RSYNC_RSH
-environment variable.
+environment variable which also allows command-line arguments.

This example shows the use of the ssh option i suspect is
most likely to be wanted.

P.S. What is the -1 option?  Is it part of the comercial ssh?



-- 

J.W. SchultzPegasystems Technologies
email address:  [EMAIL PROTECTED]

Remember Cernan and Schmitt

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