fixup variable naming
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
175eeb870d
commit
299a2f18b2
|
@ -200,8 +200,8 @@ where
|
||||||
|
|
||||||
/// Returns the Unix uid/gid for the sepcified system user.
|
/// Returns the Unix uid/gid for the sepcified system user.
|
||||||
pub fn getpwnam_ugid(username: &str) -> Result<(libc::uid_t, libc::gid_t), Error> {
|
pub fn getpwnam_ugid(username: &str) -> Result<(libc::uid_t, libc::gid_t), Error> {
|
||||||
let username = std::ffi::CString::new(username).unwrap();
|
let c_username = std::ffi::CString::new(username).unwrap();
|
||||||
let info = unsafe { libc::getpwnam(username.as_ptr()) };
|
let info = unsafe { libc::getpwnam(c_username.as_ptr()) };
|
||||||
if info == std::ptr::null_mut() {
|
if info == std::ptr::null_mut() {
|
||||||
bail!("getwpnam '{}' failed", username);
|
bail!("getwpnam '{}' failed", username);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue