From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17477 invoked by alias); 30 Nov 2005 22:07:14 -0000 Received: (qmail 16261 invoked by uid 48); 30 Nov 2005 22:07:12 -0000 Date: Wed, 30 Nov 2005 22:07:00 -0000 From: "pestes at us dot ibm dot com" To: glibc-bugs@sources.redhat.com Message-ID: <20051130220709.1955.pestes@us.ibm.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/1955] New: 2005c timezone/zic.c update creates dangling symlink on fallback path X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00143.txt.bz2 List-Id: 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.