summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-08-16 15:17:28 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-08-29 08:14:33 -0400
commitb65977f45db35390a7183929bea53692f3acb072 (patch)
tree660b839ccd15d03e2d1d02a7566d550caec47bf7 /src
parent6624f11ffb47d3e91c6e44f1dc9f8c7a8e350800 (diff)
downloadsssd-b65977f45db35390a7183929bea53692f3acb072.tar.gz
sssd-b65977f45db35390a7183929bea53692f3acb072.tar.xz
sssd-b65977f45db35390a7183929bea53692f3acb072.zip
Return the first value of name if the multivalued name attribute does not match RDN
https://fedorahosted.org/sssd/ticket/926
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 40b7c26c6..42a4240f1 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -2133,9 +2133,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;
}