mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 03:00:26 +09:00
Rewrite strerror to ssh_strerror
Signed-off-by: Norbert Pocs <npocs@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
4f09bb3660
commit
4719c09e6a
@@ -622,8 +622,12 @@ int ssh_publickey_to_file(ssh_session session,
|
|||||||
|
|
||||||
fp = fopen(file, "w+");
|
fp = fopen(file, "w+");
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
ssh_set_error(session, SSH_REQUEST_DENIED,
|
char err_msg[SSH_ERRNO_MSG_MAX] = {0};
|
||||||
"Error opening %s: %s", file, strerror(errno));
|
ssh_set_error(session,
|
||||||
|
SSH_REQUEST_DENIED,
|
||||||
|
"Error opening %s: %s",
|
||||||
|
file,
|
||||||
|
ssh_strerror(errno, err_msg, SSH_ERRNO_MSG_MAX));
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user