<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/copy.c, branch v6.7</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v6.7</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2006-12-07T07:10:35Z</updated>
<entry>
<title>cp -p now clears special bits if it fails to preserve owner or group</title>
<updated>2006-12-07T07:10:35Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-12-07T07:10:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=fc92148eac1cd2f8a5e99b3facc21e630e815bef'/>
<id>urn:sha1:fc92148eac1cd2f8a5e99b3facc21e630e815bef</id>
<content type='text'>
* NEWS: Document the cp -p fix for special bits.
* src/copy.c (set_owner): Now returns a three-way result, so
that the caller can clear the special bits.  All callers changed.
(copy_reg): Don't set the special bits if chown failed.
(copy_internal): Likewise.
* tests/cp/special-bits: Test this fix.
Signed-off-by: Jim Meyering &lt;jim@meyering.net&gt;
</content>
</entry>
<entry>
<title>* NEWS: Document the cp --preserve=ownership fix.</title>
<updated>2006-12-06T19:44:08Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-12-06T19:44:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a4f7b723f0723ec17b48ae25f0a218adcab2ff54'/>
<id>urn:sha1:a4f7b723f0723ec17b48ae25f0a218adcab2ff54</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>* src/copy.c (copy_internal): Add a comment saying why we prefer</title>
<updated>2006-10-21T07:16:19Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-10-21T07:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=46775398f2575505d355a5fea93f87bb45f07937'/>
<id>urn:sha1:46775398f2575505d355a5fea93f87bb45f07937</id>
<content type='text'>
mknod over mkfifo.
</content>
</entry>
<entry>
<title>* src/copy.c (copy_reg): Rewrite slightly to avoid duplicte code</title>
<updated>2006-10-19T05:22:54Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-10-19T05:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=86823158eb72dd472499cba2fb2e947f69afae72'/>
<id>urn:sha1:86823158eb72dd472499cba2fb2e947f69afae72</id>
<content type='text'>
when opening dst_name.
(copy_reg, copy_internal): Use (SYSCALL != 0) rather than plain
(SYSCALL) to test for failure in a system call.
</content>
</entry>
<entry>
<title>* src/copy.c (copy_internal): Use mknod rather than mkfifo to copy</title>
<updated>2006-10-18T22:33:06Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-10-18T22:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=81afea011033c0389ff03cfd4cc968f0b0cefaf0'/>
<id>urn:sha1:81afea011033c0389ff03cfd4cc968f0b0cefaf0</id>
<content type='text'>
a fifo.  This preserves the special mode bits on Solaris 10, which
is compatible with what Solaris 10 cp -R does.
</content>
</entry>
<entry>
<title>* src/copy.c (copy_internal): Remove redundant and confusing local</title>
<updated>2006-10-18T21:02:27Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-10-18T21:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7bc17873e5e304ea50842aa1908caeb24685e949'/>
<id>urn:sha1:7bc17873e5e304ea50842aa1908caeb24685e949</id>
<content type='text'>
variable src_type.
</content>
</entry>
<entry>
<title>* src/copy.c (copy_internal): Don't pass mkdir a mode greater than</title>
<updated>2006-10-18T20:56:38Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-10-18T20:56:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=11cf1d39f2fbe2dcfb6d268fd3e2a56334f1d224'/>
<id>urn:sha1:11cf1d39f2fbe2dcfb6d268fd3e2a56334f1d224</id>
<content type='text'>
7777.  This matches historical 'cp' behavior and avoids some
(though not all) implementation-defined behavior of mkdir.
* src/cp.c (make_dir_parents_private): Likewise.
* src/copy.c (copy_internal): Don't pass 'open' a mode greater
than 777.  This is required by POSIX.  It doesn't make any difference
in actual behavior on any host that I know of.
</content>
</entry>
<entry>
<title>* NEWS: cp -r --backup dir1 dir2, would rename an existing dir1/dir2</title>
<updated>2006-10-14T05:20:27Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-10-14T05:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0dc7f789861bedfa74639b89be8c3c4e8b3b6490'/>
<id>urn:sha1:0dc7f789861bedfa74639b89be8c3c4e8b3b6490</id>
<content type='text'>
to dir1/dir2~.
* src/copy.c (copy_internal): Although we do create a backup of each
destination directory when in move mode, don't do that when copying.
Reported by Peter Breitenlohner, in
&lt;http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8616&gt;.
* tests/cp/backup-dir: New file.  Test for the above.
</content>
</entry>
<entry>
<title>* NEWS: Mention these fixes.</title>
<updated>2006-09-24T19:28:25Z</updated>
<author>
<name>Jim Meyering</name>
<email>jim@meyering.net</email>
</author>
<published>2006-09-24T19:28:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e05de760c239c3cdf0fe53889a71f3816b760f22'/>
<id>urn:sha1:e05de760c239c3cdf0fe53889a71f3816b760f22</id>
<content type='text'>
* src/copy.c (copy_reg): With --verbose (-v), print
"removed `file_name'" just after unlinking a file.
(copy_internal): Likewise, in three more places.
Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
</content>
</entry>
<entry>
<title>* NEWS: Document fix for cp -i and mv -i.</title>
<updated>2006-09-20T17:32:14Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2006-09-20T17:32:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2a01141018637fc06604335aea673dff95efd033'/>
<id>urn:sha1:2a01141018637fc06604335aea673dff95efd033</id>
<content type='text'>
* src/copy.c (copy_internal): With -i, prompt even if the source
is a directory and the destination is not.  This is required by
POSIX and gives the user a chance to bail out before failing.
* tests/cp/Makefile.am (TESTS): Add cp-i.
* tests/cp/cp-i: New file.
* tests/mv/Makefile.am (TESTS): Add i-5.
* tests/mv/i-5: New file.
</content>
</entry>
</feed>
