public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/1955] New: 2005c timezone/zic.c update creates dangling symlink on fallback path
@ 2005-11-30 22:07 pestes at us dot ibm dot com
  2005-11-30 22:08 ` [Bug libc/1955] " pestes at us dot ibm dot com
  2005-12-20  7:56 ` drepper at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: pestes at us dot ibm dot com @ 2005-11-30 22:07 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/1955] 2005c timezone/zic.c update creates dangling symlink on fallback path
  2005-11-30 22:07 [Bug libc/1955] New: 2005c timezone/zic.c update creates dangling symlink on fallback path pestes at us dot ibm dot com
@ 2005-11-30 22:08 ` pestes at us dot ibm dot com
  2005-12-20  7:56 ` drepper at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pestes at us dot ibm dot com @ 2005-11-30 22:08 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pestes at us dot ibm dot com  2005-11-30 22:08 -------
Created an attachment (id=772)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=772&action=view)
patch which resolves the dangling symlink problem


-- 


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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/1955] 2005c timezone/zic.c update creates dangling symlink on fallback path
  2005-11-30 22:07 [Bug libc/1955] New: 2005c timezone/zic.c update creates dangling symlink on fallback path pestes at us dot ibm dot com
  2005-11-30 22:08 ` [Bug libc/1955] " pestes at us dot ibm dot com
@ 2005-12-20  7:56 ` drepper at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: drepper at redhat dot com @ 2005-12-20  7:56 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2005-12-20 07:56 -------
I applied the patch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-20  7:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-30 22:07 [Bug libc/1955] New: 2005c timezone/zic.c update creates dangling symlink on fallback path pestes at us dot ibm dot com
2005-11-30 22:08 ` [Bug libc/1955] " pestes at us dot ibm dot com
2005-12-20  7:56 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).