From a4f7b723f0723ec17b48ae25f0a218adcab2ff54 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 6 Dec 2006 20:44:08 +0100 Subject: * 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. --- m4/jm-macros.m4 | 1 + 1 file changed, 1 insertion(+) (limited to 'm4/jm-macros.m4') diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4 index d65f1086f..5bf46a9e3 100644 --- a/m4/jm-macros.m4 +++ b/m4/jm-macros.m4 @@ -62,6 +62,7 @@ AC_DEFUN([coreutils_MACROS], endgrent \ endpwent \ fchown \ + fchmod \ ftruncate \ iswspace \ mkfifo \ -- cgit v1.2.3-54-g00ecf