Remove CoreAdminHandler password verification

This is useless since already handled in
v2rayN/v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs with
CheckSudoPasswordAsync().
pull/7658/head
maximilionus 2025-07-27 19:21:40 +03:00
parent 4217397428
commit 653df33236
1 changed files with 1 additions and 8 deletions

View File

@ -50,17 +50,10 @@ public class CoreAdminHandler
}
};
var sudoVerified = false;
DataReceivedEventHandler dataHandler = (sender, e) =>
{
if (e.Data.IsNotEmpty())
{
if (!sudoVerified && e.Data.Contains(_sudoAccessText))
{
sudoVerified = true;
UpdateFunc(false, ResUI.SudoPwdVerfiedSuccessTip + Environment.NewLine);
return;
}
UpdateFunc(false, e.Data + Environment.NewLine);
}
};
@ -116,7 +109,7 @@ public class CoreAdminHandler
}
else
{
sb.AppendLine($"sudo -S echo \"{_sudoAccessText}\" && sudo -S {cmdLine}");
sb.AppendLine($"sudo -S {cmdLine}");
}
await File.WriteAllTextAsync(shFilePath, sb.ToString());