summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-08-29 01:37:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:03:05 -0500
commitf681306335eaf6b33d6fcaa70ac29a8cf1f5889f (patch)
tree37d1ad1d51f0eaed12d7f0c38ca3e71b6c5128d5 /source4/scripting
parent748dcc33768e99dbf68838a49a0ac2f05272dd6a (diff)
downloadsamba-f681306335eaf6b33d6fcaa70ac29a8cf1f5889f.tar.gz
samba-f681306335eaf6b33d6fcaa70ac29a8cf1f5889f.tar.bz2
samba-f681306335eaf6b33d6fcaa70ac29a8cf1f5889f.zip
r24760: Ensure we base64 encode any password being put into LDIF, to avoid
provision failures when some of the random password values are illigal LDIF. Andrew Bartlett (This used to be commit 876003f6c6466bfd37ec9b05c9a1f1cc83dd9898)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/libjs/provision.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index 57531a28b9..ca0fedf97b 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -449,6 +449,8 @@ function setup_name_mappings(info, ldb)
function provision_fix_subobj(subobj, paths)
{
+ var ldb = ldb_init();
+
subobj.REALM = strupper(subobj.REALM);
subobj.HOSTNAME = strlower(subobj.HOSTNAME);
subobj.DOMAIN = strupper(subobj.DOMAIN);
@@ -465,6 +467,11 @@ function provision_fix_subobj(subobj, paths)
subobj.CONFIGDN = "CN=Configuration," + subobj.ROOTDN;
subobj.SCHEMADN = "CN=Schema," + subobj.CONFIGDN;
+ subobj.MACHINEPASS_B64 = ldb.encode(subobj.MACHINEPASS);
+ subobj.KRBTGTPASS_B64 = ldb.encode(subobj.KRBTGTPASS);
+ subobj.ADMINPASS_B64 = ldb.encode(subobj.ADMINPASS);
+ subobj.DNSPASS_B64 = ldb.encode(subobj.DNSPASS);
+
var rdns = split(",", subobj.DOMAINDN);
subobj.RDN_DC = substr(rdns[0], strlen("DC="));