diff options
author | Pavel Březina <pbrezina@redhat.com> | 2015-03-05 15:40:41 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-03-09 13:38:28 +0100 |
commit | 12a000c8c7c07259e438fb1e992134bdd07d9a30 (patch) | |
tree | b447fa96f19bc6f404c118bbed0d1ee0523d3af4 /src/db/sysdb_ops.c | |
parent | 26d6ed2f190817b77df7c5b0041515f60ec2fb46 (diff) | |
download | sssd-12a000c8c7c07259e438fb1e992134bdd07d9a30.tar.gz sssd-12a000c8c7c07259e438fb1e992134bdd07d9a30.tar.xz sssd-12a000c8c7c07259e438fb1e992134bdd07d9a30.zip |
sysdb: use sysdb_user/group_dn
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/db/sysdb_ops.c')
-rw-r--r-- | src/db/sysdb_ops.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index 6085762dc..acdc8415b 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -423,8 +423,7 @@ int sysdb_search_user_by_uid(TALLOC_CTX *mem_ctx, return ENOMEM; } - basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb, - SYSDB_TMPL_USER_BASE, domain->name); + basedn = sysdb_user_base_dn(tmp_ctx, domain); if (!basedn) { ret = ENOMEM; goto done; @@ -494,8 +493,7 @@ int sysdb_search_user_by_upn(TALLOC_CTX *mem_ctx, return ENOMEM; } - basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb, - SYSDB_TMPL_USER_BASE, domain->name); + basedn = sysdb_user_base_dn(tmp_ctx, domain); if (basedn == NULL) { ret = ENOMEM; goto done; @@ -564,8 +562,7 @@ int sysdb_search_group_by_gid(TALLOC_CTX *mem_ctx, return ENOMEM; } - basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb, - SYSDB_TMPL_GROUP_BASE, domain->name); + basedn = sysdb_group_base_dn(tmp_ctx, domain); if (!basedn) { ret = ENOMEM; goto done; @@ -2629,8 +2626,7 @@ int sysdb_search_users(TALLOC_CTX *mem_ctx, return ENOMEM; } - basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb, - SYSDB_TMPL_USER_BASE, domain->name); + basedn = sysdb_user_base_dn(tmp_ctx, domain); if (!basedn) { DEBUG(SSSDBG_OP_FAILURE, "Failed to build base dn\n"); ret = ENOMEM; @@ -2791,8 +2787,7 @@ int sysdb_search_groups(TALLOC_CTX *mem_ctx, return ENOMEM; } - basedn = ldb_dn_new_fmt(tmp_ctx, domain->sysdb->ldb, - SYSDB_TMPL_GROUP_BASE, domain->name); + basedn = sysdb_group_base_dn(tmp_ctx, domain); if (!basedn) { DEBUG(SSSDBG_OP_FAILURE, "Failed to build base dn\n"); ret = ENOMEM; |