diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-01-22 10:53:14 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-01-22 10:53:14 +1100 |
commit | 11061499e182b9c41ec793d4eefb8a2cf7c88bfe (patch) | |
tree | fa08fcbf21143655eb85ba79c6169b3b2eb24fdd /source4/scripting | |
parent | 27b3c24040b1a7aa88413c477a3769bcd6847d72 (diff) | |
parent | 24efc9fc36194d379838eb9911b65e93535da19b (diff) | |
download | samba-11061499e182b9c41ec793d4eefb8a2cf7c88bfe.tar.gz samba-11061499e182b9c41ec793d4eefb8a2cf7c88bfe.tar.bz2 samba-11061499e182b9c41ec793d4eefb8a2cf7c88bfe.zip |
Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-abartlet
(This used to be commit 74220ca244865f97825cabdbc8aa899e71c25c7d)
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/ejs/config.mk | 12 | ||||
-rw-r--r-- | source4/scripting/libjs/provision.js | 44 | ||||
-rw-r--r-- | source4/scripting/python/config.mk | 10 | ||||
-rw-r--r-- | source4/scripting/python/modules.c | 2 | ||||
-rw-r--r-- | source4/scripting/python/samba/provision.py | 32 |
5 files changed, 20 insertions, 80 deletions
diff --git a/source4/scripting/ejs/config.mk b/source4/scripting/ejs/config.mk index 8b680ba973..656ecdae16 100644 --- a/source4/scripting/ejs/config.mk +++ b/source4/scripting/ejs/config.mk @@ -1,10 +1,6 @@ -####################### -# Start LIBRARY EJSRPC [SUBSYSTEM::EJSRPC] OBJ_FILES = \ ejsrpc.o -# End SUBSYSTEM EJSRPC -####################### [MODULE::smbcalls_config] OBJ_FILES = smbcalls_config.o @@ -79,11 +75,7 @@ INIT_FUNCTION = smb_setup_ejs_system include ejsnet/config.mk -####################### -# Start LIBRARY smbcalls -[LIBRARY::smbcalls] -SO_VERSION = 0 -VERSION = 0.0.1 +[SUBSYSTEM::smbcalls] PRIVATE_PROTO_HEADER = proto.h OBJ_FILES = \ smbcalls.o \ @@ -101,8 +93,6 @@ PRIVATE_DEPENDENCIES = \ CREDENTIALS POPT_CREDENTIALS POPT_SAMBA \ dcerpc \ NDR_TABLE -# End SUBSYSTEM smbcalls -####################### ####################### # Start BINARY SMBSCRIPT diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index 266bac1a75..0cca49dec9 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -398,9 +398,6 @@ function provision_default_paths(subobj) paths.named_conf = lp.get("private dir") + "/named.conf"; paths.winsdb = "wins.ldb"; paths.ldapdir = lp.get("private dir") + "/ldap"; - paths.ldap_basedn_ldif = paths.ldapdir + "/" + dnsdomain + ".ldif"; - paths.ldap_config_basedn_ldif = paths.ldapdir + "/" + dnsdomain + "-config.ldif"; - paths.ldap_schema_basedn_ldif = paths.ldapdir + "/" + dnsdomain + "-schema.ldif"; paths.s4_ldapi_socket = lp.get("private dir") + "/ldapi"; paths.phpldapadminconfig = lp.get("private dir") + "/phpldapadmin-config.php"; @@ -866,6 +863,12 @@ function provision_schema(subobj, message, tmp_schema_path, paths) /* This will erase anything in the tmp db */ var samdb = open_ldb(info, tmp_schema_path, true); + message("Setting up sam.ldb attributes\n"); + setup_add_ldif("provision_init.ldif", info, samdb, false); + + message("Setting up sam.ldb rootDSE\n"); + setup_add_ldif("provision_rootdse_add.ldif", info, samdb, false); + message("Adding schema container (permitted to fail)\n"); var add_ok = setup_add_ldif("provision_schema_basedn.ldif", info, samdb, true); message("Modifying schema container\n"); @@ -934,34 +937,6 @@ function provision_dns(subobj, message, paths, session_info, credentials) message("Please install the zone located in " + paths.dns + " into your DNS server. A sample BIND configuration snippit is at " + paths.named_conf + "\n"); } -/* Write out a DNS zone file, from the info in the current database */ -function provision_ldapbase(subobj, message, paths) -{ - var ok = provision_fix_subobj(subobj, paths); - assert(ok); - - message("Setting up LDAP base entry: " + subobj.DOMAINDN + " \n"); - var rdns = split(",", subobj.DOMAINDN); - subobj.EXTENSIBLEOBJECT = "objectClass: extensibleObject"; - - subobj.RDN_DC = substr(rdns[0], strlen("DC=")); - - sys.mkdir(paths.ldapdir, 0700); - - setup_file("provision_basedn.ldif", - message, paths.ldap_basedn_ldif, - subobj); - - setup_file("provision_configuration_basedn.ldif", - message, paths.ldap_config_basedn_ldif, - subobj); - - setup_file("provision_schema_basedn.ldif", - message, paths.ldap_schema_basedn_ldif, - subobj); - -} - /* guess reasonably default options for provisioning @@ -1038,14 +1013,13 @@ function provision_guess() subobj.DOMAINDN_LDB = "users.ldb"; subobj.CONFIGDN_LDB = "configuration.ldb"; subobj.SCHEMADN_LDB = "schema.ldb"; - subobj.DOMAINDN_MOD = "pdc_fsmo,password_hash"; - subobj.CONFIGDN_MOD = "naming_fsmo"; - subobj.SCHEMADN_MOD = "schema_fsmo"; + subobj.DOMAINDN_MOD = "pdc_fsmo,password_hash,instancetype"; + subobj.CONFIGDN_MOD = "naming_fsmo,instancetype"; + subobj.SCHEMADN_MOD = "schema_fsmo,instancetype"; subobj.DOMAINDN_MOD2 = ",objectguid"; subobj.CONFIGDN_MOD2 = ",objectguid"; subobj.SCHEMADN_MOD2 = ",objectguid"; - subobj.EXTENSIBLEOBJECT = "# no objectClass: extensibleObject for local ldb"; subobj.ACI = "# no aci for local ldb"; return subobj; diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk index f00b477919..450da0e90a 100644 --- a/source4/scripting/python/config.mk +++ b/source4/scripting/python/config.mk @@ -16,7 +16,7 @@ PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS SWIG_FILE = misc.i # Swig extensions -swig: pythonmods +swig:: pythonmods .SUFFIXES: _wrap.c .i @@ -28,13 +28,19 @@ realdistclean:: @-rm -f bin/python/* # FIXME: Remove _wrap.c files -pythonmods: $(PYTHON_DSOS) +pythonmods:: $(PYTHON_DSOS) $(PYTHON_PYS) PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py bin/python/security.py bin/python/events.py bin/python/net.py pydoctor:: pythonmods LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES)) +installpython:: pythonmods + @$(SHELL) $(srcdir)/script/installpython.sh \ + $(INSTALLPERMS) \ + $(DESTDIR)$(PYTHONDIR) \ + scripting/python bin/python + clean:: @echo "Removing python modules" @rm -f bin/python/* diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c index b2dd50b507..fff981e941 100644 --- a/source4/scripting/python/modules.c +++ b/source4/scripting/python/modules.c @@ -46,6 +46,8 @@ static void initdcerpc_security(void) {} extern void initlsa(void); extern void initsvcctl(void); extern void initwkssvc(void); +extern void init_libcli_nbt(void); +extern void init_libcli_smb(void); static struct _inittab py_modules[] = { STATIC_LIBPYTHON_MODULES }; diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 1607cb343b..d59cea121e 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -180,12 +180,6 @@ def provision_paths_from_lp(lp, dnsdomain): paths.dns_keytab = os.path.join(private_dir, "dns.keytab") paths.dns = os.path.join(private_dir, dnsdomain + ".zone") paths.winsdb = os.path.join(private_dir, "wins.ldb") - paths.ldap_basedn_ldif = os.path.join(private_dir, - dnsdomain + ".ldif") - paths.ldap_config_basedn_ldif = os.path.join(private_dir, - dnsdomain + "-config.ldif") - paths.ldap_schema_basedn_ldif = os.path.join(private_dir, - dnsdomain + "-schema.ldif") paths.s4_ldapi_path = os.path.join(private_dir, "ldapi") paths.phpldapadminconfig = os.path.join(private_dir, "phpldapadmin-config.php") @@ -465,7 +459,6 @@ def setup_samdb(path, setup_path, session_info, credentials, lp, setup_add_ldif(samdb, setup_path("provision_basedn.ldif"), { "DOMAINDN": domaindn, "ACI": aci, - "EXTENSIBLEOBJECT": "# no objectClass: extensibleObject for local ldb", "RDN_DC": rdn_dc, }) @@ -823,31 +816,6 @@ def create_zone_file(path, setup_path, samdb, dnsdomain, domaindn, }) -def provision_ldapbase(setup_dir, message, paths): - """Write out a DNS zone file, from the info in the current database.""" - message("Setting up LDAP base entry: %s" % domaindn) - rdns = domaindn.split(",") - - rdn_dc = rdns[0][len("DC="):] - - def setup_path(file): - return os.path.join(setup_dir, file) - - setup_file(setup_path("provision_basedn.ldif"), - paths.ldap_basedn_ldif) - - setup_file(setup_path("provision_configuration_basedn.ldif"), - paths.ldap_config_basedn_ldif) - - setup_file(setup_path("provision_schema_basedn.ldif"), - paths.ldap_schema_basedn_ldif, { - "SCHEMADN": schemadn, - "ACI": "# no aci for local ldb", - "EXTENSIBLEOBJECT": "objectClass: extensibleObject"}) - - message("Please install the LDIF located in " + paths.ldap_basedn_ldif + ", " + paths.ldap_config_basedn_ldif + " and " + paths.ldap_schema_basedn_ldif + " into your LDAP server, and re-run with --ldap-backend=ldap://my.ldap.server") - - def load_schema(setup_path, samdb, schemadn, netbiosname, configdn): """Load schema. |