[Bug 14183] New: rsync fails transferring only attributes for file without write permission

2019-11-05 Thread just subscribed for rsync-qa from bugzilla via rsync
https://bugzilla.samba.org/show_bug.cgi?id=14183

Bug ID: 14183
   Summary: rsync fails transferring only attributes for file
without write permission
   Product: rsync
   Version: 3.1.3
  Hardware: x64
OS: Mac OS X
Status: NEW
  Severity: normal
  Priority: P5
 Component: core
  Assignee: wa...@opencoder.net
  Reporter: bugzilla.samba@edp.org
QA Contact: rsync...@samba.org

When a file’s extended attributes have changed but its contents have not and
the user does not have write permission for the source file (irrespective of
the destination file permissions), rsync fails with a permission error from
lsetxattr.

Using rsync 3.1.3 on macOS 10.14.6, the output of these commands:

cd /var/tmp
mkdir stage
mkdir stage/{source,destination}
touch stage/source/foo
rsync -a --xattrs stage/source/ stage/destination/
xattr -w abc def stage/source/foo
chmod ugo-w stage/source/foo
rsync -a --xattrs stage/source/ stage/destination/

is:

rsync: rsync_xal_set:
lsetxattr("/private/var/tmp/stage/destination/foo","abc") failed: Permission
denied (13)
rsync error: some files/attrs were not transferred (see previous errors)
(code 23) at main.c(1189) [sender=3.1.3]

Note that if "echo ghi >stage/source/foo" is inserted after the first rsync,
the second rsync is perfectly happy to update the file, including the extended
attributes. Only when the extended attributes but not the contents are being
updated does rsync encounter the permissions problem.

These commands demonstrate the problem with both sides local, but it occurs
with a remote side as well.

This problem is not evident in the rsync 2.6.9 distributed by Apple with macOS.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Segmentation fault using rsync client on Android device

2019-11-05 Thread Robert Dailey via rsync
I've compiled rsync for my rooted Android (armeabi-v7a, 32-bit) device
using these instructions:

```
clone_or_update rsync master git://git.samba.org/rsync.git
cd rsync
./prepare-source
./configure \
   --prefix=$INSTALL_ROOT/rsync \
   --host=$AUTOCONF_PLATFORM \
   CFLAGS="$CFLAGS -static"
make -j8 && make install
cd -
```

Best place for instructions to build I could find were here:
https://stackoverflow.com/a/18032833/157971

I didn't get any compiler or linker errors. It seemed to work.

I copied the `bin/rsync` executable to the device in the `/data`
directory. I then executed this command:

```
./rsync - --stats --progress -rdt rsync://192.168.1.205:12000
```

I get this output:

```
opening tcp connection to 192.168.1.205 port 12000
Connected to 192.168.1.205 (192.168.1.205)
Segmentation fault
```

Not much to go on. I tried running the same command via rsync in
cygwin and it worked fine:

```
FILE_STRUCT_LEN=24, EXTRA_LEN=4
opening tcp connection to 192.168.1.205 port 12000
Connected to 192.168.1.205 (192.168.1.205)
msg checking charset: UTF-8
sending daemon args: --server --sender -tre.iLsfxC . /  (5 args)
ziosk   Ziosk Content Files
```

Can anyone help me understand why rsync is crashing on Android? Note
that I compiled rsync using the Android NDK (r20). I set up the
environment (CC, LD, etc) to point to the correct toolchain in the
NDK. It's how I build all of my third party libraries as well, so I
know at least as far as the environment goes, it's all set up
correctly.

Are there dependencies missing that could cause this problem? I did
not provide any dependencies to rsync when I compiled it.

Thanks in advance for any help. I'm stuck.

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html