From ad6882acac5f99c6400ec02f151a12d0abf74487 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 15 Mar 2000 19:42:03 +0000 Subject: [PATCH] Add additional be_isroot() checks to protect against empty root and client ndns. (the existing backend protections *should* be good enough, but one cannot be too safe) --- servers/slapd/backend.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 1ad03e506d..9bdf4d2981 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -481,7 +481,11 @@ be_isroot( Backend *be, const char *ndn ) { int rc; - if ( ndn == NULL || be->be_root_ndn == NULL ) { + if ( ndn == NULL || *ndn == '\0' ) { + return( 0 ); + } + + if ( be->be_root_ndn == NULL || *be->be_root_ndn == '\0' ) { return( 0 ); } -- 2.39.5