Skip to content
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

windows: getting "access denied" notification if named pipe already exists #78

Closed
quite opened this issue Apr 21, 2023 · 3 comments
Closed

Comments

@quite
Copy link
Contributor

quite commented Apr 21, 2023

A moderator of the winget community pkgs helpfully gave this comment about running tkey-ssh-agent. They wrote In a VM without the USB key, it gives this message: and posted a screenshot of a notification from tkey-ssh-agent that reads tkey-ssh-agent | Could not create listener: ListenPipe: open \\.\pipe\tkey-ssh-agent: Access is denied. (microsoft/winget-pkgs#103026 (comment))

The TKey USB not being plugged in really should not matter, we don't even try to connect to it until tkey-ssh-agent is asked for some action. We did not run into this ourselves during our testing on Windows 11 running in QEMU, and on Windows 10 on hardware.

Could there be some setup where user running the agent does not have permission to create a named pipe? And does that have any relation to our SecurityDescriptor setup in listen_windows.go?

One thing though, this is the exact message one gets when trying to run a second tkey-ssh-agent that tries to create the same Named Pipe as the first. Could you have happaned to do that @stephengillie

@stephengillie
Copy link

One thing though, this is the exact message one gets when trying to run a second tkey-ssh-agent that tries to create the same Named Pipe as the first.

This is likely what happened. Validation installs the package, runs all changed executables and script files, then performs a Defender scan. Frequently a package will be run multiple times, as it's launched by EXE, 1 or more LNK each on personal and public desktops and start menus, and possibly another means (such as a script file in the package). It's rare for a package to behave one way on first run and then differently on subsequent runs - here it's due to having already created the listener. And the old "meme" of a functional blocker being reported as a permissions error.

@quite
Copy link
Contributor Author

quite commented Apr 24, 2023

Thank you! We'll see about making that notification on windows a bit more informative.

@quite quite changed the title windows: issue creating the Named Pipe in some setup? windows: getting "access denied" notification if named pipe already exists Apr 24, 2023
@quite
Copy link
Contributor Author

quite commented Apr 24, 2023

See #80

quite added a commit that referenced this issue Apr 24, 2023
quite added a commit that referenced this issue Apr 26, 2023
@quite quite assigned quite and unassigned quite Apr 26, 2023
dehanj pushed a commit that referenced this issue Jan 2, 2024
dehanj pushed a commit that referenced this issue Jan 2, 2024
dehanj pushed a commit that referenced this issue Jan 2, 2024
@dehanj dehanj closed this as completed in ccbe0d1 Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants