mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-14 19:45:45 +00:00
Don't pass sudo password, all commands should be in sudoers
This commit is contained in:
parent
ce4793cc91
commit
f86e876242
1 changed files with 2 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ public class CoreAdminManager
|
|||
StringBuilder sb = new();
|
||||
sb.AppendLine("#!/bin/bash");
|
||||
var cmdLine = $"{fileName.AppendQuotes()} {string.Format(coreInfo.Arguments, Utils.GetBinConfigPath(configPath).AppendQuotes())}";
|
||||
sb.AppendLine($"exec sudo -u#{UID.ToString()} -S -- {cmdLine}");
|
||||
sb.AppendLine($"exec sudo -u#{UID.ToString()} -- {cmdLine}");
|
||||
var shFilePath = await FileUtils.CreateLinuxShellFile("run_as_sudo.sh", sb.ToString(), true);
|
||||
Dictionary<string,string> env = new Dictionary<string, string>();
|
||||
env.Add("ENABLE_DEPRECATED_LEGACY_DNS_SERVERS", "true");
|
||||
|
|
@ -43,7 +43,7 @@ public class CoreAdminManager
|
|||
arguments: "",
|
||||
workingDirectory: Utils.GetBinConfigPath(),
|
||||
displayLog: true,
|
||||
redirectInput: true,
|
||||
redirectInput: false,
|
||||
environmentVars: env,
|
||||
updateFunc: _updateFunc
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue