Differentiating debug messages from both sides

2004-01-27 Thread Wayne Davison
Some of the debug messages that rsync outputs (when verbose = 2) can
occur on both sides of the connection.  This makes it hard to know which
program is saying what.  Some debug messages deal with this by
outputting a [PID] string at the start of the message.  Unfortunately,
the startup message that tells us which pid is which is only output when
verbose = 3, so there's a bit of a problem if we use this idiom for
messages such as expanding file_list ... and excluding file ...
(which get output at verbose = 2 and can occur on both sides).

I'd like to propose a change that prefixes dual-sided messages with [s],
[r], or [g] for the sender, receiver, and generator, respectively.  This
makes them easier to read, and it works at any verbose level.  Here's a
patch.  Let me know what you think.

..wayne..
--- exclude.c   20 Jan 2004 04:53:59 -  1.58
+++ exclude.c   27 Jan 2004 07:36:35 -
@@ -27,6 +27,7 @@
 #include rsync.h
 
 extern int verbose;
+extern char *who_am_i;
 
 struct exclude_struct **exclude_list;
 struct exclude_struct **local_exclude_list;
@@ -102,7 +103,7 @@ void free_exclude_list(struct exclude_st
struct exclude_struct **list = *listp;
 
if (verbose  2)
-   rprintf(FINFO,clearing exclude list\n);
+   rprintf(FINFO, [%c] clearing exclude list\n, *who_am_i);
 
if (!list)
return;
@@ -203,12 +204,14 @@ static void report_exclude_result(char c
 * then it is stripped out by make_exclude.  So as a special
 * case we add it back in here. */
 
-   if (verbose = 2)
-   rprintf(FINFO, %s %s %s because of pattern %s%s\n,
+   if (verbose = 2) {
+   rprintf(FINFO, [%c] %s %s %s because of pattern %s%s\n,
+   *who_am_i,
ent-include ? including : excluding,
name_is_dir ? directory : file,
name, ent-pattern,
ent-directory ? / : );
+   }
 }
 
 
@@ -250,7 +253,8 @@ void add_exclude(struct exclude_struct *
out_of_memory(add_exclude);
 
if (verbose  2) {
-   rprintf(FINFO,add_exclude(%s,%s)\n,pattern,
+   rprintf(FINFO, [%c] add_exclude(%s,%s)\n,
+   *who_am_i, pattern,
include ? include : exclude);
}
 
--- flist.c 27 Jan 2004 01:47:41 -  1.174
+++ flist.c 27 Jan 2004 07:36:30 -
@@ -46,6 +46,7 @@ extern int recurse;
 extern char curr_dir[MAXPATHLEN];
 extern char *files_from;
 extern int filesfrom_fd;
+extern char *who_am_i;
 
 extern int one_file_system;
 extern int make_backups;
@@ -342,7 +343,8 @@ static void flist_expand(struct file_lis
}
 
if (verbose = 2) {
-   rprintf(FINFO, expand file_list to %.0f bytes, did%s move\n,
+   rprintf(FINFO, [%c] expand file_list to %.0f bytes, did%s 
move\n,
+   *who_am_i,
(double)sizeof(flist-files[0])
* flist-malloced,
(new_ptr == flist-files) ?  not : );
@@ -781,8 +783,10 @@ struct file_struct *make_file(char *fnam
 
   skip_excludes:
 
-   if (verbose  2)
-   rprintf(FINFO, make_file(%s,*,%d)\n, fname, exclude_level);
+   if (verbose  2) {
+   rprintf(FINFO, [%c] make_file(%s,*,%d)\n,
+   *who_am_i, fname, exclude_level);
+   }
 
file = new(struct file_struct);
if (!file)
@@ -1416,8 +1420,8 @@ static void clean_flist(struct file_list
return;
 
for (i = 0; i  flist-count; i++) {
-   rprintf(FINFO, [%ld] i=%d %s %s mode=0%o len=%.0f\n,
-   (long) getpid(), i,
+   rprintf(FINFO, [%c] i=%d %s %s mode=0%o len=%.0f\n,
+   *who_am_i, i,
NS(flist-files[i]-dirname),
NS(flist-files[i]-basename),
(int) flist-files[i]-mode,
--- main.c  27 Jan 2004 08:05:10 -  1.185
+++ main.c  27 Jan 2004 07:59:07 -
@@ -56,6 +56,8 @@ extern char *remote_filesfrom_file;
 extern char *rsync_path;
 extern char *shell_cmd;
 extern struct file_list *batch_flist;
+extern char *who_am_i;
+
 
 /* there's probably never more than at most 2 outstanding child processes,
  * but set it higher just in case.
@@ -198,7 +200,7 @@ static void show_malloc_stats(void)
getpid(),
am_server ? server  : ,
am_daemon ? daemon  : ,
-   am_sender ? sender : receiver);
+   who_am_i);
rprintf(FINFO,   arena: %10d   (bytes from sbrk)\n, mi.arena);
rprintf(FINFO,   ordblks:   %10d   (chunks not in use)\n, mi.ordblks);
rprintf(FINFO,   smblks:%10d\n, mi.smblks);
@@ -455,6 +457,8 @@ static int do_recv(int f_in,int f_out,st
   

Re: Differentiating debug messages from both sides

2004-01-27 Thread jw schultz
On Tue, Jan 27, 2004 at 12:31:05AM -0800, Wayne Davison wrote:
 Some of the debug messages that rsync outputs (when verbose = 2) can
 occur on both sides of the connection.  This makes it hard to know which
 program is saying what.  Some debug messages deal with this by
 outputting a [PID] string at the start of the message.  Unfortunately,
 the startup message that tells us which pid is which is only output when
 verbose = 3, so there's a bit of a problem if we use this idiom for
 messages such as expanding file_list ... and excluding file ...
 (which get output at verbose = 2 and can occur on both sides).
 
 I'd like to propose a change that prefixes dual-sided messages with [s],
 [r], or [g] for the sender, receiver, and generator, respectively.  This
 makes them easier to read, and it works at any verbose level.  Here's a
 patch.  Let me know what you think.

Good idea.  I think i was contemplating such a thing a year
or so ago but you've actually done something about it.

The only thing i'm not sure about is using three characters
to present a one character abreviation.

 
 ..wayne..

 --- exclude.c 20 Jan 2004 04:53:59 -  1.58
 +++ exclude.c 27 Jan 2004 07:36:35 -
 @@ -27,6 +27,7 @@
  #include rsync.h
  
  extern int verbose;
 +extern char *who_am_i;
  
  struct exclude_struct **exclude_list;
  struct exclude_struct **local_exclude_list;
 @@ -102,7 +103,7 @@ void free_exclude_list(struct exclude_st
   struct exclude_struct **list = *listp;
  
   if (verbose  2)
 - rprintf(FINFO,clearing exclude list\n);
 + rprintf(FINFO, [%c] clearing exclude list\n, *who_am_i);
  
   if (!list)
   return;
 @@ -203,12 +204,14 @@ static void report_exclude_result(char c
* then it is stripped out by make_exclude.  So as a special
* case we add it back in here. */
  
 - if (verbose = 2)
 - rprintf(FINFO, %s %s %s because of pattern %s%s\n,
 + if (verbose = 2) {
 + rprintf(FINFO, [%c] %s %s %s because of pattern %s%s\n,
 + *who_am_i,
   ent-include ? including : excluding,
   name_is_dir ? directory : file,
   name, ent-pattern,
   ent-directory ? / : );
 + }
  }
  
  
 @@ -250,7 +253,8 @@ void add_exclude(struct exclude_struct *
   out_of_memory(add_exclude);
  
   if (verbose  2) {
 - rprintf(FINFO,add_exclude(%s,%s)\n,pattern,
 + rprintf(FINFO, [%c] add_exclude(%s,%s)\n,
 + *who_am_i, pattern,
   include ? include : exclude);
   }
  
 --- flist.c   27 Jan 2004 01:47:41 -  1.174
 +++ flist.c   27 Jan 2004 07:36:30 -
 @@ -46,6 +46,7 @@ extern int recurse;
  extern char curr_dir[MAXPATHLEN];
  extern char *files_from;
  extern int filesfrom_fd;
 +extern char *who_am_i;
  
  extern int one_file_system;
  extern int make_backups;
 @@ -342,7 +343,8 @@ static void flist_expand(struct file_lis
   }
  
   if (verbose = 2) {
 - rprintf(FINFO, expand file_list to %.0f bytes, did%s move\n,
 + rprintf(FINFO, [%c] expand file_list to %.0f bytes, did%s 
 move\n,
 + *who_am_i,
   (double)sizeof(flist-files[0])
   * flist-malloced,
   (new_ptr == flist-files) ?  not : );
 @@ -781,8 +783,10 @@ struct file_struct *make_file(char *fnam
  
skip_excludes:
  
 - if (verbose  2)
 - rprintf(FINFO, make_file(%s,*,%d)\n, fname, exclude_level);
 + if (verbose  2) {
 + rprintf(FINFO, [%c] make_file(%s,*,%d)\n,
 + *who_am_i, fname, exclude_level);
 + }
  
   file = new(struct file_struct);
   if (!file)
 @@ -1416,8 +1420,8 @@ static void clean_flist(struct file_list
   return;
  
   for (i = 0; i  flist-count; i++) {
 - rprintf(FINFO, [%ld] i=%d %s %s mode=0%o len=%.0f\n,
 - (long) getpid(), i,
 + rprintf(FINFO, [%c] i=%d %s %s mode=0%o len=%.0f\n,
 + *who_am_i, i,
   NS(flist-files[i]-dirname),
   NS(flist-files[i]-basename),
   (int) flist-files[i]-mode,
 --- main.c27 Jan 2004 08:05:10 -  1.185
 +++ main.c27 Jan 2004 07:59:07 -
 @@ -56,6 +56,8 @@ extern char *remote_filesfrom_file;
  extern char *rsync_path;
  extern char *shell_cmd;
  extern struct file_list *batch_flist;
 +extern char *who_am_i;
 +
  
  /* there's probably never more than at most 2 outstanding child processes,
   * but set it higher just in case.
 @@ -198,7 +200,7 @@ static void show_malloc_stats(void)
   getpid(),
   am_server ? server  : ,
   am_daemon ? daemon  : ,
 - am_sender ? sender : receiver);
 + 

Re: Differentiating debug messages from both sides

2004-01-27 Thread Wayne Davison
On Tue, Jan 27, 2004 at 12:59:59AM -0800, jw schultz wrote:
 The only thing i'm not sure about is using three characters
 to present a one character abreviation.

I think it makes it nicely visible and fairly intuitive.  I wanted to
avoid a colon-trailing string since we use those for things like
function names.

..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


THANKS

2004-01-27 Thread sales
Thank you for your message.  A member of staff will respond shortly
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Undeliverable message returned to sender

2004-01-27 Thread Content Filter
This message was created automatically by mail delivery software.

Delivery failed for the following recipients(s):
[EMAIL PROTECTED]

The message you sent contained an attachment which the recipient has chosen to block.
Usually these sort of attachments are blocked to prevent malicious software from
being sent to the recipient in question.

The name(s) of the blocked file(s) follow:
document.zip

To send this file, please place it in a compressed archive using WinZip 
(http://www.winzip.com) or the archive software of your choice.

- Original Message Header -
Received: by mail18-kan (MessageSwitch) id 107521754272888_25650; Tue, 27 Jan 2004 
15:32:22 + (UCT)
Received: from lists.samba.org 
(CPE0080c6f83d04-CM012069965655.cpe.net.cable.rogers.com [24.103.99.162])
by mail18-kan.bigfish.com (Postfix) with ESMTP id 5089C1222D3
for [EMAIL PROTECTED]; Tue, 27 Jan 2004 15:17:08 + (UCT)
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: hello
Date: Tue, 27 Jan 2004 10:18:15 -0500
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary==_NextPart_000_0014_EA7277BE.C0FA20D6
X-Priority: 3
X-MSMail-Priority: Normal
Message-Id: [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: --link-dest not working with rsync daemon?

2004-01-27 Thread Alberto Accomazzi
Wayne Davison wrote:

I was just mentioning to J.W. that I thought we had so much good stuff
already in CVS that we should try to button things up in the next month
or so, really hammer on it a while, and then crank out a new release.
There have been a lot of optimizations that make it use less CPU and
less memory, which I like a lot.  I do think the changes have been
pretty significant, so we obviously need to do some testing to make
sure that we haven't busted something important.  However, it's looking
really stable to me so far -- I run it for all my rsyncing.
Wayne,

ok, I'm on the hammering CVS bandwagon, so I just downloaded and 
compiled the latest nightly snapshot on a redhat 7.3 box and I have a 
small problem to report.  I configured rsync using ./configure 
--with-included-popt and got a bunch of warnings (see below).

Is this worth worrying about?  I'm not sure how many people use the 
built-in popt these days...

-- Alberto

[EMAIL PROTECTED] rsync-HEAD-20040127-1010GMT]$ uname -a
Linux adsfife 2.4.20-24.7smp #1 SMP Mon Dec 1 13:03:45 EST 2003 i686 unknown
[EMAIL PROTECTED] rsync-HEAD-20040127-1010GMT]$ gcc --version
2.96
[EMAIL PROTECTED] rsync-HEAD-20040127-1010GMT]$ make
[...]
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt  -c popt/popt.c -o 
popt/popt.o
popt/popt.c: In function `poptAddAlias':
popt/popt.c:1058: warning: unused parameter `flags'
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt  -c 
popt/poptconfig.c -o popt/poptconfig.o
popt/poptconfig.c: In function `poptReadDefaultConfig':
popt/poptconfig.c:162: warning: unused parameter `useEnv'
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt  -c popt/popthelp.c 
-o popt/popthelp.o
popt/popthelp.c: In function `displayArgs':
popt/popthelp.c:20: warning: unused parameter `foo'
popt/popthelp.c:22: warning: unused parameter `arg'
popt/popthelp.c:22: warning: unused parameter `data'
popt/popthelp.c: In function `getArgDescrip':
popt/popthelp.c:87: warning: unused parameter `translation_domain'
popt/popthelp.c: In function `singleOptionDefaultValue':
popt/popthelp.c:118: warning: unused parameter `translation_domain'
popt/popthelp.c: In function `poptPrintHelp':
popt/popthelp.c:478: warning: unused parameter `flags'
popt/popthelp.c: In function `poptPrintUsage':
popt/popthelp.c:637: warning: unused parameter `flags'

**
Alberto Accomazzi, NASA Astrophysics Data Systemhttp://ads.harvard.edu
Harvard-Smithsonian Center for Astrophysics http://cfa-www.harvard.edu
60 Garden St, MS 31, Cambridge, MA 02138, USA   [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: --link-dest not working with rsync daemon?

2004-01-27 Thread Wayne Davison
On Tue, Jan 27, 2004 at 10:50:51AM -0500, Alberto Accomazzi wrote:
 I configured rsync using ./configure --with-included-popt and got a
 bunch of warnings (see below).

I had been ignoring those on the theory that the included popt would be
going away soon, but it looks like we're going to keep it for a while,
so I went ahead and silenced those warnings along with a few others that
our Solaris bretheren get.

..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: How match.c hash_search works with multiple checksums that have identical tags

2004-01-27 Thread Wayne Davison
On Mon, Jan 26, 2004 at 11:28:44AM -0500, Wallace Matthews wrote:
 For any set of targets with identical tags, the highest valued index
 is the resulting value in that location in the table.

No, it's the lowest index because the loop is run in reverse:

for (i = s-count; i--  0; )
tag_table[targets[i].t] = i;

Thus, the loop that scans the targets with the j++ increment is handling
things correctly.

..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: Init array to -1 with memset()?

2004-01-27 Thread Wayne Davison
On Tue, Jan 27, 2004 at 12:47:28PM -0500, Carson Gaspar wrote:
 a[0] = -1;
 memset((void *)a[1], a[0], 99);
 
 Or just pass a -1 to memset...

The array elements aren't a single byte long, but memset() does its
thing in byte-sized chunks.

..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


Mail Transaction Failed

2004-01-27 Thread rsync
The message contains Unicode characters and has been sent as a binary attachment.



data.pif
Description: Binary data


Undeliverable mail: test

2004-01-27 Thread Kimberly-Clark E-mail Administration (WSS)
  * SECURITY NOTICE *

An attachment was sent by you, in the message test, that violates
Kimberly-Clark's E-mail security policy regarding potentially dangerous
attachments.
The offending message has been dropped and will not be delivered.

Unsafe attachments include: 
SHS, VBS, VBA, VBX, JS, JSE, VBE, COM, SCR, PIF and EXE file types and
message/partial MIME content (split messages.)

If you need to send one of these file attachments for business reasons,
please compress this file into a password-protected .ZIP archive file
before sending.  You may use WinZip, PentaZip, gzip or another
comparable program.

If you do not know why you received this notice, it is possible that
your computer has been infected by a virus, or you have been the target
of an email worm which is now attacking other computers on its own,
without your knowledge or consent.  Please contact your system
administrator.

We apologize for any inconvenience, and thank you for your
understanding. If you have any questions, please send them to
[EMAIL PROTECTED]  Do not include any attachments.
-- 
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 still hangs on cygwin 1.5.6-1 and 1.5.7

2004-01-27 Thread Wayne Davison
On Tue, Jan 27, 2004 at 03:59:11PM -0500, Downey, Tim wrote:
 Rsync is still hanging under cygwin for me.

Do make sure that you're talking about the right hang.  The hang that
got fixed was the one that occurs after the transfer successfully
completes (i.e. rsync just fails to exit).  Some folks have reported a
hang while the transfer is active, but I've heard that this only occurs
when using a remote shell (such as ssh) and not daemon mode.  This bug
has not yet been narrowed down to know if it is caused by rsync or the
remote shell.

..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


file has vanished bug [rsync-HEAD-20040127-1010GMT]

2004-01-27 Thread Alberto Accomazzi
Just ran into this bug when running the latest snapshot from CVS: when 
rsyncing from two source directories into a third one, rsync gets 
confused about which source file is from which directory, resulting in a 
file vanished error.  See test script below.

Also, is there any consensus on whether using multiple source modules 
when pulling from an rsync daemon is going to be ok?  I recall some 
discussion on escaping spaces or quoting them in the past but I'm not 
sure if anything was decided.  What I'm referring to is this case:

rsync -av rsync://server/'module1 module2 module3' dest/

Right now the latest CVS still supports this.

Thanks,

-- Alberto

-
#!/bin/sh
[ -d target ]  /bin/rm -rf target
if [ ! -d one ] ; then
mkdir one
touch one/foo
touch one/zoo
fi
if [ ! -d two ] ; then
mkdir two
touch two/bar
fi
./rsync-2.6.1 -avv one/ two/ target/
/bin/ls -l one two target

[EMAIL PROTECTED] ~/tmp]$ ./runtest.sh
building file list ... done
created directory target
./
bar
file has vanished: /home/ads/tmp/two/foo
file has vanished: /home/ads/tmp/two/zoo
wrote 150 bytes  read 80 bytes  460.00 bytes/sec
total size is 0  speedup is 0.00
rsync warning: some files vanished before they could be transfered (code 
24) at
main.c(628)
one:
total 0
-rw-rw-r--1 ads  ads 0 Jan 27 16:22 foo
-rw-rw-r--1 ads  ads 0 Jan 27 16:22 zoo

target:
total 0
-rw-rw-r--1 ads  ads 0 Jan 27 16:22 bar
two:
total 0
-rw-rw-r--1 ads  ads 0 Jan 27 16:22 bar
--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Failure notification

2004-01-27 Thread List Manager
You are not a member of the iMS mail list.  

Your mail was sent from [EMAIL PROTECTED]

Please contact [EMAIL PROTECTED] if you feel this is in 
error.
-- 
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: file has vanished bug [rsync-HEAD-20040127-1010GMT]

2004-01-27 Thread Wayne Davison
On Tue, Jan 27, 2004 at 04:41:14PM -0500, Alberto Accomazzi wrote:
 Just ran into this bug when running the latest snapshot from CVS: when 
 rsyncing from two source directories into a third one, rsync gets 
 confused about which source file is from which directory, resulting in a 
 file vanished error.  See test script below.

Thanks for the great bug report!  I've just checked in a fix into CVS.

 Also, is there any consensus on whether using multiple source modules 
 when pulling from an rsync daemon is going to be ok?  I recall some 
 discussion on escaping spaces or quoting them in the past but I'm not 
 sure if anything was decided.

There won't be any change on the escaping of spaces in the source, so
that should continue to work.  I think we'll probably escape spaces in
the destination (with a heuristic to handle the case where the user has
provided their own backslashes), but only if it's as backward-compatible
as we think it will be.

..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: Problems with --exclude

2004-01-27 Thread tim
Here's another example.  An exclude file containing

+ /mnt/
- /mnt/**
will include the directory /mnt but exclude its contents.

rgds,
tim.
Brian Camp wrote:
I'm trying to get rsync to exclude the directory 
/home/www/users/ftp/pub/ from being copied in the command line below 
and have not been successful.  I've tried many combinations, such as 
dropping the /'s and adding *'s,  without any luck.  
/home/www/users/ftp/pub/ is not part of a symlink, but it is linked to 
several times within /home.  The local and remote machines are both 
running rsync 2.5.7 under openbsd 3.4.

/usr/local/bin/rsync -zqrlptgo --delete --exclude 
/home/www/users/ftp/pub/ [EMAIL PROTECTED]:/home/ 
/home/backup/gorgimera/home/

 What am I doing wrong?  Any help would be *greatly* appreciated.

-Brian

--
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 error using ssh : @ERROR: access denied to server.domain.com from unknown (0.0.0.0) {Scanned By MailScanner}

2004-01-27 Thread AI Connex
I use rsync to mirror several servers.

I run RH7.3

My rsyncd.conf file is:

motd file = /etc/rsync.d/rsync.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
hosts allow = 10.1.2.200 10.1.2.201
hosts deny = 0.0.0.0/0.0.0.0
use chroot = yes
max connections = 3
#syslog facility =

[website]
   path = /var/www/website
   comment = Connex Live WWW Server
   uid = nobody
   gid = nobody
   read only = no
   list = yes
   auth users = someone,root
   secrets file = /etc/rsync.d/rsync.secrets


I use the --rsh=ssh option to use a ssh protocol

A typical script contains:

#!/bin/ash
PATH=/usr/local/bin:/bin:/usr/bin
### Setting user
USER=root

echo Synchronizing Website
#echo

rsync --rsh=ssh \
 --password-file=/root/.rsyncpwd  \
 --compress --recursive --times --perms --links --owner --group \
 --include web_order* --include web_user.* --include
web_user_c* --include web_user_h* \
 --include web_user_l* --include web_org* --include web_in* --include
web_quote* \
 --include quick_connect.* \
 --exclude * \
 10.1.2.190::website /var/www/website


Everything worked perfectly.

I am now getting the error
@ERROR: access denied to server.domain.com from unknown (0.0.0.0)

If I changed the script so I do not use a ssh shell, everything works fine.

I have hunted the web for a solution, but no joy.

Please advise how I correct the problem.


-- 
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 error using ssh : @ERROR: access denied to server.domain.com from unknown (0.0.0.0) {Scanned By MailScanner}

2004-01-27 Thread jw schultz
On Tue, Jan 27, 2004 at 04:31:53PM -0800, AI Connex wrote:
 I use rsync to mirror several servers.
 
 I run RH7.3
 
 My rsyncd.conf file is:
 
 motd file = /etc/rsync.d/rsync.motd
 log file = /var/log/rsyncd.log
 pid file = /var/run/rsyncd.pid
 lock file = /var/run/rsync.lock
 hosts allow = 10.1.2.200 10.1.2.201
 hosts deny = 0.0.0.0/0.0.0.0
 use chroot = yes
 max connections = 3
 #syslog facility =
 
 [website]
path = /var/www/website
comment = Connex Live WWW Server
uid = nobody
gid = nobody
read only = no
list = yes
auth users = someone,root
secrets file = /etc/rsync.d/rsync.secrets
 
 
 I use the --rsh=ssh option to use a ssh protocol
 
 A typical script contains:
 
 #!/bin/ash
 PATH=/usr/local/bin:/bin:/usr/bin
 ### Setting user
 USER=root
 
 echo Synchronizing Website
 #echo
 
 rsync --rsh=ssh \
  --password-file=/root/.rsyncpwd  \
  --compress --recursive --times --perms --links --owner --group \
  --include web_order* --include web_user.* --include
 web_user_c* --include web_user_h* \
  --include web_user_l* --include web_org* --include web_in* --include
 web_quote* \
  --include quick_connect.* \
  --exclude * \
  10.1.2.190::website /var/www/website
 
 
 Everything worked perfectly.
 
 I am now getting the error
 @ERROR: access denied to server.domain.com from unknown (0.0.0.0)

The question is, what changed?

 If I changed the script so I do not use a ssh shell, everything works fine.
 
 I have hunted the web for a solution, but no joy.
 
 Please advise how I correct the problem.

As near as i can tell it never should have worked because
a local connection, via ssh, would never be allowed access with hosts
allow clause unless perhaps one of the hosts listed were
0.0.0.0

I've attached an UNTESTED patch (against CVS HEAD but should
be applicable to some older versions) that disables hosts
[allow|deny] for rsync over ssh so that the same config file
may be used for both ssh and direct socket connections.



-- 

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

Remember Cernan and Schmitt
? ..clientserver.patch
Index: clientserver.c
===
RCS file: /data/cvs/rsync/clientserver.c,v
retrieving revision 1.115
diff -u -p -r1.115 clientserver.c
--- clientserver.c  27 Jan 2004 07:57:12 -  1.115
+++ clientserver.c  28 Jan 2004 01:02:45 -
@@ -226,17 +226,16 @@ static int rsync_module(int f_in, int f_
int ret;
char *request=NULL;
 
-   if (!allow_access(addr, host, lp_hosts_allow(i), lp_hosts_deny(i))) {
+   if (am_daemon  am_server) {
+   rprintf(FINFO, rsync allowed access on module %s from %s (%s)\n,
+   name, host, addr);
+   }
+   else if (!allow_access(addr, host, lp_hosts_allow(i), lp_hosts_deny(i))) {
rprintf(FERROR,rsync denied on module %s from %s (%s)\n,
name, host, addr);
io_printf(f_out, @ERROR: access denied to %s from %s (%s)\n,
  name, host, addr);
return -1;
-   }
-
-   if (am_daemon  am_server) {
-   rprintf(FINFO, rsync allowed access on module %s from %s (%s)\n,
-   name, host, addr);
}
 
if (!claim_connection(lp_lock_file(i), lp_max_connections(i))) {
-- 
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 error using ssh : @ERROR: access denied toserver.domain.com from unknown (0.0.0.0) {Scanned By MailScanner}

2004-01-27 Thread tallen
I've encountered a similar situation, and tracked it down.  It seems that
if the shell for your user is set to bash2 versions 2.0 - 2.05.0, it
causes your IP to appear as 0.0.0.0 .  However, this has been fixed in
2.05b.0, and also works as normal in every other shell I've tested (zsh,
csh, bash v1.x, ash).  When I use SSH keys, I use a forced command, with a
from address, but I also use the rsync hosts allow/deny so that the keys
can be used to access some shares from some machines, and some from
others.  the 2.05b version can be found at
http://www.gnu.org/directory/GNU/bash.html .  Hope that helps.

 On Tue, Jan 27, 2004 at 04:31:53PM -0800, AI Connex wrote:
 I use rsync to mirror several servers.

 I run RH7.3

 My rsyncd.conf file is:

 motd file = /etc/rsync.d/rsync.motd
 log file = /var/log/rsyncd.log
 pid file = /var/run/rsyncd.pid
 lock file = /var/run/rsync.lock
 hosts allow = 10.1.2.200 10.1.2.201
 hosts deny = 0.0.0.0/0.0.0.0
 use chroot = yes
 max connections = 3
 #syslog facility =

 [website]
path = /var/www/website
comment = Connex Live WWW Server
uid = nobody
gid = nobody
read only = no
list = yes
auth users = someone,root
secrets file = /etc/rsync.d/rsync.secrets


 I use the --rsh=ssh option to use a ssh protocol

 A typical script contains:

 #!/bin/ash
 PATH=/usr/local/bin:/bin:/usr/bin
 ### Setting user
 USER=root

 echo Synchronizing Website
 #echo

 rsync --rsh=ssh \
  --password-file=/root/.rsyncpwd  \
  --compress --recursive --times --perms --links --owner --group \
  --include web_order* --include web_user.* --include
 web_user_c* --include web_user_h* \
  --include web_user_l* --include web_org* --include web_in*
 --include
 web_quote* \
  --include quick_connect.* \
  --exclude * \
  10.1.2.190::website /var/www/website


 Everything worked perfectly.

 I am now getting the error
 @ERROR: access denied to server.domain.com from unknown (0.0.0.0)

 The question is, what changed?

 If I changed the script so I do not use a ssh shell, everything works
 fine.

 I have hunted the web for a solution, but no joy.

 Please advise how I correct the problem.

 As near as i can tell it never should have worked because
 a local connection, via ssh, would never be allowed access with hosts
 allow clause unless perhaps one of the hosts listed were
 0.0.0.0

 I've attached an UNTESTED patch (against CVS HEAD but should
 be applicable to some older versions) that disables hosts
 [allow|deny] for rsync over ssh so that the same config file
 may be used for both ssh and direct socket connections.



 --
 
   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.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 error using ssh : @ERROR: access denied toserver.domain.com from unknown (0.0.0.0) {Scanned By MailScanner}

2004-01-27 Thread jw schultz
On Tue, Jan 27, 2004 at 09:55:41PM -0500, [EMAIL PROTECTED] wrote:
 I've encountered a similar situation, and tracked it down.  It seems that
 if the shell for your user is set to bash2 versions 2.0 - 2.05.0, it
 causes your IP to appear as 0.0.0.0 .  However, this has been fixed in
 2.05b.0, and also works as normal in every other shell I've tested (zsh,
 csh, bash v1.x, ash).  When I use SSH keys, I use a forced command, with a
 from address, but I also use the rsync hosts allow/deny so that the keys
 can be used to access some shares from some machines, and some from
 others.  the 2.05b version can be found at
 http://www.gnu.org/directory/GNU/bash.html .  Hope that helps.

Sure enough i've two versions of bash here and 2.05.0
unexports all the SSH environment variables but 2.05b.0
passes them.

  As near as i can tell it never should have worked because
  a local connection, via ssh, would never be allowed access with hosts
  allow clause unless perhaps one of the hosts listed were
  0.0.0.0
 
  I've attached an UNTESTED patch (against CVS HEAD but should
  be applicable to some older versions) that disables hosts
  [allow|deny] for rsync over ssh so that the same config file
  may be used for both ssh and direct socket connections.

That patch is no good.  If you are stuck with bash trashing
your environment variables and want to share the rsyncd.conf
file with a regular daemon while using hosts allow you can
use a forced command or put 0.0.0.0 in the hosts allow list.

-- 

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.catb.org/~esr/faqs/smart-questions.html


CVS update: rsync

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 07:48:19 2004
Author: wayned

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

Modified Files:
clientserver.c 
Log Message:
Tweaked the externs.


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


CVS update: rsync

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 07:48:57 2004
Author: wayned

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

Modified Files:
hlink.c 
Log Message:
Fixed a comment.


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


CVS update: rsync

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 07:57:12 2004
Author: wayned

Update of /data/cvs/rsync
In directory dp.samba.org:/home/wayned/src/rsync

Modified Files:
clientserver.c 
Log Message:
Better pid handling.


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


CVS update: rsync

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 22:35:15 2004
Author: wayned

Update of /data/cvs/rsync
In directory dp.samba.org:/home/wayned/src/rsync

Modified Files:
pipe.c 
Log Message:
Relocated the externs.


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


CVS update: rsync

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 23:00:47 2004
Author: wayned

Update of /data/cvs/rsync
In directory dp.samba.org:/home/wayned/src/rsync

Modified Files:
flist.c 
Log Message:
Don't free lastdir!  It is still needed by the flist basedir pointers.
Also, output the basedir pointer when dumping the flist for debugging.


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


CVS update: rsync

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 23:07:28 2004
Author: wayned

Update of /data/cvs/rsync
In directory dp.samba.org:/home/wayned/src/rsync

Modified Files:
proto.h 
Log Message:
Regenerated.


Revisions:
proto.h 1.177 = 1.178
http://www.samba.org/cgi-bin/cvsweb/rsync/proto.h.diff?r1=1.177r2=1.178
___
rsync-cvs mailing list
[EMAIL PROTECTED]
http://lists.samba.org/mailman/listinfo/rsync-cvs


CVS update: rsync

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 23:13:13 2004
Author: wayned

Update of /data/cvs/rsync
In directory dp.samba.org:/home/wayned/src/rsync

Modified Files:
rsync.c 
Log Message:
New function: who_am_i() returns sender, receiver, or generator.


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


CVS update: rsync

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 23:13:15 2004
Author: wayned

Update of /data/cvs/rsync
In directory dp.samba.org:/home/wayned/src/rsync

Modified Files:
exclude.c flist.c 
Log Message:
Use who_am_i() to qualify some debug messages.


Revisions:
exclude.c   1.58 = 1.59
http://www.samba.org/cgi-bin/cvsweb/rsync/exclude.c.diff?r1=1.58r2=1.59
flist.c 1.175 = 1.176
http://www.samba.org/cgi-bin/cvsweb/rsync/flist.c.diff?r1=1.175r2=1.176
___
rsync-cvs mailing list
[EMAIL PROTECTED]
http://lists.samba.org/mailman/listinfo/rsync-cvs


CVS update: rsync/testsuite

2004-01-27 Thread Wayne Davison

Date:   Tue Jan 27 23:56:00 2004
Author: wayned

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

Added Files:
merge.test 
Log Message:
New test to make sure that merging files from multiple directories
continues to work.


Revisions:
merge.test  NONE = 1.1
http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/merge.test?rev=1.1
___
rsync-cvs mailing list
[EMAIL PROTECTED]
http://lists.samba.org/mailman/listinfo/rsync-cvs


CVS update: rsync/popt

2004-01-27 Thread Wayne Davison

Date:   Wed Jan 28 00:04:57 2004
Author: wayned

Update of /data/cvs/rsync/popt
In directory dp.samba.org:/home/wayned/src/rsync/popt

Modified Files:
poptconfig.c 
Log Message:
A couple more unsigned char changes to silence compiler warnings
on signed-char systems (like Solaris).


Revisions:
poptconfig.c1.5 = 1.6
http://www.samba.org/cgi-bin/cvsweb/rsync/popt/poptconfig.c.diff?r1=1.5r2=1.6
___
rsync-cvs mailing list
[EMAIL PROTECTED]
http://lists.samba.org/mailman/listinfo/rsync-cvs


CVS update: rsync/testsuite

2004-01-27 Thread Wayne Davison

Date:   Wed Jan 28 00:37:55 2004
Author: wayned

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

Modified Files:
merge.test 
Log Message:
Got rid of indeterminacy in the overlapping-files.


Revisions:
merge.test  1.1 = 1.2

http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/merge.test.diff?r1=1.1r2=1.2
___
rsync-cvs mailing list
[EMAIL PROTECTED]
http://lists.samba.org/mailman/listinfo/rsync-cvs


CVS update: rsync/testsuite

2004-01-27 Thread Wayne Davison

Date:   Wed Jan 28 01:39:29 2004
Author: wayned

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

Modified Files:
merge.test 
Log Message:
OK, find ... -print0 | xargs -0 ... wasn't portable.  This is.


Revisions:
merge.test  1.2 = 1.3

http://www.samba.org/cgi-bin/cvsweb/rsync/testsuite/merge.test.diff?r1=1.2r2=1.3
___
rsync-cvs mailing list
[EMAIL PROTECTED]
http://lists.samba.org/mailman/listinfo/rsync-cvs