This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/1955] New: 2005c timezone/zic.c update creates dangling symlink on fallback path
- From: "pestes at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 30 Nov 2005 22:07:12 -0000
- Subject: [Bug libc/1955] New: 2005c timezone/zic.c update creates dangling symlink on fallback path
- Reply-to: sourceware-bugzilla at sourceware dot org
The zic.c cleanup of the linking fallback code in the dolink() function
introduces a typo in the fallback option. If the hardlink fails, it builds up
paths for the symlink which are not complete. Basically, the code uses fromfile
instead of fromname when building the target of the symlink. This creates a
dangling symlink. For example, if TZDIR/directory = "/usr/share/zoneinfo" and
the toname = /etc/localtime, then the symlink created for localtime with this
code would point to ../America/New_York since "America/New_York" is the
fromfile, whereas it should have used fromname (directory+fromfile) to create a
symlink to ../usr/share/zoneinfo/America/New_York
The attached patch resolves this typo and fixes the problem. The source of the
issue can be seen in a diff from zic.c 1.17 to 1.18 in glibc cvs, noted as the
update to tzcode2005c. Since this appears to be a direct result of updating to
that code, maybe there is something I am missing; but from what I understand,
using `zic -l America/New_York` should create a proper symlink at /etc/localtime
if hardlinking fails (such as /etc and /usr being on different physical media).
In my case this produces a dangling symlink.
--
Summary: 2005c timezone/zic.c update creates dangling symlink on
fallback path
Product: glibc
Version: 2.3.3
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: pestes at us dot ibm dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=1955
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.