From 36898bbb76abaa75940fdf3f8e221c74080c5a1c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 8 Jul 2006 11:47:23 +0000 Subject: [PATCH] don't sigsegv if has_ldapinfo_dn_ru is erroneously defined; return a (more) meaningful error --- servers/slapd/back-sql/entry-id.c | 2 +- servers/slapd/back-sql/search.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/servers/slapd/back-sql/entry-id.c b/servers/slapd/back-sql/entry-id.c index 0e17f1c1f8..801729e733 100644 --- a/servers/slapd/back-sql/entry-id.c +++ b/servers/slapd/back-sql/entry-id.c @@ -90,7 +90,7 @@ backsql_dn2id( { backsql_info *bi = op->o_bd->be_private; SQLHSTMT sth = SQL_NULL_HSTMT; - BACKSQL_ROW_NTS row; + BACKSQL_ROW_NTS row = { 0 }; RETCODE rc; int res; struct berval realndn = BER_BVNULL; diff --git a/servers/slapd/back-sql/search.c b/servers/slapd/back-sql/search.c index f6a5dcd346..6824827a09 100644 --- a/servers/slapd/back-sql/search.c +++ b/servers/slapd/back-sql/search.c @@ -314,9 +314,7 @@ backsql_init_search( } } else { - rs->sr_ref = referral_rewrite( default_referral, - NULL, &op->o_req_dn, scope ); - rc = rs->sr_err = LDAP_REFERRAL; + rs->sr_err = rc; } } } -- 2.39.5