Backport !3009 “gtimezone: Fix symlink checks on relative link targets” to glib-2-74
requested to merge pwithnall/glib:backport-3009-timezone-relative-link-target-glib-2-74 into glib-2-74
The changes in 6265b2e6 to reject weird
/etc/localtime
configurations where /etc/localtime
links to another
symlink did not consider the case where the target of /etc/localtime
is a relative path. They only considered the case where the target is
absolute.
Relative paths are permissible in all symlinks. On my Fedora 36 system,
/etc/localtime
’s target is ../usr/share/zoneinfo/Europe/London
.
Fix the check for toolbx by resolving relative paths before calling
g_lstat()
on them.
Signed-off-by: Philip Withnall pwithnall@endlessos.org
Trivial backport of !3009 (merged) to glib-2-74
.