[SSSD] [PATCH] Return the first value of name if the multivalued name attribute does not match RDN
Jakub Hrozek
jhrozek at redhat.com
Wed Aug 17 06:59:04 UTC 2011
On Wed, Aug 17, 2011 at 08:50:54AM +0200, Jan Zelený wrote:
> > https://fedorahosted.org/sssd/ticket/926
> >
> > There's one more branch where the RDN attribute name matches the naming
> > attribute name but value is not found in the naming attribute values. I
> > didn't touch that one because I wanted to loosen the rules as little
> > as possible.
>
> Ack,
> just one small note: I'd change the debug level to something different than
> fatal error.
>
> Jan
OK, attached.
-------------- next part --------------
From 6ba67e10e8dee897b1bfb49466ece448578d4538 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Tue, 16 Aug 2011 15:17:28 +0200
Subject: [PATCH] Return the first value of name if the multivalued name
attribute does not match RDN
https://fedorahosted.org/sssd/ticket/926
---
src/db/sysdb.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 3174f3d..7d030d8 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -2412,9 +2412,10 @@ errno_t sysdb_attrs_primary_name(struct sysdb_ctx *sysdb,
* We have no way of resolving this deterministically,
* so we'll punt.
*/
- DEBUG(1, ("Cannot save entry. It has multiple names and the RDN "
- "attribute does not match\n"));
- ret = EINVAL;
+ DEBUG(3, ("The entry has multiple names and the RDN attribute does "
+ "not match. Will use the first value as fallback.\n"));
+ *_primary = (const char *)sysdb_name_el->values[0].data;
+ ret = EOK;
goto done;
}
--
1.7.6
More information about the sssd-devel
mailing list