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

Handle UnauthorizedAccessException related to running VA As Administrator #138

Closed
ACyprus opened this issue May 22, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working done implemented, but not merged into release yet RatAttack
Milestone

Comments

@ACyprus
Copy link
Contributor

ACyprus commented May 22, 2022

When running VA "As Administrator", RatAttack-cli.exe will return the following error when attempting to pipe through a RATSIGNAL:

Unhandled Exception: System.UnauthorizedAccessException: Access to the path is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Pipes.NamedPipeClientStream.Connect(Int32 timeout) at RatAttack.RatAttack_cli.Main(String[] args)

Here is the associated setting in VA:

image

@alterNERDtive alterNERDtive added bug Something isn't working RatAttack labels May 22, 2022
@alterNERDtive
Copy link
Owner

Possible solutions:

  • Handle the exception in the cli tool. Will most likely not even be seen by the user since it’s the IRC client running it.
  • Check if VA is running elevated, print a warning to the log. Doesn’t solve anything, but people shouldn’t run VA elevated.
  • Make the named pipe globally accessible. Not great, but solves this issue:
    PipeSecurity pSecure = new PipeSecurity();
    pSecure.SetAccessRule(new PipeAccessRule("Everyone", PipeAccessRights.ReadWrite,
    System.Security.AccessControl.AccessControlType.Allow));
    
  • Tell people to run their IRC client / the cli tool as admin. No. Just no.

alterNERDtive added a commit that referenced this issue May 29, 2022
see #138

Writing to other users’ pipes will cause an exception. You should not run VA elevated.

Needs a warning in VA too.
@alterNERDtive alterNERDtive added this to the 4.3.1 milestone May 29, 2022
@alterNERDtive alterNERDtive self-assigned this May 29, 2022
@alterNERDtive alterNERDtive added the done implemented, but not merged into release yet label May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done implemented, but not merged into release yet RatAttack
Projects
None yet
Development

No branches or pull requests

2 participants