From a5a4e5b4836fdd693bab6e1c7f9d633d1440447d Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 6 Jan 2013 18:27:50 -0500 Subject: Add domain to sysdb_search_user_by_uid() Also remove unused sysdb_search_domuser_by_uid() --- src/db/sysdb_ops.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/db/sysdb_ops.c') 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) { -- cgit