Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1113

Merged
Created Jan 06, 2022 by Jérome Perrin@jeromeOwner

component/userhosts: use github.com/figiel/hosts for compatibility with recent libc

  • Overview 6
  • Commits 1
  • Pipelines 5
  • Changes 6

In ubuntu 21.04 (libc6 2.33-0ubuntu5) or current debian testing (libc6 2.32-5) no longer use open to open /etc/hosts, but what appears as "openat" in strace output - but can not be replaced by defining an openat function.

This uses https://github.com/figiel/hosts which uses another approach of replacing getaddrinfo, gethostbyname* and inet_aton.

Users have been updated a bit, because there are some small differences:

  • the /etc/hosts replacement file is defined by HOSTS_FILE environment variable, not HOSTS
  • the library name is libuserhosts.so, not userhosts.so

Other notable differences, for which we did not need code change are:

  • the new library also try to load a file when HOSTS_FILE is not set
  • the new library still use original /etc/hosts file
  • the new library supports aliases to hostnames, not only ip addresses
Edited Jan 06, 2022 by Jérome Perrin
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/userhosts-new-glibc
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7