[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha2-1250-gb4da374
Andrew Bartlett
abartlet at samba.org
Tue Mar 11 03:42:13 GMT 2008
The branch, v4-0-test has been updated
via b4da374a998caac18c288a0a6e3fcd2c50cbffa7 (commit)
via edb7af0685983543c321e3d8b90f6ae07af2e4e3 (commit)
via 1b15f374a89b99f3c43d9c2ce06dde9c67383e66 (commit)
from 0641a43cd6fd081cac0275f5bde2ad70fa6a71bb (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit b4da374a998caac18c288a0a6e3fcd2c50cbffa7
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Mar 11 14:41:10 2008 +1100
Fix provision script to work without smb.conf location specified.
Andrew Bartlett
commit edb7af0685983543c321e3d8b90f6ae07af2e4e3
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Mar 11 14:21:53 2008 +1100
Extend testsuite to cover specifying a domain SID.
Andrew Bartlett
commit 1b15f374a89b99f3c43d9c2ce06dde9c67383e66
Author: Andrew Bartlett <abartlet at samba.org>
Date: Tue Mar 11 14:20:42 2008 +1100
Make error handling in ldb more consistant.
This change ensures we give an immidiate error if the DN won't parse.
Also clean up strcmp use to be more standard.
Andrew Bartlett
-----------------------------------------------------------------------
Summary of changes:
source/lib/ldb/ldb.i | 5 ++++-
source/scripting/python/samba/provision.py | 5 +++--
source/setup/provision | 3 ++-
source/setup/tests/blackbox_provision.sh | 2 +-
4 files changed, 10 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/ldb/ldb.i b/source/lib/ldb/ldb.i
index 0d9679d..bd41e1e 100644
--- a/source/lib/ldb/ldb.i
+++ b/source/lib/ldb/ldb.i
@@ -258,6 +258,9 @@ int ldb_dn_from_pyobject(TALLOC_CTX *mem_ctx, PyObject *object,
struct ldb_dn *odn;
if (ldb_ctx != NULL && PyString_Check(object)) {
*dn = ldb_dn_new(mem_ctx, ldb_ctx, PyString_AsString(object));
+ if (!*dn) {
+ return SWIG_ERROR;
+ }
return 0;
}
ret = SWIG_ConvertPtr(object, (void **)&odn, SWIGTYPE_p_ldb_dn,
@@ -566,7 +569,7 @@ PyObject *PyExc_LdbError;
$1->elements = talloc_zero_array($1, struct ldb_message_element, PyDict_Size($input));
msg_pos = dict_pos = 0;
while (PyDict_Next($input, &dict_pos, &key, &value)) {
- if (!strcmp(PyString_AsString(key), "dn")) {
+ if (strcmp(PyString_AsString(key), "dn") == 0) {
/* using argp0 (magic SWIG value) here is a hack */
if (ldb_dn_from_pyobject($1, value, argp1, &$1->dn) != 0) {
SWIG_exception(SWIG_TypeError, "unable to import dn object");
diff --git a/source/scripting/python/samba/provision.py b/source/scripting/python/samba/provision.py
index ebca1f8..24870c2 100644
--- a/source/scripting/python/samba/provision.py
+++ b/source/scripting/python/samba/provision.py
@@ -51,7 +51,6 @@ class InvalidNetbiosName(Exception):
class ProvisionPaths:
def __init__(self):
- self.smbconf = None
self.shareconf = None
self.hklm = None
self.hkcu = None
@@ -217,7 +216,6 @@ def provision_paths_from_lp(lp, dnsdomain):
paths.dns = os.path.join(paths.private_dir, dnsdomain + ".zone")
paths.winsdb = os.path.join(paths.private_dir, "wins.ldb")
paths.s4_ldapi_path = os.path.join(paths.private_dir, "ldapi")
- paths.smbconf = os.path.join(paths.private_dir, "smb.conf")
paths.phpldapadminconfig = os.path.join(paths.private_dir,
"phpldapadmin-config.php")
paths.hklm = "hklm.ldb"
@@ -759,6 +757,9 @@ def provision(setup_dir, message, session_info,
if domainsid is None:
domainsid = security.random_sid()
+ else:
+ domainsid = security.Sid(domainsid)
+
if policyguid is None:
policyguid = uuid.random()
if adminpass is None:
diff --git a/source/setup/provision b/source/setup/provision
index 629bfa1..b0363d8 100755
--- a/source/setup/provision
+++ b/source/setup/provision
@@ -27,6 +27,7 @@ import optparse
import os, sys
import samba
+import param
from auth import system_session
import samba.getopt as options
@@ -110,7 +111,7 @@ if opts.realm is None or opts.domain is None:
parser.print_usage()
sys.exit(1)
-smbconf = sambaopts.get_loadparm_path()
+smbconf = sambaopts.get_loadparm().configfile()
if opts.aci is not None:
print "set ACI: %s" % opts.aci
diff --git a/source/setup/tests/blackbox_provision.sh b/source/setup/tests/blackbox_provision.sh
index 83c045e..75d4fcf 100755
--- a/source/setup/tests/blackbox_provision.sh
+++ b/source/setup/tests/blackbox_provision.sh
@@ -28,7 +28,7 @@ testit() {
}
testit "simple-default" $PYTHON ./setup/provision $CONFIGURATION --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-default
-testit "simple-dc" $PYTHON ./setup/provision $CONFIGURATION --server-role="dc" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-dc
+testit "simple-dc" $PYTHON ./setup/provision $CONFIGURATION --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc
testit "simple-member" $PYTHON ./setup/provision $CONFIGURATION --server-role="member" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-member
testit "simple-standalone" $PYTHON ./setup/provision $CONFIGURATION --server-role="standalone" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-standalone
--
Samba Shared Repository
More information about the samba-cvs
mailing list