diff options
author | Jan Cholasta <jcholast@redhat.com> | 2012-02-03 22:52:08 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-02-07 00:26:57 +0100 |
commit | 347f7c4d1e8e83fc7ffcaf9524a67e8b3ad5d7c5 (patch) | |
tree | a0867031e594fdb5e083be0f6afca3f27763783f /src/sss_client/common.c | |
parent | e7311aec8d691e5427317442387af1bc8fff3742 (diff) | |
download | sssd-347f7c4d1e8e83fc7ffcaf9524a67e8b3ad5d7c5.tar.gz sssd-347f7c4d1e8e83fc7ffcaf9524a67e8b3ad5d7c5.tar.bz2 sssd-347f7c4d1e8e83fc7ffcaf9524a67e8b3ad5d7c5.zip |
SSH: Common client code
Diffstat (limited to 'src/sss_client/common.c')
-rw-r--r-- | src/sss_client/common.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/sss_client/common.c b/src/sss_client/common.c index 8fe8b44c..28adb442 100644 --- a/src/sss_client/common.c +++ b/src/sss_client/common.c @@ -381,6 +381,8 @@ static bool sss_cli_check_version(const char *socket_name) expected_version = SSS_SUDO_PROTOCOL_VERSION; } else if (strcmp(socket_name, SSS_AUTOFS_SOCKET_NAME) == 0) { expected_version = SSS_AUTOFS_PROTOCOL_VERSION; + } else if (strcmp(socket_name, SSS_SSH_SOCKET_NAME) == 0) { + expected_version = SSS_SSH_PROTOCOL_VERSION; } else { return false; } @@ -849,6 +851,23 @@ int sss_autofs_make_request(enum sss_cli_command cmd, return ret; } +int sss_ssh_make_request(enum sss_cli_command cmd, + struct sss_cli_req_data *rd, + uint8_t **repbuf, size_t *replen, + int *errnop) +{ + enum sss_status ret = SSS_STATUS_UNAVAIL; + + ret = sss_cli_check_socket(errnop, SSS_SSH_SOCKET_NAME); + if (ret != SSS_STATUS_SUCCESS) { + return SSS_STATUS_UNAVAIL; + } + + ret = sss_cli_make_request_nochecks(cmd, rd, repbuf, replen, errnop); + + return ret; +} + const char *ssscli_err2string(int err) { |