DO NOT REPLY [Bug 5108] --delete causes: segfault at 00000000fffffff9 rip 00002af8229bb6ab rsp 00007fff88788830 error 4

2007-11-27 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5108





--- Comment #2 from [EMAIL PROTECTED]  2007-11-27 02:06 CST ---
hunter[15]$ gdb rsync
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as x86_64-linux-gnu...
(no debugging symbols found)
Using host libthread_db library /lib/libthread_db.so.1.
(gdb) set follow-fork-mode ask
Undefined item: ask.
(gdb) set follow-fork-mode ask
Undefined item: ask.
(gdb) catch fork
Catchpoint 1 (fork)
(gdb) r  -aAH --delete . /tmp/gwk
Starting program: /usr/bin/rsync -aAH --delete . /tmp/gwk
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Catchpoint 1 (forked process 8329), 0x2b808e33b3ab in fork () from
/lib/libc.so.6
(gdb) set follow-fork-mode child
(gdb) c
Continuing.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Switching to process 8329]

Catchpoint 1 (forked process 8334), 0x2b808e33b3ab in fork () from
/lib/libc.so.6
(gdb) set follow-fork-mode parent
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x2b808e3166ab in free () from /lib/libc.so.6
(gdb) where
#0  0x2b808e3166ab in free () from /lib/libc.so.6
#1  0x00424d51 in ?? ()
#2  0x00425225 in ?? ()
#3  0x0041fe98 in ?? ()
#4  0x00404da6 in ?? ()
#5  0x0041f638 in ?? ()
#6  0x00407ce5 in ?? ()
#7  0x004107fd in ?? ()
#8  0x00410f59 in ?? ()
#9  0x00411fc5 in ?? ()
#10 0x00426f45 in ?? ()
#11 0x004118d3 in ?? ()
#12 0x2b808e2beb44 in __libc_start_main () from /lib/libc.so.6
#13 0x00403bc9 in ?? ()
#14 0x7fff1ce323c8 in ?? ()
#15 0x in ?? ()
(gdb) 

It appears there are no symbols.  Where can I get a version of rsync
that contains symbols?  I'm running Ubuntu 7.10.  All I could find at the
rsync site was RPMs.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Permission denied when running from xinetd

2007-11-27 Thread Ron Yorston
Matt McCutchen [EMAIL PROTECTED] wrote:
On Sun, 2007-11-25 at 17:37 -0500, [EMAIL PROTECTED] wrote:
 When I run rsyncd from xinetd and try to rsync I will get permission
 denied error:
 
 rsync: chdir /home/test failed : Permission denied (13)

That's very bizarre, since the daemon is ostensibly running as root and
the permissions on /home/test clearly should allow the chdir.

Hmm.  Bizarre things happening when root and different behaviour when run
as a daemon versus from the command line.  Those are the sort of symptoms
one gets from SELinux denials.  Is SELinux enabled on this system?

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


Syncing to multiple servers

2007-11-27 Thread Pournaris Charalampos

Helle everyone,

Let's say we have 3 servers, 2 of them have the latest (stable) version 
of rsyncd running (2.6.9)


Server1 == I N T E R N E T == Server2 (rsyncd running)  == LAN 
== Server3 (rsyncd running)


Suppose I want to send a big file (bigfile.big) from Server1 to both 
Server2 and Server3. It would be a good idea to send first from Server1 
- Server2 and then from Server2 - Server3 to avoid sending the same 
files over the internet (Server2  3 are in a Lan and Server 3 is a 
replicate of server 2).


Is there a way to send first to Server2 from Server1 and after the rsync 
is finished to start syncing from Server2 to Server3 extacly the same 
files with the same options ?


I tried the post-xfer exec and pre-xfer exec options in the rsyncd.conf 
file but there is no way to get the original sync folder 
(/home/./bigfile.big in the following example).


Example:

Server1: rsync -avzR /home/./bigfile.big  Server2::home --progress --delete
 Syncing ..
Sync done, start internal  (lan) sync: Server2:  rsync -avzR 
/home/./bigfile.big  Server3::home --progress --delete


Thanks for your time

--
Charalampos Pournaris
[EMAIL PROTECTED]

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


Re: Syncing to multiple servers

2007-11-27 Thread Fabian Cenedese
At 14:46 27.11.2007 +0200, Pournaris Charalampos wrote:
Is there a way to send first to Server2 from Server1 and after the rsync is 
finished to start syncing from Server2 to Server3 extacly the same files with 
the same options ?

I tried the post-xfer exec and pre-xfer exec options in the rsyncd.conf file 
but there is no way to get the original sync folder (/home/./bigfile.big in 
the following example).

Example:

Server1: rsync -avzR /home/./bigfile.big  Server2::home --progress --delete
 Syncing ..
Sync done, start internal  (lan) sync: Server2:  rsync -avzR 
/home/./bigfile.big  Server3::home --progress --delete

Just thinking, I haven't tried this. You can specify the binary that is called
on the remote side if you go with SSH. Like that you could create a
script file that syncs from 2 to 3 and call that from 1 after you have finished
synching from 1 to 2. The script itself sits and runs on 2.
If 3 is a mirror of 2 you don't need exactly the same options as you used
for synching from 1 to 2, just create an exact copy (-a --delete etc).

bye   Fabi


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


DO NOT REPLY [Bug 5108] --delete causes: segfault at 00000000fffffff9 rip 00002af8229bb6ab rsp 00007fff88788830 error 4

2007-11-27 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5108





--- Comment #3 from [EMAIL PROTECTED]  2007-11-27 07:45 CST ---
To get the symbols: https://wiki.ubuntu.com/DebuggingProgramCrash .  I found
this by Googling ubuntu debug info and following a few links.

The free suggests that the crash you are seeing may actually be the same one
discussed in the thread I linked, which has been fixed in the development
version of rsync.  Please try again with the latest development version of
rsync.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Number of Files Transferred Seems Wrong

2007-11-27 Thread Jon
Hi All,

This is a continuation of a thread I started some time ago at
http://www.mail-archive.com/rsync@lists.samba.org/msg19852.html

The first occurrence of this problem seems to have just gone away and
all was good for a week or so. I have now seen this same behaviour
again, though.

I'm not sure where the logs went so sadly I cannot provide output from
rsync, but the problem is roughly the same as before in that the
'Number of files trasferred entry provided by the --stats switch is
incorrect.

During testing, I completely removed everything from my testing dir
and then ran an rsync into it from another directory on the same
machine into this directory. When the transfer was complete, I had the
entire /etc /var and /root dirs in my testing directory and the file
space totalled a little over 1GB. The report generated by the --stats
switch showed something like 35,000 files as the Number of files but
only 2 were indicated as transferred under the Number of files
transferred item of the same report.

I know this number is wrong as there was nothing in my testing dir and
now there are the entire contents of the /etc, /var and /root dir, but
I don't know why the Number of files transferred is incorrect.

Can someone shed some light for me on exactly how the 'Number of files
transferred' number is arrived at? Perhaps it's not at cut and dried
as I think.

Thanks

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


DO NOT REPLY [Bug 5108] --delete causes: segfault at 00000000fffffff9 rip 00002af8229bb6ab rsp 00007fff88788830 error 4

2007-11-27 Thread samba-bugs
https://bugzilla.samba.org/show_bug.cgi?id=5108





--- Comment #4 from [EMAIL PROTECTED]  2007-11-27 09:18 CST ---
Trying with rsync 3.0.0pre5 built locally, I get:

hunter[32]$ rsync -aAH --delete . /tmp/gwk
rsync: ACLs are not supported on this client
rsync error: syntax or usage error (code 1) at main.c(1441) [client=3.0.0pre5]

So... I run w/o -A, and then it succeeds.

Now... if I run the Ubuntu version (2.6.9) w/o -A, then it _also_ succeeds. :-)

So in the end the segfault was just a funny way of telling me it did not
have ACL support?  Bah.  (I don't need ACL support.  I had simply copied
the invocation incantation somewhere else.)

Thanks for the help.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the QA contact for the bug, or are watching the QA contact.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Number of Files Transferred Seems Wrong

2007-11-27 Thread Matt McCutchen
On Tue, 2007-11-27 at 10:11 -0400, Jon wrote:
 During testing, I completely removed everything from my testing dir
 and then ran an rsync into it from another directory on the same
 machine into this directory. When the transfer was complete, I had the
 entire /etc /var and /root dirs in my testing directory and the file
 space totalled a little over 1GB. The report generated by the --stats
 switch showed something like 35,000 files as the Number of files but
 only 2 were indicated as transferred under the Number of files
 transferred item of the same report.
 
 I know this number is wrong as there was nothing in my testing dir and
 now there are the entire contents of the /etc, /var and /root dir, but
 I don't know why the Number of files transferred is incorrect.

That is very odd, but I can't do much to troubleshoot it from the
information you gave.  Please repeat this procedure but pass -vvii to
rsync to get more information, and post your command line and the
resulting log.

 Can someone shed some light for me on exactly how the 'Number of files
 transferred' number is arrived at? Perhaps it's not at cut and dried
 as I think.

It is the number of regular files in the file list whose data is
transferred from sender to receiver either in full or using the
delta-transfer algorithm.  Once rsync decides to transfer a file, the
transfer counts even if the data was already identical.  The statistic
includes exactly those files whose itemize codes begin with  or
 (indicating a transfer) in the -i output.

Matt

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


Rsync-daemon security advisories for writable daemons

2007-11-27 Thread Wayne Davison
There are two security advisories for people who run a writable rsync
daemon.  One affects only those with use chroot = no (which is not a
very safe combination in general), and one affects a daemon that has
daemon-excluded files that are being hidden in a module's hierarchy.
Included are simple config-change suggestions that should help you to
avoid the security issues.  These advisories affect all rsync versions.

Advisory #1:

If you are running a writable rsync daemon with use chroot = no, there
is at least one way for someone to trick rsync into creating a symlink
that points outside of the module's hierarchy.

This means that if you are allowing access from users who you don't
trust, that you should either figure out a way to turn on use chroot,
or configure the daemon to refuse the --links option (see refuse
options in the rsyncd.conf manpage) which will disable the ability of
the rsync module to receive symlinks.  After doing so, you should also
check that any existing symlinks in the daemon hierarchy are safe.

Starting with the 3.0.0-pre6 release, there will be a new daemon option
available: munge symlinks.  This will allow an rsync daemon to accept
symlinks and return them intact (with even a leading slash still there,
which is new for a non-chroot daemon), but will not allow the symlinks
to be used while they are in the daemon's hierarchy.  For those running
2.6.9, there is a patch to enable this option:

http://rsync.samba.org/ftp/rsync/munge-symlinks-2.6.9.diff

Any admin applying that patch should read the munge symlinks section
of the modified rsyncd.conf manpage for more information.  You can also
read about this option in the latest manpage from the dev version:

http://rsync.samba.org/ftp/rsync/nightly/rsyncd.conf.html

Advisory #2:

If you are running a writable rsync daemon that is using one of the
exclude, exclude from, or filter options in the rsyncd.conf file
to hide data from your users, you should be aware that there are tricks
that a user can play with symlinks and/or certain options that can allow
a user that knows the name of a hidden file to access it or overwrite it
(if file permissions allow that).

You can avoid the symlink problem using the suggestions for Advisory #1.

You can avoid the problems with other options by putting the following
refuse options setting into your rsyncd.conf file:

   refuse options = --*-dest --partial-dir --backup-dir

An upcoming release of rsync 3.0.0 will hopefully fix the daemon-exclude
validation of these options to make this unnecessary, but this has not
yet been implemented.

If you combine the above refuse options with the prior suggestion to
refuse --links, that would give you this list of options (included here
for easier copy/pasting):

   refuse options = --links --*-dest --partial-dir --backup-dir

Finally, a big thank you to Matt McCutchen for his security work in
discovering and reporting these problems, suggesting avoidance options,
and helping me to test my munge-symlinks patch.

..wayne..


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

Rsync stalls

2007-11-27 Thread Joe Demeny
I am trying to rsync a machine running CYGWIN_NT-5.2 server 1.5.24(0.156/4/2) 
to another which runs FreeBSD 6.2-STABLE; both with rsync 2.6.9.

I'm trying to pull the files from the Cygwin machine with:

/usr/local/bin/rsync -avz --delete --delete-excluded -e ssh 
[EMAIL PROTECTED]:/cygdrive/e/Shared /home/[host]

However, rsync stalls. This seems to be happening when there are some new 
large file(s) on [host] - or perhaps too many files? The total is about 30 GB 
and 55,000 files.

On the FreeBSD box the connection state is FIN_WAIT_1. On the Cygwin side the 
connection state is ESTABLISHED. The connections seem to be hanging around 
indefinitely.

If I push the files from the Cygwin machine, rsync runs fine and exits with 
no error.

How can I resolve this problem?

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


Re: Permission denied when running from xinetd

2007-11-27 Thread [EMAIL PROTECTED]
 Hmm.  Bizarre things happening when root and different behaviour when run
 as a daemon versus from the command line.  Those are the sort of symptoms
 one gets from SELinux denials.  Is SELinux enabled on this system?


I am not aware of SE linux running on this system unless centos is
enabling this by default. How do I check? (I know I should not ask...)

[EMAIL PROTECTED] ~]# uname -a
Linux centos1.tekran.com 2.6.18-8.el5 #1 SMP Thu Mar 15 19:57:35 EDT
2007 i686 i686 i386 GNU/Linux
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Permission denied when running from xinetd

2007-11-27 Thread [EMAIL PROTECTED]
On Nov 26, 2007 11:38 PM, Matt McCutchen [EMAIL PROTECTED] wrote:
 On Sun, 2007-11-25 at 17:37 -0500, [EMAIL PROTECTED] wrote:

 root.  Set a shell script like the following as the server in the
 xinetd configuration to verify that the daemon is running as root and to
 strace it to get more information about the failed chdir:

 #!/bin/bash
 echo $UID $EUID /tmp/rsync.ids
 exec strace -f -o /tmp/rsync.strace /usr/bin/rsync --daemon



I have set the script as server, here is the section  of strace output
for both scenarios:


xinetd:


11891 open(/etc/group, O_RDONLY)  = 4
11891 fcntl64(4, F_GETFD)   = 0
11891 fcntl64(4, F_SETFD, FD_CLOEXEC)   = 0
11891 fstat64(4, {st_mode=S_IFREG|0644, st_size=702, ...}) = 0
11891 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d04000
11891 read(4, root:x:0:root,rsync,henro\nbin:x:..., 4096) = 702
11891 close(4)  = 0
11891 munmap(0xb7d04000, 4096)  = 0
11891 chdir(/home/test)   = -1 EACCES (Permission denied)
11891 time(NULL)= 1196105171


standalone daemon:

11942 open(/etc/group, O_RDONLY)  = 4
11942 fcntl64(4, F_GETFD)   = 0
11942 fcntl64(4, F_SETFD, FD_CLOEXEC)   = 0
11942 fstat64(4, {st_mode=S_IFREG|0644, st_size=702, ...}) = 0
11942 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f8c000
11942 read(4, root:x:0:root,rsync,henro\nbin:x:..., 4096) = 702
11942 close(4)  = 0
11942 munmap(0xb7f8c000, 4096)  = 0
11942 chdir(/home/test)   = 0
11942 setgid32(0)   = 0
11942 setgroups32(1, [0])   = 0
11942 setuid32(0)   = 0
11942 geteuid32()   = 0
11942 select(7, NULL, [6], NULL, {60, 0}) = 1 (out [6], left {60, 0})
11942 write(6, @RSYNCD: OK\n, 12) = 12
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: Rsync stalls

2007-11-27 Thread Fabian Cenedese
At 16:33 27.11.2007 -0500, Joe Demeny wrote:
I am trying to rsync a machine running CYGWIN_NT-5.2 server 1.5.24(0.156/4/2) 
to another which runs FreeBSD 6.2-STABLE; both with rsync 2.6.9.

I'm trying to pull the files from the Cygwin machine with:

/usr/local/bin/rsync -avz --delete --delete-excluded -e ssh 
[EMAIL PROTECTED]:/cygdrive/e/Shared /home/[host]

However, rsync stalls. This seems to be happening when there are some new 
large file(s) on [host] - or perhaps too many files? The total is about 30 GB 
and 55,000 files.

On the FreeBSD box the connection state is FIN_WAIT_1. On the Cygwin side the 
connection state is ESTABLISHED. The connections seem to be hanging around 
indefinitely.

If I push the files from the Cygwin machine, rsync runs fine and exits with 
no error.

One thing is a possible interaction problem with cygwin's pipes (I think). There
are many others that have a rsync stall on cygwin, but nobody has yet found
out exactly where the problem lies or how to fix it.
The other possibility is an error in rsync that was fixed early 2007. If 
possible
please try the actual development version which is in last testing stage 
(3.0.0).
This has helped me with a stall I had.

bye  Fabi


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