Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not explicitly call description on nss error #410

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions nss/src/group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn get_all_entries() -> Response<Vec<Group>> {
match client.get_group_entries(req).await {
Ok(r) => Response::Success(group_entries_to_groups(r.into_inner().entries)),
Err(e) => {
error!("error when listing groups: {}", e.code().description());
error!("error when listing groups: {}", e.code());
super::grpc_status_to_nss_response(e)
}
}
Expand Down Expand Up @@ -81,11 +81,7 @@ fn get_entry_by_gid(gid: gid_t) -> Response<Group> {
match client.get_group_by_gid(req).await {
Ok(r) => Response::Success(group_entry_to_group(r.into_inner())),
Err(e) => {
error!(
"error when getting group by gid '{}': {}",
gid,
e.code().description()
);
error!("error when getting group by gid '{}': {}", gid, e.code());
super::grpc_status_to_nss_response(e)
}
}
Expand Down
10 changes: 3 additions & 7 deletions nss/src/passwd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn get_all_entries() -> Response<Vec<Passwd>> {
match client.get_passwd_entries(req).await {
Ok(r) => Response::Success(passwd_entries_to_passwds(r.into_inner().entries)),
Err(e) => {
error!("error when listing passwd: {}", e.code().description());
error!("error when listing passwd: {}", e.code());
super::grpc_status_to_nss_response(e)
}
}
Expand Down Expand Up @@ -81,11 +81,7 @@ fn get_entry_by_uid(uid: uid_t) -> Response<Passwd> {
match client.get_passwd_by_uid(req).await {
Ok(r) => Response::Success(passwd_entry_to_passwd(r.into_inner())),
Err(e) => {
error!(
"error when getting passwd by uid '{}': {}",
uid,
e.code().description()
);
error!("error when getting passwd by uid '{}': {}", uid, e.code());
super::grpc_status_to_nss_response(e)
}
}
Expand Down Expand Up @@ -122,7 +118,7 @@ fn get_entry_by_name(name: String) -> Response<Passwd> {
error!(
"error when getting passwd by name '{}': {}",
name,
e.code().description()
e.code()
);
super::grpc_status_to_nss_response(e)
}
Expand Down
8 changes: 2 additions & 6 deletions nss/src/shadow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn get_all_entries() -> Response<Vec<Shadow>> {
match client.get_shadow_entries(req).await {
Ok(r) => Response::Success(shadow_entries_to_shadows(r.into_inner().entries)),
Err(e) => {
error!("error when listing shadow: {}", e.code().description());
error!("error when listing shadow: {}", e.code());
super::grpc_status_to_nss_response(e)
}
}
Expand Down Expand Up @@ -76,11 +76,7 @@ fn get_entry_by_name(name: String) -> Response<Shadow> {
match client.get_shadow_by_name(req).await {
Ok(r) => Response::Success(shadow_entry_to_shadow(r.into_inner())),
Err(e) => {
error!(
"error when getting shadow by name '{}': {}",
name,
e.code().description()
);
error!("error when getting shadow by name '{}': {}", name, e.code());
super::grpc_status_to_nss_response(e)
}
}
Expand Down
Loading