Blob Blame History Raw
From d0eeff900d721a0e147b3513d075dbb64b002dc1 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Tue, 12 Nov 2013 14:39:27 +0100
Subject: [PATCH 1/6] SYSDB: Skip malformed netgroup attribute.

It was not easy find out why netgroup could not be covert into result entries.
Problem was that nisNetgroupTriple contained unexpected string "(,user01)"
This patch will ignore only malformed attribute and processing of netgroup
will not fail.

Resolves:
https://fedorahosted.org/sssd/ticket/2137
---
 src/db/sysdb_search.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 8dfaf1f2ada22db5e70ebe18bee1ee299e4767dd..d15fc73ce2272bff53650ae9dd0dbdad99a849e6 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -728,7 +728,11 @@ errno_t sysdb_netgr_to_entries(TALLOC_CTX *mem_ctx,
                                         &tmp_entry[c]->value.triple.username,
                                         &tmp_entry[c]->value.triple.domainname);
                     if (ret != EOK) {
-                        goto done;
+                        DEBUG(SSSDBG_IMPORTANT_INFO,
+                              ("Cannot split netgroup triple [%s], "
+                               "this attribute will be skipped \n",
+                               triple_str));
+                        continue;
                     }
 
                     c++;
-- 
1.8.4.2