Skip to content

Commit

Permalink
Fix CStr
Browse files Browse the repository at this point in the history
  • Loading branch information
LeChatP committed Aug 24, 2023
1 parent cceb30d commit 170559e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/config/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,7 @@ impl<'a> Role<'a> {
Ok(Some(nixuser)) => {
let mut groups_to_check = Vec::new();
if let Ok(groups) = getgrouplist(
&CStr::from_bytes_until_nul(nixuser.name.as_bytes())
.expect("Internal Error"),
&CString::new(nixuser.name.as_str()).unwrap().as_c_str(),
nixuser.gid,
) {
for group in groups.iter() {
Expand Down

0 comments on commit 170559e

Please sign in to comment.