public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/578] New: zic fails when symlinks are used and directory is not empty
@ 2004-11-25 19:53 asb@bu.edu
2005-09-26 16:23 ` [Bug libc/578] " drepper at redhat dot com
0 siblings, 1 reply; 2+ messages in thread
From: asb@bu.edu @ 2004-11-25 19:53 UTC (permalink / raw)
To: glibc-bugs
In timezone/zic.c, around line 630, if link() fails to create a hard link, a
symlink is created. The target of the symlink is found by the following snippet:
const char *s = tofile;
register char * symlinkcontents = NULL;
while ((s = strchr(s+1, '/')) != NULL)
symlinkcontents = ecatalloc(symlinkcontents, ".\./");
symlinkcontents = ecatalloc(symlinkcontents, fromname);
The last line should be:
symlinkcontents = ecatalloc(symlinkcontents, fromfile);
-----------------------------
If the following conditions are met
- directory is set to "/var/tmp/glibc-build-directory", and
- symlinks are not possible
then dolink("America/Argentina/Cordoba","America/Cordoba") will produce a
symlink at /var/tmp/glibc-build-directory/America/Cordoba pointing to
..//var/tmp/glibc-build-directory/America/Argentina/Cordoba.
Clearly, the link is being created in the correct place, but the target should
be "../America/Argentina/Cordoba".
-----------------------------
This bug affects only users that can not create hard links.
-----------------------------
This bug produces the following build error durring make install on my system
(gentoo):
/var/tmp/portage/glibc-2.3.4.20040808-r1/work/build/timezone/zic: Can't link fro
m /var/tmp/portage/glibc-2.3.4.20040808-r1/image//usr/share/zoneinfo/America/Cor
doba to /var/tmp/portage/glibc-2.3.4.20040808-r1/image//usr/share/zoneinfo/Ameri
ca/Rosario: No such file or directory
because America/Cordoba exists, but is a dead link.
# file
/var/tmp/portage/glibc-2.3.4.20040808-r1/image//usr/share/zoneinfo/America/Cordoba
/var/tmp/portage/glibc-2.3.4.20040808-r1/image//usr/share/zoneinfo/America/Cordoba:
broken symbolic link to
`..//var/tmp/portage/glibc-2.3.4.20040808-r1/image//usr/share/zoneinfo/America/Argentina/Cordoba'
--
Summary: zic fails when symlinks are used and directory is not
empty
Product: glibc
Version: 2.3.3
Status: NEW
Severity: minor
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: asb at bu dot edu
CC: glibc-bugs at sources dot redhat dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sources.redhat.com/bugzilla/show_bug.cgi?id=578
------- 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] 2+ messages in thread
* [Bug libc/578] zic fails when symlinks are used and directory is not empty
2004-11-25 19:53 [Bug libc/578] New: zic fails when symlinks are used and directory is not empty asb@bu.edu
@ 2005-09-26 16:23 ` drepper at redhat dot com
0 siblings, 0 replies; 2+ messages in thread
From: drepper at redhat dot com @ 2005-09-26 16:23 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2005-09-26 16:22 -------
Discuss this with the upstream maintainer. We just use the code.
The list is: tz@elsie.nci.nih.gov.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://sourceware.org/bugzilla/show_bug.cgi?id=578
------- 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] 2+ messages in thread
end of thread, other threads:[~2005-09-26 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-25 19:53 [Bug libc/578] New: zic fails when symlinks are used and directory is not empty asb@bu.edu
2005-09-26 16:23 ` [Bug libc/578] " 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).