summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-04-17 08:43:50 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-04-18 10:23:56 -0400
commit2c9d3ca604743df82f2f3a8a05829c2dee3d97d7 (patch)
tree72e154cde2d16e53a4cff346f996cb52d4f089cd
parentdf85da09d078ae7bfdac9cc66fd79362719025e0 (diff)
downloadsssd-2c9d3ca604743df82f2f3a8a05829c2dee3d97d7.tar.gz
sssd-2c9d3ca604743df82f2f3a8a05829c2dee3d97d7.tar.xz
sssd-2c9d3ca604743df82f2f3a8a05829c2dee3d97d7.zip
Removed unused function sysdb_attrs_users_from_ldb_vals()
-rw-r--r--src/db/sysdb.c46
-rw-r--r--src/db/sysdb.h5
2 files changed, 0 insertions, 51 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 5436fb832..65b413da5 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -650,52 +650,6 @@ int sysdb_attrs_users_from_str_list(struct sysdb_attrs *attrs,
return EOK;
}
-int sysdb_attrs_users_from_ldb_vals(struct sysdb_attrs *attrs,
- const char *attr_name,
- const char *domain,
- struct ldb_val *values,
- int num_values)
-{
- struct ldb_message_element *el = NULL;
- struct ldb_val *vals;
- int i, j;
- char *member;
- int ret;
-
- ret = sysdb_attrs_get_el(attrs, attr_name, &el);
- if (ret) {
- return ret;
- }
-
- vals = talloc_realloc(attrs->a, el->values, struct ldb_val,
- el->num_values + num_values);
- if (!vals) {
- return ENOMEM;
- }
- el->values = vals;
-
- DEBUG(9, ("Adding %d members to existing %d ones\n",
- num_values, el->num_values));
-
- for (i = 0, j = el->num_values; i < num_values; i++) {
- member = sysdb_user_strdn(el->values, domain,
- (char *)values[i].data);
- if (!member) {
- DEBUG(4, ("Failed to get user dn for [%s]\n",
- (char *)values[i].data));
- return ENOMEM;
- }
- el->values[j].data = (uint8_t *)member;
- el->values[j].length = strlen(member);
- j++;
-
- DEBUG(7, (" member #%d: [%s]\n", i, member));
- }
- el->num_values = j;
-
- return EOK;
-}
-
static char *build_dom_dn_str_escape(TALLOC_CTX *mem_ctx, const char *template,
const char *domain, const char *name)
{
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index 53dbd7c10..6a1006d05 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -242,11 +242,6 @@ int sysdb_attrs_users_from_str_list(struct sysdb_attrs *attrs,
const char *attr_name,
const char *domain,
const char *const *list);
-int sysdb_attrs_users_from_ldb_vals(struct sysdb_attrs *attrs,
- const char *attr_name,
- const char *domain,
- struct ldb_val *values,
- int num_values);
errno_t sysdb_attrs_primary_name(struct sysdb_ctx *sysdb,
struct sysdb_attrs *attrs,
const char *ldap_attr,