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

Feature: Force elevation in new window #97

Closed
gerardog opened this issue Aug 4, 2021 · 3 comments
Closed

Feature: Force elevation in new window #97

gerardog opened this issue Aug 4, 2021 · 3 comments

Comments

@gerardog
Copy link
Owner

gerardog commented Aug 4, 2021

One way to ensure UIPI isolation is to elevate in a new window. If a user wants to ensure UIPI is respected is to force all elevations in new windows. To achieve this the user could do gsudo config ForceNewWindow true, and then all subsequent elevations would been done in new windows.

It is desired that a batch/script that uses gsudo would produce the same outcome (but without breaking uipi) even if ForceNewWindow is true or false. Unfortunatelly 'gsudo' currently doesn't know if it was called from a script or an interactive shell, and I doubt it could or should tell the difference.

Problems:

  • Output capturing: would break
  • Fast commands may open a new window, then close immediately. For example gsudo -n dir or gsudo cmd /k dir
  • Previous item could be fixed by opening cmd /k {command} instead of cmd /c (i.e. ´gsudo -n cmd /k dir´) but that would then break (change the outcome) of scripts using gsudo
@gerardog
Copy link
Owner Author

gerardog commented Aug 4, 2021

I have trouble finding an spec for this that fits all. Feedback wanted. But gsudo config SecurityEnforceUacIsolation true IMHO is easier to understand and does not break scripts.

@gerardog
Copy link
Owner Author

gerardog commented Oct 23, 2022

Completed in #190

Features:

  • Added setting gsudo config NewWindow.Force to force every elevation in new window. Same as using -n every time.

  • Added --KeepShell: Keep elevated shell open after running {command}.

  • Added --KeepWindow: When in new console, ask for keypress before closing the console.

  • Added setting gsudo config NewWindow.CloseBehaviour: OsDefault, KeepShellOpen (--KeepShell), PressKeyToClose (--KeepWindow)

  • Config syntax more relaxed now:

gsudo.exe config loglevel debug
gsudo.exe config loglevel=debug
gsudo.exe config loglevel="debug"
gsudo.exe config loglevel =  debug

image

image

image

@gerardog
Copy link
Owner Author

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

1 participant