summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb_ops.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 20:03:33 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:01 +0100
commit6ac396bebb4cd3124711d26dce54263f6f9c7c45 (patch)
treec497a634c0e14ab3c55469f3669b1a0f9d5f3fc3 /src/db/sysdb_ops.c
parentb7427d63bd328be32991f9d437c4a3d46bcabe03 (diff)
downloadsssd-6ac396bebb4cd3124711d26dce54263f6f9c7c45.tar.gz
sssd-6ac396bebb4cd3124711d26dce54263f6f9c7c45.tar.xz
sssd-6ac396bebb4cd3124711d26dce54263f6f9c7c45.zip
Add domain argument to sysdb_store_user()
Also remove sysdb_store_domuser()
Diffstat (limited to 'src/db/sysdb_ops.c')
-rw-r--r--src/db/sysdb_ops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 0b6951a64..61a0e77d9 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -1610,6 +1610,7 @@ done:
* this will just remove it */
int sysdb_store_user(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
const char *pwd,
uid_t uid, gid_t gid,
@@ -1641,7 +1642,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
}
}
- if (pwd && (sysdb->domain->legacy_passwords || !*pwd)) {
+ if (pwd && (domain->legacy_passwords || !*pwd)) {
ret = sysdb_attrs_add_string(attrs, SYSDB_PWD, pwd);
if (ret) goto fail;
}
@@ -1654,8 +1655,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
in_transaction = true;
- ret = sysdb_search_user_by_name(tmp_ctx, sysdb, sysdb->domain,
- name, NULL, &msg);
+ ret = sysdb_search_user_by_name(tmp_ctx, sysdb, domain, name, NULL, &msg);
if (ret && ret != ENOENT) {
goto fail;
}
@@ -1667,7 +1667,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
if (ret == ENOENT) {
/* users doesn't exist, turn into adding a user */
- ret = sysdb_add_user(sysdb, sysdb->domain, name, uid, gid, gecos, homedir,
+ ret = sysdb_add_user(sysdb, domain, name, uid, gid, gecos, homedir,
shell, orig_dn, attrs, cache_timeout, now);
if (ret == EEXIST) {
/* This may be a user rename. If there is a user with the
@@ -1686,7 +1686,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
DEBUG(SSSDBG_MINOR_FAILURE,
("A user with the same UID [%llu] was removed from the "
"cache\n", (unsigned long long) uid));
- ret = sysdb_add_user(sysdb, sysdb->domain, name, uid, gid, gecos, homedir,
+ ret = sysdb_add_user(sysdb, domain, name, uid, gid, gecos, homedir,
shell, orig_dn, attrs, cache_timeout, now);
}
@@ -1738,7 +1738,7 @@ int sysdb_store_user(struct sysdb_ctx *sysdb,
(now + cache_timeout) : 0));
if (ret) goto fail;
- ret = sysdb_set_user_attr(sysdb, sysdb->domain, name, attrs, SYSDB_MOD_REP);
+ ret = sysdb_set_user_attr(sysdb, domain, name, attrs, SYSDB_MOD_REP);
if (ret != EOK) goto fail;
if (remove_attrs) {