[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Fri Nov 5 22:27:02 MDT 2010
The branch, master has been updated
via ce203c0 s4-cldap: fixed debug message to match content
via 2d52eea s4-join: fixed SPNs, invocationId and dnshostname and python join
via a162b1a s4-join: switch over to the new DC join in make test
via 724599d samba-tool: deprecate samba-tool vampire command
from 097be4b s3: Make proper use of sid_check_is_in_xx routines
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ce203c001db8d9598b6432738abd3081e8d658b8
Author: Andrew Tridgell <tridge at samba.org>
Date: Sat Nov 6 14:44:33 2010 +1100
s4-cldap: fixed debug message to match content
Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
Autobuild-User: Andrew Tridgell <tridge at samba.org>
Autobuild-Date: Sat Nov 6 04:26:45 UTC 2010 on sn-devel-104
commit 2d52eea0289e8c61282eba26b8dbb8036ca6a04b
Author: Andrew Tridgell <tridge at samba.org>
Date: Sat Nov 6 14:35:30 2010 +1100
s4-join: fixed SPNs, invocationId and dnshostname and python join
- we need the GN/ SPN for replication.
- fixed the string form of the invocationId
- lowercase the dnshostname
Pair-Programmed-With: Andrew Bartlett <abartlet at samba.org>
commit a162b1a2d865c90441789640104adcd982e2bb75
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Nov 5 18:57:36 2010 +1100
s4-join: switch over to the new DC join in make test
commit 724599de635608f13e0f2d500a59b8830ceede84
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Nov 5 14:16:49 2010 +1100
samba-tool: deprecate samba-tool vampire command
-----------------------------------------------------------------------
Summary of changes:
selftest/target/Samba4.pm | 2 +-
source4/libcli/finddcs_cldap.c | 2 +-
source4/scripting/devel/drs/vampire_ad.sh | 2 +-
source4/scripting/python/samba/join.py | 7 ++++---
source4/scripting/python/samba/netcmd/vampire.py | 6 +++++-
5 files changed, 12 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 4676ad8..56b6186 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -995,7 +995,7 @@ sub provision_vampire_dc($$$)
my $cmd = "";
$cmd .= "SOCKET_WRAPPER_DEFAULT_IFACE=\"$ret->{SOCKET_WRAPPER_DEFAULT_IFACE}\" ";
$cmd .= "KRB5_CONFIG=\"$ret->{KRB5_CONFIG}\" ";
- $cmd .= "$samba_tool vampire $ret->{CONFIGURATION} $dcvars->{REALM} --realm=$dcvars->{REALM}";
+ $cmd .= "$samba_tool join $ret->{CONFIGURATION} $dcvars->{REALM} DC --realm=$dcvars->{REALM}";
$cmd .= " -U$dcvars->{DC_USERNAME}\%$dcvars->{DC_PASSWORD}";
unless (system($cmd) == 0) {
diff --git a/source4/libcli/finddcs_cldap.c b/source4/libcli/finddcs_cldap.c
index bbb221c..1928243 100644
--- a/source4/libcli/finddcs_cldap.c
+++ b/source4/libcli/finddcs_cldap.c
@@ -334,7 +334,7 @@ static void finddcs_cldap_srv_resolved(struct composite_context *ctx)
}
for (i=0; state->srv_addresses[i]; i++) {
- DEBUG(4,("finddcs: DNS server %u at '%s'\n", i, state->srv_addresses[i]));
+ DEBUG(4,("finddcs: DNS SRV response %u at '%s'\n", i, state->srv_addresses[i]));
}
state->srv_address_index = 0;
diff --git a/source4/scripting/devel/drs/vampire_ad.sh b/source4/scripting/devel/drs/vampire_ad.sh
index ec14b24..5740ae1 100755
--- a/source4/scripting/devel/drs/vampire_ad.sh
+++ b/source4/scripting/devel/drs/vampire_ad.sh
@@ -23,6 +23,6 @@ nsupdate -g nsupdate.txt
REALM="$(echo $DNSDOMAIN | tr '[a-z]' '[A-Z]')"
-sudo $GDB bin/samba-tool vampire $DNSDOMAIN -Uadministrator%$pass -s $PREFIX/etc/smb.conf --option=realm=$REALM --option="ads:dc function level=4" --option="ads:min function level=0" -d2 "$@" || exit 1
+sudo $GDB bin/samba-tool join $DNSDOMAIN DC -Uadministrator%$pass -s $PREFIX/etc/smb.conf --option=realm=$REALM --option="ads:dc function level=4" --option="ads:min function level=0" -d2 "$@" || exit 1
# PRIVATEDIR=$PREFIX/private sudo -E scripting/bin/setup_dns.sh $machine $DNSDOMAIN $machine_ip || exit 1
#sudo rndc flush
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index d57eb58..7d3b6f2 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -85,7 +85,7 @@ class dc_join:
ctx.dnsdomain = ldb.Dn(ctx.samdb, ctx.base_dn).canonical_str().split('/')[0]
ctx.realm = ctx.dnsdomain
- ctx.dnshostname = "%s.%s" % (ctx.myname, ctx.dnsdomain)
+ ctx.dnshostname = "%s.%s" % (ctx.myname.lower(), ctx.dnsdomain)
ctx.acct_dn = "CN=%s,OU=Domain Controllers,%s" % (ctx.myname, ctx.base_dn)
@@ -93,7 +93,8 @@ class dc_join:
ctx.tmp_samdb = None
ctx.SPNs = [ "HOST/%s" % ctx.myname,
- "HOST/%s" % ctx.dnshostname ]
+ "HOST/%s" % ctx.dnshostname,
+ "GC/%s/%s" % (ctx.dnshostname, ctx.dnsdomain) ]
# these elements are optional
ctx.never_reveal_sid = None
@@ -319,7 +320,7 @@ class dc_join:
rec["HasMasterNCs"] = [ ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
rec["msDS-HasMasterNCs"] = [ ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
rec["options"] = "1"
- rec["invocationId"] = str(uuid.uuid4())
+ rec["invocationId"] = ndr_pack(misc.GUID(str(uuid.uuid4())))
ctx.DsAddEntry(rec)
# find the GUID of our NTDS DN
diff --git a/source4/scripting/python/samba/netcmd/vampire.py b/source4/scripting/python/samba/netcmd/vampire.py
index a1cd4fa..509aa8a 100644
--- a/source4/scripting/python/samba/netcmd/vampire.py
+++ b/source4/scripting/python/samba/netcmd/vampire.py
@@ -26,6 +26,7 @@ from samba.netcmd import (
Command,
Option,
SuperCommand,
+ CommandError
)
class cmd_vampire(Command):
@@ -40,11 +41,14 @@ class cmd_vampire(Command):
takes_options = [
Option("--target-dir", help="Target directory.", type=str),
+ Option("--force", help="force run", action='store_true', default=False),
]
takes_args = ["domain"]
- def run(self, domain, target_dir=None, credopts=None, sambaopts=None, versionopts=None):
+ def run(self, domain, target_dir=None, credopts=None, sambaopts=None, versionopts=None, force=False):
+ if not force:
+ raise CommandError("samba-tool vampire is deprecated, please use samba-tool join. Use --force to override")
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
net = Net(creds, lp, server=credopts.ipaddress)
--
Samba Shared Repository
More information about the samba-cvs
mailing list