#include "lib/appweb/ejs/ejs.h"
#include "scripting/ejs/smbcalls.h"
#include "smb_build.h"
+#include "version.h"
/*
return the type of a variable
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
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);
}
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 */
assert(subobj.DOMAIN);
assert(subobj.HOSTNAME);
+ subobj.VERSION = version();
subobj.HOSTIP = hostip();
subobj.DOMAINGUID = randguid();
subobj.DOMAINSID = randsid();
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