ksud: fmt
This commit is contained in:
@@ -5,10 +5,7 @@ use anyhow::ensure;
|
|||||||
use getopts::Options;
|
use getopts::Options;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::os::unix::process::CommandExt;
|
use std::os::unix::process::CommandExt;
|
||||||
use std::{
|
use std::{ffi::CStr, process::Command};
|
||||||
ffi::CStr,
|
|
||||||
process::Command,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
defs,
|
defs,
|
||||||
@@ -188,7 +185,7 @@ pub fn root_shell() -> Result<()> {
|
|||||||
|
|
||||||
if let Some(pw) = pw {
|
if let Some(pw) = pw {
|
||||||
let home = unsafe { CStr::from_ptr(pw.pw_dir) };
|
let home = unsafe { CStr::from_ptr(pw.pw_dir) };
|
||||||
let pw_name = unsafe { CStr::from_ptr(pw.pw_name)};
|
let pw_name = unsafe { CStr::from_ptr(pw.pw_name) };
|
||||||
|
|
||||||
let home = home.to_string_lossy();
|
let home = home.to_string_lossy();
|
||||||
let pw_name = pw_name.to_string_lossy();
|
let pw_name = pw_name.to_string_lossy();
|
||||||
|
|||||||
Reference in New Issue
Block a user