[PR #7077] [MERGED] bugfix: map sandbox hostname to ipv6 in /etc/hosts #6306

Closed
opened 2026-05-05 10:54:28 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/7077
Author: @kmk3
Created: 2/24/2026
Status: Merged
Merged: 2/25/2026
Merged by: @kmk3

Base: masterHead: hostname-map-ipv6


📝 Commits (1)

  • 95bbdf8 bugfix: map sandbox hostname to ipv6 in /etc/hosts

📊 Changes

1 file changed (+8 additions, -3 deletions)

View changed files

📝 src/firejail/fs_hostname.c (+8 -3)

📄 Description

Currently it is only mapped to ipv4, so add an ipv6 line.

Default hosts file:

$ cat /etc/hosts
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1        localhost
::1              localhost

Before:

$ firejail --quiet --noprofile --hostname=foo cat /etc/hosts
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 foo
::1              localhost

After:

$ firejail --quiet --noprofile --hostname=foo cat /etc/hosts
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 foo
::1 foo

Related commits:

Relates to #7048.

Reported-by: @liloman


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/7077 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 2/24/2026 **Status:** ✅ Merged **Merged:** 2/25/2026 **Merged by:** [@kmk3](https://github.com/kmk3) **Base:** `master` ← **Head:** `hostname-map-ipv6` --- ### 📝 Commits (1) - [`95bbdf8`](https://github.com/netblue30/firejail/commit/95bbdf8f28d0f4e8fd820b846f8298afaf246e31) bugfix: map sandbox hostname to ipv6 in /etc/hosts ### 📊 Changes **1 file changed** (+8 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/fs_hostname.c` (+8 -3) </details> ### 📄 Description Currently it is only mapped to ipv4, so add an ipv6 line. Default hosts file: $ cat /etc/hosts # Static table lookup for hostnames. # See hosts(5) for details. 127.0.0.1 localhost ::1 localhost Before: $ firejail --quiet --noprofile --hostname=foo cat /etc/hosts # Static table lookup for hostnames. # See hosts(5) for details. 127.0.0.1 foo ::1 localhost After: $ firejail --quiet --noprofile --hostname=foo cat /etc/hosts # Static table lookup for hostnames. # See hosts(5) for details. 127.0.0.1 foo ::1 foo Related commits: * 6f164f415 ("--keep-hostname part 2 (#7048)", 2026-02-03) Relates to #7048. Reported-by: @liloman --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:54:28 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#6306
No description provided.