summaryrefslogtreecommitdiffstats
path: root/src/db/sysdb.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-08-16 15:17:28 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-08-25 13:30:37 -0400
commit690ae38fc14acac1e62cac52558eeb263404ceca (patch)
treed29f769dd817192ec0d99e5383825adadb5a0548 /src/db/sysdb.c
parentdb86e17493ceff0567a1b879f8e5ec5b1332a4d6 (diff)
downloadsssd-690ae38fc14acac1e62cac52558eeb263404ceca.tar.gz
sssd-690ae38fc14acac1e62cac52558eeb263404ceca.tar.xz
sssd-690ae38fc14acac1e62cac52558eeb263404ceca.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/db/sysdb.c')
-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 3174f3d14..7d030d83e 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;
}