summaryrefslogtreecommitdiffstats
path: root/src/responder/ssh
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2012-08-27 04:43:23 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-09-04 10:17:42 +0200
commitef9f85751b26995093cc9782fe48ddeacc8e2d3f (patch)
treeb0d7601f32cccb97189cb503a010037d1b1ea95c /src/responder/ssh
parenta3d176d116ceccd6a7547c128fab5df5cdd2c2b6 (diff)
downloadsssd-ef9f85751b26995093cc9782fe48ddeacc8e2d3f.tar.gz
sssd-ef9f85751b26995093cc9782fe48ddeacc8e2d3f.tar.xz
sssd-ef9f85751b26995093cc9782fe48ddeacc8e2d3f.zip
SSH: Return error code in SSH utility functions
Diffstat (limited to 'src/responder/ssh')
-rw-r--r--src/responder/ssh/sshsrv_cmd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/responder/ssh/sshsrv_cmd.c b/src/responder/ssh/sshsrv_cmd.c
index 3c67fd4e9..a689515a8 100644
--- a/src/responder/ssh/sshsrv_cmd.c
+++ b/src/responder/ssh/sshsrv_cmd.c
@@ -420,6 +420,7 @@ ssh_host_pubkeys_format_known_host_plain(TALLOC_CTX *mem_ctx,
struct sss_ssh_ent *ent)
{
TALLOC_CTX *tmp_ctx;
+ errno_t ret;
char *name, *pubkey;
char *result = NULL;
size_t i;
@@ -447,9 +448,9 @@ ssh_host_pubkeys_format_known_host_plain(TALLOC_CTX *mem_ctx,
}
for (i = 0; i < ent->num_pubkeys; i++) {
- pubkey = sss_ssh_format_pubkey(tmp_ctx, ent, &ent->pubkeys[i],
- SSS_SSH_FORMAT_OPENSSH, "");
- if (!pubkey) {
+ ret = sss_ssh_format_pubkey(tmp_ctx, ent, &ent->pubkeys[i],
+ SSS_SSH_FORMAT_OPENSSH, "", &pubkey);
+ if (ret != EOK) {
result = NULL;
goto done;
}
@@ -491,9 +492,9 @@ ssh_host_pubkeys_format_known_host_hashed(TALLOC_CTX *mem_ctx,
}
for (i = 0; i < ent->num_pubkeys; i++) {
- pubkey = sss_ssh_format_pubkey(tmp_ctx, ent, &ent->pubkeys[i],
- SSS_SSH_FORMAT_OPENSSH, "");
- if (!pubkey) {
+ ret = sss_ssh_format_pubkey(tmp_ctx, ent, &ent->pubkeys[i],
+ SSS_SSH_FORMAT_OPENSSH, "", &pubkey);
+ if (ret != EOK) {
result = NULL;
goto done;
}