fix linux uid username mismatch
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
c48ed06d93
commit
9a9a8197ae
3 changed files with 66 additions and 32 deletions
|
|
@ -1514,7 +1514,14 @@ async fn start_ipc(
|
|||
if crate::platform::is_root() {
|
||||
let mut res = Ok(None);
|
||||
for _ in 0..10 {
|
||||
res = crate::platform::run_as_user("--cm");
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
res = crate::platform::run_as_user("--cm");
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
res = crate::platform::run_as_user("--cm", None);
|
||||
}
|
||||
if res.is_ok() {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue