svn commit: samba r12947 - in
branches/SAMBA_4_0/source/scripting/libjs: .
tridge at samba.org
tridge at samba.org
Sun Jan 15 16:24:55 GMT 2006
Author: tridge
Date: 2006-01-15 16:24:55 +0000 (Sun, 15 Jan 2006)
New Revision: 12947
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12947
Log:
added some error checking that I stumbled across while testing domain migration
Modified:
branches/SAMBA_4_0/source/scripting/libjs/provision.js
Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===================================================================
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js 2006-01-15 12:30:36 UTC (rev 12946)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js 2006-01-15 16:24:55 UTC (rev 12947)
@@ -526,6 +526,8 @@
function provision_validate(subobj, message)
{
+ var lp = loadparm_init();
+
if (!valid_netbios_name(subobj.DOMAIN)) {
message("Invalid NetBIOS name for domain\n");
return false;
@@ -536,6 +538,19 @@
return false;
}
+
+ if (lp.get("workgroup") != subobj.DOMAIN) {
+ message("workgroup '%s' in smb.conf must match chosen domain '%s'\n",
+ lp.get("workgroup"), subobj.DOMAIN);
+ return false;
+ }
+
+ if (lp.get("realm") != subobj.REALM) {
+ message("realm '%s' in smb.conf must match chosen realm '%s'\n",
+ lp.get("realm"), subobj.REALM);
+ return false;
+ }
+
return true;
}
@@ -547,7 +562,7 @@
joindom.join_type = join_type;
joindom.netbios_name = netbios_name;
if (!ctx.JoinDomain(joindom)) {
- message("Domain Join failed: " + join.error_string);
+ message("Domain Join failed: " + joindom.error_string);
return false;
}
return true;
More information about the samba-cvs
mailing list