protonscr

New Steam chat gets confused by /etc/localtime symlink

steamopen Steam client
ValveSoftware/steam-for-linux#5609 · opened 2018-08-05 by mat8913 · updated 2018-09-09 · 2 comments · github
Mmat8913 2018-08-05 github

Your system information

  • Steam client version (build number or date): Aug 1 2018, at 22:27:11
  • Distribution (e.g. Ubuntu): NixOS
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

The Steam client seems to determine the timezone by doing the equivalent of readlink /etc/localtime instead of following the symlink all the way through (ie. readlink -f /etc/localtime). This causes the new Steam chat to fail to connect on NixOS where /etc/localtime is a symlink to a symlink to a symlink. (NixOS/nixpkgs#44254)

Steps for reproducing this issue:

I specified distribution as NixOS above, but you can actually reproduce this on Debian as well (and in theory any other Linux distro).


Here's how to reproduce Steam chat failing to connect on Debian:

  1. Run as root:

    ln -s /usr/share/zoneinfo/Australia/Sydney /localtime
    rm /etc/localtime
    ln -s /localtime /etc/localtime
    
  2. Now run Steam

  3. Wait a bit for Steam chat to pop up and fail to connect to network


To demonstrate Steam chat getting confused by the symlink:

  1. Run as root:

    mkdir /zoneinfo
    ln -s /usr/share/zoneinfo/Australia/Sydney /zoneinfo/NZ
    rm /etc/localtime
    ln -s /zoneinfo/NZ /etc/localtime
    
  2. Now run Steam

  3. Send a message in Steam chat and notice that times are displayed in New Zealand timezone, despite every other application on the system now displaying times in Sydney Australia timezone.

Nnanonyme 2018-09-09 github

It's not just that. Zoneinfo files have timezone information inside them which is supposed to dictate the timezone. The names are supposed to be opaque. Your double link hints to that this isn't the case here but the Steam component is instead treating the names significant

Nnanonyme 2018-09-09 github

I mean, yeah, you do need to follow the chain if you want to know using stat whether there was a change in current timezone but other than that it's a parseable binary data file

Nothing extracted yet.