[SSSD] [PATCH] SYSDB: Print message why netgroup cannot be parsed

Lukas Slebodnik lslebodn at redhat.com
Tue Nov 12 16:21:56 UTC 2013


ehlo,

It was not easy find out why netgroup could not be covert into result entries.
Problem was that nisNetgroupTriple contained unexpected string "(,user01)"

[sssd[nss]] [lookup_netgr_step] (0x0100): Requesting info for [netgr_example]
[sssd[nss]] [lookup_netgr_step] (0x0020): Failed to convert results into entries
[sssd[nss]] [nss_cmd_setnetgrent_done] (0x0020): setnetgrent failed
[sssd[nss]] [netgr_hash_remove] (0x1000): netgroup [netgr_example] was already removed

Simple patch is attached.

LS
-------------- next part --------------
>From f68890db040a979639909ca2c2880d4853d244a0 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Tue, 12 Nov 2013 14:39:27 +0100
Subject: [PATCH] SYSDB: Print message why netgroup cannot be parsed

It was not easy find out why netgroup could not be covert into result entries.
Problem was that nisNetgroupTriple contained unexpected string "(,user01)"

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

diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index 8dfaf1f2ada22db5e70ebe18bee1ee299e4767dd..71e727efb24db637d2a693d3efa62deec989a387 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -728,6 +728,9 @@ 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) {
+                        DEBUG(SSSDBG_MINOR_FAILURE,
+                              ("Cannot split netgroup tripple [%s]\n",
+                               triple_str));
                         goto done;
                     }
 
-- 
1.8.3.1



More information about the sssd-devel mailing list