diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-03-23 10:27:00 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-03-23 10:59:33 -0400 |
commit | 4a72049c51d1c20be7c0c5eccdb1cc2d5d813ae5 (patch) | |
tree | 3f5592eb44e6b4701c44070de8d1b57069e8737d /src | |
parent | ea65835c09d4c930921b955416a91538da477639 (diff) | |
download | sssd_unused-4a72049c51d1c20be7c0c5eccdb1cc2d5d813ae5.tar.gz sssd_unused-4a72049c51d1c20be7c0c5eccdb1cc2d5d813ae5.tar.xz sssd_unused-4a72049c51d1c20be7c0c5eccdb1cc2d5d813ae5.zip |
Don't crash if we get a multivalued name without an origDN
Coverity 10740 and 10739
Diffstat (limited to 'src')
-rw-r--r-- | src/db/sysdb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 7446aea9..483aae95 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -2079,7 +2079,9 @@ errno_t sysdb_attrs_primary_name(struct sysdb_ctx *sysdb, goto done; } if (orig_dn_el->num_values == 0) { - DEBUG(7, ("Original DN is not available.\n")); + DEBUG(1, ("Original DN is not available.\n")); + ret = EINVAL; + goto done; } else if (orig_dn_el->num_values == 1) { ret = sysdb_get_rdn(sysdb, tmpctx, (const char *) orig_dn_el->values[0].data, |