Bug 12967

Summary: File permissions after timezone changing with "tzsetup"
Product: Base System Reporter: Udo Schweigert <ust>
Component: binAssignee: ru <ru>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Udo Schweigert 1999-08-04 18:30:01 UTC
After changing the timezone with /usr/sbin/tzsetup (or /stand/sysinstall)
the file /etc/localtime gets file permissions modified with the callers umask.
(If /etc/localtime is a symbolic links, things may be different)

So if umask is 077 the file has:

-r--------  1 root  wheel  287 Aug  4 17:17 /etc/localtime

With this permissions only uid 0 has the correct zone, the others fall back
to UTC.

How-To-Repeat: 
# ls -l /etc/localtime
# umask 077
# /usr/sbin/tzsetup
# ls -l /etc/localtime
Comment 1 ru freebsd_committer freebsd_triage 1999-08-05 12:49:12 UTC
State Changed
From-To: open->feedback

Fixed in -CURRENT (tzsetup.c,v 1.14). 
Comment 2 ru freebsd_committer freebsd_triage 1999-08-05 12:52:01 UTC
Responsible Changed
From-To: freebsd-bugs->ru

So I remember to MFC. 
Comment 3 ru freebsd_committer freebsd_triage 1999-08-16 21:47:42 UTC
State Changed
From-To: feedback->closed

Fixed in RELENG_3 (tzsetup.c,v 1.11.2.2).