summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexamples/misc/adssearch.pl18
-rw-r--r--python/samba/tests/upgradeprovision.py2
-rw-r--r--python/samba/tests/upgradeprovisionneeddc.py2
-rwxr-xr-xscript/autobuild.py19
-rwxr-xr-xscript/librelease.sh2
-rwxr-xr-xselftest/target/Samba3.pm3
-rw-r--r--testsuite/headers/wscript_build4
7 files changed, 26 insertions, 24 deletions
diff --git a/examples/misc/adssearch.pl b/examples/misc/adssearch.pl
index 13a85bede98..02c4464abba 100755
--- a/examples/misc/adssearch.pl
+++ b/examples/misc/adssearch.pl
@@ -42,11 +42,13 @@ my $rebind_url;
my $tdbdump = "/usr/bin/tdbdump";
+my $ntdbdump = "/usr/bin/ntdbdump";
my $testparm = "/usr/bin/testparm";
my $net = "/usr/bin/net";
my $dig = "/usr/bin/dig";
my $nmblookup = "/usr/bin/nmblookup";
my $secrets_tdb = "/etc/samba/secrets.tdb";
+my $secrets_ntdb = "/etc/samba/secrets.ntdb";
my $klist = "/usr/bin/klist";
my $kinit = "/usr/bin/kinit";
my $workgroup = "";
@@ -723,13 +725,21 @@ sub get_machine_password {
my $workgroup = shift || "";
$workgroup = uc($workgroup);
- my ($found, $tmp);
- -x $tdbdump || die "tdbdump is not installed. cannot proceed autodetection\n";
- -r $secrets_tdb || die "cannot read $secrets_tdb. cannot proceed autodetection\n";
+ my ($found, $tmp, $dbdump, $db);
+ if (-r $secrets_ntdb) {
+ -x $ntdbdump || die "ntdbdump is not installed. cannot proceed autodetection\n";
+ $dbdump = $ntdbdump;
+ $db = $secrets_ntdb;
+ } else {
+ -x $tdbdump || die "tdbdump is not installed. cannot proceed autodetection\n";
+ -r $secrets_tdb || die "cannot read $secrets_tdb. cannot proceed autodetection\n";
+ $dbdump = $tdbdump;
+ $db = $secrets_tdb;
+ }
# get machine-password
my $key = sprintf("SECRETS/MACHINE_PASSWORD/%s", $workgroup);
- open(SECRETS,"$tdbdump $secrets_tdb |");
+ open(SECRETS,"$dbdump $db |");
while(my $line = <SECRETS>) {
chomp($line);
if ($found) {
diff --git a/python/samba/tests/upgradeprovision.py b/python/samba/tests/upgradeprovision.py
index 3c0bc2af13e..d785bc1cb4d 100644
--- a/python/samba/tests/upgradeprovision.py
+++ b/python/samba/tests/upgradeprovision.py
@@ -147,7 +147,7 @@ class UpdateSecretsTests(samba.tests.TestCaseInTempDir):
self.assertEquals(newmodules.msgs, refmodules.msgs)
def tearDown(self):
- for name in ["ref.ldb", "secrets.ldb", "secrets.tdb", "secrets.tdb.bak"]:
+ for name in ["ref.ldb", "secrets.ldb", "secrets.tdb", "secrets.tdb.bak", "secrets.ntdb"]:
path = os.path.join(self.tempdir, name)
if os.path.exists(path):
os.unlink(path)
diff --git a/python/samba/tests/upgradeprovisionneeddc.py b/python/samba/tests/upgradeprovisionneeddc.py
index 914beeba726..bf254531510 100644
--- a/python/samba/tests/upgradeprovisionneeddc.py
+++ b/python/samba/tests/upgradeprovisionneeddc.py
@@ -172,7 +172,7 @@ class UpgradeProvisionWithLdbTestCase(TestCaseInTempDir):
self.assertTrue(re.match(".*upgrade to.*", str(oem2)))
def tearDown(self):
- for name in ["ref.ldb", "secrets.ldb", "secrets.tdb", "secrets.tdb.bak", "sam.ldb"]:
+ for name in ["ref.ldb", "secrets.ldb", "secrets.tdb", "secrets.tdb.bak", "secrets.ntdb", "sam.ldb"]:
path = os.path.join(self.tempdir, name)
if os.path.exists(path):
os.unlink(path)
diff --git a/script/autobuild.py b/script/autobuild.py
index 6fcdcd45d0a..3175ff082fb 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -22,7 +22,6 @@ builddirs = {
"samba-libs" : ".",
"ldb" : "lib/ldb",
"tdb" : "lib/tdb",
- "ntdb" : "lib/ntdb",
"talloc" : "lib/talloc",
"replace" : "lib/replace",
"tevent" : "lib/tevent",
@@ -32,7 +31,7 @@ builddirs = {
"retry" : "."
}
-defaulttasks = [ "ctdb", "samba", "samba-ctdb", "samba-libs", "ldb", "tdb", "ntdb", "talloc", "replace", "tevent", "pidl" ]
+defaulttasks = [ "ctdb", "samba", "samba-ctdb", "samba-libs", "ldb", "tdb", "talloc", "replace", "tevent", "pidl" ]
tasks = {
"ctdb" : [ ("random-sleep", "../script/random-sleep.sh 60 600", "text/plain"),
@@ -81,10 +80,6 @@ tasks = {
("tdb-make", "cd lib/tdb && make", "text/plain"),
("tdb-install", "cd lib/tdb && make install", "text/plain"),
- ("ntdb-configure", "cd lib/ntdb && PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=NONE --abi-check --enable-debug -C ${PREFIX}", "text/plain"),
- ("ntdb-make", "cd lib/ntdb && make", "text/plain"),
- ("ntdb-install", "cd lib/ntdb && make install", "text/plain"),
-
("tevent-configure", "cd lib/tevent && PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=NONE --abi-check --enable-debug -C ${PREFIX}", "text/plain"),
("tevent-make", "cd lib/tevent && make", "text/plain"),
("tevent-install", "cd lib/tevent && make install", "text/plain"),
@@ -93,7 +88,7 @@ tasks = {
("ldb-make", "cd lib/ldb && make", "text/plain"),
("ldb-install", "cd lib/ldb && make install", "text/plain"),
- ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=!talloc,!tdb,!pytdb,!ntdb,!pyntdb,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX}", "text/plain"),
+ ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=!talloc,!tdb,!pytdb,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX}", "text/plain"),
("make", "make", "text/plain"),
("install", "make install", "text/plain"),
("dist", "make dist", "text/plain")],
@@ -118,16 +113,6 @@ tasks = {
("distcheck", "make distcheck", "text/plain"),
("clean", "make clean", "text/plain") ],
- "ntdb" : [
- ("random-sleep", "../../script/random-sleep.sh 60 600", "text/plain"),
- ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
- ("make", "make", "text/plain"),
- ("install", "make install", "text/plain"),
- ("test", "make test", "text/plain"),
- ("check-clean-tree", "../../script/clean-source-tree.sh", "text/plain"),
- ("distcheck", "make distcheck", "text/plain"),
- ("clean", "make clean", "text/plain") ],
-
"talloc" : [
("random-sleep", "../../script/random-sleep.sh 60 600", "text/plain"),
("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
diff --git a/script/librelease.sh b/script/librelease.sh
index 5119ca4aca7..7584e481d30 100755
--- a/script/librelease.sh
+++ b/script/librelease.sh
@@ -80,7 +80,7 @@ release_lib() {
for lib in $*; do
case $lib in
- talloc | tdb | tevent | ldb)
+ talloc | tdb | ntdb | tevent | ldb)
[ -z "$GPG_USER" ] && {
GPG_USER='Samba Library Distribution Key <samba-bugs@samba.org>'
}
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 0c48ddabb25..097d90a8de4 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -607,6 +607,9 @@ $ret->{USERNAME} = KTEST\\Administrator
system("cp $self->{srcdir}/source3/selftest/ktest-secrets.tdb $prefix/private/secrets.tdb");
chmod 0600, "$prefix/private/secrets.tdb";
+#Make sure there's no old ntdb file.
+ system("rm -f $prefix/private/secrets.ntdb");
+
#This uses a pre-calculated krb5 credentials cache, obtained by running Samba4 with:
# "--option=kdc:service ticket lifetime=239232" "--option=kdc:user ticket lifetime=239232" "--option=kdc:renewal lifetime=239232"
#
diff --git a/testsuite/headers/wscript_build b/testsuite/headers/wscript_build
index d0625a0fcb8..f612ad92615 100644
--- a/testsuite/headers/wscript_build
+++ b/testsuite/headers/wscript_build
@@ -8,6 +8,10 @@ def build_test_headers(task):
f.write('/* generated header test */\n')
hlist = task.env.public_headers_list[:]
hlist.sort()
+ # We need to include tdb.h before ntdb.h. It's the rules!
+ if 'tdb.h' in hlist and 'ntdb.h' in hlist:
+ hlist.remove('ntdb.h')
+ hlist.append('ntdb.h')
for h in hlist:
f.write('#include "%s"\n' % os.path.normpath(h))