Unix platform elevation enhancements v2 (#7658)

* Remove multiple send password actions on Unix elev

* Remove CoreAdminHandler password verification

This is useless since already handled in
v2rayN/v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs with
CheckSudoPasswordAsync().

* Disable caching and prompt for sudo call

* Cleanup CoreAdminHandler pwd verify remains

* Migrate sudo opts to initial pwd verification
This commit is contained in:
maximilionus
2025-07-29 14:28:09 +03:00
committed by GitHub
parent 74bb01d044
commit ce7c41e3ff
2 changed files with 3 additions and 13 deletions

View File

@@ -64,8 +64,8 @@ public partial class SudoPasswordInputView : UserControl
{
try
{
// Use sudo -S echo command to verify password
var arg = new List<string>() { "-c", "sudo -S echo SUDO_CHECK" };
// Use sudo echo command to verify password
var arg = new List<string>() { "-c", "sudo -S -k -p '' echo SUDO_CHECK" };
var result = await CliWrap.Cli
.Wrap(Global.LinuxBash)
.WithArguments(arg)