summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-03-23 10:27:00 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-03-23 10:58:57 -0400
commitdfdad4fa71f0a75e8a8494f5c919ffd8fe2a2959 (patch)
tree9cb0b9906bf53f73dd949131f4273b735ea1b613 /src
parent24be43b38dc62de571636f04632f00f699112440 (diff)
downloadsssd-dfdad4fa71f0a75e8a8494f5c919ffd8fe2a2959.tar.gz
sssd-dfdad4fa71f0a75e8a8494f5c919ffd8fe2a2959.tar.bz2
sssd-dfdad4fa71f0a75e8a8494f5c919ffd8fe2a2959.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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 94738c60..05309431 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -2195,7 +2195,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,