msys2 / msys2/msys2-runtime

Home directory evaluation broken for Network Service account

Open
#258 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
240
Forks
60
Avg merge
2d 3h
Merged PRs (30d)
1

Description

Background: Coming here by way of Git for Windows. We have a Windows service that interacts with git repositories, which necessitates managing SSH config for the Network Service account. That lives in the Network Service profile directory, %windir%\ServiceProfiles\NetworkService. This stopped working in the latest version of Git for Windows, as ~ no longer resolves correctly for Network Service. I tracked the issue down to msys-2.0.dll. The issue appears after 3.4.10 and before 3.5.4.

Issue: Previously, ~ correctly resolved to "/c/Windows/ServiceProfiles/NetworkService". Now, it resolves to "/". Swapping just one file, msys-2.0.dll, between 3.4.10 and 3.5.4 controls whether the issue happens or not.

Example: bash included in older Git for Windows (msys2 3.4.10)
Image

Example: bash included in direct msys2 install (3.5.4)
Image

Please let me know if you have any ideas. Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Network Service account behavior with bash and compare msys-2.0.dll from the 3.4.10 and 3.5.4 versions. Start by tracing home-directory evaluation for %windir%\ServiceProfiles\NetworkService. Done means ~ resolves to /c/Windows/ServiceProfiles/NetworkService rather than /.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.