diff options
author | Volker Lendecke <vl@samba.org> | 2015-03-12 13:25:38 +0000 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2015-03-17 11:30:51 +0100 |
commit | 334015ebca42262668c82fbc9f5b2d25b0100b65 (patch) | |
tree | 5971d882e8ed614d21dc991734cafdc22eabc9b1 /examples | |
parent | 89052936aee34af841fea230c92e133ad28e67c6 (diff) | |
download | samba-334015ebca42262668c82fbc9f5b2d25b0100b65.tar.gz |
autobuild: Remove ntdb target
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/misc/adssearch.pl | 18 |
1 files changed, 14 insertions, 4 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) { |