Bug 761423 - hardlink sets timestamps based on order of arguments
Summary: hardlink sets timestamps based on order of arguments
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: hardlink
Version: 6.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Jan Zeleny
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-08 10:11 UTC by Marko Myllynen
Modified: 2017-12-06 12:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 834997 (view as bug list)
Environment:
Last Closed: 2017-12-06 12:16:51 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Marko Myllynen 2011-12-08 10:11:05 UTC
Description of problem:
hardlink sets timestamps for files hardlink'ed with -c based on the order of command line arguments. This randomness can make files to appear to be newer than they in reality are. This might confuse some tools when (for example RPM packages suddenly have newer timestamp than the repodata files after hardlink'ing).

hardlink should always set the date of files being hardlink'ed with -c to that of the oldest file not a timestamp based on the order of command line arguments.

root@localhost:~# mkdir -p test/1 test/2      
root@localhost:~# cd test
root@localhost:~/test# echo a > 1/f1
root@localhost:~/test# echo a > 2/f2
root@localhost:~/test# touch -r /etc 2/f2
root@localhost:~/test# ls -li */*        
651611 -rw-r--r--. 1 root root 2 2011-12-08 11:53 1/f1
651613 -rw-r--r--. 1 root root 2 2011-12-08 10:26 2/f2
root@localhost:~/test# hardlink -c 1 2
root@localhost:~/test# ls -li */*     
651613 -rw-r--r--. 2 root root 2 2011-12-08 10:26 1/f1
651613 -rw-r--r--. 2 root root 2 2011-12-08 10:26 2/f2
root@localhost:~/test# rm -f 1/f1 2/f2 
root@localhost:~/test# echo a > 1/f1
root@localhost:~/test# echo a > 2/f2
root@localhost:~/test# touch -r /etc 2/f2
root@localhost:~/test# hardlink -c 2 1
root@localhost:~/test# ls -li */*
651611 -rw-r--r--. 2 root root 2 2011-12-08 11:54 1/f1
651611 -rw-r--r--. 2 root root 2 2011-12-08 11:54 2/f2
root@localhost:~/test# 

Version-Release number of selected component (if applicable):
RHEL 6.2

Comment 4 RHEL Program Management 2012-09-07 05:14:46 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2013-10-14 00:52:58 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 6 Jan Kurik 2017-12-06 12:16:51 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/


Note You need to log in before you can comment on or make changes to this bug.