Wayne Davison
0379c8eca1
Make sure that the user has write permissions when opening a temp file.
2007-11-03 19:27:49 +00:00
Wayne Davison
11b02d927f
Adding Wesley Terpstra's lchmod()-equivalent that uses setattrlist().
2007-10-16 16:00:41 +00:00
Wayne Davison
8e41b68e8f
Tweaking the license text a bit more.
2007-07-10 13:55:49 +00:00
Wayne Davison
4fd842f98d
Switching to GPL 3.
2007-07-07 05:33:14 +00:00
Wayne Davison
b5ae4e25c2
Added a comment to the do_chmod() to mark it as a discouraged function.
2007-05-22 05:59:02 +00:00
Wayne Davison
9439c0cb5a
Adding the --fake-super option.
2007-04-24 07:32:44 +00:00
Wayne Davison
ba2133d6ad
Further modifications to the copyright comment section.
2007-02-04 14:54:58 +00:00
Wayne Davison
4f37559232
Avoid a compiler warning about setting "len" without using it.
2006-11-21 08:37:06 +00:00
Wayne Davison
4a19c3b254
Added "const" to appropriate char pointers.
2006-11-19 00:23:21 +00:00
Wayne Davison
e7c67065c0
Updated the FSF's address to an even newer one.
2006-04-25 23:51:12 +00:00
Wayne Davison
0f78b81511
- Updated the address for the FSF in the opening comment.
...
- Standardized the format of the opening comment, including adding a
brief description of what's in the file for those that lacked it.
- Added some missing copyright lines.
- Some minor whitespace tweaks (in a few of the files).
2006-04-25 20:23:34 +00:00
Wayne Davison
63cf5ae72c
Made a bunch of char* args const.
2006-01-29 18:52:53 +00:00
Wayne Davison
f853b777be
Complicate the lseek64() function prototype because some systems
...
don't have off64_t.
2005-09-03 16:56:53 +00:00
Wayne Davison
d11f5c6e2b
- Don't call do_chmod() unless HAVE_CHMOD is defined.
...
- Made do_chmod() handle symlinks or return 1 if not possible.
- We now mask off the mode bits in do_chmod() sing CHMOD_BITS.
2005-07-27 23:30:53 +00:00
Wayne Davison
ebd33e0cea
Use the new HAVE_LSEEK64 define.
2005-04-06 02:08:21 +00:00
Wayne Davison
0dd046d36f
Don't check defined-ness of SIZEOF_OFF64_T.
2005-02-14 00:58:10 +00:00
Wayne Davison
4f5b0756df
John E. Malmberg convinced me to standardize on #ifs for defined
...
values instead of non-zero.
2005-02-14 00:53:43 +00:00
Wayne Davison
25e1181466
Use new USE_STAT64_FUNCS define.
2005-01-28 20:33:55 +00:00
Wayne Davison
1164f67827
Make use of new HAVE_STRUCT_STAT64 define.
2005-01-28 20:15:08 +00:00
Wayne Davison
df6933406f
Got rid of unused mmap section.
2005-01-28 17:06:41 +00:00
Wayne Davison
d4daa7b68c
Changed HAVE_OFF64_T to SIZEOF_OFF64_T.
2005-01-28 16:21:37 +00:00
Wayne Davison
0957a7463e
When SUPPORT_LINKS is not defined, we now go ahead and provide
...
the do_lstat() function and just have it call do_stat().
2005-01-19 19:29:20 +00:00
Paul Green
58af2f958c
Fix typo in handling of lchown when the host operating system does
...
not implement it. It should get mapped to chown.
2005-01-18 21:19:42 +00:00
Wayne Davison
051547603a
Moved kluged (conditional) define of lchown from rsync.h to syscall.c.
2005-01-03 21:03:33 +00:00
Wayne Davison
da6eb9d123
Improved do_mknod() so that it handles creating a fifo file
...
and a socket file when mknod() itself does not.
2004-10-01 06:56:14 +00:00
Wayne Davison
3267d6a9ce
Some systems need do_mkstemp() to use setmode() to set O_BINARY.
2004-10-01 02:34:22 +00:00
Wayne Davison
6dcb93208d
Don't use mkstemp() if the OS has open64() but not mkstemp64().
2004-08-02 21:56:07 +00:00
Wayne Davison
7a27e9b599
Don't use ENOMSG -- it's not portable.
2004-02-18 22:33:21 +00:00
Wayne Davison
cfeed4da95
- If we return an error because of dry_run being set, we now set errno.
...
- The do_mkstemp() routine now preserves the errno value from fchmod()
if that call fails.
- Improved the CHECK_RO macro stuff.
2004-02-17 23:00:00 +00:00
Wayne Davison
4068d8617d
We no longer munge a double-leading slash in do_open() because we
...
shouldn't generate a path with a double-leading slash anymore.
2004-02-17 22:49:19 +00:00
Wayne Davison
e106de49c8
Tweaked the O_BINARY code to the latest idiom.
2003-03-30 23:00:51 +00:00
Wayne Davison
855decd3a7
Added back the O_BINARY #ifdef.
2003-01-26 20:09:02 +00:00
David Dykstra
536b84680b
Open config files in text mode when O_TEXT is defined. This helps on
...
Cygwin when the config files are on a filesystem that is mounted in
binary mode. Patch from Ville Herva.
2003-01-26 03:46:54 +00:00
David Dykstra
f0b4fdaf5e
Ignore errors from chmod when --preserve-perms/-p/-a are not set.
...
Gnu cp behaves the same way.
2003-01-21 00:58:50 +00:00
Martin Pool
c127e8aaec
Add a test case for trim_trailing_slashes, and make it handle other cases.
2002-03-25 03:51:17 +00:00
Martin Pool
bf4e725d5d
Code that was meant to trim trailing slashes from mkdir() paths
...
actually did not; fix it.
2002-03-25 03:29:47 +00:00
Martin Pool
ded8347d6b
Cope with BSD systems on which mkdir() will not accept a trailing
...
slash.
<http://www.opensource.apple.com/bugs/X/BSD%20Kernel/2734739.html >
2002-02-18 22:44:23 +00:00
Martin Pool
25f2cb3d6b
Fix for < http://rsync.samba.org/cgi-bin/rsync/incoming?id=3750 >
...
temp files must be opened through do_open so that binary modes is used
on cygwin. (Chris Boucher)
2002-01-14 00:16:51 +00:00
Andrew Tridgell
f62c17e378
use mkstemp on systems where it is secure
2001-05-02 08:33:18 +00:00
Martin Pool
18c71e96f8
Doc.
2001-02-23 01:45:46 +00:00
Andrew Tridgell
b0f3f5784c
open on paths starting with // fails on win32
2000-01-23 03:00:27 +00:00
David Dykstra
3420c8e6e0
Fixed bug introduced by calling do_open() for O_RDONLY files. Changed it
...
so the check for dry_run and CHECK_RO are not done when flags is O_RDONLY.
Only do the adding of O_BINARY, which was the intention.
1999-11-04 15:43:38 +00:00
Andrew Tridgell
2b086e033c
paranoia change - treat list_only like read_only and refuse all
...
syscalls that might change the filesystem. This shouldn't be needed,
but I like paranoid coding :)
1998-12-05 01:56:45 +00:00
David Dykstra
a926daecbf
Always add the O_BINARY flag in do_open if it is defined, for Windows.
...
Suggestion from Mart.Laak@hansa.ee
1998-11-24 19:10:21 +00:00
Andrew Tridgell
bb0f7089fe
check for munmap as well as mmap. NextStep only has mmap in standard
...
libs
1998-05-26 14:18:59 +00:00
Andrew Tridgell
754d120c98
use mmap() for files of any size. This should be much more buffer
...
cache friendly.
1998-05-21 05:52:37 +00:00
Andrew Tridgell
f0fca04e4e
first vesrion of working socket based rsync. It still needs a lot of
...
work, but at least it works :-)
1998-05-09 13:58:54 +00:00
Andrew Tridgell
f28ee65baa
damn solaris doesn't prototype it's functions correctly. grrr.
1998-05-06 07:35:37 +00:00
Andrew Tridgell
59503278bf
better test for solaris broken readdir
1998-05-06 07:18:06 +00:00
Andrew Tridgell
d6e6ecbdbf
handle broken readdir() on Solaris 2.6 (it returns the name offset by
...
2 characters!)
1998-05-06 07:00:38 +00:00