diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-12-06 20:44:08 +0100 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-12-06 20:44:08 +0100 |
commit | a4f7b723f0723ec17b48ae25f0a218adcab2ff54 (patch) | |
tree | 17b957ba5b84ba3da91460fb0eb677f4e4f1dd01 /src/copy.h | |
parent | e7f7dcb9d150341b63b9b70b0aeb0593e8888857 (diff) | |
download | coreutils-a4f7b723f0723ec17b48ae25f0a218adcab2ff54.tar.xz |
* NEWS: Document the cp --preserve=ownership fix.
* m4/jm-macros.m4 (coreutils_MACROS): Check for fchmod.
* src/copy.c (fchmod_or_lchmod): New function.
(copy_reg): New arg OMITTED_PERMISSIONS. All uses changed.
Omit confusing and unused ", dst_mode" arg to 'open' without O_CREAT.
When creating a file, use O_EXCL, so we're more likely to detect
funny business by other processes. At the end, if permissions
were omitted, chmod them back in.
(copy_internal): If the ownership might change, omit some permissions
at first, then restore them after chowning the file.
* src/cp.c (make_dir_parents_private): Likewise.
* src/copy.c (cached_umask): New function.
* src/copy.h (cached_umask): New decl.
Diffstat (limited to 'src/copy.h')
-rw-r--r-- | src/copy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/copy.h b/src/copy.h index f08b62520..c815baf64 100644 --- a/src/copy.h +++ b/src/copy.h @@ -213,5 +213,6 @@ void src_info_init (struct cp_options *); bool chown_privileges (void); bool chown_failure_ok (struct cp_options const *); +mode_t cached_umask (void); #endif |