From 65bf7621d9cb40650478bb126332c5d5cf2301f1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 3 Jan 2006 20:26:57 +0000 Subject: r12703: Fix handling of short passdb backends (also reported by Steinar Gunderson) (This used to be commit 4c562c42b43d98f4c6bdbacc5cb1dd5e65bc3418) --- source4/scripting/libjs/upgrade.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source4/scripting/libjs/upgrade.js b/source4/scripting/libjs/upgrade.js index 0ffb790d5f..51818487eb 100644 --- a/source4/scripting/libjs/upgrade.js +++ b/source4/scripting/libjs/upgrade.js @@ -605,8 +605,10 @@ data: %d var pdb = samba3.configuration.get_list("passdb backend"); if (pdb != undefined) { for (var b in pdb) { - if (substr(pdb[b], 0, 7) == "ldapsam") { - ldapurl = substr(pdb[b], 8); + if (strlen(pdb[b]) >= 7) { + if (substr(pdb[b], 0, 7) == "ldapsam") { + ldapurl = substr(pdb[b], 8); + } } } } -- cgit