microsoft / microsoft/sudo

FUSLOGVW.exe corrupts custom directory name when run with sudo inline

Open
#128 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Needs-Triage
Dominant language
Rust
Stars
5.9k
Forks
180
Avg merge
1d 7h
Merged PRs (30d)
2

Description

Sudo for Windows version

1.0.1

Windows build number

10.0.26100.0

Other Software

Assembly Binding Log Viewer 4.0.30319.0

Steps to reproduce
  1. Configure inline sudo.

  2. Run sudo FUSLOGVW.exe

  3. Click on Settings.

  4. Enable custom log path.

  5. Enter a valid existing directory.

  6. An error will pop up: Custom log path must not be relative. And it must be an existing directory. Please reset custom log path.

  7. Inspect the Windows API call using Process Monitor from Sysinternals and see that the path name has been corrupted:

    Image
  8. Run FUSLOGVW.exe from an elevated PowerShell prompt (which can be elevated using sudo or by starting the process elevated from the Start menu), and confirm that this bug is not present.

Another developer has also reproduced this issue on a separate PC.

Expected Behavior

Running Assembly Binding Log Viewer under sudo inline will behave the same as when elevated via other means.

Actual Behavior

I'm unable to set a custom log directory because the log path is corrupted when calling the Windows CreateFile API.

Contributor guide

Open the contributing guide

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

Start by reproducing the custom log path failure with FUSLOGVW.exe through inline sudo, then compare the path passed to the Windows CreateFile API with an elevated PowerShell launch. Trace the inline execution path and path handling; done means an existing custom directory is accepted and behaves the same under both elevation methods.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.