Re: [RFC PATCH] Add SHA1 support

2020-03-16 Thread Dimitrios Apostolou via rsync
On Thursday, February 20, 2020 10:34:53 PM CET, Sebastian Andrzej Siewior 
via rsync wrote:


I'm still not sure if rsync requires a cryptographic hash _or_ if a
strong hash like xxHash64 would be just fine for the job.


I'm fairly sure the hash should *not* be easy to spoof, so I'd say a 
cryptographic hash is needed.


As an example, if a file is replaced by a file of the same size and same 
hash,
rsync (if -c is in use) will consider the file is the same, and avoid 
copying it.



Dimitris


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


Re: Would you expect --perms -M--fake-super to set the file mode to the original one?

2020-03-16 Thread Dimitrios Apostolou via rsync

According to --help:

 --fake-superstore/recover privileged attrs using xattrs

So I would assume which mode it uses when it reads the file,
depends on whether this option is on or off.


On Monday, March 16, 2020 9:09:36 PM CET, Kevin Korb via rsync wrote:

I don't believe it is possible.  I think the misunderstanding stems from
the fact that the permissions are even stored in the xattr.  They don't
need to be there but they may as well be.  They don't take much space.
The real question would be when rsync reads the file to restore it and
the file perms are different than the ones in the xattr which set does
it use?

On 3/16/20 10:01 AM, Dimitrios Apostolou via rsync wrote:

Thanks. This is a bit counter-intuitive to me. So how would you tell
rsync to store the original permissions in the xattr, but do not touch
the real file mode?

On Thursday, March 12, 2020 6:26:18 PM CET, Kevin Korb via 
rsync wrote: ...





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


Re: Would you expect --perms -M--fake-super to set the file mode to the original one?

2020-03-16 Thread Kevin Korb via rsync
I don't believe it is possible.  I think the misunderstanding stems from
the fact that the permissions are even stored in the xattr.  They don't
need to be there but they may as well be.  They don't take much space.
The real question would be when rsync reads the file to restore it and
the file perms are different than the ones in the xattr which set does
it use?

On 3/16/20 10:01 AM, Dimitrios Apostolou via rsync wrote:
> Thanks. This is a bit counter-intuitive to me. So how would you tell
> rsync to store the original permissions in the xattr, but do not touch
> the real file mode?
> 
> On Thursday, March 12, 2020 6:26:18 PM CET, Kevin Korb via rsync wrote:
>> I would expect that the sending rsync would only send the perms provided
>> modified by the --chmod.  I wouldn't expect the receiver to even know
>> the other permissions.
>>
>> On 3/12/20 1:23 PM, Dimitrios Apostolou via rsync wrote:
>>> Thank you for the feedback, I'm glad to see that different people see
>>> the issue
>>> differently. As a followup question, what would you expect this to do:
>>>
>>> rsync --perms --chmod g+rX -M--fake-super src dst
>>>
>>> I would expect it to store the original permissions in the xattr,
>>> while ...
>>
> 
> 

-- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
Kevin Korb  Phone:(407) 252-6853
Systems Administrator   Internet:
FutureQuest, Inc.   ke...@futurequest.net  (work)
Orlando, Floridak...@sanitarium.net (personal)
Web page:   https://sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,



signature.asc
Description: OpenPGP digital signature
-- 
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


Re: Would you expect --perms -M--fake-super to set the file mode to the original one?

2020-03-16 Thread Dimitrios Apostolou via rsync

Thanks. This is a bit counter-intuitive to me. So how would you tell
rsync to store the original permissions in the xattr, but do not touch
the real file mode?

On Thursday, March 12, 2020 6:26:18 PM CET, Kevin Korb via rsync wrote:

I would expect that the sending rsync would only send the perms provided
modified by the --chmod.  I wouldn't expect the receiver to even know
the other permissions.

On 3/12/20 1:23 PM, Dimitrios Apostolou via rsync wrote:

Thank you for the feedback, I'm glad to see that different people see
the issue
differently. As a followup question, what would you expect this to do:

rsync --perms --chmod g+rX -M--fake-super src dst

I would expect it to store the original permissions in the 
xattr, while ...





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


atimes+ctimes patch

2020-03-16 Thread Madhu via rsync
schilytools star has the ability to restore ctimes from tarfiles. This
is useful when restoring filesystems as root in single user mode, and
I thought I'd like rsync to do the same.

I started working off the rsync-patches/atimes.diff patch but noticed
that this patch is buggy and presently does not work. (It fails to set
the atime and it fails to set the mtime too).  Even if this is fixed
that patch does not provide for setting nanosecond times.

The way nanosecond mtimes are presently handled is clunky and I am
looking for advice on how to proceed:

- would one want to use the st_ctim, st_atim st_mtim - struct timespec
  structures in struct stat - when available.

If the code to handle nanosecond times for mtime is cleaned up it
could be reused consistently for the ctime and atimes and [1] in
patches

It would be possible to produce a new patch which incorporated new
options atimes (-U --atimes) and (-W --ctimes) - with the caveat that
-W has to be run as root and messes with the system clock, and maybe
support --ctimes --atimes only st_ctim, etc. is available)

If anyone has already done this work or thought about it (or can point
to another project which has done this) I'd be glad for advice.

[1] and possibly birthtimes (by setting the clock before a creat but
that is too ugly even for me to contemplate)


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