summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorSteve French <sfrench@samba.org>2005-08-15 23:52:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:33:23 -0500
commitf9c7357d74d2c76cfb4046cb05e9533a0cb22303 (patch)
tree9d93652e3099042d2e064069cebfcfbe5c9acdcd /source4
parent4ed7904b7e6994f8a1e13538529f827ff4c148c9 (diff)
downloadsamba-f9c7357d74d2c76cfb4046cb05e9533a0cb22303.tar.gz
samba-f9c7357d74d2c76cfb4046cb05e9533a0cb22303.tar.bz2
samba-f9c7357d74d2c76cfb4046cb05e9533a0cb22303.zip
r9310: Add two missing return statements after null pointer checks to fix potential oops in kdc code.
Found by coverity. (This used to be commit 3b707b928969c87ac7e9948a567a3ebbc754f28c)
Diffstat (limited to 'source4')
-rw-r--r--source4/kdc/hdb-ldb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index 651aa2347a..0aa18423a0 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -644,6 +644,7 @@ static krb5_error_code LDB_lookup_spn_alias(krb5_context context, struct ldb_con
if (!spnmappings || spnmappings->num_values == 0) {
krb5_warnx(context, "ldb_search: dn: %s no sPNMappings attribute", service_dn);
krb5_set_error_string(context, "ldb_search: dn: %s no sPNMappings attribute", service_dn);
+ return HDB_ERR_NOENTRY;
}
for (i = 0; i < spnmappings->num_values; i++) {
@@ -664,6 +665,7 @@ static krb5_error_code LDB_lookup_spn_alias(krb5_context context, struct ldb_con
service_dn, mapping);
krb5_set_error_string(context, "ldb_search: dn: %s sPNMapping malformed: %s",
service_dn, mapping);
+ return HDB_ERR_NOENTRY;
}
p[0] = '\0';
p++;