summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-06 18:27:50 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:49:20 +0100
commita5a4e5b4836fdd693bab6e1c7f9d633d1440447d (patch)
treea58ee3c7c5d78da5350817d5c02ede740a586f49 /src/db
parent2ce00e0d3896bb42db169d1e79553a81ca837a22 (diff)
downloadsssd-a5a4e5b4836fdd693bab6e1c7f9d633d1440447d.tar.gz
sssd-a5a4e5b4836fdd693bab6e1c7f9d633d1440447d.tar.bz2
sssd-a5a4e5b4836fdd693bab6e1c7f9d633d1440447d.zip
Add domain to sysdb_search_user_by_uid()
Also remove unused sysdb_search_domuser_by_uid()
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb.h6
-rw-r--r--src/db/sysdb_ops.c7
-rw-r--r--src/db/sysdb_subdomains.c11
3 files changed, 5 insertions, 19 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index b744ac24..333c94ae 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -385,11 +385,6 @@ errno_t sysdb_master_domain_add_info(struct sysdb_ctx *sysdb,
struct sysdb_subdom *domain_info);
-errno_t sysdb_search_domuser_by_uid(TALLOC_CTX *mem_ctx,
- struct sss_domain_info *domain,
- uid_t uid,
- const char **attrs,
- struct ldb_message **msg);
errno_t sysdb_store_domuser(struct sss_domain_info *domain,
const char *name,
const char *pwd,
@@ -554,6 +549,7 @@ int sysdb_search_user_by_name(TALLOC_CTX *mem_ctx,
int sysdb_search_user_by_uid(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
uid_t uid,
const char **attrs,
struct ldb_message **msg);
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 76f19878..2e361ec8 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -277,6 +277,7 @@ done:
int sysdb_search_user_by_uid(TALLOC_CTX *mem_ctx,
struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
uid_t uid,
const char **attrs,
struct ldb_message **msg)
@@ -295,7 +296,7 @@ int sysdb_search_user_by_uid(TALLOC_CTX *mem_ctx,
}
basedn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
- SYSDB_TMPL_USER_BASE, sysdb->domain->name);
+ SYSDB_TMPL_USER_BASE, domain->name);
if (!basedn) {
ret = ENOMEM;
goto done;
@@ -1129,7 +1130,7 @@ int sysdb_add_user(struct sysdb_ctx *sysdb,
/* check no other user with the same uid exist */
if (uid != 0) {
- ret = sysdb_search_user_by_uid(tmp_ctx, sysdb,
+ ret = sysdb_search_user_by_uid(tmp_ctx, sysdb, domain,
uid, NULL, &msg);
if (ret != ENOENT) {
if (ret == EOK) ret = EEXIST;
@@ -2397,7 +2398,7 @@ int sysdb_delete_user(struct sysdb_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,
+ ret = sysdb_search_user_by_uid(tmp_ctx, sysdb, sysdb->domain,
uid, NULL, &msg);
}
if (ret == EOK) {
diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c
index de5a6ac1..5943c1d1 100644
--- a/src/db/sysdb_subdomains.c
+++ b/src/db/sysdb_subdomains.c
@@ -577,17 +577,6 @@ errno_t sysdb_get_subdomain_context(TALLOC_CTX *mem_ctx,
} \
} while(0)
-errno_t sysdb_search_domuser_by_uid(TALLOC_CTX *mem_ctx,
- struct sss_domain_info *domain,
- uid_t uid,
- const char **attrs,
- struct ldb_message **msg)
-{
- CHECK_DOMAIN_INFO(domain);
-
- return sysdb_search_user_by_uid(mem_ctx, domain->sysdb, uid, attrs, msg);
-}
-
errno_t sysdb_store_domuser(struct sss_domain_info *domain,
const char *name,
const char *pwd,