gsudo

Sudo for Windows

MIT License

Stars
5.2K
Committers
24

Bot releases are hidden (Show)

gsudo - gsudo v2.3.0

Published by gerardog over 1 year ago

What's Changed

Full Changelog: https://github.com/gerardog/gsudo/compare/v2.2.0...v2.3.0

gsudo - gsudo v2.0.10

Published by gerardog over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/gerardog/gsudo/compare/v2.0.9...v2.0.10

gsudo - gsudo v2.0.9

Published by gerardog over 1 year ago

What's Changed

Full Changelog: https://github.com/gerardog/gsudo/compare/v2.0.8...v2.0.9

gsudo - gsudo v2.0.8

Published by gerardog over 1 year ago

What's Changed

Full Changelog: https://github.com/gerardog/gsudo/compare/v2.0.7...v2.0.8

gsudo - gsudo v2.0.7

Published by gerardog over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/gerardog/gsudo/compare/v2.0.6...v2.0.7

gsudo - gsudo v1.7.0

Published by gerardog about 2 years ago

What's Changed

  • Feature: Follow posix conventions for command line arguments #148 by @gerardog in https://github.com/gerardog/gsudo/pull/179
    • Short options without arguments can be grouped (gsudo -n -w -d => gsudo -nwd)
    • Short options with arguments now accepts space/no-space/equals as separator ( gsudo -i Low => gsudo -iLow or gsudo -i=Low )
    • For example gsudo -i Low -n -w -d --debug MyProgram.exe can now be written as
      • gsudo -iLow -nwd --debug MyProgram.exe allowed
      • gsudo -i=Low -nwd --debug MyProgram.exe allowed
      • gsudo -i Low -nwd --debug MyProgram.exe allowed

Full Changelog: https://github.com/gerardog/gsudo/compare/v1.6.0...v1.7.0

gsudo - gsudo v1.3.1-Feature-NetCore

Published by gerardog about 2 years ago

IMPORTANT: This is an experimental pre-release. Please, only use this version if you feel comfortable trying an experimental version that may have more problems than usual, and you are the kind of person that is willing to report problems as GitHub Issues or in this discussion thread.

In any other case, just use v1.3.0.

Also, the code-signing certificate expired so this version is signed with a self-signed certificate. I was waiting for donations to get a new certificate, and we almost made it so I am purchasing a new one this week.

This pre-release won't be published to WinGet / Scoop / Chocolatey.

Features

  • Migrated to .Net 7.0
    • Faster performance (38% for x64, 14% for x86)
    • Native build (No need to have any .Net Runtime installed). This also means different versions for x86 and x64 OS. Use the one matching your system. The gsudoSetup.msi installs the correct version automatically.
    • Details in this blog post

Full Changelog: https://github.com/gerardog/gsudo/compare/b7865bde46644586e5d978564ccb886ce09aff32...v1.3.1-Feature-NetCore

gsudo - gsudo v1.3.0

Published by gerardog over 2 years ago

Features

  • Git-Bash/MinGW Improvements:
    • Proper elevations of commands as bash commands (unless -d is specified)
      For example: gsudo ls /etc/hosts will elevate bash -c "ls /etc/hosts" instead of cmd /c ls.exe "C:/Program Files/Git/etc/hosts"
    • Fixed algorithm to define which parent process will be the allowed cache root. #134
      Still the Credentials Cache may not work in MinGW unless you add this function to your .bashrc profile:
      gsudo() { WSLENV=WSL_DISTRO_NAME:USER:$WSLENV MSYS_NO_PATHCONV=1 gsudo.exe "$@"; }
    • Fixed issues with Shell detection. (7f9d55b)
    • Disable Git-Bash/MinGW param translation on elevation(cd12fe4)

Fixes

  • WSL: Force reset color after gsudo ends. (b047df6)
  • Fixed gsudo bash script missing on Chocolatey package (aebd731)
  • Show received command line in debug information when --debug is specified. (086777c)

Full Changelog: https://github.com/gerardog/gsudo/compare/v1.2.0...v1.3.0

gsudo - gsudo v1.2.0

Published by gerardog over 2 years ago

Features

  • PowerShell: Allow to optionally load PS profiles when elevating simple commands. #130
    • For gsudo, use gsudo --loadProfile command per command, or gsudo config PowerShellLoadProfile true for permanent configuration.
    • For Invoke-Gsudo: use Invoke-gsudo { scriptBlock } -LoadProfile per command, or set $gsudoLoadProfile=$true in your $PROFILE after Import-Module gsudoModule for permanent configuration.
      For best results, if you enable this feature, your $PROFILE should not write any output to the console.

Fixes

  • Do not change Console encoding, because it alters the parent Console Host CodePage even after gsudo is closed. Fixes issues with Asian/double-byte character set (DBCS) setups. (fixes #129)
gsudo - gsudo v1.1.1

Published by gerardog over 2 years ago

Fixes

  • Improved support for elevation when current user is not admin, including PowerShell Invoke-gsudo cmdlet support #113
    • This is the scenario where gsudo's UAC popup asks for a different set of credentials.
    • The change consists into proper launching the elevated process in the admin user context.
    • Internally this means the default 'TokenSwitch' gsudo mode is not suitable for this scenario, so we fallback to Attached mode (for interactive consoles) or Piped (for Invoke-gsudo cmdlet or In/Out/Err redirection).
  • Piped Mode:
    • Fix encoding issues.
    • Close elevated StdIn when closed by client.
    • Allow local-echo if StdIn is redirected.
    • When --copyEV is used, the %UserName% variable is not copied.
  • gsudo -n -k now open the new window after closing credentials cache (-k)
  • gsudo PowerShell module now includes proper version number in gsudoModule.psd1 #127
  • Chocolatey: Fixed choco upgrade/uninstall when current directory is gsudo directory

Full Changelog: https://github.com/gerardog/gsudo/compare/v1.1.0...v1.1.1

gsudo - gsudo v1.1.0

Published by gerardog over 2 years ago

Features

  • Improved PowerShell elevation syntax with a wrapper function Invoke-gsudo #39: See the readme. For example:
Get-process SpoolSv | Invoke-gsudo { Stop-Process -Force }
  • Added gsudo !! for PowerShell to elevate the last command. #44 Requires importing gsudoModule.psm1 as explained in the readme
  • Added support for Take Command shell #107

Fixes

  • Fixed Unable to install/uninstall Chocolatey package if gsudo is running #74: Unfortunately, you still need to close gsudo before upgrading to this release, but for the next one you may gsudo choco upgrade gsudo, I promise. (Tip: For now, close all gsudo instances, then gsudo -n -k choco upgrade gsudo)
  • TokenSwith mode: Using a more restrictive security descriptor for process handles, to reduce security exposure and process handle leak.
  • Attached mode: Fixed Ctrl-C handler and redirection.
  • VT mode: Fixed redirection.

Full Changelog: https://github.com/gerardog/gsudo/compare/v1.0.2...v1.1.0

gsudo - gsudo v1.0.2

Published by gerardog about 3 years ago

Fixes

  • Fixed 'gsudo cache' auto-elevation on PowerShell when path has spaces.
  • Fixed Cache auto not working with sudo alias or msys (#98)
  • gsudo failing in PowerShell with ExecutionPolicy=Restricted. (#101)
  • Fixed Ctrl-C Handling on de-elevation (#103)
gsudo - gsudo v1.0.1

Published by gerardog about 3 years ago

Fixes:

  • Fixed problem when elevating PowerShell commands with parameters ending in \
gsudo - gsudo v1.0.0

Published by gerardog about 3 years ago

Features

  • Improved elevation of Bash commands #56: [BREAKING CHANGE] No more need to make additional character escaping (like " to \"). Now most commands can be elevated by prepending 'gsudo'.
    For example:
# Before: (<= v0.7.3)
gsudo Get-Item '""C:\Program Files\""'
$hash = gsudo "(Get-FileHash \""$file\"" -Algorithm $algorithm).Hash"
$hash = gsudo '(Get-FileHash \"C:\My Secret.txt\").Hash'
# After: (only standard pwsh escaping rules needed)
gsudo Get-Item "C:\Program Files\"
$hash = gsudo "(Get-FileHash ""$file"" -Algorithm $algorithm).Hash"
$hash = gsudo '(Get-FileHash "C:\My Secret.txt").Hash'
  • Improved elevation of WSL commands #55: [BREAKING CHANGE] Now prepend gsudo (.exe not required) to elevate WSL native commands (instead of CMD commands), or use gsudo -d {cmd} to elevate CMD commands.

  • Added -d/--direct to bypass the shell wrapper (i.e. powershell/bash/wsl) (#80) and interpret the command to elevate as a Windows / CMD app.
    For example if you do gsudo notepad C:\file.txt from powershell, it will launch another powershell instance to resolve possible PS aliases/commands. (i.e. 'powershell.exe -Command notepad'). But if you add '-d' (gsudo -d notepad) it will expect a CMD/Windows command, so it will launch notepad.exe from the path directly (also a little bit faster).

Fixes

  • gsudo config fails on auto-elevation #62 + #93
  • Microsoft Store Apps fail to elevate if command line has quotes #78
  • Removed Administrator: prefix from console title on de-elevations. #91
  • gsudo launches a 64 bit cmd when ran in a 32-bit cmd #92
  • Bad command prompt on Windows 8.1 #30
  • 'Process exited with code' message now only shown in Debug mode
gsudo - gsudo v0.7.3

Published by gerardog almost 4 years ago

Fixes:

  • Fixed Failed to load hostfxr.dll when PowerShell is installed via Microsoft Store (#65)
  • Fixed cmd language changed after running gsudo (#63 #67)
  • Fixed cmd elevated color scheme (#51)
  • Fixed exception with gsudo config when gsudo.exe is placed in a path with spaces. (#62)
gsudo - gsudo v0.7.2

Published by gerardog about 4 years ago

Fixes:

  • Fix Unhandled Exception when pressing CTRL+C after ~4 minutes runtime (Ctrl-C Handler delegate was garbage collected). (#53)
  • Fix Choco package issue when the user is not admin and installs as another user (#50)
  • Fix gsudo red ´#´ CMD prompt breaking console color scheme on some scenarios (#51)
  • Fix gsudo !prefix now case insensitive.
gsudo - gsudo v0.7.1

Published by gerardog over 4 years ago

New Features:

  • Bang Bang: Running gsudo !! allows to elevate a command executed previously (CMD only, not Pwsh). Same as on Unix/Linux sudo bang bang.
    • gsudo !! elevates the last executed command.
    • gsudo !prefix elevates the last executed command that starts with prefix.
    • gsudo !?infix elevates the last executed command that contains infix.

Fixes:

  • Fixed "Unable to connect" issue on non-english Window versions. (#42)
  • Fixed issue not running apps with "autoElevate" manifest (those that normally shows UAC, like regedit). (#36)
  • Fixed issue not running the associated program when specifiyng a document gsudo file.txt (#29)
  • Fixed hang when launched via a UWP's alias (#43)
  • Fixed some warnings appearing when Google Drive FS/crashpad is installed (#32)
  • Fixed character encoding issues in VT mode. (#31)
gsudo - gsudo v0.7 **Quarantine Edition**

Published by gerardog over 4 years ago

  • For security reasons, the Credentials Cache is no longer 'automatic' by default. It has 3 modes now:
    • Disabled: Every elevation request shows a UAC popup.
    • Explicit: (default) Every elevation shows a UAC popup, unless a cache session is started/stopped with gsudo cache on/off.
    • Auto: Simil-unix-sudo. The first elevation shows a UAC Popup and starts a cache session automatically.

Those who want to see a reduced amount of UAC popups must opt-in to start a cache session (gsudo cache on) or set the Auto mode (gsudo config CacheMode Auto).

  • Are you leaving the keyboard to a co-worker? run gsudo -k to stop all cache sessions.

  • gsudo can not only launch elevated but also unelevate or restrict the permissions of a given command. With the added the --integrity {level} | (-i for short) option to launch a process with any integrity level. For example:

    • gsudo -i Low {command} start the process with low integrity, restricted permissions.
    • gsudo -i Medium {command} start with normal permissions. Can be used to unelevate a process.
    • Only High (the default) or higher has local admin privileges.
  • Added gsudo status to show info regarding the user, elevation, and cache status.

  • gsudo is now just one single EXE file, (no DLLs). (#26)

  • New internal method to elevate/unelevate based on replacing the new process security token, instead of (the now deprecated) console attachment/redirection.

Fixes:

  • Elevating the tee command (or any other awaiting for Std Input closure) now works properly. (#25)
  • Running gsudo from a mapped drive now works but only if the current directory is local. (#27)
  • Improved Chocolatey scripts upgrade scenarios (#17)
  • Cache session now closes when the allowed process ends. (#24)
gsudo - gsudo v0.6.0

Published by gerardog over 4 years ago

New Features

  • Added -s / --system parameter to run as Local System Account.

Fixes:

  • Fixed PowerShell arguments when calling gsudo with or without arguments
    Contemplates PSCore 6.0.0 to 6.2.3 bug when installed as a global tool.
gsudo - gsudo v0.5.3

Published by gerardog almost 5 years ago

  • Fix for Win32Exception when elevating a batch file without specifying .bat exception. gsudo MyBatchFile (#6).
Badges
Extracted from project README
Join the chat at https://gitter.im/gsudo/community CI Build Chocolatey Downloads GitHub Downloads
Related Projects