svn commit: samba r13369 - in branches/SAMBA_4_0/source:
scripting/ejs scripting/libjs setup
idra at samba.org
idra at samba.org
Mon Feb 6 18:29:57 GMT 2006
Author: idra
Date: 2006-02-06 18:29:57 +0000 (Mon, 06 Feb 2006)
New Revision: 13369
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13369
Log:
let's have a way to show the samba4 version through ejs
and use it in provisioning to fullfill rfc 3045 requirements
Modified:
branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c
branches/SAMBA_4_0/source/scripting/libjs/provision.js
branches/SAMBA_4_0/source/setup/provision_init.ldif
Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c 2006-02-06 18:03:57 UTC (rev 13368)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c 2006-02-06 18:29:57 UTC (rev 13369)
@@ -25,6 +25,7 @@
#include "lib/appweb/ejs/ejs.h"
#include "scripting/ejs/smbcalls.h"
#include "smb_build.h"
+#include "version.h"
/*
return the type of a variable
@@ -111,7 +112,16 @@
return 0;
}
+/*
+ return the current version
+*/
+static int ejs_version(MprVarHandle eid, int argc, struct MprVar **argv)
+{
+ mpr_ReturnString(eid, SAMBA_VERSION_STRING);
+ return 0;
+}
+
/*
setup C functions that be called from ejs
*/
@@ -146,5 +156,6 @@
ejsDefineCFunction(-1, "typeof", ejs_typeof, NULL, MPR_VAR_SCRIPT_HANDLE);
ejsDefineStringCFunction(-1, "libinclude", ejs_libinclude, NULL, MPR_VAR_SCRIPT_HANDLE);
+ ejsDefineCFunction(-1, "version", ejs_version, NULL, MPR_VAR_SCRIPT_HANDLE);
}
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===================================================================
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js 2006-02-06 18:03:57 UTC (rev 13368)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js 2006-02-06 18:29:57 UTC (rev 13369)
@@ -150,7 +150,6 @@
return s[0];
}
-
/* the ldb is in bad shape, possibly due to being built from an
incompatible previous version of the code, so delete it
completely */
@@ -452,6 +451,7 @@
assert(subobj.DOMAIN);
assert(subobj.HOSTNAME);
+ subobj.VERSION = version();
subobj.HOSTIP = hostip();
subobj.DOMAINGUID = randguid();
subobj.DOMAINSID = randsid();
Modified: branches/SAMBA_4_0/source/setup/provision_init.ldif
===================================================================
--- branches/SAMBA_4_0/source/setup/provision_init.ldif 2006-02-06 18:03:57 UTC (rev 13368)
+++ branches/SAMBA_4_0/source/setup/provision_init.ldif 2006-02-06 18:29:57 UTC (rev 13369)
@@ -74,6 +74,8 @@
forestFunctionality: 0
domainControllerFunctionality: 2
isSynchronized: TRUE
+vendorName: Samba Team (http://samba.org)
+vendorVersion: ${VERSION}
#Add modules to the list to activate them by default
#beware often order is important
More information about the samba-cvs
mailing list