aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index a8acc18..bc81384 100644
--- a/main.go
+++ b/main.go
@@ -357,7 +357,7 @@ func (server *Server) objectExists(dn string) (bool, error) {
func (server *Server) checkSuffix(dn string, allow_extend bool) (string, error) {
suffix := server.config.Suffix
if len(dn) < len(suffix) {
- if dn != suffix[-len(dn):] || !allow_extend {
+ if dn != suffix[len(suffix)-len(dn):] || !allow_extend {
return suffix, fmt.Errorf(
"Only handling stuff under DN %s", suffix)
}