The branch, master has been updated via 3adc4f5 selftest: samba4.samba-tool.domopen now passes, so do not skip via 2da506e s4-selftest re-enable nsstest on libnss_winbind.so via 8d3e92d s4-kdc: only build hdb plugin if we build against system Heimdal via f8e26c6 clarify Roadmap, as the shape of Samba 4.0 is much clearer now via 6092517 Remove outdated information from the README via 650bd5e s4-dnsupdate: Do not attempt to add the PDC names if we are not a PDC via d8f9893 pydsdb: provide a am_pdc hook like am_rodc to python scripts from dbbb626 s4-dns Use match-by-key in GSSAPI server if principal is not specified
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 3adc4f5545cba9ba1b328fedbefede0a65852c52 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Dec 7 12:56:50 2011 +1100 selftest: samba4.samba-tool.domopen now passes, so do not skip Autobuild-User: Andrew Bartlett <abart...@samba.org> Autobuild-Date: Wed Dec 7 04:42:02 CET 2011 on sn-devel-104 commit 2da506ee66111ea52e7e3f211392bcaf707e0f6a Author: Andrew Bartlett <abart...@samba.org> Date: Wed Dec 7 12:51:59 2011 +1100 s4-selftest re-enable nsstest on libnss_winbind.so commit 8d3e92d0430ec994d22ddd96babb430f8beb9315 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Dec 7 11:43:01 2011 +1100 s4-kdc: only build hdb plugin if we build against system Heimdal It is not safe to have a system kadmin use our plugin if we do not share the same libkrb5. Andrew Bartlett commit f8e26c6920420aa072ef337ec5f7f5c40ba0f2e4 Author: Andrew Bartlett <abart...@samba.org> Date: Thu Nov 10 10:02:15 2011 +1100 clarify Roadmap, as the shape of Samba 4.0 is much clearer now commit 60925179c96cfa717396b059a3c44895ed7ef8ef Author: Andrew Bartlett <abart...@samba.org> Date: Thu Nov 10 09:59:57 2011 +1100 Remove outdated information from the README commit 650bd5e718a603b3cbcd503db6fe4150d2cf8369 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Dec 7 09:57:07 2011 +1100 s4-dnsupdate: Do not attempt to add the PDC names if we are not a PDC commit d8f98933fd35bb10f064edaa1a4ac8d89c6e83bc Author: Andrew Bartlett <abart...@samba.org> Date: Wed Dec 7 09:56:31 2011 +1100 pydsdb: provide a am_pdc hook like am_rodc to python scripts ----------------------------------------------------------------------- Summary of changes: README | 36 +++++++----------------------- Roadmap | 14 ++++------- selftest/skip | 2 - source4/dsdb/pydsdb.c | 22 +++++++++++++++++++ source4/kdc/wscript_build | 1 + source4/scripting/bin/samba_dnsupdate | 16 +++++++++---- source4/scripting/python/samba/samdb.py | 4 +++ source4/selftest/tests.py | 2 +- testprogs/blackbox/nsstest.sh | 22 +++++++++++++++++++ 9 files changed, 75 insertions(+), 44 deletions(-) create mode 100755 testprogs/blackbox/nsstest.sh Changeset truncated at 500 lines: diff --git a/README b/README index ea75cc0..6c842c3 100644 --- a/README +++ b/README @@ -61,7 +61,7 @@ a complete replacement for Windows NT, Warp, NFS or Netware servers." - a SMB server, to provide Windows NT and LAN Manager-style file and print services to SMB clients such as Windows 95, Warp Server, smbfs and others. -- a Windows NT 4.0 Domain Controller replacement. +- a Windows Domain Controller (NT4 and AD) replacement. - a file/print server that can act as a member of a Windows NT 4.0 or Active Directory domain. @@ -82,14 +82,14 @@ http://samba.org/samba, and browse the user survey. Related packages include: -- smbfs, a Linux-only filesystem allowing you to mount remote SMB - filesystems from PCs on your Linux box. This is included as standard with - Linux 2.0 and later. - -- cifsvfs, a more advanced Linux-only filesystem allowing you to mount +- cifsvfs, an advanced Linux-only filesystem allowing you to mount remote SMB filesystems from PCs on your Linux box. This is included as standard with Linux 2.5 and later. +- smbfs, the previous Linux-only filesystem allowing you to mount remote SMB + filesystems from PCs on your Linux box. This is included as standard with + Linux 2.0 and later. + CONTRIBUTIONS @@ -105,20 +105,13 @@ on the various Samba mailing lists can be found at http://lists.samba.org/. You can also get the Samba sourcecode straight from the git repository - see http://wiki.samba.org/index.php/Using_Git_for_Samba_Development. -You could also send hardware/software/money/jewelry or pre-paid pizza -vouchers directly to Andrew. The pizza vouchers would be especially -welcome, in fact there is a special field in the survey for people who -have paid up their pizza :-) - If you like a particular feature then look through the git change-log (on the web at http://gitweb.samba.org/?p=samba.git;a=summary) and see who added it, then send them an email. Remember that free software of this kind lives or dies by the response we get. If no one tells us they like it then we'll probably move onto -something else. However, as you can see from the user survey quite a lot of -people do seem to like it at the moment :-) - +something else. MORE INFO ========= @@ -201,25 +194,14 @@ A few tips when submitting to this or any mailing list. 8. RTFM. Google. groups.google.com. -NEWS GROUP ----------- - -You might also like to look at the usenet news group comp.protocols.smb -as it often contains lots of useful info and is frequented by lots of -Samba users. The newsgroup was initially setup by people on the Samba -mailing list. It is not, however, exclusive to Samba, it is a forum for -discussing the SMB protocol (which Samba implements). The samba list -is gatewayed to this newsgroup. - - WEB SITE -------- A Samba WWW site has been setup with lots of useful info. Connect to: -http://samba.org/samba/ +http://samba.org/ As well as general information and documentation, this also has searchable archives of the mailing list and a user survey that shows who else is using -this package. Have you registered with the survey yet? :-) +this package. diff --git a/Roadmap b/Roadmap index 114fbf3..c79176d 100644 --- a/Roadmap +++ b/Roadmap @@ -15,15 +15,11 @@ Samba-3.0.x This release turned into maintenance mode since we Samba-3.6.x This is the current stable Samba 3 release intended for all Samba production server. -Samba-4 Danger Will Robinson, a big code clean up with major - system redesign. More will be announced as this work - starts to take shape. +Samba-4.0 A future release including the AD domain controller + feature, and the file server and other functionality + from Samba 3.6. Note that it is a given that the Samba-Team will continue to track -Windows (NT/200x) update releases, ensuring that Samba will work -well with whatever "Beta" releases Redmond throws our way :-). - -You may also note that the release numbers get fuzzier the -further into the future the objectives get. This is intentional -as we cannot commit to exact timeframes. +Windows releases, ensuring that Samba will work +well with whatever releases Redmond throws our way :-). diff --git a/selftest/skip b/selftest/skip index 5be321e..8771b67 100644 --- a/selftest/skip +++ b/selftest/skip @@ -79,8 +79,6 @@ ^samba4.*.base.samba3.* # Samba3-specific test ^samba4.*.raw.samba3.* # Samba3-specific test ^samba4.rpc..*samba3.* # Samba3-specific test -^samba4.samba-tool.domopen.*$ # Hangs for some reason -^samba4.nss.test # Fails ^samba4.raw.offline # Samba 4 doesn't have much offline support yet ^samba4.rpc.autoidl # this one just generates a lot of noise, and is no longer useful ^samba4.rpc.countcalls # this is not useful now we have full IDL diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index 3c7c8bf..738ea6d 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -945,6 +945,25 @@ static PyObject *py_dsdb_am_rodc(PyObject *self, PyObject *args) return PyBool_FromLong(am_rodc); } +/* + call into samdb_is_pdc() + */ +static PyObject *py_dsdb_am_pdc(PyObject *self, PyObject *args) +{ + PyObject *py_ldb; + struct ldb_context *ldb; + int ret; + bool am_pdc; + + if (!PyArg_ParseTuple(args, "O", &py_ldb)) + return NULL; + + PyErr_LDB_OR_RAISE(py_ldb, ldb); + + am_pdc = samdb_is_pdc(ldb); + return PyBool_FromLong(am_pdc); +} + static PyMethodDef py_dsdb_methods[] = { { "_samdb_server_site_name", (PyCFunction)py_samdb_server_site_name, @@ -997,6 +1016,9 @@ static PyMethodDef py_dsdb_methods[] = { { "_am_rodc", (PyCFunction)py_dsdb_am_rodc, METH_VARARGS, NULL }, + { "_am_pdc", + (PyCFunction)py_dsdb_am_pdc, METH_VARARGS, + NULL }, { "_dsdb_set_schema_from_ldif", (PyCFunction)py_dsdb_set_schema_from_ldif, METH_VARARGS, NULL }, { "_dsdb_set_schema_from_ldb", (PyCFunction)py_dsdb_set_schema_from_ldb, METH_VARARGS, diff --git a/source4/kdc/wscript_build b/source4/kdc/wscript_build index 6a6e4f2..5b2ba28 100644 --- a/source4/kdc/wscript_build +++ b/source4/kdc/wscript_build @@ -24,6 +24,7 @@ bld.SAMBA_LIBRARY('HDB_SAMBA4_PLUGIN', link_name='modules/hdb/hdb_samba4.so', realname='hdb_samba4.so', install_path='${MODULESDIR}/hdb', + enabled = (bld.CONFIG_SET("USING_SYSTEM_KRB5") and bld.CONFIG_SET("USING_SYSTEM_HDB")) ) bld.SAMBA_SUBSYSTEM('WDC_SAMBA4', diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index aa307ee..86af6d8 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -155,6 +155,10 @@ class dnsobj(object): ################################################ # parse a DNS line from def parse_dns_line(line, sub_vars): + if line.startswith("SRV _ldap._tcp.pdc._msdcs.") and not samdb.am_pdc(): + if opts.verbose: + print "Skipping PDC entry (%s) as we are not a PDC" % line + return None subline = samba.substitute_var(line, sub_vars) d = dnsobj(subline) return d @@ -249,13 +253,10 @@ def check_dns_name(d): ########################################### # get the list of substitution vars -def get_subst_vars(): +def get_subst_vars(samdb): global lp, am_rodc vars = {} - samdb = SamDB(url=lp.samdb_url(), session_info=system_session(), - lp=lp) - vars['DNSDOMAIN'] = samdb.domain_dns_name() vars['DNSFOREST'] = samdb.forest_dns_name() vars['HOSTNAME'] = samdb.host_dns_name() @@ -425,8 +426,11 @@ os.environ['KRB5_CONFIG'] = krb5conf file = open(dns_update_list, "r") +samdb = SamDB(url=lp.samdb_url(), session_info=system_session(), + lp=lp) + # get the substitution dictionary -sub_vars = get_subst_vars() +sub_vars = get_subst_vars(samdb) # build up a list of update commands to pass to nsupdate update_list = [] @@ -440,6 +444,8 @@ for line in file: if line == '' or line[0] == "#": continue d = parse_dns_line(line, sub_vars) + if d is None: + continue if d.type == 'A' and len(IP4s) == 0: continue if d.type == 'AAAA' and len(IP6s) == 0: diff --git a/source4/scripting/python/samba/samdb.py b/source4/scripting/python/samba/samdb.py index 4bd1acd..98c36bf 100644 --- a/source4/scripting/python/samba/samdb.py +++ b/source4/scripting/python/samba/samdb.py @@ -76,6 +76,10 @@ class SamDB(samba.Ldb): '''return True if we are an RODC''' return dsdb._am_rodc(self) + def am_pdc(self): + '''return True if we are an PDC emulator''' + return dsdb._am_pdc(self) + def domain_dn(self): '''return the domain DN''' return str(self.get_default_basedn()) diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 15ff7a9..370bce3 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -386,7 +386,7 @@ for env in ["dc", "s4member"]: nsstest4 = binpath("nsstest") if os.path.exists(nsstest4): - plantestsuite("samba4.nss.test using winbind(s4member)", "s4member", [valgrindify(nsstest4), os.path.join(samba4bindir, "shared/libnss_winbind.so")]) + plantestsuite("samba4.nss.test using winbind(s4member)", "s4member", [os.path.join(bbdir, "nsstest.sh"), nsstest4, os.path.join(samba4bindir, "default/nsswitch/libnss-winbind.so")]) else: skiptestsuite("samba4.nss.test using winbind(s4member)", "nsstest not available") diff --git a/testprogs/blackbox/nsstest.sh b/testprogs/blackbox/nsstest.sh new file mode 100755 index 0000000..bbca904 --- /dev/null +++ b/testprogs/blackbox/nsstest.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# Blackbox wrapper for nsstest +# Copyright (C) 2006-2007 Jelmer Vernooij <jel...@samba.org> +# Copyright (C) 2006-2008 Andrew Bartlett <abart...@samba.org> + +if [ $# -lt 2 ]; then +cat <<EOF +Usage: nsstest.sh NSSTEST LIBNSS_WINBIND +EOF +exit 1; +fi + +nsstest=$1 +libnss_winbind=$2 +shift 2 +failed=0 + +. `dirname $0`/subunit.sh + +testit "run nsstest" $VALGRIND $nsstest $libnss_winbind || failed=`expr $failed + 1` + +exit $failed -- Samba Shared Repository