summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 21:40:12 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:01 +0100
commit74ac1c2834cd8961ed9e7cadcfe28b113bffe4de (patch)
treeba2d53343e42df082390683e1a04e65e436d2d6c /src/db
parent777f5bc1fb5f2ba4267de83843beee51090eb8d5 (diff)
downloadsssd-74ac1c2834cd8961ed9e7cadcfe28b113bffe4de.tar.gz
sssd-74ac1c2834cd8961ed9e7cadcfe28b113bffe4de.tar.bz2
sssd-74ac1c2834cd8961ed9e7cadcfe28b113bffe4de.zip
Add domain argument to sysdb_cache_auth()
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/db/sysdb_ops.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 707e1478..687818dc 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -707,6 +707,7 @@ errno_t check_failed_login_attempts(struct confdb_ctx *cdb,
uint32_t *failed_login_attempts,
time_t *delayed_until);
int sysdb_cache_auth(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
const char *password,
struct confdb_ctx *cdb,
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 3da1d74b..6ff10d7d 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -2784,6 +2784,7 @@ done:
}
int sysdb_cache_auth(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
const char *password,
struct confdb_ctx *cdb,
@@ -2824,7 +2825,7 @@ int sysdb_cache_auth(struct sysdb_ctx *sysdb,
return EINVAL;
}
- if (!sysdb->domain->cache_credentials) {
+ if (!domain->cache_credentials) {
DEBUG(3, ("Cached credentials not available.\n"));
return EINVAL;
}
@@ -2841,7 +2842,7 @@ int sysdb_cache_auth(struct sysdb_ctx *sysdb,
return ret;
}
- ret = sysdb_search_user_by_name(tmp_ctx, sysdb, sysdb->domain,
+ ret = sysdb_search_user_by_name(tmp_ctx, sysdb, domain,
name, attrs, &ldb_msg);
if (ret != EOK) {
DEBUG(1, ("sysdb_search_user_by_name failed [%d][%s].\n",
@@ -2955,7 +2956,7 @@ int sysdb_cache_auth(struct sysdb_ctx *sysdb,
}
}
- ret = sysdb_set_user_attr(sysdb, sysdb->domain,
+ ret = sysdb_set_user_attr(sysdb, domain,
name, update_attrs, LDB_FLAG_MOD_REPLACE);
if (ret) {
DEBUG(1, ("Failed to update Login attempt information!\n"));