Bug 6959 - glibc 2.7 overwrites /etc/localtime symlink
Summary: glibc 2.7 overwrites /etc/localtime symlink
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.8
: P2 normal
Target Milestone: ---
Assignee: GNU C Library Locale Maintainers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-13 19:38 UTC by Eric Sandall
Modified: 2014-07-02 06:15 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
Check if /etc/localtime is a symlink as well (398 bytes, patch)
2008-10-13 19:40 UTC, Eric Sandall
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Sandall 2008-10-13 19:38:31 UTC
See http://bugs.sourcemage.org/show_bug.cgi?id=14548

$ ls -lah /etc/localtime
lrwxrwxrwx 1 root root 30 Jun 25 11:51 /etc/localtime ->
/usr/share/zoneinfo/US/Pacific

# Install glibc
Our package uses `make install` and has no modifications related to localtime

$ ls -lah /etc/localtime
lrwxrwxrwx 1 root root 29 Jun 25 18:22 /etc/localtime ->
../usr/share/zoneinfo/Factory

This did not use to happen with glibc (as late as 2.6).
Comment 1 Eric Sandall 2008-10-13 19:40:04 UTC
Created attachment 3001 [details]
Check if /etc/localtime is a symlink as well

Modify timezone/Makefile to also check if /etc/localtime is a symlink before
resetting to Factory. Tested multiple installs and my /etc/localtime symlink
remained untouched after this patch was applied.
Comment 2 Eric Sandall 2009-01-22 19:43:50 UTC
Still an issue in glibc 2.9 and the patch applies cleanly.
Comment 3 Joseph Myers 2012-05-01 16:17:29 UTC
This was fixed by:

commit 482ff4dae91cf9a288284072d1a299868db7a634
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Wed Mar 7 04:48:47 2012 -0500

    Don't install timezone rule files

meaning that glibc no longer installs timezone files at all.