-
Notifications
You must be signed in to change notification settings - Fork 819
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
RestrictAddressFamilies (systemd) prevents running host apps #10459
Comments
Note: from microsoft/git#604, the address family in question turned out to be |
Thank you for reporting this @nedsociety. Unfortunately I think this needs to be fixed on the git side (or whoever owns the systemd unit). The error you're seeing is "by-design" in the sense that systemd explicitely denies WSL from opening an hvsocket to invoke a Windows binary so this is not something that WSL can "fix". |
Thanks for clarifying the responsibility here. Still, aside from actual possibility of implementing a fix, I have a deep doubt if it's a good design to shift the responsibility to service writers for this. It mandates that they should be aware of WSL internals yet there's none that mentions such caveats (googled |
Windows Version
Microsoft Windows [Version 10.0.22621.2134]
WSL Version
1.3.14.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.90.3-1
Distro Version
Ubuntu 22.04
Other Software
git (microsoft fork) 2.39.2.vfs.0.0
Repro Steps
~/.gitconfig
(wsl), add these lines to share host's git cred store with WSL:(that path depends on the host side installation)
4. Run
scalar register <some repo>
5. Run
systemctl --user start git-maintenance@hourly.service
Expected Behavior
The hourly maintenance job succeeds.
Actual Behavior
it fails with following logs (
systemctl --user status git-maintenance@hourly.service
):with further investigation I've located the following lines are generated by git-maintenance:
(
~/.config/systemd/user/git-maintenance@.service
)and commenting out that specific line workarounds the problem. I have no idea what address families are required for WSL to interop with the host, but it definitely is blocking the cred store executable from running at all.
I'm not 100% sure that if it's to be solved from git or WSL. It might be easy for git to add some kind of address family that WSL uses to the line in question. But I believe if you're writing such systemd services (just like git authors) you won't be expected to write some WSL-specific construct onto that configuration, so I'd argue WSL should transparently support it.
X-posting: microsoft/git#604
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: