Hide Forgot
tzdata-update was rewritten in a Red Hat patch (glibc-rh1200555.patch) but it misses a feature of the old tzdata-update that was the chunk: ---8<--- long int sret; sret = INTERNAL_SYSCALL (fchmod, err, 2, fd, 0644); if (INTERNAL_SYSCALL_ERROR_P (sret, err)) goto clean_up; ---8<--- So, depending of the umask set (e.g. 0077), it may create a /etc/localtime that is unreadable by non root users. Test case should be simple, just set the umask and run /usr/sbin/tzdata-update.
Agreed, we should restore the fchmod call.
The Lua version of tzdata-update in the tzdata package is not affected because RPM resets the umask to 022: [root@lenovo-thinkstation-01 ~]# rm -f /etc/localtime [root@lenovo-thinkstation-01 ~]# rpm -e --nodeps tzdata [root@lenovo-thinkstation-01 ~]# (umask 077; rpm -i tzdata-2016c-1.el6.noarch.rpm) warning: tzdata-2016c-1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY [root@lenovo-thinkstation-01 ~]# ls -l /etc/localtime -rw-r--r--. 1 root root 3519 Sep 15 07:32 /etc/localtime [root@lenovo-thinkstation-01 ~]# rm -f /etc/localtime [root@lenovo-thinkstation-01 ~]# (umask 077; yum reinstall tzdata-2016c-1.el6.noarch.rpm) … Installed: tzdata.noarch 0:2016c-1.el6 Complete! [root@lenovo-thinkstation-01 ~]# ls -l /etc/localtime -rw-r--r--. 1 root root 3519 Sep 15 07:33 /etc/localtime
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2017-0680.html