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

Fix relative symlinks handling in resolver.rs to retrieve resolv.conf #65

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

xRodney
Copy link
Contributor

@xRodney xRodney commented Dec 17, 2024

On Ubuntu 24.04.1, the symlink is relative:
$ ll /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Aug 27 17:37 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

which on current master fails with:
No such file or directory (os error 2)

This fix resolves the relative path based on the symlink location, not cwd.

It also improves errors in this area, as finding out what file or directory was missing, considering no other context at all in logs or otherwise, was quite a challenge.

Copy link
Owner

@ancwrd1 ancwrd1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job

@ancwrd1 ancwrd1 merged commit 65239cb into ancwrd1:main Dec 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants