Bug 105639 - coreutils-5.3.0-r1: the --parents option in 'cp' causes strange error messages
Bug#: 105639 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: spock@gentoo.org
Component: Applications
URL: 
Summary: coreutils-5.3.0-r1: the --parents option in 'cp' causes strange error messages
Keywords:  
Status Whiteboard: 
Opened: 2005-09-11 15:31 0000
Description:   Opened: 2005-09-11 15:31 0000
When doing:
  cp -pRH --parents /dir1/dir2/dir3/file /tmp/testdir
cp displays the following error message:
  failed to get attributes of dir1/dir2/dir3/file
unless it was called with / as the cwd.

The problem is caused by a miscalculated offset passed to re_protect().

------- Comment #1 From Michal Januszewski 2005-09-11 15:32:21 0000 -------
Created an attachment (id=68202) [details]
A patch that fixes the described problem.

------- Comment #2 From SpanKY 2005-09-11 17:45:13 0000 -------
Created an attachment (id=68211) [details]
100_all_coreutils-pathname-off-by-one.patch

mmm, no, this should be the correct fix ...

see if it works for me, i cant seem to get attr stuff to work on my box atm

------- Comment #3 From SpanKY 2005-09-11 17:45:27 0000 -------
err, see if it works for *you* :)

------- Comment #4 From Michal Januszewski 2005-09-12 06:07:20 0000 -------
Yup, it seems to be working just fine with the patch applied.

------- Comment #5 From SpanKY 2005-09-12 17:35:30 0000 -------
added to 5.3.0-r1

------- Comment #6 From SpanKY 2005-09-16 06:19:05 0000 -------
*** Bug 106133 has been marked as a duplicate of this bug. ***