Skip to content

Releases: gerardog/gsudo

gsudo v1.4.0

04 Sep 18:13
Compare
Choose a tag to compare

What's Changed

  • 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
  • This release is the similar to the v1.3.1-Feature-NetCore prerelease, but properly signed with the new code signing certificate.
    • Thank you so much to all the sponsors that made it possible!! We will need a renew the certificate in exactly one year, so your donations are appreciated!
  • New GitHub Actions pipeline for (hopefully faster) Build, Test & Release

Full Changelog: v1.3.0...v1.4.0

gsudo v1.3.1-Feature-NetCore

27 Aug 22:09
Compare
Choose a tag to compare
Pre-release

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: b7865bd...v1.3.1-Feature-NetCore

gsudo v1.3.0

13 Apr 14:04
Compare
Choose a tag to compare

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: v1.2.0...v1.3.0

gsudo v1.2.0

25 Mar 13:02
Compare
Choose a tag to compare

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 v1.1.1

12 Mar 03:41
Compare
Choose a tag to compare

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: v1.1.0...v1.1.1

gsudo v1.1.0

27 Feb 21:49
Compare
Choose a tag to compare

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: v1.0.2...v1.1.0

gsudo v1.0.2

18 Aug 19:30
Compare
Choose a tag to compare

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 v1.0.1

07 Aug 20:57
Compare
Choose a tag to compare

Fixes:

  • Fixed problem when elevating PowerShell commands with parameters ending in \

gsudo v1.0.0

07 Aug 05:41
Compare
Choose a tag to compare

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 v0.7.3

20 Dec 22:07
Compare
Choose a tag to compare

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)