diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-08-16 15:17:28 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-08-25 13:30:47 -0400 |
commit | d214d6a5c22887a6a3b503183c3306cebf6074be (patch) | |
tree | 49911ff191925974eeb0e726f3e903af3373556d | |
parent | b72487483c4190457f61d2b8765cc960096a40ce (diff) | |
download | sssd-d214d6a5c22887a6a3b503183c3306cebf6074be.tar.gz sssd-d214d6a5c22887a6a3b503183c3306cebf6074be.tar.xz sssd-d214d6a5c22887a6a3b503183c3306cebf6074be.zip |
Return the first value of name if the multivalued name attribute does not match RDN
https://fedorahosted.org/sssd/ticket/926
-rw-r--r-- | 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 8165e923c..0bceb37b4 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -2432,9 +2432,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; } |