debian zoneinfo link fix

Jakob Østergaard joe at keepit.com
Mon Nov 16 14:16:37 UTC 2015


Hello again,

My apologies for the very late reply. Went on two weeks of paternity leave with no time for e-mail :)


>> The following patch is a simple fix; it simply ignores files outside of the root.
> 
> 
> thanks for the patch!
> 
> have you considered simply adding :follow-symlinks nil to the
> cl-fad:walk-directory call? that seems to me like a more
> straightforward fix.
> 

I think this would be problematic as symlinks are widely used inside zoneinfo for “aliases”; e.g. 

# ls -l /usr/share/zoneinfo/Africa/Lagos 
lrwxrwxrwx 1 root root 26 Apr 27  2015 /usr/share/zoneinfo/Africa/Lagos -> ../posix/Africa/Porto-Novo

This is common practice it seems:
# find /usr/share/zoneinfo/ -type l |wc -l
1036

On Debian 8 it looks similar. My Mac on the other hand doesn’t have a single symlink under zoneinfo.

I realize my fix above isn’t complete, because strictly speaking a link could point to another path that is deeper than /usr/share/zoneinfo, but still outside it, and a string length based check will not discover that.

Since the patch improves local-time for me, even though it has a theoretical shortcoming, I’ll leave it in locally. If anyone has other suggestions for “cleaner” approaches, I would of course appreciate it.

 / jakob




More information about the local-time-devel mailing list