/*
Authors:
Jan Cholasta <jcholast@redhat.com>
Copyright (C) 2012 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <talloc.h>
#include "util/crypto/sss_crypto.h"
#include "db/sysdb_ssh.h"
#include "responder/ssh/ssh_private.h"
static char *
struct sss_ssh_ent *ent)
{
size_t i;
if (!tmp_ctx) {
return NULL;
}
if (!name) {
goto done;
}
for (i = 0; i < ent->num_aliases; i++) {
if (!name) {
goto done;
}
}
if (!result) {
goto done;
}
for (i = 0; i < ent->num_pubkeys; i++) {
goto done;
}
if (!result) {
goto done;
}
}
done:
return result;
}
static char *
struct sss_ssh_ent *ent)
{
size_t i, j, k;
if (!tmp_ctx) {
return NULL;
}
if (!result) {
goto done;
}
for (i = 0; i < ent->num_pubkeys; i++) {
goto done;
}
for (j = 0; j <= ent->num_aliases; j++) {
for (k = 0; k < SSS_SHA1_LENGTH; k++) {
}
hash);
"sss_hmac_sha1() failed (%d): %s\n",
goto done;
}
if (!saltstr) {
goto done;
}
if (!hashstr) {
goto done;
}
if (!result) {
goto done;
}
}
}
done:
return result;
}
static errno_t
bool hash_known_hosts,
int fd)
{
char *entstr;
size_t i;
static const char *attrs[] = {
};
return ENOMEM;
}
"Fatal: Sysdb CTX not found for this domain!\n");
goto done;
}
continue;
continue;
}
for (i = 0; i < num_hosts; i++) {
"Failed to get SSH host public keys\n");
continue;
}
if (hash_known_hosts) {
} else {
}
continue;
}
if (wret == -1) {
goto done;
}
}
}
done:
return ret;
}
struct sss_domain_info *domain,
const char *name,
bool hash_known_hosts,
int known_hosts_timeout)
{
char *filename;
return ENOMEM;
}
/* Update host's expiration time. */
goto done;
}
}
/* Create temporary known hosts file. */
goto done;
}
if (fd == -1) {
goto done;
}
/* Write contents. */
goto done;
}
/* Rename to SSH known hosts file. */
if (ret == -1) {
goto done;
}
if (ret == -1) {
goto done;
}
done:
if (fd != -1) {
}
return ret;
}