Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Steam chat gets confused by /etc/localtime symlink #5609

Open
mat8913 opened this issue Aug 5, 2018 · 2 comments
Open

New Steam chat gets confused by /etc/localtime symlink #5609

mat8913 opened this issue Aug 5, 2018 · 2 comments
Assignees

Comments

@mat8913
Copy link

mat8913 commented Aug 5, 2018

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.

@nanonyme
Copy link

nanonyme commented Sep 9, 2018

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

@nanonyme
Copy link

nanonyme commented Sep 9, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants