diff options
author | Jan Cholasta <jcholast@redhat.com> | 2012-08-27 04:43:23 -0400 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-09-04 10:17:42 +0200 |
commit | ef9f85751b26995093cc9782fe48ddeacc8e2d3f (patch) | |
tree | b0d7601f32cccb97189cb503a010037d1b1ea95c /src/sss_client/ssh | |
parent | a3d176d116ceccd6a7547c128fab5df5cdd2c2b6 (diff) | |
download | sssd-ef9f85751b26995093cc9782fe48ddeacc8e2d3f.tar.gz sssd-ef9f85751b26995093cc9782fe48ddeacc8e2d3f.tar.bz2 sssd-ef9f85751b26995093cc9782fe48ddeacc8e2d3f.zip |
SSH: Return error code in SSH utility functions
Diffstat (limited to 'src/sss_client/ssh')
-rw-r--r-- | src/sss_client/ssh/sss_ssh_authorizedkeys.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/sss_client/ssh/sss_ssh_authorizedkeys.c b/src/sss_client/ssh/sss_ssh_authorizedkeys.c index dd9a0628..74b9693f 100644 --- a/src/sss_client/ssh/sss_ssh_authorizedkeys.c +++ b/src/sss_client/ssh/sss_ssh_authorizedkeys.c @@ -109,12 +109,13 @@ int main(int argc, const char **argv) /* print results */ for (i = 0; i < ent->num_pubkeys; i++) { - repr = sss_ssh_format_pubkey(mem_ctx, ent, &ent->pubkeys[i], - SSS_SSH_FORMAT_OPENSSH, NULL); - if (!repr) { - ERROR("Not enough memory\n"); - ret = EXIT_FAILURE; - goto fini; + ret = sss_ssh_format_pubkey(mem_ctx, ent, &ent->pubkeys[i], + SSS_SSH_FORMAT_OPENSSH, NULL, &repr); + if (ret != EOK) { + DEBUG(SSSDBG_OP_FAILURE, + ("sss_ssh_format_pubkey() failed (%d): %s\n", + ret, strerror(ret))); + continue; } printf("%s\n", repr); |