Repository navigation
Share host names within Linux UTS namespaces - #1889
Merged
Merged
Conversation
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/broker-host-names
branch
2 times, most recently
from
November 14, 2026 22:05
dec7273 to
26821cd
Compare
Base automatically changed from
wdcui/ulitebox/broker-host-names
to
ulitebox
November 14, 2026 22:21
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/uts-host-names
branch
2 times, most recently
from
November 14, 2026 23:54
7f223ee to
311c46f
Compare
Make sethostname and setdomainname set the broker's host names, which uname reads, so a change is seen by every process in the caller's UTS namespace. CLONE_NEWUTS gives the child its own copy, and unshare(CLONE_NEWUTS) gives the caller one. The shim keeps Linux's rules: 64-byte names, EPERM before EINVAL before EFAULT, and root only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5406de6-bab4-4f3b-b232-ae238032c2c2
Extend the UTS and IPC namespace test to set and read the host and domain names: their length and error rules, that the processes of a namespace, vfork children and exec'd programs included, share them, and that clone, clone3 and unshare give a new namespace a separate copy. Every check also holds on Linux. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f5406de6-bab4-4f3b-b232-ae238032c2c2
The shim shouldn't assume how LiteBox supports host names, so its comments refer to LiteBox rather than the broker. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2e5cd85d-5d69-4dcf-a36d-b00805c90d53
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/uts-host-names
branch
from
November 15, 2026 20:21
7304675 to
794ae08
Compare
Weidong Cui (wdcui)
marked this pull request as ready for review
November 15, 2026 20:34
|
🤖 SemverChecks 🤖 Click for details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR keeps Linux guests' host and domain names in LiteBox's shared host names, so the processes of a UTS namespace share them.
unamereads both, truncating longer names to Linux's length limit.sethostnameandsetdomainnameneed root and follow Linux's checks in order.CLONE_NEWUTSgives a new child its own copy of the names, andunshare(CLONE_NEWUTS)gives the caller one. The end-to-end UTS test now checks sharing and separation.