diff options
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb.h | 12 | ||||
-rw-r--r-- | src/db/sysdb_ops.c | 12 | ||||
-rw-r--r-- | src/db/sysdb_subdomains.c | 18 |
3 files changed, 7 insertions, 35 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h index 392746c8..4e11fbe5 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -385,17 +385,6 @@ errno_t sysdb_master_domain_add_info(struct sysdb_ctx *sysdb, struct sysdb_subdom *domain_info); -errno_t sysdb_store_domuser(struct sss_domain_info *domain, - const char *name, - const char *pwd, - uid_t uid, gid_t gid, - const char *gecos, - const char *homedir, - const char *shell, - struct sysdb_attrs *attrs, - char **remove_attrs, - uint64_t cache_timeout, - time_t now); errno_t sysdb_delete_domuser(struct sss_domain_info *domain, const char *name, uid_t uid); @@ -662,6 +651,7 @@ int sysdb_mod_group_member(struct sysdb_ctx *sysdb, int mod_op); 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, diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index 0b6951a6..61a0e77d 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) { diff --git a/src/db/sysdb_subdomains.c b/src/db/sysdb_subdomains.c index ef6b0ad3..4a81b1df 100644 --- a/src/db/sysdb_subdomains.c +++ b/src/db/sysdb_subdomains.c @@ -577,24 +577,6 @@ errno_t sysdb_get_subdomain_context(TALLOC_CTX *mem_ctx, } \ } while(0) -errno_t sysdb_store_domuser(struct sss_domain_info *domain, - const char *name, - const char *pwd, - uid_t uid, gid_t gid, - const char *gecos, - const char *homedir, - const char *shell, - struct sysdb_attrs *attrs, - char **remove_attrs, - uint64_t cache_timeout, - time_t now) -{ - CHECK_DOMAIN_INFO(domain); - - return sysdb_store_user(domain->sysdb, name, pwd, uid, gid, gecos, homedir, - shell, NULL, attrs, remove_attrs, cache_timeout, now); -} - errno_t sysdb_delete_domuser(struct sss_domain_info *domain, const char *name, uid_t uid) { |