summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_common.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-12-05 15:51:35 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-12-16 14:46:17 -0500
commit75a43c7f91fcb27dee75976cc7c094dd5fa589f6 (patch)
treea1c05b7934e12f3bf8a561eae2d33a1f7b09e97e /src/providers/ldap/ldap_common.c
parent4e9631a9f1ae87317eef53145622099c46196b56 (diff)
downloadsssd-75a43c7f91fcb27dee75976cc7c094dd5fa589f6.tar.gz
sssd-75a43c7f91fcb27dee75976cc7c094dd5fa589f6.tar.xz
sssd-75a43c7f91fcb27dee75976cc7c094dd5fa589f6.zip
Export the function to convert ldb_result to sysdb_attrs
It will be reused later in the sudo responder
Diffstat (limited to 'src/providers/ldap/ldap_common.c')
-rw-r--r--src/providers/ldap/ldap_common.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index f9627ac1d..dc55f6eca 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -1402,32 +1402,3 @@ char *sdap_get_id_specific_filter(TALLOC_CTX *mem_ctx,
}
return filter; /* NULL or not */
}
-
-errno_t msgs2attrs_array(TALLOC_CTX *mem_ctx, size_t count,
- struct ldb_message **msgs,
- struct sysdb_attrs ***attrs)
-{
- int i;
- struct sysdb_attrs **a;
-
- a = talloc_array(mem_ctx, struct sysdb_attrs *, count);
- if (a == NULL) {
- DEBUG(1, ("talloc_array failed.\n"));
- return ENOMEM;
- }
-
- for (i = 0; i < count; i++) {
- a[i] = talloc(a, struct sysdb_attrs);
- if (a[i] == NULL) {
- DEBUG(1, ("talloc_array failed.\n"));
- talloc_free(a);
- return ENOMEM;
- }
- a[i]->num = msgs[i]->num_elements;
- a[i]->a = talloc_steal(a[i], msgs[i]->elements);
- }
-
- *attrs = a;
-
- return EOK;
-}