-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is just a rebased version of the same patches that went into master.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkyaG1oACgkQHsardTLnvCW74gCgpgoE8SqGV74eLwbffRAYAv6R
16kAoILN6C0rnXfrVrdBRUkYvjW989MA
=uSnr
-----END PGP SIGNATURE-----
From 5639bf0719ce355078d3b583d07a953b2389fff8 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhro...@redhat.com>
Date: Wed, 22 Sep 2010 11:04:26 -0400
Subject: [PATCH] Fix sysdb_group_dn_name

---
 src/db/sysdb.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 638ac69..78af9cc 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -56,6 +56,7 @@ errno_t sysdb_group_dn_name(struct sysdb_ctx *ctx, void *memctx,
                             const char *_dn, char **_name)
 {
     struct ldb_dn *dn;
+    const struct ldb_val *val;
     *_name = NULL;
 
     dn = ldb_dn_new_fmt(memctx, ctx->ldb, "%s", _dn);
@@ -63,7 +64,14 @@ errno_t sysdb_group_dn_name(struct sysdb_ctx *ctx, void *memctx,
         return ENOMEM;
     }
 
-    *_name = talloc_strdup(memctx, ldb_dn_get_rdn_name(dn));
+    val = ldb_dn_get_rdn_val(dn);
+    if (val == NULL) {
+        talloc_zfree(dn);
+        return EINVAL;
+    }
+
+    *_name = talloc_strndup(memctx, (char *) val->data, val->length);
+
     if (!*_name) {
         talloc_zfree(dn);
         return ENOMEM;
-- 
1.5.5.6

From cc03375817719899e38a97f92945fd9c68e2f6e3 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhro...@redhat.com>
Date: Thu, 16 Sep 2010 17:09:16 +0200
Subject: [PATCH] Fix sysdb_attrs_to_list

---
 src/db/sysdb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 78af9cc..0091023 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -1991,13 +1991,13 @@ errno_t sysdb_attrs_to_list(TALLOC_CTX *memctx,
     for (attr_idx = 0; attr_idx < attr_count; attr_idx++) {
         /* Examine each attribute within the entry */
         for (i = 0; i < attrs[attr_idx]->num; i++) {
-            if (strcasecmp(attrs[attr_idx]->a->name, attr_name) == 0) {
+            if (strcasecmp(attrs[attr_idx]->a[i].name, attr_name) == 0) {
                 /* Attribute name matches the requested name
                  * Copy it to the output list
                  */
                 list[list_idx] = talloc_strdup(
                         list,
-                        (const char *)attrs[attr_idx]->a->values[0].data);
+                        (const char *)attrs[attr_idx]->a[i].values[0].data);
                 if (!list[list_idx]) {
                     talloc_free(list);
                     return ENOMEM;
-- 
1.5.5.6

From 5e478335b9b888070ddb18c8f8f4c0b66f2efb58 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhro...@redhat.com>
Date: Thu, 16 Sep 2010 11:29:00 -0400
Subject: [PATCH] Request the correct attribute name

---
 src/providers/ldap/sdap_async_accounts.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c
index d83a9dc..9dfde58 100644
--- a/src/providers/ldap/sdap_async_accounts.c
+++ b/src/providers/ldap/sdap_async_accounts.c
@@ -1583,7 +1583,7 @@ static void sdap_initgr_rfc2307_process(struct tevent_req *subreq)
     }
     else {
         ret = sysdb_attrs_to_list(state, groups, count,
-                                  state->opts->group_map[SDAP_AT_GROUP_NAME].name,
+                                  SYSDB_NAME,
                                   &state->ldap_grouplist);
         if (ret != EOK) {
             tevent_req_error(req, ret);
-- 
1.5.5.6

Attachment: 0001-Fix-sysdb_group_dn_name.patch.sig
Description: PGP signature

Attachment: 0002-Fix-sysdb_attrs_to_list.patch.sig
Description: PGP signature

Attachment: 0003-Request-the-correct-attribute-name.patch.sig
Description: PGP signature

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to