summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 23:27:51 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:02 +0100
commit3412d14d65490c32414e72ac20fe21bad53ceb45 (patch)
treee63253f040369cfe88fa37a40377704072a168f7 /src/db
parent044868b388b4e47499f12a9105310b247bbe1ce2 (diff)
downloadsssd-3412d14d65490c32414e72ac20fe21bad53ceb45.tar.gz
sssd-3412d14d65490c32414e72ac20fe21bad53ceb45.tar.xz
sssd-3412d14d65490c32414e72ac20fe21bad53ceb45.zip
Add domain argument to sysdb_delete_user()
Also remove sysdb_delete_domuser()
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.c8
3 files changed, 5 insertions, 16 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index e180b682..5f406e31 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -384,11 +384,6 @@ errno_t sysdb_master_domain_get_info(TALLOC_CTX *mem_ctx,
errno_t sysdb_master_domain_add_info(struct sysdb_ctx *sysdb,
struct sysdb_subdom *domain_info);
-
-errno_t sysdb_delete_domuser(struct sss_domain_info *domain,
- const char *name, uid_t uid);
-
-
errno_t sysdb_delete_domgroup(struct sss_domain_info *domain,
const char *name, gid_t gid);
@@ -762,6 +757,7 @@ int sysdb_search_users(TALLOC_CTX *mem_ctx,
struct ldb_message ***msgs);
int sysdb_delete_user(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name, uid_t uid);
int sysdb_search_groups(TALLOC_CTX *mem_ctx,
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 4a0ed57b..4b885d67 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1673,7 +1673,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
/* This may be a user rename. If there is a user with the
* same UID, remove it and try to add the basic user again
*/
- ret = sysdb_delete_user(sysdb, NULL, uid);
+ ret = sysdb_delete_user(sysdb, domain, NULL, uid);
if (ret == ENOENT) {
/* Not found by UID, return the original EEXIST,
* this may be a conflict in MPG domain or something
@@ -2404,6 +2404,7 @@ fail:
/* =Delete-User-by-Name-OR-uid============================================ */
int sysdb_delete_user(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name, uid_t uid)
{
TALLOC_CTX *tmp_ctx;
@@ -2421,10 +2422,10 @@ int sysdb_delete_user(struct sysdb_ctx *sysdb,
}
if (name) {
- ret = sysdb_search_user_by_name(tmp_ctx, sysdb, sysdb->domain,
+ ret = sysdb_search_user_by_name(tmp_ctx, sysdb, domain,
name, NULL, &msg);
} else {
- ret = sysdb_search_user_by_uid(tmp_ctx, sysdb, sysdb->domain,
+ ret = sysdb_search_user_by_uid(tmp_ctx, sysdb, domain,
uid, NULL, &msg);
}
if (ret == EOK) {
diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c
index 6ec3e4f4..10de8502 100644
--- a/src/db/sysdb_subdomains.c
+++ b/src/db/sysdb_subdomains.c
@@ -577,14 +577,6 @@ errno_t sysdb_get_subdomain_context(TALLOC_CTX *mem_ctx,
} \
} while(0)
-errno_t sysdb_delete_domuser(struct sss_domain_info *domain,
- const char *name, uid_t uid)
-{
- CHECK_DOMAIN_INFO(domain);
-
- return sysdb_delete_user(domain->sysdb, name, uid);
-}
-
errno_t sysdb_delete_domgroup(struct sss_domain_info *domain,
const char *name, gid_t gid)
{