summaryrefslogtreecommitdiff
path: root/src/db/sysdb_ops.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 18:24:12 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commit2ce00e0d3896bb42db169d1e79553a81ca837a22 (patch)
tree4680fe9905816d67d70169ccc378f41545db8352 /src/db/sysdb_ops.c
parent5d78919c955c945e78865f322726aac075c71203 (diff)
downloadsssd-2ce00e0d3896bb42db169d1e79553a81ca837a22.tar.gz
sssd-2ce00e0d3896bb42db169d1e79553a81ca837a22.tar.bz2
sssd-2ce00e0d3896bb42db169d1e79553a81ca837a22.zip
Add domain to sysdb_search_user_by_name()
Also remove unused sysdb_search_domuser_by_name()
Diffstat (limited to 'src/db/sysdb_ops.c')
-rw-r--r--src/db/sysdb_ops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 08d7734d..76f19878 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -233,6 +233,7 @@ int sysdb_search_entry(TALLOC_CTX *mem_ctx,
int sysdb_search_user_by_name(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
const char **attrs,
struct ldb_message **msg)
@@ -249,7 +250,7 @@ int sysdb_search_user_by_name(TALLOC_CTX *mem_ctx,
return ENOMEM;
}
- basedn = sysdb_user_dn(sysdb, tmp_ctx, sysdb->domain, name);
+ basedn = sysdb_user_dn(sysdb, tmp_ctx, domain, name);
if (!basedn) {
ret = ENOMEM;
goto done;
@@ -1295,7 +1296,7 @@ int sysdb_add_group(struct sysdb_ctx *sysdb,
* Don't worry about users, if we try to add a user with the same
* name the operation will fail */
- ret = sysdb_search_user_by_name(tmp_ctx, sysdb,
+ ret = sysdb_search_user_by_name(tmp_ctx, sysdb, domain,
name, NULL, &msg);
if (ret != ENOENT) {
if (ret == EOK) ret = EEXIST;
@@ -1640,7 +1641,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
in_transaction = true;
- ret = sysdb_search_user_by_name(tmp_ctx, sysdb,
+ ret = sysdb_search_user_by_name(tmp_ctx, sysdb, sysdb->domain,
name, NULL, &msg);
if (ret && ret != ENOENT) {
goto fail;
@@ -2393,7 +2394,7 @@ int sysdb_delete_user(struct sysdb_ctx *sysdb,
}
if (name) {
- ret = sysdb_search_user_by_name(tmp_ctx, sysdb,
+ ret = sysdb_search_user_by_name(tmp_ctx, sysdb, sysdb->domain,
name, NULL, &msg);
} else {
ret = sysdb_search_user_by_uid(tmp_ctx, sysdb,
@@ -2817,7 +2818,7 @@ int sysdb_cache_auth(struct sysdb_ctx *sysdb,
return ret;
}
- ret = sysdb_search_user_by_name(tmp_ctx, sysdb,
+ ret = sysdb_search_user_by_name(tmp_ctx, sysdb, sysdb->domain,
name, attrs, &ldb_msg);
if (ret != EOK) {
DEBUG(1, ("sysdb_search_user_by_name failed [%d][%s].\n",