/*
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 <talloc.h>
#include "db/sysdb_ssh.h"
#include "db/sysdb_private.h"
static struct ldb_dn *
struct sss_domain_info *domain,
const char *name)
{
}
static errno_t
const char *name,
struct sysdb_attrs *attrs)
{
attrs);
return ret;
}
return EOK;
}
const char *name,
const char *alias,
int cache_timeout,
struct sysdb_attrs *attrs)
{
bool in_transaction = false;
bool new_alias;
unsigned int i;
if (!tmp_ctx) {
return ENOMEM;
}
goto done;
}
in_transaction = true;
goto done;
}
goto done;
}
goto done;
}
if (alias) {
new_alias = true;
/* copy aliases from the existing entry */
if (host) {
if (el) {
for (i = 0; i < el->num_values; i++) {
new_alias = false;
}
"Could not add name alias %s [%d]: %s\n",
goto done;
}
}
}
}
/* add alias only if it is not already present */
if (new_alias) {
"Could not add name alias %s [%d]: %s\n",
goto done;
}
}
}
/* make sure sshPublicKey is present when modifying an existing host */
if (host) {
"Could not get sysdb sshPublicKey [%d]: %s\n",
goto done;
}
}
"Could not set sysdb lastUpdate [%d]: %s\n",
goto done;
}
goto done;
}
goto done;
}
goto done;
}
in_transaction = false;
done:
if (in_transaction) {
}
}
return ret;
}
const char *name,
struct sysdb_attrs *attrs,
int mod_op)
{
if (!tmp_ctx) {
return ENOMEM;
}
if (!dn) {
goto done;
}
done:
return ret;
}
const char *name,
int known_hosts_timeout)
{
"Updating known_hosts expire time of host %s\n", name);
if (!tmp_ctx) {
return ENOMEM;
}
if (!attrs) {
goto done;
}
"Could not set known_hosts expire time [%d]: %s\n",
goto done;
}
goto done;
}
done:
return ret;
}
const char *name)
{
}
struct sss_domain_info *domain,
const char *filter,
const char **attrs,
struct ldb_message ***hosts)
{
if (!tmp_ctx) {
return ENOMEM;
}
&num_results, &results);
"Error looking up host [%d]: %s\n",
goto done;
*num_hosts = 0;
goto done;
}
*num_hosts = num_results;
done:
return ret;
}
struct sss_domain_info *domain,
const char *name,
const char **attrs,
struct ldb_message **host)
{
const char *filter;
if (!tmp_ctx) {
return ENOMEM;
}
if (!filter) {
goto done;
}
goto done;
}
if (num_hosts > 1) {
"Found more than one host with name %s\n", name);
goto done;
}
done:
return ret;
}
struct sss_domain_info *domain,
const char **attrs,
struct ldb_message ***hosts,
{
const char *filter;
if (!tmp_ctx) {
return ENOMEM;
}
"(&(|(!(%s=*))(%s=0)(%s>=%lld))(%s>=%lld))",
if (!filter) {
goto done;
}
done:
return ret;
}