Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 83260
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Linux Gnome Desktop Team <gnome@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: hodak@nemo.physics.ncsu.edu
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
system-tools-backends-1.4.2-umask_for_localtime.patch system-tools-backends-1.4.2-umask_for_localtime.patch patch Leonardo Boshell (RETIRED) 2006-11-08 08:58 0000 596 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 83260 depends on: Show dependency tree
Bug 83260 blocks: 214265
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-02-24 21:30 0000
Whenever I use Gnome tool for setting time, it chnages permission to
/etc/localtime so that only root can see it:

ls -l /etc/localtime
-rw-------  1 root root 1267 Feb 25 00:19 /etc/localtime

After this user sees time in UTC zone. Doing "chmod o+r /etc/localtime" fixes
the problem. I am seeing this in XFCE4, I have not tested it in GNOME.

Reproducible: Always
Steps to Reproduce:
1.Check current time and timezone as a user
2.Run Date and Time tool
3.Again check current time and timezone as a user

Actual Results:  
Timezone is set to UTC, and time is shifted by a differece between correct time
zone and UTC (5 hours in case of EST). This is because the permissions on
/etc/timezone are too restrictive, only root can read the file.

Expected Results:  
Timezone should not be changed.

Portage 2.0.51-r15 (default-linux/x86/2004.2, gcc-3.3.5,
glibc-2.3.4.20040808-r1, 2.6.10-ck5 i686)
=================================================================
System uname: 2.6.10-ck5 i686 AMD Athlon(TM) XP 2400+
Gentoo Base System version 1.5.3
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  9 2005,
23:57:41)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/ http://mirror.datapipe.net/gentoo
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
ftp://ftp.ussg.iu.edu/pub/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex X aalib alsa apm artworkextra avi bash-completion berkdb
bitmap-fonts cdparanoia cdr crypt cups curl directfb divx4linux edl emboss
encode f77 fam fbcon fbdev fftw flac font-server foomaticdb fortran fpx gd gdbm
gif gnome gpm graphviz gstreamer gtk gtk2 gtkhtml guile hal imagemagick imlib
ipv6 java javascript jpeg libcaca libg++ libwww live lzo lzw-tiff mad mikmod
mmx
mng motif mozilla mozsvg mpeg msn nas ncurses network nls nptl nvidia oggvorbis
opengl pam pdflib perl plotutils png python quicktime readline real rtc sdl
slang spell sse ssl svg tcltk tcpd tetex theora tiff truetype truetype-fonts
type1-fonts usb v4l v4l2 wmf xml xml2 xmms xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS

------- Comment #1 From Joe McCann (RETIRED) 2005-03-01 13:47:22 0000 -------
I can't reproduce this, my permissions are fine on /etc/localtime even after
using the time-admin tool.

joem@triforce ~ % ls -l /etc/localtime
-rw----r--  1 root root 1.3K Mar  1 16:41 /etc/localtime

------- Comment #2 From hodak@nemo.physics.ncsu.edu 2005-03-03 19:41:07 0000 -------
This problem is related to user's umask setting, I have umask 077 in my .bashrc
and after disabling it (and having default 0022) it went away. 
The same bug was also filed in RedHat's bugzilla:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129876

Apparently, RedHat fixed it in December.

------- Comment #3 From Nathaniel McCallum (RETIRED) 2005-07-03 14:42:46 0000 -------
Closing per above.

------- Comment #4 From hodak@nemo.physics.ncsu.edu 2005-07-03 23:53:17 0000 -------
Reopening, since it still does not work in Gentoo. RedHat may have fixed it (at
least according to their bugzilla), but it still does not work. Thus, this bug
is not resolved yet. 

------- Comment #5 From John N. Laliberte (RETIRED) 2006-05-10 18:30:33 0000 -------
@reporter: can you still reproduce this with 2.12?

------- Comment #6 From hodak@nemo.physics.ncsu.edu 2006-05-13 21:23:44 0000 -------
(In reply to comment #5)
> @reporter: can you still reproduce this with 2.12?
> 

Yes, running current stable gnome (2.12.3), the error is still there. 

------- Comment #7 From Gilles Dartiguelongue 2006-09-04 02:58:17 0000 -------
It seems that this issue is absolutely not handled by system-tools-backends
code (which is used by gnome-system-tools). I suggest to look for upstream bug
(on gnome bugzilla) and drop the link here.

------- Comment #8 From hodak@nemo.physics.ncsu.edu 2006-10-22 16:36:33 0000 -------
(In reply to comment #7)
> It seems that this issue is absolutely not handled by system-tools-backends
> code (which is used by gnome-system-tools). I suggest to look for upstream bug
> (on gnome bugzilla) and drop the link here.
> 
I looked at gnome bugzilla, but could not find anything relevant.
The only bug report (and fix) I was able to find is the entry in RedHat
bugzilla already mentioned above:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=129876

------- Comment #9 From Leonardo Boshell (RETIRED) 2006-11-08 08:58:14 0000 -------
Created an attachment (id=101480) [details]
system-tools-backends-1.4.2-umask_for_localtime.patch

I couldn't reproduce this behaviour when running time-admin as a normal user
and then entering the root password. I only see it when I set the umask and
then run time-admin as root.

Anyway, looking at the source code, it's easy to see what's going on: the
backend first deletes the current localtime file and then it does a simple copy
operation without verifying the permissions on the file afterwards.

The attached patch reflects one way to fix this. You can apply it manually to
/usr/share/setup-tool-backends/scripts/time-conf or apply it inside
system-tools-backends's ebuild. Please test it and let us know if this resolves
what you describe.

Thanks.

------- Comment #10 From hodak@nemo.physics.ncsu.edu 2007-01-01 21:56:10 0000 -------
How can I try out this patch, I mean how do I modify the system-tools-backends
(I hope this is the right one) ebuild to inlcude the patch when I reemerge it?

------- Comment #11 From Gilles Dartiguelongue 2008-10-12 20:34:28 0000 -------
this version has been long masked but if any newer version still produce this
bug, please visit bug #214265.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug