[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 66cbc62... s4-waf: Replace local includes in header files with proper system names. from b0d7a3d... Thanks to Andrew Bartlett's advice, fix the NTLMSSP version problem the correct way. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 66cbc62961bad98fa8f0cdb49370b415a1d2b2d2 Author: Thomas Nagy Date: Wed May 19 22:13:03 2010 +0200 s4-waf: Replace local includes in header files with proper system names. Signed-off-by: Jelmer Vernooij --- Summary of changes: buildtools/wafsamba/wafsamba.py | 121 --- 1 files changed, 100 insertions(+), 21 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index 96e9515..0893eac 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -620,6 +620,103 @@ def INSTALL_DIRS(bld, destdir, dirs): Build.BuildContext.INSTALL_DIRS = INSTALL_DIRS +re_header = re.compile('#include[ \t]*"([^"]+)"', re.I | re.M) +class header_task(Task.Task): +name = 'header' +color = 'PINK' +vars = ['INCLUDEDIR', 'HEADER_DEPS'] +def run(self): +txt = self.inputs[0].read(self.env) + +txt = txt.replace('#if _SAMBA_BUILD_ == 4', '#if 1\n') + +themap = self.generator.bld.subst_table +def repl(m): +if m.group(1): +s = m.group(1) +return "#include <%s>" % themap.get(s, s) +return '' + +txt = re_header.sub(repl, txt) + +f = None +try: +f = open(self.outputs[0].abspath(self.env), 'w') +f.write(txt) +finally: +if f: +f.close() + +def init_subst(bld): +""" +initialize the header substitution table +for now use the file headermap.txt but in the future we will compute the paths properly +""" + +if getattr(bld, 'subst_table', None): +return bld.subst_table_h + +node = bld.srcnode.find_resource("source4/headermap.txt") +if not node: +return {} +lines = node.read(None) +bld.subst_table_h = hash(lines) +lines = [x.strip().split(': ') for x in lines.split('\n') if x.rfind(': ') > -1] +bld.subst_table = dict(lines) +return bld.subst_table_h + +...@taskgen.feature('pubh') +def make_public_headers(self): +if not self.bld.is_install: +# install time only (lazy) +return + +self.env['HEADER_DEPS'] = init_subst(self.bld) +# adds a dependency and trigger a rebuild if the dict changes + +header_path = getattr(self, 'header_path', None) or '' + +for x in self.to_list(self.headers): + +# too complicated, but what was the original idea? +if isinstance(header_path, list): +add_dir = '' +for (p1, dir) in header_path: +lst = self.to_list(p1) +for p2 in lst: +if fnmatch.fnmatch(x, p2): +add_dir = dir +break +else: +continue +break +inst_path = add_dir +else: +inst_path = header_path + +dest = '' +name = x +if x.find(':') != -1: +s = x.split(':') +name = s[0] +dest = s[1] + +inn = self.path.find_resource(name) +if not inn: +raise ValueError("could not find the public header %r in %r" % (name, self.path)) +out = inn.change_ext('.inst.h') +self.create_task('header', inn, out) + +if not dest: +dest = inn.name + +if inst_path: +inst_path = inst_path + '/' +inst_path = inst_path + dest + +#print("going to install the headers", inst_path, out) +self.bld.install_as('${INCLUDEDIR}/%s' % inst_path, out, self.env) + def PUBLIC_HEADERS(bld, public_headers, header_path=None): '''install some headers @@ -627,27 +724,9 @@ def PUBLIC_HEADERS(bld, public_headers, header_path=None): or it can be a dictionary of wildcard patterns which map to destination directories relative to INCLUDEDIR ''' -dest = '${INCLUDEDIR}' -if isinstance(header_path, str): -dest += '/' + header_path -for h in TO_LIST(public_headers): -hdest = dest -if isinstance(header_path, list):
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ac93412... pynet: Raise proper exceptions rather than invoking sys.exit. from d18fbda... testprogs/win32: make it possible to specify MINGW_CC http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ac9341245af38fe019c43ad9e413dbc62e26bc7a Author: Jelmer Vernooij Date: Wed May 19 00:26:56 2010 +0200 pynet: Raise proper exceptions rather than invoking sys.exit. --- Summary of changes: source4/scripting/python/samba/netcmd/newuser.py |8 .../scripting/python/samba/netcmd/setpassword.py |6 ++ 2 files changed, 6 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/scripting/python/samba/netcmd/newuser.py b/source4/scripting/python/samba/netcmd/newuser.py index 9ffc0e6..bb5537a 100644 --- a/source4/scripting/python/samba/netcmd/newuser.py +++ b/source4/scripting/python/samba/netcmd/newuser.py @@ -20,8 +20,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import samba.getopt as options -from samba.netcmd import Command, Option -import sys, ldb +from samba.netcmd import Command, CommandError, Option +import ldb from getpass import getpass from samba.auth import system_session @@ -61,6 +61,6 @@ class cmd_newuser(Command): samdb.newuser(username, password, force_password_change_at_next_login_req=must_change_at_next_login) except ldb.LdbError, (num, msg): -print('Failed to create user "%s" : %s' % (username, msg)) -sys.exit(1) +raise CommandError('Failed to create user "%s" : %s' % ( +username, msg)) diff --git a/source4/scripting/python/samba/netcmd/setpassword.py b/source4/scripting/python/samba/netcmd/setpassword.py index 098b3cb..d51e8ea 100644 --- a/source4/scripting/python/samba/netcmd/setpassword.py +++ b/source4/scripting/python/samba/netcmd/setpassword.py @@ -22,7 +22,6 @@ import samba.getopt as options from samba.netcmd import Command, CommandError, Option -import sys from getpass import getpass from samba.auth import system_session from samba.samdb import SamDB @@ -73,6 +72,5 @@ class cmd_setpassword(Command): force_change_at_next_login=must_change_at_next_login, username=username) except: -print('Failed to set password for user "%s"' % username) -sys.exit(1) - +raise CommandError('Failed to set password for user "%s"' % +username) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c0fb7b8... s3: Fix some more iconv convenience usages. via 390ada6... Remove more usages of iconv_convenience in files which were apparently not recompiled by waf. via b8268cf... s3: Remove use of iconv_convenience. via f9ca9e4... Finish removal of iconv_convenience in public API's. from e9f5bdf... smbconf: only include smbconf headers where needed. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c0fb7b8180f7383590f24e84cc3700aa77499112 Author: Jelmer Vernooij Date: Fri May 14 17:39:07 2010 +0200 s3: Fix some more iconv convenience usages. commit 390ada6ec79b0480a44da1fa81a63dcaf5c81da7 Author: Jelmer Vernooij Date: Mon May 10 14:08:38 2010 +0200 Remove more usages of iconv_convenience in files which were apparently not recompiled by waf. commit b8268cf7b0264ea28f684cbdfbf462e68a018d83 Author: Jelmer Vernooij Date: Mon May 10 00:42:06 2010 +0200 s3: Remove use of iconv_convenience. commit f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d Author: Jelmer Vernooij Date: Sun May 9 17:20:01 2010 +0200 Finish removal of iconv_convenience in public API's. --- Summary of changes: lib/tdr/tdr.c| 17 ++-- lib/tdr/tdr.h|2 - lib/tdr/testsuite.c | 18 ++-- libcli/auth/ntlmssp_ndr.c| 32 ++ libcli/auth/ntlmssp_ndr.h|6 - libcli/auth/schannel_state.h |3 - libcli/auth/schannel_state_tdb.c | 17 +-- libcli/cldap/cldap.c |7 +- libcli/cldap/cldap.h |3 - libcli/ldap/ldap_ndr.c |4 +- libcli/named_pipe_auth/npa_tstream.c |7 +- libcli/named_pipe_auth/npa_tstream.h |1 - libcli/nbt/libnbt.h |6 +- libcli/nbt/nbtname.c |6 +- libcli/nbt/nbtsocket.c |8 +- libcli/nbt/pynbt.c | 12 +- libcli/nbt/tools/nmblookup.c |2 +- libcli/ndr_netlogon.c|6 +- libcli/netlogon.c| 17 +--- libcli/netlogon_proto.h |4 - libcli/registry/util_reg.c | 19 ++-- libcli/samsync/decrypt.c |2 +- libcli/security/secace.c |4 +- librpc/idl/drsblobs.idl | 22 ++-- librpc/idl/drsuapi.idl | 10 +- librpc/idl/epmapper.idl |2 +- librpc/idl/frsrpc.idl|2 +- librpc/idl/named_pipe_auth.idl |4 +- librpc/idl/nbt.idl |2 +- librpc/idl/netlogon.idl |2 +- librpc/idl/ntlmssp.idl |4 +- librpc/idl/security.idl |6 +- librpc/idl/spoolss.idl | 32 +++--- librpc/ndr/libndr.h | 25 ++--- librpc/ndr/ndr.c | 56 --- librpc/ndr/ndr_compression.c |8 +- librpc/ndr/ndr_drsuapi.c |4 +- librpc/ndr/ndr_drsuapi.h |2 +- librpc/ndr/ndr_frsrpc.c |4 +- librpc/ndr/ndr_frsrpc.h |1 - librpc/ndr/ndr_krb5pac.c | 16 ++-- librpc/ndr/ndr_ntlmssp.c | 10 +- librpc/ndr/ndr_ntlmssp.h |2 - librpc/ndr/ndr_schannel.c|4 +- librpc/ndr/ndr_sec_helper.c | 20 ++-- librpc/ndr/ndr_spoolss_buf.c | 42 librpc/ndr/ndr_spoolss_buf.h | 24 ++-- librpc/ndr/uuid.c|4 +- librpc/rpc/binding.c |6 +- librpc/tools/ndrdump.c |8 +- pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm |4 +- pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |8 +- pidl/lib/Parse/Pidl/Samba4/Python.pm |4 +- pidl/tests/ndr_string.pl | 18 +-- source3/include/includes.h |1 - source3/include/proto.h | 12 +-- source3/lib/eventlog/eventlog.c | 10 +- source3/lib/messages_local.c |5 +- source3/lib/secdesc.c| 14 +-- source3/lib/sharesec.c
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e22722a... selftest: Cope with empty testsuite results in more places. via 11ec291... selftest: Cope with testsuites without any output whatsoever (probably an error though). via f7f1a3a... pynet: Remove unused credentials argument. from fe31b67... s3-registry: only include registry headers when really needed. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e22722ae641a43710380faa3e2ca8395e554deb8 Author: Jelmer Vernooij Date: Tue May 18 01:39:17 2010 +0200 selftest: Cope with empty testsuite results in more places. commit 11ec2916a7ba937aa09057a3a6b990bd29476cc4 Author: Jelmer Vernooij Date: Tue May 18 00:01:48 2010 +0200 selftest: Cope with testsuites without any output whatsoever (probably an error though). commit f7f1a3a4516528be8722bb416428c8abb4bab652 Author: Jelmer Vernooij Date: Sun May 2 20:02:26 2010 +0200 pynet: Remove unused credentials argument. --- Summary of changes: selftest/format-subunit |8 +--- source4/libnet/py_net.c |7 +++ 2 files changed, 8 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/format-subunit b/selftest/format-subunit index 032b990..b4509ab 100755 --- a/selftest/format-subunit +++ b/selftest/format-subunit @@ -109,7 +109,7 @@ class PlainFormatter(object): if reason is not None: self.output_msg("REASON: %s\n" % (reason,)) self.suitesfailed.append(name) -if self.immediate and not self.verbose: +if self.immediate and not self.verbose and name in self.test_output: out += self.test_output[name] unexpected = True @@ -157,7 +157,8 @@ class PlainFormatter(object): for suite in self.suitesfailed: f.write("== %s ==\n" % suite) -f.write(self.test_output[suite]+"\n\n") +if suite in self.test_output: +f.write(self.test_output[suite]+"\n\n") f.write("\n") @@ -165,7 +166,8 @@ class PlainFormatter(object): for suite in self.suitesfailed: print "=" * 78 print "FAIL: %s" % suite -print self.test_output[suite] +if suite in self.test_output: +print self.test_output[suite] print "" f.write("= Skipped tests =\n") diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 0592b3f..9b5fa5d 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -40,12 +40,11 @@ static PyObject *py_net_join(py_net_Object *self, PyObject *args, PyObject *kwar NTSTATUS status; PyObject *result; TALLOC_CTX *mem_ctx; - PyObject *py_creds; - const char *kwnames[] = { "domain_name", "netbios_name", "join_type", "level", "credentials", NULL }; + const char *kwnames[] = { "domain_name", "netbios_name", "join_type", "level", NULL }; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ssiiO:Join", discard_const_p(char *, kwnames), + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ssii:Join", discard_const_p(char *, kwnames), &r.in.domain_name, &r.in.netbios_name, -&r.in.join_type, &r.in.level, &py_creds)) +&r.in.join_type, &r.in.level)) return NULL; mem_ctx = talloc_new(self->mem_ctx); -- Samba Shared Repository
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, hOn Fri, 2010-05-14 at 12:12 -0500, Matthias Dieter Wallnöfer wrote: > The branch, master has been updated >via d712356... s4:repl_meta_data LDB module - fix counter types >via 8608eae... s4:net domainlevel tool - fix up the error handling as > Jelmer suggested >via 6d95a20... s4:dsdb_cache LDB module - fix a typo >via da5cd4b... s4:samldb LDB module - remove unused variables > from b5dc394... s4:gensec expose gensec_set_target_principal for use > outside GENSEC > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > > - Log - > commit d7123565698fefd16e7696c0e4bb4ec98f6f62ac > Author: Matthias Dieter Wallnöfer > Date: Fri May 14 18:56:51 2010 +0200 > > s4:repl_meta_data LDB module - fix counter types > > commit 8608eaef76631666a41109317d2a9b20979c5025 > Author: Matthias Dieter Wallnöfer > Date: Fri May 14 18:59:36 2010 +0200 > > s4:net domainlevel tool - fix up the error handling as Jelmer suggested > > Sorry, I've copied this from the "ldap.py" test and thought it would work. Thanks for fixing that. Have you verified that we actually need that code? is there a particular reason why those modifies would fail and if they do should we really ignore that silently? Cheers, Jelmer signature.asc Description: This is a digitally signed message part
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2cc612c... s3-selftest: Allow overriding the subunit formatter. from d712356... s4:repl_meta_data LDB module - fix counter types http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2cc612cb6bb72e5dc52d12783aee04d2ef102198 Author: Jelmer Vernooij Date: Sun May 16 00:21:19 2010 +0200 s3-selftest: Allow overriding the subunit formatter. (e.g. "make selftest SUBUNIT_FORMATTER=cat") --- Summary of changes: source3/Makefile.in |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/Makefile.in b/source3/Makefile.in index 968e5ba..3d47384 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -3177,6 +3177,8 @@ selftestdir = ../selftest S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin:$$$(LIB_PATH_VAR)" +SUBUNIT_FORMATTER = $(PYTHON) $(selftestdir)/format-subunit --immediate + selftest:: all torture timelimit @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \ SAMBA4SHAREDDIR="$(builddir)/bin/shared" SMBTORTURE4=$(smbtorture4_path) \ @@ -3189,7 +3191,7 @@ selftest:: all torture timelimit --socket-wrapper $(TESTS) | \ $(PYTHON) $(selftestdir)/filter-subunit \ --expected-failures=$(srcdir)/selftest/knownfail | \ - $(PYTHON) $(selftestdir)/format-subunit --immediate + $(SUBUNIT_FORMATTER) selftest-%: $(MAKE) selftest TESTS=$* -- Samba Shared Repository
Re: [SCM] Samba Shared Repository - branch master updated
On Thu, 2010-05-13 at 15:43 -0500, Matthias Dieter Wallnöfer wrote: > diff --git a/source4/scripting/python/samba/netcmd/domainlevel.py > b/source4/scripting/python/samba/netcmd/domainlevel.py > index 310747a..72559bb 100644 > --- a/source4/scripting/python/samba/netcmd/domainlevel.py > +++ b/source4/scripting/python/samba/netcmd/domainlevel.py > @@ -200,7 +200,7 @@ class cmd_domainlevel(Command): > try: > samdb.modify(m) > except LdbError, (num, _): > -pass > +self.assertEquals(num, ldb.ERR_UNWILLING_TO_PERFORM) ^^^ This doesn't work, assertEquals is on TestCase. You'd probably want sometihng like: if num != ldb.ERR_UNWILLING_TO_PERFORM: raise Cheers, Jelmer signature.asc Description: This is a digitally signed message part
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Thu, 2010-05-13 at 10:12 -0500, Matthias Dieter Wallnöfer wrote: > diff --git a/source4/scripting/python/samba/netcmd/domainlevel.py > b/source4/scripting/python/samba/netcmd/domainlevel.py > index f7e67a2..310747a 100644 > --- a/source4/scripting/python/samba/netcmd/domainlevel.py > +++ b/source4/scripting/python/samba/netcmd/domainlevel.py > @@ -185,17 +185,42 @@ class cmd_domainlevel(Command): > > # Deactivate mixed/interim domain support > if level_domain_mixed != 0: > +# Directly on the base DN > m = ldb.Message() > m.dn = ldb.Dn(samdb, domain_dn) > m["nTMixedDomain"] = ldb.MessageElement("0", >ldb.FLAG_MOD_REPLACE, "nTMixedDomain") > samdb.modify(m) > +# Under partitions > +m = ldb.Message() > +m.dn = ldb.Dn(samdb, "CN=" + lp.get("workgroup") > + + ",CN=Partitions,CN=Configuration," + domain_dn) > +m["nTMixedDomain"] = ldb.MessageElement("0", > + ldb.FLAG_MOD_REPLACE, "nTMixedDomain") > +try: > +samdb.modify(m) > +except LdbError, (num, _): > + pass ^^^ Please catch specific error codes here rather than everything. Otherwise we'll end up eating exception for errors we don't want to ignore. Cheers, Jelmer signature.asc Description: This is a digitally signed message part
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ed39e9b... s3: Work around dependency bug in Samba 4 waf build in merged build. from aa8d91a... libwbclient: Fix a fd-leak at dlclose-time http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ed39e9b67f38312b6786172e80b4d7057dbd513a Author: Jelmer Vernooij Date: Mon May 10 14:48:41 2010 +0200 s3: Work around dependency bug in Samba 4 waf build in merged build. --- Summary of changes: source3/Makefile.in |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/Makefile.in b/source3/Makefile.in index c6986ed..1a4456d 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -3217,13 +3217,14 @@ clean_libnetapi_examples: ../source4/configure: ../buildtools/scripts/configure.waf cd ../source4 && ./autogen.sh -samba4-configure: - @$(MAKE) -C ../source4 reconfigure || ( cd ../source4 && ./configure --enable-auto-reconfigure --prefix="$(prefix)" ) +samba4-configure: ../source4/configure + @$(MAKE) -C ../source4 reconfigure || ( cd ../source4 && ./configure --enable-auto-reconfigure ) .PHONY: samba4-configure bin/smbtorture4: $(BINARY_PREREQS) samba4-configure - cd ../source4 && ../buildtools/bin/waf build --targets=smbtorture + cd ../source4 && ../buildtools/bin/waf build --targets=asn1_compile,compile_et + cd ../source4 && ../buildtools/bin/waf build --targets=smbtorture cp ../source4/bin/smbtorture bin/smbtorture4 .PHONY: bin/smbtorture4 -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 961993b... s3-merged: Make sure bin/ exists when copying in bin/smbtorture4. via 169aaba... s3-merged: Use newly added waf reconfigure subcommand. via 9542155... Reintroduce merged build, using waf to build smbtorture4. via 674a78d... Revert "Revert "s3-build: Remove --enable-merged support."" via c18d58b... samba3: Generate C files from IDL in source3/librpc/gen_ndr rather than librpc/gen_ndr. from 5b7163a... Only MULTIPLE-UNLOCK test left to fix ! http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 961993bc9126a85338303034718341576e783761 Author: Jelmer Vernooij Date: Fri May 7 18:30:46 2010 +0200 s3-merged: Make sure bin/ exists when copying in bin/smbtorture4. commit 169aabae702c2ff7d5c59d387265dd842784bd36 Author: Jelmer Vernooij Date: Thu May 6 15:31:48 2010 +0200 s3-merged: Use newly added waf reconfigure subcommand. commit 95421552be87d17353ba5a351a096e2b4bfdfae8 Author: Jelmer Vernooij Date: Thu May 6 14:08:49 2010 +0200 Reintroduce merged build, using waf to build smbtorture4. commit 674a78d60a7dbc4d2af1b229a6b3b2a96c2517f3 Author: Jelmer Vernooij Date: Thu May 6 12:00:01 2010 +0200 Revert "Revert "s3-build: Remove --enable-merged support."" This reverts commit 8f8e7c788a12d1e0bda9183ed765cc1048e105f7. commit c18d58b854836fc8df56883f7197d6fce0d70c1d Author: Jelmer Vernooij Date: Thu May 6 11:49:10 2010 +0200 samba3: Generate C files from IDL in source3/librpc/gen_ndr rather than librpc/gen_ndr. This is done to make it possible to run waf in the source4/ tree at the same time, since waf has problems with files that were generated by something else. --- Summary of changes: source3/Makefile.in | 132 -- source3/configure.in| 16 +-- source3/samba4-templates.mk | 144 --- source3/samba4.m4 | 211 -- source3/samba4.mk | 265 --- 5 files changed, 79 insertions(+), 689 deletions(-) delete mode 100644 source3/samba4-templates.mk delete mode 100644 source3/samba4.m4 delete mode 100644 source3/samba4.mk Changeset truncated at 500 lines: diff --git a/source3/Makefile.in b/source3/Makefile.in index ac936e4..3184d03 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -286,9 +286,9 @@ PASSCHANGE_OBJ = libsmb/passchange.o LIBNDR_DRSUAPI_OBJ = ../librpc/ndr/ndr_drsuapi.o \ ../librpc/ndr/ndr_compression.o \ -../librpc/gen_ndr/ndr_drsuapi.o \ +librpc/gen_ndr/ndr_drsuapi.o \ ../librpc/ndr/ndr_drsblobs.o \ -../librpc/gen_ndr/ndr_drsblobs.o +librpc/gen_ndr/ndr_drsblobs.o ZLIB_OBJ = @ZLIB_OBJS@ @@ -299,47 +299,47 @@ COMPRESSION_OBJ = ../lib/compression/mszip.o \ DRSUAPI_OBJ = $(LIBNDR_DRSUAPI_OBJ) \ $(COMPRESSION_OBJ) -LIBNDR_NTLMSSP_OBJ = ../librpc/gen_ndr/ndr_ntlmssp.o \ +LIBNDR_NTLMSSP_OBJ = librpc/gen_ndr/ndr_ntlmssp.o \ ../librpc/ndr/ndr_ntlmssp.o LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \ ../librpc/ndr/ndr.o \ ../librpc/ndr/ndr_misc.o \ -../librpc/gen_ndr/ndr_misc.o \ -../librpc/gen_ndr/ndr_security.o \ +librpc/gen_ndr/ndr_misc.o \ +librpc/gen_ndr/ndr_security.o \ ../librpc/ndr/ndr_sec_helper.o \ librpc/ndr/ndr_string.o \ ../librpc/ndr/uuid.o \ librpc/ndr/util.o \ -../librpc/gen_ndr/ndr_dcerpc.o +librpc/gen_ndr/ndr_dcerpc.o RPCCLIENT_NDR_OBJ = rpc_client/ndr.o -LIBNDR_GEN_OBJ0 = ../librpc/gen_ndr/ndr_samr.o \ - ../librpc/gen_ndr/ndr_lsa.o +LIBNDR_GEN_OBJ0 = librpc/gen_ndr/ndr_samr.o \ + librpc/gen_ndr/ndr_lsa.o -LIBNDR_GEN_OBJ1 = ../librpc/gen_ndr/ndr_netlogon.o \ +LIBNDR_GEN_OBJ1 = librpc/gen_ndr/ndr_netlogon.o \ ../librpc/ndr/ndr_netlogon.o -LIBNDR_GEN_OBJ2 = ../librpc/gen_ndr/ndr_spoolss.o \ +LIBNDR_GEN_OBJ2 = librpc/gen_ndr/ndr_spoolss.o \ ../librpc/ndr/ndr_spoolss_buf.o -LIBNDR_GEN_OBJ = ../librpc/gen_ndr/ndr_wkssvc.o \ +LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_wkssvc.o \ $(LIBNDR_GEN_OBJ0) \ -../librpc/gen_ndr/ndr_dfs.o \ -../librpc/gen_ndr/ndr_echo.o \ -../librpc/gen_ndr/ndr_winreg.o \ -../librpc/gen_ndr/ndr_initshutdown.o \ -../librpc/gen_ndr/ndr_srvsvc.o \ -../librpc/gen_ndr/ndr_eventlog.o \ +librpc/gen_ndr/ndr_dfs.o \ +librpc/gen_ndr/ndr_echo.o \ +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fc33659... Remove the copy of ldb from Samba 3. from 24b2ddd... s3-build: fix the build of vfs_notify_fam. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fc336590dc35f1737ddc74333b959bdd32ee22d3 Author: Jelmer Vernooij Date: Thu May 6 10:41:43 2010 +0200 Remove the copy of ldb from Samba 3. There were two utility functions that other parts of Samba 3 still relied on; they have been moved to lib/ldb_compat.[ch]. --- Summary of changes: libcli/ldap/ldap_ndr.c |4 + source3/Makefile.in| 127 +- source3/configure.in |2 - source3/lib/ldb/Doxyfile | 26 - source3/lib/ldb/Makefile.in| 173 -- source3/lib/ldb/README_gcov.txt| 29 - source3/lib/ldb/aclocal.m4 |1 - source3/lib/ldb/autogen.sh | 17 - source3/lib/ldb/common/attrib_handlers.c | 405 - source3/lib/ldb/common/ldb.c | 1136 source3/lib/ldb/common/ldb_attributes.c| 308 source3/lib/ldb/common/ldb_controls.c | 105 -- source3/lib/ldb/common/ldb_debug.c | 104 -- source3/lib/ldb/common/ldb_dn.c| 1050 --- source3/lib/ldb/common/ldb_ldif.c | 760 source3/lib/ldb/common/ldb_match.c | 430 - source3/lib/ldb/common/ldb_modules.c | 459 - source3/lib/ldb/common/ldb_msg.c | 829 - source3/lib/ldb/common/ldb_parse.c | 818 - source3/lib/ldb/common/ldb_utf8.c | 148 -- source3/lib/ldb/common/qsort.c | 252 --- source3/lib/ldb/config.guess | 1561 source3/lib/ldb/config.mk | 315 source3/lib/ldb/config.sub | 1686 - source3/lib/ldb/configure.ac | 74 - source3/lib/ldb/docs/builddocs.sh | 52 - source3/lib/ldb/docs/design.txt| 41 - source3/lib/ldb/docs/installdocs.sh| 17 - source3/lib/ldb/examples.dox | 16 - source3/lib/ldb/examples/ldbreader.c | 122 -- source3/lib/ldb/examples/ldifreader.c | 127 -- source3/lib/ldb/include/dlinklist.h| 181 -- source3/lib/ldb/include/includes.h | 29 - source3/lib/ldb/include/ldb.h | 1554 source3/lib/ldb/include/ldb_errors.h | 310 source3/lib/ldb/include/ldb_private.h | 224 --- source3/lib/ldb/install-sh | 238 --- source3/lib/ldb/ldap.m4| 90 - source3/lib/ldb/ldb.pc.in | 15 - source3/lib/ldb/ldb_ildap/ldb_ildap.c | 827 - source3/lib/ldb/ldb_ldap/ldb_ldap.c| 846 - source3/lib/ldb/ldb_sqlite3/README |7 - source3/lib/ldb/ldb_sqlite3/base160.c | 154 -- source3/lib/ldb/ldb_sqlite3/ldb_sqlite3.c | 1912 source3/lib/ldb/ldb_sqlite3/schema | 363 source3/lib/ldb/ldb_sqlite3/trees.ps | 1760 -- source3/lib/ldb/ldb_tdb/ldb_cache.c| 560 -- source3/lib/ldb/ldb_tdb/ldb_index.c| 1178 source3/lib/ldb/ldb_tdb/ldb_pack.c | 293 --- source3/lib/ldb/ldb_tdb/ldb_search.c | 527 -- source3/lib/ldb/ldb_tdb/ldb_tdb.c | 1087 --- source3/lib/ldb/ldb_tdb/ldb_tdb.h | 123 -- source3/lib/ldb/ldb_tdb/ldb_tdb_wrap.c | 141 -- source3/lib/ldb/libldb.m4 |1 - source3/lib/ldb/mainpage.dox | 80 - source3/lib/ldb/man/ad2oLschema.1.xml | 87 - source3/lib/ldb/man/ldb.3.xml | 262 --- source3/lib/ldb/man/ldbadd.1.xml | 105 -- source3/lib/ldb/man/ldbdel.1.xml | 105 -- source3/lib/ldb/man/ldbedit.1.xml | 200 -- source3/lib/ldb/man/ldbmodify.1.xml| 93 - source3/lib/ldb/man/ldbrename.1.xml| 107 -- source3/lib/ldb/man/ldbsearch.1.xml| 119 -- source3/lib/ldb/man/oLschema2ldif.1.xml| 79 - source3/lib/ldb/modules/asq.c | 488 - source3/lib/ldb/modules/ldb_map.c | 1337 -- source3/lib/ldb/modules/ldb_map.h
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via df6d0db... s4: Fix python binding for drsblobs via f534080... s4 python: fix glues functions manipulating NTTIME via 8313362... pidl: Fix the generation of py helper for 64 bit integer from 668e28b... s3: Unify DEBUG_KRB5_TKT_REGAIN and DEBUG_KRB5_TKT_RENEWAL http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit df6d0db21d31dee1bc51c3a0703e1ad9ab5f028b Author: Matthieu Patou Date: Tue Apr 13 00:58:50 2010 +0400 s4: Fix python binding for drsblobs This binding needs symbols in drsblobs_c.c otherwise we have unresolved symbols commit f534080367ac886391efe1a5570a48400a1a66b0 Author: Matthieu Patou Date: Thu Apr 15 00:18:14 2010 +0400 s4 python: fix glues functions manipulating NTTIME The fix include reverse function (from NTTIME to timestamp) + fix on the transformation of a NTTIME to a PyLong object commit 831336293dfd9ab3771c2eb0f155b7423e71ec94 Author: Matthieu Patou Date: Thu Apr 15 00:18:46 2010 +0400 pidl: Fix the generation of py helper for 64 bit integer Up to now the generation of code for python helpers dealing with 64 bits (NTTIME,hyper, ...) was broken because they were assumed to be Int (PyInt_From ...) as Integer is always 32 bits in python. This fix use PyLong and states that the incomming data is a long long as it should be 64 bit at least. Signed-off-by: Jelmer Vernooij --- Summary of changes: pidl/lib/Parse/Pidl/Samba4/Python.pm |6 - source4/librpc/config.mk |2 +- source4/scripting/python/pyglue.c| 36 +- 3 files changed, 41 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 789a7dd..226db07 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -961,7 +961,11 @@ sub ConvertScalarToPython($$$) $ctypename = expandAlias($ctypename); - if ($ctypename =~ /^(char|u?int[0-9]*|hyper|dlong|udlong|udlongr|time_t|NTTIME_hyper|NTTIME|NTTIME_1sec)$/) { + if ($ctypename =~ /^(u?int64|hyper|dlong|udlong|udlongr|NTTIME_hyper|NTTIME|NTTIME_1sec)$/) { + return "PyLong_FromLongLong($cvar)"; + } + + if ($ctypename =~ /^(char|u?int[0-9]*|time_t)$/) { return "PyInt_FromLong($cvar)"; } diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index 282053a..aa065a0 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -726,7 +726,7 @@ python_drsuapi_OBJ_FILES = ../librpc/gen_ndr/py_drsuapi.o LIBRARY_REALNAME = samba/dcerpc/drsblobs.$(SHLIBEXT) PRIVATE_DEPENDENCIES = RPC_NDR_DRSBLOBS PYTALLOC pyparam_util pycredentials python_dcerpc -python_drsblobs_OBJ_FILES = ../librpc/gen_ndr/py_drsblobs.o +python_drsblobs_OBJ_FILES = ../librpc/gen_ndr/py_drsblobs.o ../librpc/gen_ndr/ndr_drsblobs.o [PYTHON::python_dcerpc_security] LIBRARY_REALNAME = samba/dcerpc/security.$(SHLIBEXT) diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index f085714..b2a9d2c 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -105,7 +105,37 @@ static PyObject *py_unix2nttime(PyObject *self, PyObject *args) unix_to_nt_time(&nt, t); - return PyInt_FromLong((uint64_t)nt); + return PyLong_FromLongLong((uint64_t)nt); +} + +static PyObject *py_nttime2unix(PyObject *self, PyObject *args) +{ + time_t t; + NTTIME nt; + if (!PyArg_ParseTuple(args, "K", &nt)) + return NULL; + + t = nt_time_to_unix(nt); + + return PyInt_FromLong((uint64_t)t); +} + +static PyObject *py_nttime2string(PyObject *self, PyObject *args) +{ + PyObject *ret; + NTTIME nt, nt2; + TALLOC_CTX *tmp_ctx; + const char *string; + + if (!PyArg_ParseTuple(args, "K", &nt)) + return NULL; + tmp_ctx = talloc_new(NULL); + + string = nt_time_string(tmp_ctx, nt); + ret = PyString_FromString(string); + + talloc_free(tmp_ctx); + return ret; } static PyObject *py_set_debug_level(PyObject *self, PyObject *args) @@ -249,6 +279,10 @@ static PyMethodDef py_misc_methods[] = { "Generate random password with a length >= min and <= max." }, { "unix2nttime", (PyCFunction)py_unix2nttime, METH_VARARGS, "unix2nttime(timestamp) -> nttime" }, + { "nttime2unix", (PyCFunction)py_nttime2unix, METH_VARARGS, + "nttime2unix(nttime) -> timestamp" }, + { "nttime2string", (PyCFuncti
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0f57a39... pidl: Fix display field for time fields with newer versions of Wireshark. from e904443... Carefully label SMB1-specific locking calls. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0f57a3991644d69f22ef7303aad03343bdf1ab3c Author: Jeff Morriss Date: Fri Apr 30 00:11:54 2010 +0200 pidl: Fix display field for time fields with newer versions of Wireshark. Pidl generates some Wireshark dissector fields of type FT_ABSOLUTE_TIME. Starting some time not too long ago, these fields need a 'display' field other than BASE_NONE or BASE_DEC. This commit fixes this, *assuming* that all the times are "local." --- Summary of changes: pidl/lib/Parse/Pidl/Wireshark/NDR.pm |8 1 files changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index b8adf2d..64b8dcf 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -886,10 +886,10 @@ sub Initialize($$) $self->register_type("dlong", "offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, drep, \...@hf\@, NULL);","FT_INT64", "BASE_DEC", 0, "NULL", 8); $self->register_type("GUID", "offset = dissect_ndr_uuid_t(tvb, offset, pinfo, tree, drep, \...@hf\@, NULL);","FT_GUID", "BASE_NONE", 0, "NULL", 4); $self->register_type("policy_handle", "offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, \...@hf\@, \...@param\@);","FT_BYTES", "BASE_NONE", 0, "NULL", 4); - $self->register_type("NTTIME", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \...@hf\@);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4); - $self->register_type("NTTIME_hyper", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \...@hf\@);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4); - $self->register_type("time_t", "offset = dissect_ndr_time_t(tvb, offset, pinfo,tree, drep, \...@hf\@, NULL);","FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4); - $self->register_type("NTTIME_1sec", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \...@hf\@);", "FT_ABSOLUTE_TIME", "BASE_NONE", 0, "NULL", 4); + $self->register_type("NTTIME", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \...@hf\@);","FT_ABSOLUTE_TIME", "ABSOLUTE_TIME_LOCAL", 0, "NULL", 4); + $self->register_type("NTTIME_hyper", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \...@hf\@);","FT_ABSOLUTE_TIME", "ABSOLUTE_TIME_LOCAL", 0, "NULL", 4); + $self->register_type("time_t", "offset = dissect_ndr_time_t(tvb, offset, pinfo,tree, drep, \...@hf\@, NULL);","FT_ABSOLUTE_TIME", "ABSOLUTE_TIME_LOCAL", 0, "NULL", 4); + $self->register_type("NTTIME_1sec", "offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, \...@hf\@);", "FT_ABSOLUTE_TIME", "ABSOLUTE_TIME_LOCAL", 0, "NULL", 4); $self->register_type("SID", " dcerpc_info *di = (dcerpc_info *)pinfo->private_data; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f8fc7fc... s3-build: Remove --enable-merged support. from 44b0a0c... s4: remove unused rap.h. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f8fc7fcbeb8141c5b2775e2219bae17c55ad4a3c Author: Jelmer Vernooij Date: Mon Apr 26 23:50:16 2010 +0200 s3-build: Remove --enable-merged support. --- Summary of changes: source3/configure.in| 51 + source3/samba4-templates.mk | 144 --- source3/samba4.m4 | 211 -- source3/samba4.mk | 265 --- 4 files changed, 3 insertions(+), 668 deletions(-) delete mode 100644 source3/samba4-templates.mk delete mode 100644 source3/samba4.m4 delete mode 100644 source3/samba4.mk Changeset truncated at 500 lines: diff --git a/source3/configure.in b/source3/configure.in index 9a190cc..a30f301 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -195,17 +195,15 @@ AC_ARG_WITH(profiling-data, ) dnl Checks for programs. -merged_build_possible=yes - AC_PROG_INSTALL AC_PROG_AWK # Check for GNU make m4_include(../m4/check_make.m4) -AC_SAMBA_GNU_MAKE([true], [merged_build_possible=no]) +AC_SAMBA_GNU_MAKE([true], [true]) # Check for perl m4_include(../m4/check_perl.m4) -AC_SAMBA_PERL([true], [merged_build_possible=no]) +AC_SAMBA_PERL([true], [true]) AC_CHECK_TOOL(AR, ar) @@ -1831,7 +1829,6 @@ if test x"$BLDSHARED" != x"true"; then SHLD="shared-libraries-disabled" PICFLAG="${PIE_CFLAGS}" SHLIBEXT="shared_libraries_disabled" - merged_build_possible=no fi AC_MSG_CHECKING([used PICFLAG]) @@ -4235,10 +4232,6 @@ if test x"$with_ads_support" != x"no"; then LIBS="$ac_save_LIBS" fi -if test x"$use_ads" != xyes; then - merged_build_possible=no -fi - AC_CHECK_LIB_EXT(nscd, NSCD_LIBS, nscd_flush_cache) PASSDB_LIBS="$PASSDB_LIBS $NSCD_LIBS" @@ -6627,39 +6620,8 @@ MSG fi -AC_ARG_ENABLE(merged-build, -[AS_HELP_STRING([--enable-merged-build], [Build Samba 4 as well])], -[ enable_merged_build=$enableval ], [ enable_merged_build=auto ]) - -if test x"$enable_merged_build" = x"yes" -a \ - x"$merged_build_possible" = x"no" ; then - AC_MSG_ERROR(Merged build required but not possible) -fi - m4_include(../lib/zlib/zlib.m4) -if test x$enable_merged_build = xauto; then - # Check for python - m4_include(../m4/check_python.m4) - AC_SAMBA_PYTHON_DEVEL([true], [merged_build_possible=no]) - - AC_MSG_CHECKING([whether it would be possible to do a merged build]) - AC_MSG_RESULT([$merged_build_possible]) - - # Enable merged build automatically if possible, when in developer mode - if test "x$developer" = xyes; then - enable_merged_build=$merged_build_possible - fi -fi - -if test x$enable_merged_build = xyes; then - MERGED_BUILD=1 - saved_USESHARED="$USESHARED" - USESHARED="false" - m4_include(samba4.m4) - USESHARED="$saved_USESHARED" -fi - AC_SUBST(ZLIB_LIBS) AC_SUBST(ZLIB_OBJS) AC_ZLIB([ZLIB_OBJS=""], [ @@ -6731,14 +6693,7 @@ SMBD_LIBS="$samba_dmapi_libs" AC_SUBST(SMBD_LIBS) CFLAGS="${CFLAGS} \$(FLAGS)" - -if test x$MERGED_BUILD != x1; then - CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3" -else - if test x"$BLDSHARED" = x"true" ; then - LDFLAGS="$LDFLAGS -L./bin" - fi -fi +CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3" AC_SUBST(MAKEFILE) if test x$samba_cv_gnu_make = xyes; then diff --git a/source3/samba4-templates.mk b/source3/samba4-templates.mk deleted file mode 100644 index 0024a75..000 --- a/source3/samba4-templates.mk +++ /dev/null @@ -1,144 +0,0 @@ -# Templates file for Samba 4 -# This relies on GNU make. -# -# © 2008 Jelmer Vernooij -# -### -# Templates -### - -# Partially link -# Arguments: target object file, source object files -define partial_link_template -$(1): $(2) ; - @echo Partially linking $$@ - @mkdir -p $$(@D) - @$$(PARTLINK) -o $$@ $$^ -endef - -# Link a binary -# Arguments: target file, depends, flags -define binary_link_template -$(1)4: $(2) ; - @echo Linking $$@ - @$$(BNLD) $$(BNLD_FLAGS) $$(INTERN_LDFLAGS) -o $$@ $$(INSTALL_LINK_FLAGS) $(3) $$(LIBS) -clean:: - @rm -f $(1) - -everything:: $(1)4 - -endef - -# Link a host-machine binary -# Arguments: target file, depends, flags -defi
Re: [SCM] Samba Shared Repository - branch master updated
Hi Tridge, On Tue, 2010-04-20 at 01:11 -0500, Andrew Tridgell wrote: > The branch, master has been updated >via f1c5239... pytalloc: ensure talloc_ctx is directly after > PyObject_HEAD >via 45be1c7... talloc: there is no ambiguity when freeing a ptr with > a null parent >via 773a8af... tdb: update tdb ABI to use hide_symbols=True >via cdaac0a... build: include uninitialised data in the ABI symbols >via 0e56037... build: quote cross-answer strings >via f2bd78c... build: allow "waf --abi-check" to force a re-check of > the ABI > from 538a07a... s4:provisionbackend Print the command we failed to > start slapd with > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > > - Log - > commit f1c523939b88aee0b1ce7375d68b06a0b8cf5d28 > Author: Andrew Tridgell > Date: Tue Apr 20 15:33:00 2010 +1000 > > pytalloc: ensure talloc_ctx is directly after PyObject_HEAD > > the talloc python interface for tp_alloc and tp_dealloc relies on a > cast to a py_talloc_Object to find the talloc_ctx (see > py_talloc_dealloc). This means we rely on the talloc_ctx for the > object being directly after the PyObject_HEAD > > This fixes the talloc free with references bug in samba_dnsupdate > > The actual problem was the tp_alloc() call in > PyCredentialCacheContainer_from_ccache_container() which used a cast > from a py_talloc_Object to a PyCredentialCacheContainerObject. That > case effectively changed the parent/child relationship between the > talloc_ctx and the ccc ptr. > > This patch changes all the structures that follow this pattern to put > the TALLOC_CTX directly after the PyObject_HEAD, to ensure that if > anyone else decides to do a dangerous cast like this that it won't > cause the same sort of subtle breakage. > > Pair-Programmed-With: Rusty Russell Thanks! This makes the bug less visible, but I think we should also make make the code fail in this situation and fix PyCredentialCacheContainerObject. Things like py_talloc_dealloc should ensure that they are only used with objects that were created using those functions, perhaps using a magic value? Cheers, Jelmer
Re: [SCM] Samba Shared Repository - branch master updated
On Mon, 2010-04-19 at 12:26 -0400, simo wrote: > On Mon, 2010-04-19 at 18:17 +0200, Stefan (metze) Metzmacher wrote: > > Matthias Dieter Wallnöfer schrieb: > > > Sorry Jelmer, > > > > > > this wasn't clear (to prevent the use of "TALLOC_FREE"). But a real > > > issue is the fact that we have already approximately 150-200 occourences > > > of it under "source4" (checked with "cscope"). And we merge more and > > > more with the s3 codebase so we get more and more occourences. Therefore > > > I would simply propose to allow it for s4 as well. > > > > I think it's fine to use it also in source4. > > Looks fine to me too, trading a warning from valgrind with a segfault > for dereferencing a NULL pointer doesn't seem a big issue. > Actually a segfault has probably more chances to be dealt with earlier. It would be nice to standardize on one or the other though rather than using a strange mix of both. Should we encourage the use of TALLOC_FREE() over talloc_free() ? Cheers, Jelmer
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 13bbfa3... pydsdb: Fix memory leak on invalid parameters, formatting, trivial typos. via ce28f85... s4 python: add a unit test for function dsdb_get_oid_from_attid via 634caed... s4 python: make the function dsdb_get_oid_from_attid reachable from a samDB object via d784ece... s4 python: Add a function to get the oid of an attribute when the attid is known via 9c2aed8... s4: Add python binding to waf so that the drsblobs.so is also built in waf via 6d9ce1f... s4: Fix python binding for drsblobs via b8d6f1c... s4 provision: Remove hard coded ACL for GPO objects from f1ecdb9... s4:setup/wscript_build: install dns_update_list into ${SETUPDIR} http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 13bbfa3fcabfc97a57ae56ef916bf13137fb5290 Author: Jelmer Vernooij Date: Thu Apr 15 18:41:56 2010 +0200 pydsdb: Fix memory leak on invalid parameters, formatting, trivial typos. commit ce28f854c0c8c62c6f13989ec4d2f9e890ffd0e1 Author: Matthieu Patou Date: Wed Apr 14 00:46:51 2010 +0400 s4 python: add a unit test for function dsdb_get_oid_from_attid Signed-off-by: Jelmer Vernooij commit 634caed116d7e369d5a0002ab93d03744b2e0b1d Author: Matthieu Patou Date: Sun Apr 11 02:02:50 2010 +0400 s4 python: make the function dsdb_get_oid_from_attid reachable from a samDB object Signed-off-by: Jelmer Vernooij commit d784ecec555a3d9737e6f4b3894f27904d2b833c Author: Matthieu Patou Date: Tue Apr 13 00:51:00 2010 +0400 s4 python: Add a function to get the oid of an attribute when the attid is known This function is mainly to help decoding replPropertyMetaData in python Signed-off-by: Jelmer Vernooij commit 9c2aed862d2ecbc4047cd0326250096767731c05 Author: Matthieu Patou Date: Tue Apr 13 01:00:08 2010 +0400 s4: Add python binding to waf so that the drsblobs.so is also built in waf Signed-off-by: Jelmer Vernooij commit 6d9ce1fee3a87ed0961c3d9e009008a98efd10c2 Author: Matthieu Patou Date: Tue Apr 13 00:58:50 2010 +0400 s4: Fix python binding for drsblobs This binding needs symbols in drsblobs_c.c otherwise we have unresolved symbols Signed-off-by: Jelmer Vernooij commit b8d6f1ce892c36840d392021b528e8c3bdb875dd Author: Matthieu Patou Date: Thu Apr 8 01:44:22 2010 +0400 s4 provision: Remove hard coded ACL for GPO objects It is no longer needed to hard code ACL for GPO object as we have now code that calculate ACL from defaultSecurityDescriptor and inheritance correctly. In fact the resulting ACL returned by this hard coded value is a bit wrong as some ACE are duplicated. Signed-off-by: Jelmer Vernooij --- Summary of changes: source4/dsdb/pydsdb.c| 44 ++ source4/librpc/config.mk |2 +- source4/librpc/wscript_build |6 +++ source4/scripting/python/samba/__init__.py |3 ++ source4/scripting/python/samba/tests/dsdb.py | 42 source4/selftest/tests.sh|1 + source4/setup/provision_group_policy.ldif|2 - 7 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 source4/scripting/python/samba/tests/dsdb.py Changeset truncated at 500 lines: diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index 1d71c6b..88c6208 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -19,6 +19,7 @@ #include #include "includes.h" +#include "libcli/util/pyerrors.h" #include "dsdb/samdb/samdb.h" #include "lib/ldb/pyldb.h" #include "libcli/security/security.h" @@ -183,6 +184,47 @@ static PyObject *py_samdb_ntds_invocation_id(PyObject *self, PyObject *args) return result; } +static PyObject *py_dsdb_get_oid_from_attid(PyObject *self, PyObject *args) +{ + PyObject *py_ldb; + struct ldb_context *ldb; + uint32_t attid; + struct dsdb_schema *schema; + const char *oid; + PyObject *ret; + TALLOC_CTX *mem_ctx; + WERROR status; + + if (!PyArg_ParseTuple(args, "Oi", &py_ldb, &attid)) + return NULL; + + mem_ctx = talloc_new(NULL); + if (mem_ctx == NULL) { + PyErr_NoMemory(); + return NULL; + } + + PyErr_LDB_OR_RAISE(py_ldb, ldb); + + schema = dsdb_get_schema(ldb, NULL); + + if (!schema) { + PyErr_SetString(PyExc_RuntimeError, "Failed to find a schema from ldb \n"); + talloc_free(mem_ctx); + return NULL; + } + + status = dsdb_schema_pfm_oid_from_attid(schema-&g
Re: [SCM] Samba Shared Repository - branch master updated
Hi Metze, On Tue, 2010-04-13 at 03:10 -0500, Stefan Metzmacher wrote: > diff --git a/testprogs/blackbox/test_kinit.sh > b/testprogs/blackbox/test_kinit.sh > index be5037b..08e88ba 100755 > --- a/testprogs/blackbox/test_kinit.sh > +++ b/testprogs/blackbox/test_kinit.sh > @@ -64,7 +64,7 @@ testit "kinit renew ticket" $samba4kinit --request-pac -R > test_smbclient "Test login with kerberos ccache" 'ls' -k yes || failed=`expr > $failed + 1` > > testit "domain join with kerberos ccache" $VALGRIND $net join $DOMAIN > $CONFIGURATION -W "$DOMAIN" -k yes $@ || failed=`expr $failed + 1` > -testit "check time with kerberos ccache" $VALGRIND $net time $SERVER > $CONFIGURATION -W "$DOMAIN" -k yes $@ || failed=`expr $failed + 1` > +testit "check time with kerberos ccache" $VALGRIND $net $CONFIGURATION -W > "$DOMAIN" -k yes $@ time $SERVER || failed=`expr $failed + 1` > > testit "add user with kerberos ccache" $VALGRIND $net user add nettestuser > $CONFIGURATION -k yes $@ || failed=`expr $failed + 1` > userpass=testp...@12% Thanks for spotting that! I'll see if I can fix it not to rely on the parameter ordering. Cheers, Jelmer
Re: [SCM] Samba Shared Repository - branch master updated
On Mon, 2010-04-12 at 20:29 -0500, Andrew Tridgell wrote: > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > > - Log - > commit b7ffc6e5b228d21f547bec77f378f0fdc88b6dd2 > Author: Andrew Tridgell > Date: Tue Apr 13 11:27:24 2010 +1000 > > build: fixed a typo that prevented --bundled-libraries from working > correctly > > Jelmer noticed that --minimum-library-version=talloc:2.0.1 > --bundled-libraries=!tevent > didn't do the right thing. Thanks! Cheers, Jelmer
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9db207d... selftest: Cope with strict. from 9ef235e... s4:tortore/rpc/spoolss.c: fix declaration after code warning http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9db207da071002b4eb671ba8500f1c26963e3859 Author: Jelmer Vernooij Date: Mon Apr 12 16:11:31 2010 +0200 selftest: Cope with strict. --- Summary of changes: selftest/selftest.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 7bc14b1..aa3d79c 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -641,7 +641,7 @@ sub read_testlist($) while () { if (/-- TEST(-LOADLIST)? --\n/) { - my $supports_loadlist = ($1 eq "-LOADLIST"); + my $supports_loadlist = (defined($1) and $1 eq "-LOADLIST"); my $name = ; $name =~ s/\n//g; my $env = ; -- Samba Shared Repository
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Fri, Oct 23, 2009 at 07:28:04AM -0500, Matthias Dieter Wallnöfer wrote: > The branch, master has been updated >via 4f8826f... ldb python bindungs - better use the "enum ldb_scope" > for the search scope rather than "int" > from b9a3f1d... s3: Fix crash in pam_winbind, another reference to > freed memory. > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > > - Log - > commit 4f8826ff7f4789c5b5f363b733a42053f72aa526 > Author: Matthias Dieter Wallnöfer > Date: Fri Oct 23 14:26:41 2009 +0200 > > ldb python bindungs - better use the "enum ldb_scope" for the search > scope rather than "int" > > --- > > Summary of changes: > source4/lib/ldb/pyldb.c |5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > > > Changeset truncated at 500 lines: > > diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c > index d4a369c..136cd47 100644 > --- a/source4/lib/ldb/pyldb.c > +++ b/source4/lib/ldb/pyldb.c > @@ -1006,7 +1006,7 @@ static PyObject *py_ldb_schema_format_value(PyLdbObject > *self, PyObject *args) > static PyObject *py_ldb_search(PyLdbObject *self, PyObject *args, PyObject > *kwargs) > { > PyObject *py_base = Py_None; > - int scope = LDB_SCOPE_DEFAULT; > + enum ldb_scope scope = LDB_SCOPE_DEFAULT; > char *expr = NULL; > PyObject *py_attrs = Py_None; > PyObject *py_controls = Py_None; > @@ -1348,7 +1348,8 @@ static PyObject > *py_ldb_module_del_transaction(PyLdbModuleObject *self) > static PyObject *py_ldb_module_search(PyLdbModuleObject *self, PyObject > *args, PyObject *kwargs) > { > PyObject *py_base, *py_tree, *py_attrs, *py_ret; > - int ret, scope; > + int ret; > + enum ldb_scope scope; > struct ldb_request *req; > const char * const kwnames[] = { "base", "scope", "tree", "attrs", NULL > }; > struct ldb_module *mod; > Please revert this - this is intentional. PyArg_ParseTupleAndKeywords parses and sets an integer, not an ldb_scope enum. The values it reads are not necessarily valid ldb_scope values. Cheers, Jelmer
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 47c4e88... s4-net: Add definition of outf. from f8e527b... build: added --minimum-library-version configure option http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 47c4e883d6fd833a7ca5d37f289908299f9f0c15 Author: Jelmer Vernooij Date: Mon Apr 12 02:55:27 2010 +0200 s4-net: Add definition of outf. --- Summary of changes: source4/scripting/python/samba/netcmd/__init__.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py index 3dcf019..3deaec3 100644 --- a/source4/scripting/python/samba/netcmd/__init__.py +++ b/source4/scripting/python/samba/netcmd/__init__.py @@ -54,6 +54,8 @@ class Command(object): synopsis = property(_get_synopsis) +outf = sys.stdout + takes_args = [] takes_options = [] takes_optiongroups = {} -- Samba Shared Repository
Re: [SCM] Samba Shared Repository - branch master updated
On Sun, 2010-04-11 at 21:34 +0200, Matthias Dieter Wallnöfer wrote: > Okay, okay - will remove them again. > > But I have to state that each torture output call seems to have a > different policy regarding newlines at the end or not: > > e.g. torture_comment(tctx, "Test sec_desc level\n") - here it's needed. > > Is there an easy rule when yes, when no? It would be nice to see only > one method to don't have to worry about this. torture_fail, torture_result, etc. all receive a string with a description why the particular result occurred. Generally this description is only one sentence or less. torture_comment() can be used for whatever comments you like and generally just outputs directly to stdout. It can be used for incremental output (including backspace characters) or multiple lines. Cheers, Jelmer > Jelmer Vernooij wrote: > > Hi Matthias, > > > > On Sun, 2010-04-11 at 04:34 -0500, Matthias Dieter Wallnöfer wrote: > > > >> The branch, master has been updated > >> via c7dfe73... s4:torture - "dbspeed" test - add newlines as we > >> have them in the other failure messages > >>from 52ab3ca... s4:torture - "dbspeed" test > >> > >> http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > >> > >> > >> - Log - > >> commit c7dfe736a88549f5793521609aca68ca85545c1b > >> Author: Matthias Dieter Wallnfer > >> Date: Sun Apr 11 11:33:45 2010 +0200 > >> > >> s4:torture - "dbspeed" test - add newlines as we have them in the > >> other failure messages > >> > > torture_result() calls should generally *not* have any newlines, > > torture_result() adds one itself. > > > > Cheers, > > > > Jelmer > > > signature.asc Description: This is a digitally signed message part
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e1630ec... idl: Use C-style comments, because cpp on some platforms doesn't accept // comments. from 1d3b00b... s4:dbspeed torture - improve also the TDB code part http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e1630ecb11ac09025456debeb3dc6afaccdb955b Author: Jelmer Vernooij Date: Sun Apr 11 22:16:48 2010 +0200 idl: Use C-style comments, because cpp on some platforms doesn't accept // comments. --- Summary of changes: librpc/idl/wmi.idl | 42 +- 1 files changed, 21 insertions(+), 21 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/idl/wmi.idl b/librpc/idl/wmi.idl index 1f7b5ca..3ae5a45 100644 --- a/librpc/idl/wmi.idl +++ b/librpc/idl/wmi.idl @@ -279,17 +279,17 @@ coclass WbemClassObject { WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE = 0x1, WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS = 0x2, -//WBEM_FLAVOR_MASK_PROPAGATION = 0x0F, +/*WBEM_FLAVOR_MASK_PROPAGATION = 0x0F, */ WBEM_FLAVOR_NOT_OVERRIDABLE = 0x10, -//WBEM_FLAVOR_MASK_PERMISSIONS = 0x10, +/*WBEM_FLAVOR_MASK_PERMISSIONS = 0x10, */ WBEM_FLAVOR_ORIGIN_PROPAGATED = 0x20, WBEM_FLAVOR_ORIGIN_SYSTEM = 0x40, -//WBEM_FLAVOR_MASK_ORIGIN = 0x60, +/*WBEM_FLAVOR_MASK_ORIGIN = 0x60, */ WBEM_FLAVOR_AMENDED = 0x80 -//WBEM_FLAVOR_MASK_AMENDED = 0x80 +/*WBEM_FLAVOR_MASK_AMENDED = 0x80 */ } WBEM_FLAVOR_TYPE; @@ -299,7 +299,7 @@ coclass WbemClassObject WCF_INSTANCE = 2, WCF_CLASS = 4, WCF_CLASS_PART_INTERNAL = 8 - // WCF_CLASS_PART_SHARED = 0x104 + /* WCF_CLASS_PART_SHARED = 0x104 */ } WCO_FLAGS; typedef [public,nopull,nopush] struct @@ -420,7 +420,7 @@ coclass WbemClassObject WERROR CreateInstanceEnum( -[in] BSTR strFilter, // allow more things than a class name +[in] BSTR strFilter, /* allow more things than a class name */ [in] long lFlags, [in,unique] IWbemContext* pCtx, [out] IEnumWbemClassObject** ppEnum @@ -525,36 +525,36 @@ coclass WbemClassObject WERROR Clone([out] IWbemContext** ppNewCopy); WERROR GetNames( -//[in] long lFlags, -//[out] SAFEARRAY (BSTR)* pNames +/*[in] long lFlags, */ +/*[out] SAFEARRAY (BSTR)* pNames */ ); WERROR BeginEnumeration([in] long lFlags); WERROR Next( -//[in] long lFlags, -//[out] BSTR* pstrName, -//[out] VARIANT* pValue +/*[in] long lFlags, */ +/*[out] BSTR* pstrName, */ +/*[out] VARIANT* pValue */ ); WERROR EndEnumeration(); WERROR SetValue( -//[in, string] LPCWSTR wszName, -//[in] long lFlags -//[in] VARIANT* pValue +/*[in, string] LPCWSTR wszName, */ +/*[in] long lFlags */ +/*[in] VARIANT* pValue */ ); WERROR GetValue( -//[in, string] LPCWSTR wszName, -//[in] long lFlags, -//[out] VARIANT* pValue +/*[in, string] LPCWSTR wszName, */ +/*[in] long lFlags, */ +/*[out] VARIANT* pValue */ ); WERROR DeleteValue( -//[in, string] LPCWSTR wszName, -//[in] long lFlags +/*[in, string] LPCWSTR wszName, */ +/*[in] long lFlags */ ); WERROR DeleteAll(); @@ -613,7 +613,7 @@ coclass WbemClassObject } WTYPES; typedef [relative_base] struct { - // [relative] WBEMDATA4 *data; /* 0x9 */ + /* [relative] WBEMDATA4 *data; */ /* 0x9 */ uint32 data_size; uint8 wtype; } WBEMDATA4; @@ -669,7 +669,7 @@ coclass WbemClassObject [ object, - // restricted, + /* restricted, */ uuid(44aca675-e8fc-11d0-a07c-00c04fb68820) ] interface IWbemCallResult : IUnknown { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b65c8d0... s4: Fix more test results to not conflict with subunit commands. via 5d0694f... subunit: Cope with lowercase test results in tap2subunit. via 3a34b5f... subunit: Remove more test output that could be interpreted by subunit. via 7da94cc... subunit: Support formatting compatible with upstream subunit, for consistency. via d0ab744... selftest: Accept 'testing:' to introduce new tests. from 0ee1985... [Bug 7345] Incomplete description of function return values in libsmbclient.h http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b65c8d05059466f8e8b2196c99469105afd128e8 Author: Jelmer Vernooij Date: Sun Apr 11 20:56:48 2010 +0200 s4: Fix more test results to not conflict with subunit commands. commit 5d0694f9941e22f92c9c641b8fb3a7ce376ee5cd Author: Jelmer Vernooij Date: Sun Apr 11 20:56:02 2010 +0200 subunit: Cope with lowercase test results in tap2subunit. Also submitted upstream. commit 3a34b5f35ec0a666ff8f731577bd2fdfa67e9dcb Author: Jelmer Vernooij Date: Sun Apr 11 16:55:48 2010 +0200 subunit: Remove more test output that could be interpreted by subunit. commit 7da94cc4a664521be279b019e9f32121cd410193 Author: Jelmer Vernooij Date: Sun Apr 11 01:39:06 2010 +0200 subunit: Support formatting compatible with upstream subunit, for consistency. Upstream subunit makes a ":" after commands optional, so I've fixed any places where we might trigger commands accidently. I've filed a bug about this in subunit. commit d0ab7440acf57f698290c2ba64650c6144bc8545 Author: Jelmer Vernooij Date: Sun Apr 11 00:08:16 2010 +0200 selftest: Accept 'testing:' to introduce new tests. --- Summary of changes: lib/subunit/python/subunit/__init__.py |6 +- .../python/subunit/tests/test_tap2subunit.py | 15 +++- lib/tdb/tools/tdbtorture.c |2 +- selftest/subunithelper.py | 32 --- source4/dsdb/kcc/kcc_topology.c|2 +- .../samdb/ldb_modules/tests/possibleinferiors.py |2 +- source4/lib/ldb/tests/test-generic.sh |2 +- source4/lib/ldb/tools/ldbtest.c|2 +- source4/torture/basic/base.c | 74 source4/torture/basic/denytest.c |4 +- source4/torture/basic/misc.c |2 +- source4/torture/basic/unlink.c |2 +- source4/torture/libnet/libnet_share.c |2 +- source4/torture/libnetapi/libnetapi_group.c| 18 ++-- source4/torture/libnetapi/libnetapi_user.c | 18 ++-- source4/torture/locktest.c |2 +- source4/torture/locktest2.c|2 +- source4/torture/raw/acls.c | 14 ++-- source4/torture/raw/chkpath.c | 10 +- source4/torture/raw/close.c|8 +- source4/torture/raw/composite.c| 13 ++-- source4/torture/raw/lock.c | 26 +++--- source4/torture/raw/lookuprate.c |2 +- source4/torture/raw/mkdir.c| 14 ++-- source4/torture/raw/mux.c |4 +- source4/torture/raw/notify.c | 92 ++-- source4/torture/raw/search.c |2 +- source4/torture/raw/setfileinfo.c | 26 +++--- source4/torture/rpc/alter_context.c|6 +- source4/torture/rpc/drsuapi.c | 16 ++-- source4/torture/rpc/drsuapi_cracknames.c | 12 ++-- source4/torture/rpc/dsgetinfo.c|2 +- source4/torture/rpc/dssync.c |2 +- source4/torture/rpc/lsa.c |2 +- source4/torture/rpc/netlogon.c |2 +- source4/torture/rpc/samba3rpc.c|4 +- source4/torture/rpc/samlogon.c |2 +- source4/torture/rpc/samr.c | 34 source4/torture/rpc/samr_accessmask.c | 30 +++--- source4/torture/rpc/spoolss.c |2 +- source4/torture/rpc/srvsvc.c | 36 source4/torture/rpc/wkssvc.c | 58 ++-- source4/torture/smb2/acls.c| 10 +- source4/torture/smb2/create.c | 18 ++-- source4/torture/smb2/dir.c |2 +- source4/torture/smb2/notify.c | 78 source4/torture/smb2/setinfo.c | 14 ++--
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Sun, 2010-04-11 at 04:34 -0500, Matthias Dieter Wallnöfer wrote: > The branch, master has been updated >via c7dfe73... s4:torture - "dbspeed" test - add newlines as we have > them in the other failure messages > from 52ab3ca... s4:torture - "dbspeed" test > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > > - Log - > commit c7dfe736a88549f5793521609aca68ca85545c1b > Author: Matthias Dieter Wallnfer > Date: Sun Apr 11 11:33:45 2010 +0200 > > s4:torture - "dbspeed" test - add newlines as we have them in the other > failure messages torture_result() calls should generally *not* have any newlines, torture_result() adds one itself. Cheers, Jelmer signature.asc Description: This is a digitally signed message part
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 664eacc... subunit: Don't abort when receiving test results from tests that weren't announced. via 64bf8c4... selftest: Support passing --load-list to test runners. via 4fb98b6... torture: Simplify torture suite running, call restricted test suite runner. via 6b442f4... smbtorture: Remove unused shell feature. via 24f3645... smbtorture: Support --load-list argument. from 0b7bb7f... s4:registry - "patchfile_preg.c" - use more "sizeof"s on length specification http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 664eacc53a50415cd4f5534386501f640228f6c3 Author: Jelmer Vernooij Date: Sat Apr 10 22:35:57 2010 +0200 subunit: Don't abort when receiving test results from tests that weren't announced. commit 64bf8c400c8076316929cb6f06346bdf1c48d9d7 Author: Jelmer Vernooij Date: Sat Apr 10 22:20:12 2010 +0200 selftest: Support passing --load-list to test runners. commit 4fb98b6856fd0174d0f41f390e28027da636c307 Author: Jelmer Vernooij Date: Sat Apr 10 21:24:33 2010 +0200 torture: Simplify torture suite running, call restricted test suite runner. commit 6b442f43bc54555c60760eced131c2d50bf72a95 Author: Jelmer Vernooij Date: Fri Apr 9 01:59:01 2010 +0200 smbtorture: Remove unused shell feature. commit 24f364517b4013f3467c873e5b1877fe5f1c1941 Author: Jelmer Vernooij Date: Fri Apr 9 01:58:28 2010 +0200 smbtorture: Support --load-list argument. --- Summary of changes: lib/torture/torture.c|7 ++ lib/torture/torture.h|5 ++ selftest/selftest.pl | 20 -- selftest/subunithelper.py| 43 --- source4/selftest/tests.sh| 15 source4/torture/smbtorture.c | 162 +++--- 6 files changed, 130 insertions(+), 122 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/torture/torture.c b/lib/torture/torture.c index 9adf681..dcb28ee 100644 --- a/lib/torture/torture.c +++ b/lib/torture/torture.c @@ -304,6 +304,13 @@ bool torture_run_suite(struct torture_context *context, return ret; } +bool torture_run_suite_restricted(struct torture_context *context, + struct torture_suite *suite, char **restricted) +{ + /* FIXME */ + return false; +} + void torture_ui_test_start(struct torture_context *context, struct torture_tcase *tcase, struct torture_test *test) diff --git a/lib/torture/torture.h b/lib/torture/torture.h index 6eb2c15..931937c 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -218,6 +218,11 @@ bool torture_suite_add_suite(struct torture_suite *suite, bool torture_run_suite(struct torture_context *context, struct torture_suite *suite); +/* Run the specified testsuite recursively, but only the specified + * tests */ +bool torture_run_suite_restricted(struct torture_context *context, + struct torture_suite *suite, char **restricted); + /* Run the specified testcase */ bool torture_run_tcase(struct torture_context *context, struct torture_tcase *tcase); diff --git a/selftest/selftest.pl b/selftest/selftest.pl index fb2e1a8..7bc14b1 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -125,6 +125,7 @@ use strict; use FindBin qw($RealBin $Script); use File::Spec; +use File::Temp qw(tempfile); use Getopt::Long; use POSIX; use Cwd qw(abs_path); @@ -224,9 +225,9 @@ sub expand_environment_strings($) return $s; } -sub run_testsuite($$) +sub run_testsuite($) { - my ($envname, $name, $cmd, $i, $totalsuites, $tests_to_run) = @_; + my ($envname, $name, $cmd, $i, $totalsuites) = @_; my $pcap_file = setup_pcap($name); Subunit::start_testsuite($name); @@ -639,7 +640,8 @@ sub read_testlist($) open(IN, $filename) or die("Unable to open $filename: $!"); while () { - if ($_ eq "-- TEST --\n") { + if (/-- TEST(-LOADLIST)? --\n/) { + my $supports_loadlist = ($1 eq "-LOADLIST"); my $name = ; $name =~ s/\n//g; my $env = ; @@ -648,7 +650,7 @@ sub read_testlist($) $cmdline =~ s/\n//g; if (should_run_test($name) == 1) { $required_envs{$env} = 1; - push (@ret, [$name, $env, $cmdline]); + push (@ret, [$name, $env, $cmdline, $supports_loadlist]); } } else {
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Fri, 2010-04-09 at 16:52 -0500, Matthias Dieter Wallnöfer wrote: > Summary of changes: > source4/selftest/tests.sh |4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > > Changeset truncated at 500 lines: > > diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh > index 1fd9d38..d4f7e47 100755 > --- a/source4/selftest/tests.sh > +++ b/source4/selftest/tests.sh > @@ -126,7 +126,9 @@ if grep ENABLE_GNUTLS.1 $CONFIG_H > /dev/null; then > plantestsuite "ldb.ldaps with options $options" dc $bbdir/test_ldb.sh > ldaps \$SERVER_IP $options > done > fi > -plantestsuite "ldb.ldapi with options $options" dc $bbdir/test_ldb.sh ldapi > \$PREFIX_ABS/dc/private/ldapi $options > +for options in "" "-U\$USERNAME%\$PASSWORD"; do > +plantestsuite "ldb.ldapi with options $options" dc $bbdir/test_ldb.sh > ldapi \$PREFIX_ABS/dc/private/ldapi $options > +done I'm not too familiar with this code, but I'm wondering - does running the ldapi test with -U make sense, don't we just use the socket permissions? Cheers, Jelmer signature.asc Description: This is a digitally signed message part
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 673ca04... s4-build: Fix autoconf build (net_machinepw.c is no longer present) from c666b8a... s3: Use talloc_tos() as talloc ctx for fd_lines_load() in map_username() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 673ca041140d56dbe1b1f840af3a9f51e72d140b Author: Jelmer Vernooij Date: Fri Apr 9 14:20:18 2010 +0200 s4-build: Fix autoconf build (net_machinepw.c is no longer present) --- Summary of changes: librpc/gen_ndr/cli_winreg.c |1 + source4/utils/net/config.mk |1 - 2 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/gen_ndr/cli_winreg.c b/librpc/gen_ndr/cli_winreg.c index 208ca66..82dbb63 100644 --- a/librpc/gen_ndr/cli_winreg.c +++ b/librpc/gen_ndr/cli_winreg.c @@ -5640,3 +5640,4 @@ NTSTATUS rpccli_winreg_DeleteKeyEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } + diff --git a/source4/utils/net/config.mk b/source4/utils/net/config.mk index 5b94140..56d2d8a 100644 --- a/source4/utils/net/config.mk +++ b/source4/utils/net/config.mk @@ -39,7 +39,6 @@ PRIVATE_DEPENDENCIES = \ net_OBJ_FILES = $(addprefix $(utilssrcdir)/net/, \ net.o \ - net_machinepw.o \ net_password.o \ net_join.o \ net_vampire.o) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0d92dd1... s4-net: Cope with options without arguments. via 410527f... s4-net: 'net user create' -> 'net user add', for backwards compatibility. via ececb73... Support --version in python scripts. via 9af8d02... s4-net: Convert machinepw command to python. via f83aa13... s4-net: Convert vampire command over to Python. via ffa73c4... s4-net: Convert user subcommand to Python. from 8149094... s4/dsdb: Set schemaInfo attribute value during provisioning http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0d92dd1074971a3c1e3116de5188a475298587a2 Author: Jelmer Vernooij Date: Fri Apr 9 02:37:20 2010 +0200 s4-net: Cope with options without arguments. commit 410527f9369c44a25a5689b4665f3485c16d625a Author: Jelmer Vernooij Date: Fri Apr 9 02:31:57 2010 +0200 s4-net: 'net user create' -> 'net user add', for backwards compatibility. commit ececb7326200d6c59fa15f7542421099d3899297 Author: Jelmer Vernooij Date: Fri Apr 9 02:30:48 2010 +0200 Support --version in python scripts. commit 9af8d02b2230f78e4842106b918ff278dadd1d59 Author: Jelmer Vernooij Date: Thu Apr 8 23:58:15 2010 +0200 s4-net: Convert machinepw command to python. commit f83aa13f6228e04359952f04ebd7afed9a742c4a Author: Jelmer Vernooij Date: Thu Apr 8 23:53:19 2010 +0200 s4-net: Convert vampire command over to Python. commit ffa73c412e1190024ae0bf4758174d1b21c16e13 Author: Jelmer Vernooij Date: Mon Mar 1 23:03:41 2010 +0100 s4-net: Convert user subcommand to Python. --- Summary of changes: source4/libnet/py_net.c| 126 source4/scripting/python/samba/getopt.py |8 ++ source4/scripting/python/samba/netcmd/__init__.py |9 ++- source4/scripting/python/samba/netcmd/join.py | 59 + source4/scripting/python/samba/netcmd/machinepw.py | 53 source4/scripting/python/samba/netcmd/user.py | 74 source4/scripting/python/samba/netcmd/vampire.py | 52 source4/utils/net/config.mk|3 +- source4/utils/net/net.c|3 - source4/utils/net/net_machinepw.c | 91 -- source4/utils/net/net_user.c | 125 --- source4/utils/net/net_vampire.c| 67 --- source4/utils/net/wscript_build|2 +- 13 files changed, 382 insertions(+), 290 deletions(-) create mode 100644 source4/scripting/python/samba/netcmd/join.py create mode 100644 source4/scripting/python/samba/netcmd/machinepw.py create mode 100644 source4/scripting/python/samba/netcmd/user.py create mode 100644 source4/scripting/python/samba/netcmd/vampire.py delete mode 100644 source4/utils/net/net_machinepw.c delete mode 100644 source4/utils/net/net_user.c Changeset truncated at 500 lines: diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index d6bd134..f2fc771 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -183,11 +183,137 @@ static PyObject *py_net_time(py_net_Object *self, PyObject *args, PyObject *kwar static const char py_net_time_doc[] = "time(server_name) -> timestr\n" "Retrieve the remote time on a server"; +static PyObject *py_net_user_create(py_net_Object *self, PyObject *args, PyObject *kwargs) +{ + const char *kwnames[] = { "username", NULL }; + NTSTATUS status; + TALLOC_CTX *mem_ctx; + struct libnet_CreateUser r; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s", discard_const_p(char *, kwnames), + &r.in.user_name)) + return NULL; + + r.in.domain_name = cli_credentials_get_domain(self->libnet_ctx->cred); + + mem_ctx = talloc_new(NULL); + if (mem_ctx == NULL) { + PyErr_NoMemory(); + return NULL; + } + + status = libnet_CreateUser(self->libnet_ctx, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + PyErr_SetString(PyExc_RuntimeError, r.out.error_string); + talloc_free(mem_ctx); + return NULL; + } + + talloc_free(mem_ctx); + + Py_RETURN_NONE; +} + +static const char py_net_create_user_doc[] = "create_user(username)\n" +"Create a new user."; + +static PyObject *py_net_user_delete(py_net_Object *self, PyObject *args, PyObject *kwargs) +{ + const char *kwnames[] = { "username", NULL }; + NTSTATUS status; + TALLOC_CTX *mem
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 26d928e... s4-net: Convert 'net time' to python. via 0c6f434... net: Convert time command to python. via 6510b2c... s4-net: Use new Net() object in net export keytab. via 814e20e... pynet: Create a net class. from 7a6f1c7... s4-python: Fix formatting, use standard convention to call instance methods. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 26d928e9482725fe66db05f23af573fdea61a291 Author: Jelmer Vernooij Date: Thu Apr 8 23:41:08 2010 +0200 s4-net: Convert 'net time' to python. commit 0c6f434b7bc0d9d4a8819a03815200966c92736e Author: Jelmer Vernooij Date: Mon Mar 1 22:33:01 2010 +0100 net: Convert time command to python. commit 6510b2cdd21c473bd146b7630d69d06342801cb1 Author: Jelmer Vernooij Date: Thu Apr 8 22:59:16 2010 +0200 s4-net: Use new Net() object in net export keytab. commit 814e20e7da60f0ec33dfea1d4d6dda1b653b818d Author: Jelmer Vernooij Date: Mon Mar 1 22:23:45 2010 +0100 pynet: Create a net class. --- Summary of changes: source4/auth/credentials/pycredentials.c | 23 ++- source4/auth/gensec/pygensec.c |2 +- source4/auth/pyauth.c |7 +- source4/lib/ldb-samba/pyldb.c |6 +- source4/lib/registry/pyregistry.c |4 +- source4/libnet/py_net.c| 218 source4/librpc/rpc/pyrpc.c |4 +- source4/param/provision.c |2 +- source4/param/pyparam.h|2 +- source4/param/pyparam_util.c |6 +- source4/scripting/python/pyglue.c |7 +- source4/scripting/python/samba/netcmd/__init__.py |2 + source4/scripting/python/samba/netcmd/export.py|6 +- .../python/samba/netcmd/{export.py => time.py} | 30 +-- source4/utils/net/config.mk|1 - source4/utils/net/net.c|1 - source4/utils/net/net_time.c | 78 --- source4/utils/net/wscript_build|2 +- source4/utils/tests/test_net.sh| 10 +- 19 files changed, 196 insertions(+), 215 deletions(-) copy source4/scripting/python/samba/netcmd/{export.py => time.py} (64%) delete mode 100644 source4/utils/net/net_time.c Changeset truncated at 500 lines: diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c index cd578a5..c5cca4f 100644 --- a/source4/auth/credentials/pycredentials.c +++ b/source4/auth/credentials/pycredentials.c @@ -197,14 +197,18 @@ static PyObject *py_creds_guess(py_talloc_Object *self, PyObject *args) { PyObject *py_lp_ctx = Py_None; struct loadparm_context *lp_ctx; + struct cli_credentials *creds; + + creds = PyCredentials_AsCliCredentials(self); + if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx)) return NULL; - lp_ctx = lp_from_py_object(py_lp_ctx); + lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */ if (lp_ctx == NULL) return NULL; - cli_credentials_guess(PyCredentials_AsCliCredentials(self), lp_ctx); + cli_credentials_guess(creds, lp_ctx); Py_RETURN_NONE; } @@ -214,14 +218,18 @@ static PyObject *py_creds_set_machine_account(py_talloc_Object *self, PyObject * PyObject *py_lp_ctx = Py_None; struct loadparm_context *lp_ctx; NTSTATUS status; + struct cli_credentials *creds; + + creds = PyCredentials_AsCliCredentials(self); + if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx)) return NULL; - lp_ctx = lp_from_py_object(py_lp_ctx); + lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */ if (lp_ctx == NULL) return NULL; - status = cli_credentials_set_machine_account(PyCredentials_AsCliCredentials(self), lp_ctx); + status = cli_credentials_set_machine_account(creds, lp_ctx); PyErr_NTSTATUS_IS_ERR_RAISE(status); Py_RETURN_NONE; @@ -255,17 +263,20 @@ static PyObject *py_creds_get_named_ccache(py_talloc_Object *self, PyObject *arg struct tevent_context *event_ctx; int ret; const char *error_string; + struct cli_credentials *creds; + + creds = PyCredentials_AsCliCredentials(self); if (!PyArg_ParseTuple(args, "|Os", &py_lp_ctx, &ccache_name)) return NULL; - lp_ctx = lp_from_py_object(py_lp_ctx); + lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */ if (lp_ctx == NULL)
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7a6f1c7... s4-python: Fix formatting, use standard convention to call instance methods. via ae6d306... s4-python: Cancel transaction properly in case of exceptions, fix formatting. via 57ac0a6... s4-python: Move load_partition_usn to dsdb module. via dd4ef4e... s4-python: More cleanups. via a35d876... s4-python: rename samba.glue to samba._glue to indicate it's private. via cc6e2b8... s4-python: Fix formatting, import of FLG_NOSYNC. via d7a46ee... s4-python: Simplify code, improve formatting. via be4b688... s4-python: Remove obsolete and broken torture modules. via 19e1537... testr: Use waf test runner. via d0c2515... selftest: Add --filtered-subunit option. via ffb2449... selftest: Support --load-list option. via b59ba79... s4-waf: Support --load-list option. via 4f2d8d6... s4-python: samdb: Default to using global schema. from 5d5fc92... s4:dsdb - Handle INVALID_DN_SYNTAX from OpenLDAP in dsdb_module_load_partition_usn(). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7a6f1c78429183bd22e4b3e82881ac3ce2e0a1a7 Author: Jelmer Vernooij Date: Thu Apr 8 23:18:17 2010 +0200 s4-python: Fix formatting, use standard convention to call instance methods. commit ae6d306c68aeb79280a950409352c76bad4fcd33 Author: Jelmer Vernooij Date: Thu Apr 8 22:14:50 2010 +0200 s4-python: Cancel transaction properly in case of exceptions, fix formatting. commit 57ac0a6042c368a72beca3b48d0ae7210a9c999b Author: Jelmer Vernooij Date: Thu Apr 8 22:07:42 2010 +0200 s4-python: Move load_partition_usn to dsdb module. commit dd4ef4e106d372cfadf7b47db8bf9dc25728b3bc Author: Jelmer Vernooij Date: Thu Apr 8 21:01:17 2010 +0200 s4-python: More cleanups. commit a35d876537eb301d75a254d9da97268d041da8d6 Author: Jelmer Vernooij Date: Thu Apr 8 20:34:40 2010 +0200 s4-python: rename samba.glue to samba._glue to indicate it's private. commit cc6e2b8a819c6a1da4e6214be9607aab2de270bb Author: Jelmer Vernooij Date: Thu Apr 8 20:28:11 2010 +0200 s4-python: Fix formatting, import of FLG_NOSYNC. commit d7a46ee129c455cba95126e9c0f409522127894e Author: Jelmer Vernooij Date: Thu Apr 8 18:57:09 2010 +0200 s4-python: Simplify code, improve formatting. commit be4b68817544b87d12a1dcd7d8b5c5d778872418 Author: Jelmer Vernooij Date: Thu Apr 8 18:53:14 2010 +0200 s4-python: Remove obsolete and broken torture modules. The functionality of these modules is already present in a more current form in other modules. commit 19e1537fdfce58e9ce1bbaa293be4d00f0e0fda1 Author: Jelmer Vernooij Date: Thu Apr 8 16:49:24 2010 +0200 testr: Use waf test runner. commit d0c25157e9b96ce9855ecd632723423ea45ea8c0 Author: Jelmer Vernooij Date: Thu Apr 8 16:48:33 2010 +0200 selftest: Add --filtered-subunit option. commit ffb2449a13504261d3c113fcd3891553ccd44ff1 Author: Jelmer Vernooij Date: Thu Apr 8 16:16:15 2010 +0200 selftest: Support --load-list option. commit b59ba79b959955a43d6749fe9670229fbb2a679f Author: Jelmer Vernooij Date: Thu Apr 8 15:24:33 2010 +0200 s4-waf: Support --load-list option. commit 4f2d8d6ace81c03fb0ff181ccfb0f3c2e02e2c45 Author: Jelmer Vernooij Date: Thu Apr 8 15:08:27 2010 +0200 s4-python: samdb: Default to using global schema. --- Summary of changes: selftest/selftest.pl | 46 ++- source4/.testr.conf|4 +- source4/dsdb/config.mk |2 +- source4/dsdb/pydsdb.c | 49 +++ source4/dsdb/wscript_build |2 +- source4/lib/ldb/pyldb.c|9 +- source4/lib/ldb/tests/python/acl.py|6 +- source4/lib/ldb/tests/python/deletetest.py |5 +- source4/lib/ldb/tests/python/urgent_replication.py | 56 ++-- source4/scripting/bin/samba_dnsupdate |9 +- source4/scripting/bin/upgradeprovision | 43 ++- source4/scripting/python/config.mk |8 +- source4/scripting/python/pyglue.c | 52 +--- source4/scripting/python/samba/__init__.py | 20 +- source4/scripting/python/samba/getopt.py |4 +- .../scripting/python/samba/netcmd/domainlevel.py | 10 +- source4/scripting/python/samba/netcmd/dsacl.py | 21 +- source4/scripting/python/samba/netcmd/fsmo.py | 20 +- source4/scripting/python/samba/netcmd/ntacl.py |3 +- .../scripting/python/samba/netcmd/pwsettings.py|2 +- source4/scripting/python/samba/ntacls.py | 41 ++- source4/scripting/python/samba/provision.py| 99 +++-- source4/script
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7f65f77... Update waf build. via cf17d48... Migrate 'net export keytab' to python. from 8d588e9... s3-lanman: use spoolss for api_RDosPrintJobDel(). http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7f65f77b4dfb5ee124992a34db4a92be4d728fb0 Author: Jelmer Vernooij Date: Thu Apr 8 22:46:02 2010 +0200 Update waf build. commit cf17d48dec1ed94127b239c9bf40bcdcbcd808ca Author: Jelmer Vernooij Date: Mon Mar 1 20:43:19 2010 +0100 Migrate 'net export keytab' to python. --- Summary of changes: source4/libnet/py_net.c | 67 ++--- source4/scripting/python/samba/netcmd/__init__.py |2 + source4/scripting/python/samba/netcmd/export.py | 57 +++ source4/utils/net/config.mk |3 +- source4/utils/net/net.c |1 - source4/utils/net/net_export_keytab.c | 110 - source4/utils/net/wscript_build |2 +- 7 files changed, 116 insertions(+), 126 deletions(-) create mode 100644 source4/scripting/python/samba/netcmd/export.py delete mode 100644 source4/utils/net/net_export_keytab.c Changeset truncated at 500 lines: diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index e5ca5e1..7f799db 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -90,12 +90,12 @@ static PyObject *py_net_join(PyObject *cls, PyObject *args, PyObject *kwargs) talloc_free(mem_ctx); - if (result == NULL) - return NULL; - return result; } +static const char py_net_join_doc[] = "join(domain_name, netbios_name, join_type, level) -> (join_password, domain_sid, domain_name)\n\n" \ +"Join the domain with the specified name."; + static PyObject *py_net_set_password(PyObject *cls, PyObject *args, PyObject *kwargs) { union libnet_SetPassword r; @@ -109,7 +109,7 @@ static PyObject *py_net_set_password(PyObject *cls, PyObject *args, PyObject *kw r.generic.level = LIBNET_SET_PASSWORD_GENERIC; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sssO:SetPassword", discard_const_p(char *, kwnames), + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sssO:set_password", discard_const_p(char *, kwnames), &r.generic.in.account_name, &r.generic.in.domain_name, &r.generic.in.newpassword, &py_creds)) { return NULL; @@ -135,28 +135,72 @@ static PyObject *py_net_set_password(PyObject *cls, PyObject *args, PyObject *kw return NULL; } + talloc_free(mem_ctx); + Py_RETURN_NONE; } -static const char py_net_join_doc[] = "join(domain_name, netbios_name, join_type, level) -> (join_password, domain_sid, domain_name)\n\n" \ -"Join the domain with the specified name."; - -static const char py_net_set_password_doc[] = "SetPassword(account_name, domain_name, newpassword) -> True\n\n" \ +static const char py_net_set_password_doc[] = "set_password(account_name, domain_name, newpassword) -> True\n\n" \ "Set password for a user. You must supply credential with enough rights to do this.\n\n" \ "Sample usage is:\n" \ "creds = samba.credentials.Credentials()\n" \ "creds.set_username('admin_user')\n" \ "creds.set_domain('domain_name')\n" \ "creds.set_password('pass')\n\n" \ -"net.SetPassword(account_name=,\n" \ +"net.set_password(account_name=,\n" \ "domain_name=creds.get_domain(),\n" \ "newpassword=new_pass,\n" \ "credentials=creds)\n"; +static PyObject *py_net_export_keytab(PyObject *cls, PyObject *args, PyObject *kwargs) +{ + struct libnet_export_keytab r; + struct tevent_context *ev; + TALLOC_CTX *mem_ctx; + const char *kwnames[] = { "keytab", "creds", NULL }; + struct libnet_context *libnet_ctx; + PyObject *py_creds; + struct cli_credentials *creds; + NTSTATUS status; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO:export_keytab", discard_const_p(char *, kwnames), +&r.in.keytab_name, &py_creds)) { + return NULL; + } + + creds = cli_credentials_from_py_object(py_creds); + if (creds == NULL) { + PyErr_SetString(PyExc_TypeError, "Expected credentials object"); + return NULL; + } + + /* FIXME: we really nee
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 479fd9c... s4-net: Simplify SamDB connect code. via 2578072... s4-python: Move set_global_schema to pydsdb. via a1e47e3... s4-waf: Add dist target. from ca74246... s3: Fix a typo http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 479fd9c03fc84824fea310b76d48ce271587cfe7 Author: Jelmer Vernooij Date: Thu Apr 8 12:19:51 2010 +0200 s4-net: Simplify SamDB connect code. commit 2578072541e880c83089fdd278d81467e91ddc5a Author: Jelmer Vernooij Date: Thu Apr 8 03:26:39 2010 +0200 s4-python: Move set_global_schema to pydsdb. commit a1e47e3dd2beb0c46bfc90095b066ffd64706529 Author: Jelmer Vernooij Date: Wed Apr 7 23:57:23 2010 +0200 s4-waf: Add dist target. --- Summary of changes: buildtools/scripts/Makefile.waf|3 + source4/dsdb/pydsdb.c | 139 +++- source4/scripting/python/pyglue.c | 18 --- .../scripting/python/samba/netcmd/domainlevel.py |7 +- source4/scripting/python/samba/netcmd/dsacl.py | 10 +- .../scripting/python/samba/netcmd/enableaccount.py |7 +- source4/scripting/python/samba/netcmd/fsmo.py |7 +- source4/scripting/python/samba/netcmd/newuser.py |7 +- .../scripting/python/samba/netcmd/pwsettings.py|7 +- source4/scripting/python/samba/netcmd/setexpiry.py |7 +- .../scripting/python/samba/netcmd/setpassword.py |7 +- source4/scripting/python/samba/samdb.py|2 +- 12 files changed, 118 insertions(+), 103 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf index 4fb9fd2..78cd0e1 100644 --- a/buildtools/scripts/Makefile.waf +++ b/buildtools/scripts/Makefile.waf @@ -22,6 +22,9 @@ test: quicktest: $(WAF) test --quick $(if $(TESTS),--tests="$(TESTS)") +dist: + $(WAF) dist + clean: $(WAF) clean diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index b18c127..cc75472 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -33,6 +33,25 @@ } */\ ldb = PyLdb_AsLdbContext(py_ldb); +static PyObject *py_ldb_get_exception(void) +{ + PyObject *mod = PyImport_ImportModule("ldb"); + if (mod == NULL) + return NULL; + + return PyObject_GetAttrString(mod, "LdbError"); +} + +static void PyErr_SetLdbError(PyObject *error, int ret, struct ldb_context *ldb_ctx) +{ + if (ret == LDB_ERR_PYTHON_EXCEPTION) + return; /* Python exception should already be set, just keep that */ + + PyErr_SetObject(error, + Py_BuildValue(discard_const_p(char, "(i,s)"), ret, + ldb_ctx == NULL?ldb_strerror(ret):ldb_errstring(ldb_ctx))); +} + static PyObject *py_samdb_server_site_name(PyObject *self, PyObject *args) { PyObject *py_ldb, *result; @@ -216,6 +235,21 @@ static PyObject *py_samdb_ntds_objectGUID(PyObject *self, PyObject *args) return result; } +static PyObject *py_dsdb_set_global_schema(PyObject *self, PyObject *args) +{ + PyObject *py_ldb; + struct ldb_context *ldb; + int ret; + if (!PyArg_ParseTuple(args, "O", &py_ldb)) + return NULL; + + PyErr_LDB_OR_RAISE(py_ldb, ldb); + + ret = dsdb_set_global_schema(ldb); + PyErr_LDB_ERROR_IS_ERR_RAISE(py_ldb_get_exception(), ret, ldb); + + Py_RETURN_NONE; +} static PyMethodDef py_dsdb_methods[] = { { "samdb_server_site_name", (PyCFunction)py_samdb_server_site_name, @@ -234,10 +268,13 @@ static PyMethodDef py_dsdb_methods[] = { "Get SID of domain in use." }, { "samdb_ntds_invocation_id", (PyCFunction)py_samdb_ntds_invocation_id, METH_VARARGS, "get the NTDS invocation ID GUID as a string"}, - { "dsdb_set_ntds_invocation_id", (PyCFunction)py_dsdb_set_ntds_invocation_id, METH_VARARGS, + { "dsdb_set_ntds_invocation_id", + (PyCFunction)py_dsdb_set_ntds_invocation_id, METH_VARARGS, NULL }, - { "samdb_ntds_objectGUID", (PyCFunction)py_samdb_ntds_objectGUID, METH_VARARGS, - "get the NTDS objectGUID as a string"}, + { "samdb_ntds_objectGUID", (PyCFunction)py_samdb_ntds_objectGUID, + METH_VARARGS, "get the NTDS objectGUID as a string"}, + { "dsdb_set_global_schema", (PyCFunction)py_dsdb_set_global_schema, + METH_VARARGS, NULL }, { NULL } }; @@ -251,44 +288,76 @@ void initdsdb(void) return; /* "userAccountControl&quo
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e5bb6d5... s4-waf: Fix 'waf dist' app name. via 472860c... Move configure_check_unused script to root scriptdir, as it is useful for both s3 and s4. via 36474e5... s4: Remove unused pkg-config replacement in perl. via 0473926... update-external: Support updating dnspython. from 7ccd680... s3: Fix bug 7327 -- Build fails while building without kerberos http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e5bb6d56df9b8816665fd42a04531ef19b30be17 Author: Jelmer Vernooij Date: Wed Apr 7 22:52:28 2010 +0200 s4-waf: Fix 'waf dist' app name. commit 472860c9a7485e37627900cb450dca605051e07a Author: Jelmer Vernooij Date: Wed Apr 7 22:17:34 2010 +0200 Move configure_check_unused script to root scriptdir, as it is useful for both s3 and s4. commit 36474e58676574d426f4f8a3a067be52fa78cc9f Author: Jelmer Vernooij Date: Wed Apr 7 22:15:27 2010 +0200 s4: Remove unused pkg-config replacement in perl. commit 0473926a5b448c1a0b397d079c353f8406588c0d Author: Jelmer Vernooij Date: Wed Apr 7 22:13:34 2010 +0200 update-external: Support updating dnspython. --- Summary of changes: buildtools/wafsamba/samba_dist.py |2 +- lib/update-external.sh |5 + .../script => script}/configure_check_unused.pl|0 source4/script/pkg-config | 145 4 files changed, 6 insertions(+), 146 deletions(-) rename {source4/script => script}/configure_check_unused.pl (100%) delete mode 100755 source4/script/pkg-config Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py index e01bebe..68fdf08 100644 --- a/buildtools/wafsamba/samba_dist.py +++ b/buildtools/wafsamba/samba_dist.py @@ -19,7 +19,7 @@ def add_tarfile(tar, fname, abspath): def dist(appname='',version=''): -if not isinstance(appname, str): +if not appname: # this copes with a mismatch in the calling arguments for dist() appname = Utils.g_module.APPNAME version = Utils.g_module.VERSION diff --git a/lib/update-external.sh b/lib/update-external.sh index 53748d8..fc2443b 100755 --- a/lib/update-external.sh +++ b/lib/update-external.sh @@ -13,4 +13,9 @@ echo "Updating testtools..." bzr export "$WORKDIR/testtools" lp:testtools rsync -avz --delete "$WORKDIR/testtools/" "$TARGETDIR/testtools/" +echo "Updating dnspython..." +git clone git://www.dnspython.org/dnspython.git "$WORKDIR/dnspython" +rm -rf "$WORKDIR/dnspython/.git" +rsync -avz --delete "$WORKDIR/dnspython/" "$TARGETDIR/dnspython/" + rm -rf "$WORKDIR" diff --git a/source4/script/configure_check_unused.pl b/script/configure_check_unused.pl similarity index 100% rename from source4/script/configure_check_unused.pl rename to script/configure_check_unused.pl diff --git a/source4/script/pkg-config b/source4/script/pkg-config deleted file mode 100755 index 458cac6..000 --- a/source4/script/pkg-config +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/perl -# Simple pkg-config implementation in perl -# jel...@samba.org, November 2006 - -use strict; -use Getopt::Long; - -my @dirs = split(/:/, $ENV{PKG_CONFIG_PATH}); - -my $opt_help = 0; -my $opt_libs = 0; -my $opt_cflags = 0; -my $opt_static = 0; - -my $result = GetOptions ( - 'help|h|?' => \$opt_help, - 'static' => \$opt_static, - 'libs' => \$opt_libs, - 'cflags' => \$opt_cflags - ); - -if (not $result) { - exit(1); -} - -if ($opt_help) { - print "pkg-config replacement in perl\n"; - print "Copyright (C) 2006 Jelmer Vernooij \n"; - print "\n"; - print "Usage: pkg-config [OPTIONS] PACKAGE...\n"; - print " --help Print this help message\n"; - print " --staticPrint flags for static libraries\n"; - print " --libs Print linker flags\n"; - print " --cflagsPrint C compiler flags\n"; - print "\n"; - exit(0); -} - -sub find_path($) -{ - my $name = shift; - foreach my $dir (@dirs) { - if (-f "$dir/$name-uninstalled.pc") { - return "$dir/$name-uninstalled.pc"; - } - } - foreach my $dir (@dirs) { - if (-f "$dir/$name.pc" ) { - return "$dir/$name.pc"; - } - } - die(&q
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2cf3585... selftest: Display minutes and hours for duration. from baf81a0... LDB:python bindings - also empty LDB message elements should have a python representation http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2cf3585e52807eedfe80bffcd56fd6df4eec467b Author: Jelmer Vernooij Date: Wed Apr 7 17:54:57 2010 +0200 selftest: Display minutes and hours for duration. --- Summary of changes: selftest/format-subunit | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/format-subunit b/selftest/format-subunit index 54949df..032b990 100755 --- a/selftest/format-subunit +++ b/selftest/format-subunit @@ -15,6 +15,18 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools")) import subunithelper import subunit +def format_time(t): +minutes, seconds = divmod(t, 60) +hours, minutes = divmod(minutes, 60) +ret = "" +if hours: +ret += "%dh" % hours +if minutes: +ret += "%dm" % minutes +ret += "%ds" % seconds +return ret + + class PlainFormatter(object): def __init__(self, summaryfile, verbose, immediate, statistics, @@ -62,7 +74,7 @@ class PlainFormatter(object): out = "[%d" % self.index if self.totalsuites is not None: out += "/%d" % self.totalsuites -out += " in %ds" % duration +out += " in " + format_time(duration) if self.suitesfailed: out += ", %d errors" % (len(self.suitesfailed),) out += "] %s" % name -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c76bd65... s4-samdb: Allow skipping global schema. via feeedf4... s4-provision: Proper handling of exceptions, use SamDB class but skip global schema. via 21ab06f... s4-python: Move samdb_ntds_objectGUID to pydsdb. via fe4b212... urgent_replication: Use standard comments rather than docstrings. from eebc66c... s3-spoolss: Added a winreg_getform1 function. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c76bd65b608bed0810013b3a447a4a30fbed98bd Author: Jelmer Vernooij Date: Wed Apr 7 12:11:12 2010 +0200 s4-samdb: Allow skipping global schema. commit feeedf49cfc2edbfdfd0e5512904ea67f2daff11 Author: Jelmer Vernooij Date: Wed Apr 7 12:10:09 2010 +0200 s4-provision: Proper handling of exceptions, use SamDB class but skip global schema. commit 21ab06f8a233b38bee750250e455416ac0bef13e Author: Jelmer Vernooij Date: Sun Apr 4 03:30:03 2010 +0200 s4-python: Move samdb_ntds_objectGUID to pydsdb. commit fe4b212eba1d7645c8be98240a2630759050197d Author: Jelmer Vernooij Date: Sun Apr 4 03:08:05 2010 +0200 urgent_replication: Use standard comments rather than docstrings. --- Summary of changes: source4/dsdb/pydsdb.c | 148 source4/lib/ldb/tests/python/urgent_replication.py | 57 source4/scripting/bin/samba_dnsupdate |6 +- source4/scripting/bin/upgradeprovision |3 +- source4/scripting/python/pyglue.c | 144 --- source4/scripting/python/samba/__init__.py | 10 +- .../scripting/python/samba/netcmd/setpassword.py |2 +- source4/scripting/python/samba/provision.py| 24 ++- source4/scripting/python/samba/samdb.py| 55 ++-- 9 files changed, 247 insertions(+), 202 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index ac9b93c..b18c127 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -21,6 +21,8 @@ #include "includes.h" #include "dsdb/samdb/samdb.h" #include "lib/ldb/pyldb.h" +#include "libcli/security/security.h" +#include "librpc/ndr/libndr.h" /* FIXME: These should be in a header file somewhere, once we finish moving * away from SWIG .. */ @@ -83,6 +85,138 @@ static PyObject *py_dsdb_convert_schema_to_openldap(PyObject *self, return ret; } +static PyObject *py_samdb_set_domain_sid(PyLdbObject *self, PyObject *args) +{ + PyObject *py_ldb, *py_sid; + struct ldb_context *ldb; + struct dom_sid *sid; + bool ret; + + if (!PyArg_ParseTuple(args, "OO", &py_ldb, &py_sid)) + return NULL; + + PyErr_LDB_OR_RAISE(py_ldb, ldb); + + sid = dom_sid_parse_talloc(NULL, PyString_AsString(py_sid)); + + ret = samdb_set_domain_sid(ldb, sid); + if (!ret) { + PyErr_SetString(PyExc_RuntimeError, "set_domain_sid failed"); + return NULL; + } + Py_RETURN_NONE; +} + +static PyObject *py_samdb_get_domain_sid(PyLdbObject *self, PyObject *args) +{ + PyObject *py_ldb; + struct ldb_context *ldb; + const struct dom_sid *sid; + PyObject *ret; + char *retstr; + + if (!PyArg_ParseTuple(args, "O", &py_ldb)) + return NULL; + + PyErr_LDB_OR_RAISE(py_ldb, ldb); + + sid = samdb_domain_sid(ldb); + if (!sid) { + PyErr_SetString(PyExc_RuntimeError, "samdb_domain_sid failed"); + return NULL; + } + retstr = dom_sid_string(NULL, sid); + ret = PyString_FromString(retstr); + talloc_free(retstr); + return ret; +} + +static PyObject *py_samdb_ntds_invocation_id(PyObject *self, PyObject *args) +{ + PyObject *py_ldb, *result; + struct ldb_context *ldb; + TALLOC_CTX *mem_ctx; + const struct GUID *guid; + + mem_ctx = talloc_new(NULL); + if (mem_ctx == NULL) { + PyErr_NoMemory(); + return NULL; + } + + if (!PyArg_ParseTuple(args, "O", &py_ldb)) { + talloc_free(mem_ctx); + return NULL; + } + + PyErr_LDB_OR_RAISE(py_ldb, ldb); + + guid = samdb_ntds_invocation_id(ldb); + if (guid == NULL) { + PyErr_SetString(PyExc_RuntimeError, + "Failed to find NTDS invocation ID"); + talloc_free(mem_ctx); + return NULL; + } + + result = PyString_FromString(GUID_string(mem_ctx, guid)); + talloc_free(mem_ctx); + return result; +} + +static PyObject *py_dsdb_
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 027adf8... Support 'make test TESTS=foo' again. from c349aa3... s4-python: Use standard infrastructure for finding included testtools, subunit and iso8601. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 027adf88eaf8c3a7375da7c0f9c0397db46668e6 Author: Jelmer Vernooij Date: Wed Apr 7 00:32:24 2010 +0200 Support 'make test TESTS=foo' again. --- Summary of changes: buildtools/scripts/Makefile.waf |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf index e17ae21..4fb9fd2 100644 --- a/buildtools/scripts/Makefile.waf +++ b/buildtools/scripts/Makefile.waf @@ -17,10 +17,10 @@ uninstall: $(WAF) uninstall test: - $(WAF) test + $(WAF) test $(if $(TESTS),--tests="$(TESTS)") quicktest: - $(WAF) test --quick + $(WAF) test --quick $(if $(TESTS),--tests="$(TESTS)") clean: $(WAF) clean -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c349aa3... s4-python: Use standard infrastructure for finding included testtools, subunit and iso8601. from 4d482d9... s4-smbtorture: more work on forms tests in RPC-SPOOLSS. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c349aa3619efde5e00fd0d05f0670a7b6c2f3327 Author: Jelmer Vernooij Date: Wed Apr 7 00:26:28 2010 +0200 s4-python: Use standard infrastructure for finding included testtools, subunit and iso8601. --- Summary of changes: lib/subunit/python/wscript_build | 19 --- source4/scripting/python/wscript_build |2 -- source4/wscript_build |1 - 3 files changed, 0 insertions(+), 22 deletions(-) delete mode 100644 lib/subunit/python/wscript_build Changeset truncated at 500 lines: diff --git a/lib/subunit/python/wscript_build b/lib/subunit/python/wscript_build deleted file mode 100644 index f99ba42..000 --- a/lib/subunit/python/wscript_build +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python - - -# install out various python scripts for use by make test - -bld.SAMBA_SCRIPT('python_iso8601', - pattern='iso8601/**/*.py', - installdir='python') - - -bld.SAMBA_SCRIPT('python_subunit', - pattern='subunit/**/*.py', - installdir='python') - - -bld.SAMBA_SCRIPT('python_testtools', - pattern='testtools/**/*.py', - installdir='python') - diff --git a/source4/scripting/python/wscript_build b/source4/scripting/python/wscript_build index 2a09869..96de643 100644 --- a/source4/scripting/python/wscript_build +++ b/source4/scripting/python/wscript_build @@ -23,9 +23,7 @@ bld.SAMBA_PYTHON('python_uuid', bld.SAMBA_PYTHON('python_glue', source='pyglue.c', - # _PY_FILES='$(shell find samba ../lib/subunit/python -type f -name "*.py")', deps='LIBNDR ldb SAMDB CREDENTIALS pyldb python_dcerpc_misc python_dcerpc_security pyauth pyldb_util pyparam_util', - # EPYDOC_OPTIONS='--no-private --url http://www.samba.org/ --no-sourcecode', realname='samba/glue.so' ) diff --git a/source4/wscript_build b/source4/wscript_build index d128a85..0fbd059 100644 --- a/source4/wscript_build +++ b/source4/wscript_build @@ -48,7 +48,6 @@ bld.RECURSE('lib/ldb') bld.RECURSE('dynconfig') bld.RECURSE('../lib/util/charset') bld.RECURSE('scripting/python') -bld.RECURSE('../lib/subunit/python') bld.RECURSE('param') bld.RECURSE('librpc') bld.RECURSE('dsdb') -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5f080d8... s4-python: Fix compilation of samba._ldb. from 96ae3ee... fix a segfault in the notify subsystem http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5f080d8e03f1060347cdd05d65bf72b0ce7dec0e Author: Jelmer Vernooij Date: Tue Apr 6 14:24:24 2010 +0200 s4-python: Fix compilation of samba._ldb. --- Summary of changes: source4/lib/ldb-samba/wscript_build |4 1 files changed, 4 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/ldb-samba/wscript_build b/source4/lib/ldb-samba/wscript_build index d80805c..d853d19 100644 --- a/source4/lib/ldb-samba/wscript_build +++ b/source4/lib/ldb-samba/wscript_build @@ -8,3 +8,7 @@ bld.SAMBA_SUBSYSTEM('LDBSAMBA', deps='LIBSECURITY SAMDB_SCHEMA LIBNDR NDR_DRSBLOBS' ) + +bld.SAMBA_PYTHON('pyldbsamba', 'pyldb.c', +deps='LDBSAMBA pyparam_util', +realname='samba/_ldb.so') -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 449bdf3... s4-python: Move set_session_info to PySambaLdb. via 55b98e9... s4-python: Move register_samba_handlers to PySambaLdb. via e9c3f2e... s4-python: Move ldb_set_utf8_casefold to pyldb-samba. via ae97613... s4-python: Move set_opaque_integer to pyldb. via b72a5c0... Move glue.set_credentials hack to samba.Ldb. via 099fc00... Add C-based Samba-specific subclass of Ldb. from badc255... s4-build: remove any 'makefile' that may have been left by the waf build http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 449bdf35432230b060387856637759e2fe7022d6 Author: Jelmer Vernooij Date: Sun Apr 4 02:20:52 2010 +0200 s4-python: Move set_session_info to PySambaLdb. commit 55b98e9768cb2a1ae4b9cc83e3d5f33b51b22e8f Author: Jelmer Vernooij Date: Sun Apr 4 02:07:46 2010 +0200 s4-python: Move register_samba_handlers to PySambaLdb. commit e9c3f2ef13f62eb583bd7c5dfb6b94a0a8a0fc4f Author: Jelmer Vernooij Date: Sun Apr 4 02:01:47 2010 +0200 s4-python: Move ldb_set_utf8_casefold to pyldb-samba. commit ae9761349904ac9c4c2745018903d8c2fcc2abf1 Author: Jelmer Vernooij Date: Sun Apr 4 01:54:57 2010 +0200 s4-python: Move set_opaque_integer to pyldb. commit b72a5c033670a84423d1099aedbcfa5047ac47e6 Author: Jelmer Vernooij Date: Sun Apr 4 01:51:04 2010 +0200 Move glue.set_credentials hack to samba.Ldb. commit 099fc00b601fe7775f5fdb18d8473031b8a7ce27 Author: Jelmer Vernooij Date: Sun Apr 4 01:48:35 2010 +0200 Add C-based Samba-specific subclass of Ldb. --- Summary of changes: source4/auth/pyauth.c |3 +- source4/auth/pyauth.h |1 - source4/dsdb/pydsdb.c | 66 --- source4/lib/ldb-samba/config.mk |6 + source4/lib/ldb-samba/pyldb.c | 271 +++ source4/lib/ldb/pyldb.c | 12 +- source4/lib/ldb/tests/python/deletetest.py |1 - source4/param/pyparam.h |2 + source4/scripting/python/pyglue.c | 109 --- source4/scripting/python/samba/__init__.py | 26 +--- source4/scripting/python/samba/provision.py |8 +- 11 files changed, 295 insertions(+), 210 deletions(-) create mode 100644 source4/lib/ldb-samba/pyldb.c Changeset truncated at 500 lines: diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index 865609e..f81b449 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -107,7 +107,8 @@ void initauth(void) if (PyType_Ready(&PyAuthSession) < 0) return; - m = Py_InitModule3("auth", py_auth_methods, "Authentication and authorization support."); + m = Py_InitModule3("auth", py_auth_methods, + "Authentication and authorization support."); if (m == NULL) return; diff --git a/source4/auth/pyauth.h b/source4/auth/pyauth.h index f3c9cea..2d0379e 100644 --- a/source4/auth/pyauth.h +++ b/source4/auth/pyauth.h @@ -23,7 +23,6 @@ #include "lib/talloc/pytalloc.h" #include "auth/session.h" -PyAPI_DATA(PyTypeObject) PyAuthSession; #define PyAuthSession_AsSession(obj) py_talloc_get_type(obj, struct auth_session_info) #define PyAuthSession_Check(obj) PyObject_TypeCheck(obj, &PyAuthSession) struct auth_session_info *PyObject_AsSession(PyObject *obj); diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index 6e3e50a..ac9b93c 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -57,70 +57,6 @@ static PyObject *py_samdb_server_site_name(PyObject *self, PyObject *args) return result; } -/* XXX: This function really should be in pyldb.c */ -static PyObject *py_dsdb_set_opaque_integer(PyObject *self, PyObject *args) -{ - PyObject *py_ldb; - int value; - int *old_val, *new_val; - char *py_opaque_name, *opaque_name_talloc; - struct ldb_context *ldb; - TALLOC_CTX *tmp_ctx; - - if (!PyArg_ParseTuple(args, "Osi", &py_ldb, &py_opaque_name, &value)) - return NULL; - - PyErr_LDB_OR_RAISE(py_ldb, ldb); - - /* see if we have a cached copy */ - old_val = (int *)ldb_get_opaque(ldb, py_opaque_name); - /* XXX: We shouldn't just blindly assume that the value that is -* already present has the size of an int and is not shared -* with other code that may rely on it not changing. -* JRV 20100403 */ - - if (old_val) { - *old_val = value; - Py_RETURN_NONE; - } - - tmp_ctx = talloc_new(ldb); - if (tmp_ctx == NULL) { - PyErr_NoMemory();
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e39ed55... selftest: Remove python2.4-isms from c75184b... Fix issue with aio where r/w lock wasn't kept across aio read operations. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e39ed552b69e95217864855332e6c883466a4548 Author: Jelmer Vernooij Date: Tue Apr 6 03:55:10 2010 +0200 selftest: Remove python2.4-isms --- Summary of changes: selftest/filter-subunit |4 ++-- selftest/subunithelper.py |8 +--- 2 files changed, 7 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/filter-subunit b/selftest/filter-subunit index 605a898..923d5cf 100755 --- a/selftest/filter-subunit +++ b/selftest/filter-subunit @@ -26,9 +26,9 @@ parser.add_option("--prefix", type="string", opts, args = parser.parse_args() if opts.expected_failures: - expected_failures = list(subunithelper.read_test_regexes(opts.expected_failures)) + expected_failures = subunithelper.read_test_regexes(opts.expected_failures) else: - expected_failures = [] + expected_failures = {} statistics = { 'TESTS_UNEXPECTED_OK': 0, diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index 8659f98..2c5fa31 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -190,6 +190,7 @@ class SubunitOps(object): def read_test_regexes(name): +ret = {} f = open(name, 'r') try: for l in f: @@ -198,15 +199,16 @@ def read_test_regexes(name): continue if "#" in l: (regex, reason) = l.split("#", 1) -yield (regex.strip(), reason.strip()) +ret[regex.strip()] = reason.strip() else: -yield l, None +ret[l] = None finally: f.close() +return ret def find_in_list(regexes, fullname): -for regex, reason in regexes: +for regex, reason in regexes.iteritems(): if re.match(regex, fullname): if reason is None: return "" -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 55aeb68... s4-python: Move dsdb_convert_schema_to_openldap to dsdb. via 2a67eda... s4-python: Move set_opaque_integer -> dsdb. via ccd954f... s4-python: Avoid importing glue directly. via aed295b... s4-python: Remove convenience macro PyErr_SetStringError. via 8afd52a... s4-python: Move samdb_server_site_name to dsdb module. via 31a517e... s4-python: Move dsdb constants to a separate python module. from e5b33be... s4-python: Remove remaining constants. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 55aeb682ba157dc02d838381d1b5d9db166beaeb Author: Jelmer Vernooij Date: Sun Apr 4 00:42:52 2010 +0200 s4-python: Move dsdb_convert_schema_to_openldap to dsdb. commit 2a67eda98f88f132443bc2b81ca2686bcc1775a6 Author: Jelmer Vernooij Date: Sun Apr 4 00:40:01 2010 +0200 s4-python: Move set_opaque_integer -> dsdb. commit ccd954f2a7534cc27afd17b23e2fc838e10cf6b3 Author: Jelmer Vernooij Date: Sun Apr 4 00:30:34 2010 +0200 s4-python: Avoid importing glue directly. commit aed295b97e649ef7db4300cc400bc2bd9b1a03b0 Author: Jelmer Vernooij Date: Sun Apr 4 00:22:29 2010 +0200 s4-python: Remove convenience macro PyErr_SetStringError. This macro assumed that all errors were runtime errors. commit 8afd52a6418125100a5e8a6a4312c0460e57ac88 Author: Jelmer Vernooij Date: Sun Apr 4 00:21:09 2010 +0200 s4-python: Move samdb_server_site_name to dsdb module. commit 31a517e1721fc0080473b376cd59c090cfab6456 Author: Jelmer Vernooij Date: Sun Apr 4 00:14:23 2010 +0200 s4-python: Move dsdb constants to a separate python module. --- Summary of changes: source4/auth/credentials/pycredentials.c |2 +- source4/dsdb/config.mk |6 + source4/dsdb/pydsdb.c | 212 source4/lib/ldb/tests/python/ldap.py |7 +- source4/lib/ldb/tests/python/ldap_schema.py| 37 +--- source4/lib/ldb/tests/python/sec_descriptor.py |6 +- source4/lib/ldb/tests/python/urgent_replication.py |6 +- source4/libcli/util/pyerrors.h |3 - source4/scripting/python/pyglue.c | 162 +--- source4/scripting/python/samba/__init__.py | 55 + .../scripting/python/samba/netcmd/domainlevel.py |2 +- source4/scripting/python/samba/provision.py| 21 +- source4/scripting/python/samba/samdb.py|5 +- source4/scripting/python/samba/upgradehelpers.py |3 +- source4/setup/provision|7 +- 15 files changed, 266 insertions(+), 268 deletions(-) create mode 100644 source4/dsdb/pydsdb.c Changeset truncated at 500 lines: diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c index f5e8029..cd578a5 100644 --- a/source4/auth/credentials/pycredentials.c +++ b/source4/auth/credentials/pycredentials.c @@ -272,7 +272,7 @@ static PyObject *py_creds_get_named_ccache(py_talloc_Object *self, PyObject *arg return PyCredentialCacheContainer_from_ccache_container(ccc); } - PyErr_SetStringError(error_string); + PyErr_SetString(PyExc_RuntimeError, error_string); talloc_free(event_ctx); return NULL; diff --git a/source4/dsdb/config.mk b/source4/dsdb/config.mk index 356f732..69b7227 100644 --- a/source4/dsdb/config.mk +++ b/source4/dsdb/config.mk @@ -106,3 +106,9 @@ PRIVATE_DEPENDENCIES = \ DNS_UPDATE_SRV_OBJ_FILES = $(addprefix $(dsdbsrcdir)/dns/, \ dns_update.o) + +[PYTHON::python_dsdb] +LIBRARY_REALNAME = samba/dsdb.$(SHLIBEXT) +PRIVATE_DEPENDENCIES = SAMDB + +python_dsdb_OBJ_FILES = $(dsdbsrcdir)/pydsdb.o diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c new file mode 100644 index 000..6e3e50a --- /dev/null +++ b/source4/dsdb/pydsdb.c @@ -0,0 +1,212 @@ +/* + Unix SMB/CIFS implementation. + Copyright (C) Jelmer Vernooij 2007-2010 + Copyright (C) Matthias Dieter Wallnöfer 2009 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include +#include "includes.h
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e5b33be... s4-python: Remove remaining constants. via 5a02621... s4-python: Remove unused imports, duplicate definitions of SECINFO_ constants. via 13a6aee... s4-python: Remove duplicate definition of GUID_DRS_* constants. via 3ec8147... selftest: for clarity, rename test to testsuite from bbe0797... libwbclient: Both talloc_free and wbcFreeMemory deal with NULL http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e5b33be2f2655ae8b3a59bf7fe54174464c8cbe9 Author: Jelmer Vernooij Date: Sat Apr 3 23:44:18 2010 +0200 s4-python: Remove remaining constants. commit 5a026219a97e396284d30a33e1ab57c059be67e0 Author: Jelmer Vernooij Date: Sat Apr 3 23:33:47 2010 +0200 s4-python: Remove unused imports, duplicate definitions of SECINFO_ constants. commit 13a6aee591e972413a522944d168257e17808ca3 Author: Jelmer Vernooij Date: Sat Apr 3 23:18:23 2010 +0200 s4-python: Remove duplicate definition of GUID_DRS_* constants. commit 3ec8147105267f2f890b4e605221a4347f51c644 Author: Jelmer Vernooij Date: Thu Apr 1 16:24:24 2010 +0200 selftest: for clarity, rename test to testsuite --- Summary of changes: source4/lib/ldb/tests/python/sec_descriptor.py | 12 +- source4/scripting/python/pyglue.c | 21 --- source4/scripting/python/samba/__init__.py | 22 --- source4/scripting/python/samba/netcmd/dsacl.py | 19 +- source4/scripting/python/samba/netcmd/netacl.py |3 - source4/selftest/tests.sh | 212 +++--- 6 files changed, 121 insertions(+), 168 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/ldb/tests/python/sec_descriptor.py b/source4/lib/ldb/tests/python/sec_descriptor.py index 4d03c0b..8b2a879 100755 --- a/source4/lib/ldb/tests/python/sec_descriptor.py +++ b/source4/lib/ldb/tests/python/sec_descriptor.py @@ -1,31 +1,29 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import getopt import optparse import sys import os import base64 import re import random -import time sys.path.append("bin/python") import samba.getopt as options # Some error messages that are being tested -from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError -from ldb import ERR_NO_SUCH_OBJECT, ERR_INVALID_DN_SYNTAX, ERR_UNWILLING_TO_PERFORM -from ldb import ERR_INSUFFICIENT_ACCESS_RIGHTS +from ldb import SCOPE_SUBTREE, SCOPE_BASE, LdbError +from ldb import ERR_NO_SUCH_OBJECT # For running the test unit from samba.ndr import ndr_pack, ndr_unpack from samba.dcerpc import security from samba.auth import system_session -from samba import Ldb, DS_DOMAIN_FUNCTION_2008, SECINFO_OWNER, \ -SECINFO_GROUP, SECINFO_DACL, SECINFO_SACL +from samba import Ldb, DS_DOMAIN_FUNCTION_2008 +from samba.dcerpc.security import ( +SECINFO_OWNER, SECINFO_GROUP, SECINFO_DACL, SECINFO_SACL) from subunit.run import SubunitTestRunner import unittest diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index 8fe764c..37d75cd 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -751,27 +751,6 @@ void initglue(void) PyModule_AddObject(m, "DS_DC_FUNCTION_2008", PyInt_FromLong(DS_DC_FUNCTION_2008)); PyModule_AddObject(m, "DS_DC_FUNCTION_2008_R2", PyInt_FromLong(DS_DC_FUNCTION_2008_R2)); - /* "LDAP_SERVER_SD_FLAGS_OID" */ - PyModule_AddObject(m, "SECINFO_OWNER", PyInt_FromLong(SECINFO_OWNER)); - PyModule_AddObject(m, "SECINFO_GROUP", PyInt_FromLong(SECINFO_GROUP)); - PyModule_AddObject(m, "SECINFO_DACL", PyInt_FromLong(SECINFO_DACL)); - PyModule_AddObject(m, "SECINFO_SACL", PyInt_FromLong(SECINFO_SACL)); - - /* control access rights guids */ - PyModule_AddObject(m, "GUID_DRS_ALLOCATE_RIDS", PyString_FromString(GUID_DRS_ALLOCATE_RIDS)); - PyModule_AddObject(m, "GUID_DRS_CHANGE_DOMAIN_MASTER", PyString_FromString(GUID_DRS_CHANGE_DOMAIN_MASTER)); - PyModule_AddObject(m, "GUID_DRS_CHANGE_INFR_MASTER", PyString_FromString(GUID_DRS_CHANGE_INFR_MASTER)); - PyModule_AddObject(m, "GUID_DRS_CHANGE_PDC", PyString_FromString(GUID_DRS_CHANGE_PDC)); - PyModule_AddObject(m, "GUID_DRS_CHANGE_RID_MASTER", PyString_FromString(GUID_DRS_CHANGE_RID_MASTER)); - PyModule_AddObject(m, "GUID_DRS_CHANGE_SCHEMA_MASTER", PyString_FromString(GUID_DRS_CHANGE_SCHEMA_MASTER)); - PyModule_AddObject(m, "GUID_DRS_GET_CHANGES", PyString_FromString(GUID_DRS_GET_CHANGES)); - PyModule_AddObject(m, "GUID_DRS_GET_ALL_CHANGES", PyString_FromString(GUID_DRS_GET_ALL_CH
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c63440e... s4-python: Ensure __init__ exists in samba.external, or importing will fail. via 84891b0... s4-python: Install external packages to a different directory but import into the normal namespace when the system doesn't have it available. from 64c5642... s3: Fix a typo in winbindd_pam_logoff http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c63440e040798722288a530a64e59d19344c63ee Author: Jelmer Vernooij Date: Thu Apr 1 15:32:32 2010 +0200 s4-python: Ensure __init__ exists in samba.external, or importing will fail. commit 84891b048d577e52da91c64d310f7bafa115d015 Author: Jelmer Vernooij Date: Thu Apr 1 15:20:25 2010 +0200 s4-python: Install external packages to a different directory but import into the normal namespace when the system doesn't have it available. --- Summary of changes: source4/script/installmisc.sh |8 +--- source4/scripting/bin/samba_dnsupdate |2 +- source4/scripting/python/samba/__init__.py | 13 + 3 files changed, 15 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/script/installmisc.sh b/source4/script/installmisc.sh index 6a53b98..32a2ee4 100755 --- a/source4/script/installmisc.sh +++ b/source4/script/installmisc.sh @@ -83,12 +83,14 @@ cp setup/provision.smb.conf.standalone $SETUPDIR || exit 1 echo "Installing external python libraries" mkdir -p $DESTDIR$PYTHONDIR || exit 1 -for p in $($PYTHON scripting/python/samba_external/missing.py); +MISSING="$($PYTHON scripting/python/samba_external/missing.py)" +for p in $MISSING do package=`basename $p` echo "Installing missing python package $package" - mkdir -p $DESTDIR$PYTHONDIR/$package - cp -r ../lib/$p/* $DESTDIR$PYTHONDIR/$package/ || exit 1 + mkdir -p $DESTDIR$PYTHONDIR/samba/external/$package + touch $DESTDIR$PYTHONDIR/samba/external/__init__.py + cp -r ../lib/$p/* $DESTDIR$PYTHONDIR/samba/external/$package/ || exit 1 done echo "Installing stuff in $PRIVATEDIR" diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index 8a7b8a4..b3956aa 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -38,7 +38,7 @@ from samba import glue from samba.auth import system_session from samba.samdb import SamDB -samba.ensure_external_module("dns.resolver", "dnspython") +samba.ensure_external_module("dns", "dnspython") import dns.resolver as resolver default_ttl = 900 diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 87753b5..50ecde2 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -402,10 +402,15 @@ def ensure_external_module(modulename, location): try: __import__(modulename) except ImportError: -sys.path.insert(0, -os.path.join(os.path.dirname(__file__), - "../../../../lib", location)) -__import__(modulename) +import sys +if _in_source_tree(): +sys.path.insert(0, +os.path.join(os.path.dirname(__file__), + "../../../../lib", location)) +__import__(modulename) +else: +sys.modules[modulename] = __import__( +"samba.external.%s" % modulename, fromlist=["samba.external"]) version = glue.version -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 132e505... subunitrun: Find testtools and subunit when they're not provided by the system. from a2411c5... s3:winbindd: correctly invalidate the cached connection http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 132e505d1edc501edbe73bb75b65c1f5a724e70b Author: Jelmer Vernooij Date: Thu Apr 1 14:47:54 2010 +0200 subunitrun: Find testtools and subunit when they're not provided by the system. --- Summary of changes: source4/scripting/bin/subunitrun |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index 63afdc7..7b9f20e 100755 --- a/source4/scripting/bin/subunitrun +++ b/source4/scripting/bin/subunitrun @@ -22,14 +22,16 @@ import sys # Find right directory when running from source tree sys.path.insert(0, "bin/python") -from subunit.run import SubunitTestRunner from unittest import TestProgram import optparse -import os -from samba import param +import samba +samba.ensure_external_module("testtools", "testtools") +samba.ensure_external_module("subunit", "subunit/python") import samba.getopt as options import samba.tests +from subunit.run import SubunitTestRunner + parser = optparse.OptionParser("subunitrun [options] ") credopts = options.CredentialsOptions(parser) parser.add_option_group(credopts) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 74f36df... selftest: Update sys.path before attempting to import external modules. from c6b1553... selftest: Make sure format-subunit and filter-subunit can find testtools/subunit. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 74f36df4b30601417dc69031bf6f1af4c652e440 Author: Jelmer Vernooij Date: Wed Mar 31 04:52:13 2010 +0200 selftest: Update sys.path before attempting to import external modules. --- Summary of changes: selftest/filter-subunit |3 ++- selftest/format-subunit |5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/filter-subunit b/selftest/filter-subunit index 41d92c9..605a898 100755 --- a/selftest/filter-subunit +++ b/selftest/filter-subunit @@ -5,13 +5,14 @@ import optparse import os -import subunithelper import sys import signal sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python")) sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools")) +import subunithelper + parser = optparse.OptionParser("filter-subunit [options] < instream > outstream") parser.add_option("--expected-failures", type="string", help="File containing list of regexes matching tests to consider known " diff --git a/selftest/format-subunit b/selftest/format-subunit index e590652..54949df 100755 --- a/selftest/format-subunit +++ b/selftest/format-subunit @@ -8,12 +8,13 @@ import optparse import os import signal import sys -import subunithelper -import subunit sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python")) sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools")) +import subunithelper +import subunit + class PlainFormatter(object): def __init__(self, summaryfile, verbose, immediate, statistics, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c6b1553... selftest: Make sure format-subunit and filter-subunit can find testtools/subunit. from 36c8485... subunit: Include remainder of bindings and metadata. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c6b1553a2b83c5e70fcb1a3a76e49ed496553a4e Author: Jelmer Vernooij Date: Wed Mar 31 04:51:05 2010 +0200 selftest: Make sure format-subunit and filter-subunit can find testtools/subunit. --- Summary of changes: selftest/filter-subunit |4 selftest/format-subunit |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/filter-subunit b/selftest/filter-subunit index e0774f2..41d92c9 100755 --- a/selftest/filter-subunit +++ b/selftest/filter-subunit @@ -4,10 +4,14 @@ # Published under the GNU GPL, v3 or later import optparse +import os import subunithelper import sys import signal +sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python")) +sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools")) + parser = optparse.OptionParser("filter-subunit [options] < instream > outstream") parser.add_option("--expected-failures", type="string", help="File containing list of regexes matching tests to consider known " diff --git a/selftest/format-subunit b/selftest/format-subunit index 4e02f0f..e590652 100755 --- a/selftest/format-subunit +++ b/selftest/format-subunit @@ -11,6 +11,9 @@ import sys import subunithelper import subunit +sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python")) +sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools")) + class PlainFormatter(object): def __init__(self, summaryfile, verbose, immediate, statistics, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 36c8485... subunit: Include remainder of bindings and metadata. from 6897be7... testtools: Fix included testtools, for systems that don't have it. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 36c84854cb801ba025fd3b43d9cf998da451eca7 Author: Jelmer Vernooij Date: Wed Mar 31 04:24:04 2010 +0200 subunit: Include remainder of bindings and metadata. --- Summary of changes: lib/subunit/Apache-2.0 | 202 + lib/subunit/BSD | 26 +++ lib/subunit/COPYING | 36 lib/subunit/INSTALL | 25 +++ lib/subunit/Makefile.am | 136 ++ lib/subunit/NEWS| 174 ++ lib/subunit/README | 217 ++- lib/subunit/c++/README | 50 + lib/subunit/c++/SubunitTestProgressListener.cpp | 63 +++ lib/subunit/c++/SubunitTestProgressListener.h | 56 ++ lib/subunit/c/README| 68 +++ lib/subunit/c/include/subunit/child.h | 79 lib/subunit/c/lib/child.c | 82 + lib/subunit/c/tests/test_child.c| 192 lib/subunit/configure.ac| 75 lib/subunit/libcppunit_subunit.pc.in| 11 ++ lib/subunit/libsubunit.pc.in| 11 ++ lib/subunit/runtests.py | 138 ++ lib/subunit/shell/README| 62 +++ lib/subunit/shell/share/subunit.sh | 56 ++ lib/subunit/shell/tests/test_function_output.sh | 97 ++ lib/subunit/shell/tests/test_source_library.sh | 108 +++ lib/update-external.sh |5 +- 23 files changed, 1959 insertions(+), 10 deletions(-) create mode 100644 lib/subunit/Apache-2.0 create mode 100644 lib/subunit/BSD create mode 100644 lib/subunit/COPYING create mode 100644 lib/subunit/INSTALL create mode 100644 lib/subunit/Makefile.am create mode 100644 lib/subunit/NEWS create mode 100644 lib/subunit/c++/README create mode 100644 lib/subunit/c++/SubunitTestProgressListener.cpp create mode 100644 lib/subunit/c++/SubunitTestProgressListener.h create mode 100644 lib/subunit/c/README create mode 100644 lib/subunit/c/include/subunit/child.h create mode 100644 lib/subunit/c/lib/child.c create mode 100644 lib/subunit/c/tests/test_child.c create mode 100644 lib/subunit/configure.ac create mode 100644 lib/subunit/libcppunit_subunit.pc.in create mode 100644 lib/subunit/libsubunit.pc.in create mode 100755 lib/subunit/runtests.py create mode 100644 lib/subunit/shell/README create mode 100644 lib/subunit/shell/share/subunit.sh create mode 100755 lib/subunit/shell/tests/test_function_output.sh create mode 100755 lib/subunit/shell/tests/test_source_library.sh Changeset truncated at 500 lines: diff --git a/lib/subunit/Apache-2.0 b/lib/subunit/Apache-2.0 new file mode 100644 index 000..d645695 --- /dev/null +++ b/lib/subunit/Apache-2.0 @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 +http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source fo
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6897be7... testtools: Fix included testtools, for systems that don't have it. from 5f3fcf7... s4-python: Install external included packages only if they're not present on the system. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6897be747594e385ee032ac1409289ce2d208548 Author: Jelmer Vernooij Date: Wed Mar 31 04:19:36 2010 +0200 testtools: Fix included testtools, for systems that don't have it. --- Summary of changes: lib/testtools/HACKING | 139 + lib/testtools/LICENSE | 19 ++ lib/testtools/MANIFEST.in |9 + lib/testtools/MANUAL | 213 lib/testtools/Makefile | 28 +++ lib/testtools/NEWS | 191 ++ lib/testtools/README | 54 + lib/testtools/setup.py | 25 +++ lib/testtools/{ => }/testtools/__init__.py |0 lib/testtools/{ => }/testtools/content.py |0 lib/testtools/{ => }/testtools/content_type.py |0 lib/testtools/{ => }/testtools/matchers.py |0 lib/testtools/{ => }/testtools/run.py |0 lib/testtools/{ => }/testtools/runtest.py |0 lib/testtools/{ => }/testtools/testcase.py |0 .../{ => }/testtools/testresult/__init__.py|0 .../{ => }/testtools/testresult/doubles.py |0 lib/testtools/{ => }/testtools/testresult/real.py |0 lib/testtools/{ => }/testtools/tests/__init__.py |0 lib/testtools/{ => }/testtools/tests/helpers.py|0 .../{ => }/testtools/tests/test_content.py |0 .../{ => }/testtools/tests/test_content_type.py|0 .../{ => }/testtools/tests/test_matchers.py|0 .../{ => }/testtools/tests/test_runtest.py |0 .../{ => }/testtools/tests/test_testresult.py |0 .../{ => }/testtools/tests/test_testsuite.py |0 .../{ => }/testtools/tests/test_testtools.py |0 lib/testtools/{ => }/testtools/testsuite.py|0 lib/testtools/{ => }/testtools/utils.py|0 lib/update-external.sh |2 +- 30 files changed, 679 insertions(+), 1 deletions(-) create mode 100644 lib/testtools/HACKING create mode 100644 lib/testtools/LICENSE create mode 100644 lib/testtools/MANIFEST.in create mode 100644 lib/testtools/MANUAL create mode 100644 lib/testtools/Makefile create mode 100644 lib/testtools/NEWS create mode 100644 lib/testtools/README create mode 100755 lib/testtools/setup.py rename lib/testtools/{ => }/testtools/__init__.py (100%) rename lib/testtools/{ => }/testtools/content.py (100%) rename lib/testtools/{ => }/testtools/content_type.py (100%) rename lib/testtools/{ => }/testtools/matchers.py (100%) rename lib/testtools/{ => }/testtools/run.py (100%) rename lib/testtools/{ => }/testtools/runtest.py (100%) rename lib/testtools/{ => }/testtools/testcase.py (100%) rename lib/testtools/{ => }/testtools/testresult/__init__.py (100%) rename lib/testtools/{ => }/testtools/testresult/doubles.py (100%) rename lib/testtools/{ => }/testtools/testresult/real.py (100%) rename lib/testtools/{ => }/testtools/tests/__init__.py (100%) rename lib/testtools/{ => }/testtools/tests/helpers.py (100%) rename lib/testtools/{ => }/testtools/tests/test_content.py (100%) rename lib/testtools/{ => }/testtools/tests/test_content_type.py (100%) rename lib/testtools/{ => }/testtools/tests/test_matchers.py (100%) rename lib/testtools/{ => }/testtools/tests/test_runtest.py (100%) rename lib/testtools/{ => }/testtools/tests/test_testresult.py (100%) rename lib/testtools/{ => }/testtools/tests/test_testsuite.py (100%) rename lib/testtools/{ => }/testtools/tests/test_testtools.py (100%) rename lib/testtools/{ => }/testtools/testsuite.py (100%) rename lib/testtools/{ => }/testtools/utils.py (100%) Changeset truncated at 500 lines: diff --git a/lib/testtools/HACKING b/lib/testtools/HACKING new file mode 100644 index 000..8fe323c --- /dev/null +++ b/lib/testtools/HACKING @@ -0,0 +1,139 @@ +=== +Notes for contributing to testtools +=== + +Coding style + + +In general, follow PEP 8 <http://www.python.org/dev/peps/pep-0008/>. + +For consistency with the standard library's ``unittest`` module, method names +are generally ``camelCase``. + +testtools supports Python 2.4 and later, so avoid any 2.5-only features li
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5f3fcf7... s4-python: Install external included packages only if they're not present on the system. via 0e77bea... installmisc: Support DESTDIR for Python directories. via 62ed8a6... format-subunit: Hide reason if it is None. via 49d82aa... format-subunit: Don't show reason at all if it is None. via a8ac7fd... Put testtools directly under lib/ to make it easier to install from Samba 4. via e4af3af... samba_external: Simplify script to find missing external packages; include subunit and testtools as well. from 31094b0... smbtorture: Report number of available tests in a testsuite using subunit. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5f3fcf7a7773737fd87c8ff5530fae2286e88927 Author: Jelmer Vernooij Date: Wed Mar 31 03:56:24 2010 +0200 s4-python: Install external included packages only if they're not present on the system. commit 0e77bea165d6db9ca8a138e78f5051234b069789 Author: Jelmer Vernooij Date: Wed Mar 31 03:47:10 2010 +0200 installmisc: Support DESTDIR for Python directories. commit 62ed8a68cd30037f73536c32c7293bc9a3ab88d4 Author: Jelmer Vernooij Date: Wed Mar 31 03:34:50 2010 +0200 format-subunit: Hide reason if it is None. commit 49d82aa7729c5bfa7dde313580630a5ff97fc05a Author: Jelmer Vernooij Date: Wed Mar 31 03:32:23 2010 +0200 format-subunit: Don't show reason at all if it is None. commit a8ac7fda573a924debf165d39eff3c1837240d4f Author: Jelmer Vernooij Date: Wed Mar 31 03:19:18 2010 +0200 Put testtools directly under lib/ to make it easier to install from Samba 4. commit e4af3afd7ae3e39218b42a42d39c2ec10be9a642 Author: Jelmer Vernooij Date: Wed Mar 31 03:15:24 2010 +0200 samba_external: Simplify script to find missing external packages; include subunit and testtools as well. --- Summary of changes: lib/subunit/update.sh | 17 - lib/{subunit/python => }/testtools/__init__.py |0 lib/{subunit/python => }/testtools/content.py |0 lib/{subunit/python => }/testtools/content_type.py |0 lib/{subunit/python => }/testtools/matchers.py |0 lib/{subunit/python => }/testtools/run.py |0 lib/{subunit/python => }/testtools/runtest.py |0 lib/{subunit/python => }/testtools/testcase.py |0 .../python => }/testtools/testresult/__init__.py |0 .../python => }/testtools/testresult/doubles.py|0 .../python => }/testtools/testresult/real.py |0 .../python => }/testtools/tests/__init__.py|0 .../python => }/testtools/tests/helpers.py |0 .../python => }/testtools/tests/test_content.py|0 .../testtools/tests/test_content_type.py |0 .../python => }/testtools/tests/test_matchers.py |0 .../python => }/testtools/tests/test_runtest.py|0 .../python => }/testtools/tests/test_testresult.py |0 .../python => }/testtools/tests/test_testsuite.py |0 .../python => }/testtools/tests/test_testtools.py |0 lib/{subunit/python => }/testtools/testsuite.py|0 lib/{subunit/python => }/testtools/utils.py|0 lib/update-external.sh | 19 +++ selftest/format-subunit| 14 +++--- source4/lib/ldb/tests/python/deletetest.py |1 + source4/lib/ldb/tests/python/urgent_replication.py |8 +--- source4/script/installmisc.sh |9 + source4/scripting/python/config.mk |4 ++-- source4/scripting/python/samba_external/missing.py | 13 + source4/selftest/tests.sh | 14 +++--- 30 files changed, 51 insertions(+), 48 deletions(-) delete mode 100755 lib/subunit/update.sh rename lib/{subunit/python => }/testtools/__init__.py (100%) rename lib/{subunit/python => }/testtools/content.py (100%) rename lib/{subunit/python => }/testtools/content_type.py (100%) rename lib/{subunit/python => }/testtools/matchers.py (100%) rename lib/{subunit/python => }/testtools/run.py (100%) rename lib/{subunit/python => }/testtools/runtest.py (100%) rename lib/{subunit/python => }/testtools/testcase.py (100%) rename lib/{subunit/python => }/testtools/testresult/__init__.py (100%) rename lib/{subunit/python => }/testtools/testresult/doubles.py (100%) rename lib/{subunit/python => }/testtools/testresult/real.py (100%) rename lib/{subunit/python => }/testtools/tests/__init__.py (100%) rename lib/{subunit/python => }/testtools/tests/helpers.py (100%) rename lib/{subunit/python => }/testtool
Re: [SCM] Samba Shared Repository - branch master updated
On Tue, Mar 30, 2010 at 01:28:47AM -0500, Andrew Tridgell wrote: > The branch, master has been updated >via 21499a1... selftest: reason may be None > from 4f4addd... s4-test: oLschema2ldif doesn't take -H any more > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > > - Log - > commit 21499a148e4b6600d13977eb97c1a77d9bf5fd4c > Author: Andrew Tridgell > Date: Tue Mar 30 16:27:09 2010 +1100 > > selftest: reason may be None > > jelmer, please check > > --- > > Summary of changes: > selftest/format-subunit |4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) Thanks, tridge. I've committed a slight tweak to this to hide the reason line completely if the reason is None (which ideally shouldn't happen, it's nice to have a one-line summary of why a test failed). Cheers, Jelmer signature.asc Description: Digital signature
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Tue, Mar 30, 2010 at 05:54:55AM -0500, Matthias Dieter Walln??fer wrote: > The branch, master has been updated >via b08... s4:registry/tests/hive.c - make the test compatible > with big-endian platforms > from 08e0d94... replace: allow memmem() with an empty string to return > NULL > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > - Log - > commit b0842dcb141ba6e8eb96781e6cf360db1b57 > Author: Matthias Dieter Walln??fer > Date: Tue Mar 30 12:46:56 2010 +0200 > > s4:registry/tests/hive.c - make the test compatible with big-endian > platforms On what platform were these tests failing ? Cheers, Jelmer signature.asc Description: Digital signature
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 31094b0... smbtorture: Report number of available tests in a testsuite using subunit. from 197c982... subunit: Also import copies of filters and perl module. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 31094b0e8ca73e3150de9de689f4c5c38b2e9f1f Author: Jelmer Vernooij Date: Wed Mar 31 02:57:47 2010 +0200 smbtorture: Report number of available tests in a testsuite using subunit. --- Summary of changes: lib/torture/subunit.c| 24 +++- lib/torture/torture.c| 21 + lib/torture/torture.h|9 + selftest/selftest.pl |2 +- source4/torture/smbtorture.c |8 +++- 5 files changed, 61 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/torture/subunit.c b/lib/torture/subunit.c index 832f11f..86b3dd0 100644 --- a/lib/torture/subunit.c +++ b/lib/torture/subunit.c @@ -81,10 +81,32 @@ static void subunit_warning(struct torture_context *test, fprintf(stderr, "WARNING!: %s\n", comment); } +static void subunit_progress(struct torture_context *tctx, int offset, enum torture_progress_whence whence) +{ + switch (whence) { + case TORTURE_PROGRESS_SET: + printf("progress: %d\n", offset); + break; + case TORTURE_PROGRESS_CUR: + printf("progress: %+-d\n", offset); + break; + case TORTURE_PROGRESS_POP: + printf("progress: pop\n"); + break; + case TORTURE_PROGRESS_PUSH: + printf("progress: push\n"); + break; + default: + fprintf(stderr, "Invalid call to progress()\n"); + break; + } +} + const struct torture_ui_ops torture_subunit_ui_ops = { .comment = subunit_comment, .warning = subunit_warning, .test_start = subunit_test_start, .test_result = subunit_test_result, - .suite_start = subunit_suite_start + .suite_start = subunit_suite_start, + .progress = subunit_progress, }; diff --git a/lib/torture/torture.c b/lib/torture/torture.c index 672726e..9adf681 100644 --- a/lib/torture/torture.c +++ b/lib/torture/torture.c @@ -245,6 +245,23 @@ struct torture_tcase *torture_suite_add_tcase(struct torture_suite *suite, return tcase; } +int torture_suite_children_count(const struct torture_suite *suite) +{ + int ret = 0; + struct torture_tcase *tcase; + struct torture_test *test; + struct torture_suite *tsuite; + for (tcase = suite->testcases; tcase; tcase = tcase->next) { + for (test = tcase->tests; test; test = test->next) { + ret++; + } + } + for (tsuite = suite->children; tsuite; tsuite = tsuite->next) { + ret ++; + } + return ret; +} + /** * Run a torture test suite. */ @@ -259,6 +276,8 @@ bool torture_run_suite(struct torture_context *context, if (context->results->ui_ops->suite_start) context->results->ui_ops->suite_start(context, suite); + context->results->ui_ops->progress(context, + torture_suite_children_count(suite), TORTURE_PROGRESS_SET); old_testname = context->active_testname; if (old_testname != NULL) context->active_testname = talloc_asprintf(context, "%s-%s", @@ -271,7 +290,9 @@ bool torture_run_suite(struct torture_context *context, } for (tsuite = suite->children; tsuite; tsuite = tsuite->next) { + context->results->ui_ops->progress(context, 0, TORTURE_PROGRESS_PUSH); ret &= torture_run_suite(context, tsuite); + context->results->ui_ops->progress(context, 0, TORTURE_PROGRESS_POP); } talloc_free(context->active_testname); diff --git a/lib/torture/torture.h b/lib/torture/torture.h index ad3668f..cb2c02b 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -34,6 +34,13 @@ enum torture_result { TORTURE_SKIP=3 }; +enum torture_progress_whence { + TORTURE_PROGRESS_SET, + TORTURE_PROGRESS_CUR, + TORTURE_PROGRESS_POP, + TORTURE_PROGRESS_PUSH, +}; + /* * These callbacks should be implemented by any backend that wishes * to listen to reports from the torture tests. @@ -52,6 +59,7 @@ struct torture_ui_ops struct torture_test *); void (*test_result) (struct torture_context *, enum torture_result, const char *reason); + void (*p
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 197c982... subunit: Also import copies of filters and perl module. via 9fe4b01... selftest: Use boolean types in Python. via 6c299d2... selftest: Use standard subunit command for progress reporting. via 7f1360d... selftest: Support parsing progress in format-subunit/filter-subunit. via b2eb609... selftest: Use standard subunit commands for progress reporting. via beb630b... s4-selftest: Fix xfail for base.delete. via 12e34ea... selftest: Use absolute tests names in knownfail. via 08161e0... selftest: Convert filter-subunit to Python so the subunit Python module can be used later. via ae5381d... format-subunit: Avoid printing backtrace on Ctrl-C. from 2699db3... s4-torture: removed more uses of typeof() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 197c98292bd838e27da6692ba8e7984f12a66fef Author: Jelmer Vernooij Date: Tue Mar 30 15:03:41 2010 +0200 subunit: Also import copies of filters and perl module. commit 9fe4b01ca682b57cf7c79775abacf135d0c87d42 Author: Jelmer Vernooij Date: Tue Mar 30 14:44:37 2010 +0200 selftest: Use boolean types in Python. commit 6c299d28b56dd237792cc80c15c6169e701b4a97 Author: Jelmer Vernooij Date: Tue Mar 30 14:42:23 2010 +0200 selftest: Use standard subunit command for progress reporting. commit 7f1360db5123b61cd4473f54d4fb55746c5d8245 Author: Jelmer Vernooij Date: Tue Mar 30 14:36:25 2010 +0200 selftest: Support parsing progress in format-subunit/filter-subunit. commit b2eb609d4de39c1359142bc0562daf36e4dee08c Author: Jelmer Vernooij Date: Tue Mar 30 14:30:08 2010 +0200 selftest: Use standard subunit commands for progress reporting. commit beb630b69051acfb6e92ae8ed86007999e7937cd Author: Jelmer Vernooij Date: Tue Mar 30 14:15:38 2010 +0200 s4-selftest: Fix xfail for base.delete. commit 12e34eafb82822a80dbe9dc12b4695ab665644a7 Author: Jelmer Vernooij Date: Tue Mar 30 14:02:36 2010 +0200 selftest: Use absolute tests names in knownfail. commit 08161e093d38f0d7b54841f5572a024f228408fa Author: Jelmer Vernooij Date: Tue Mar 30 12:46:26 2010 +0200 selftest: Convert filter-subunit to Python so the subunit Python module can be used later. commit ae5381d34c75918f7fa49654585d277bbfe66f49 Author: Jelmer Vernooij Date: Tue Mar 30 02:39:50 2010 +0200 format-subunit: Avoid printing backtrace on Ctrl-C. --- Summary of changes: lib/subunit/filters/subunit-filter | 105 ++ lib/subunit/filters/subunit-ls | 93 lib/subunit/filters/subunit-notify | 65 + lib/subunit/filters/subunit-stats| 41 ++ lib/subunit/filters/subunit-tags | 26 lib/subunit/filters/subunit2gtk | 259 ++ lib/subunit/filters/subunit2junitxml | 65 + lib/subunit/filters/subunit2pyunit | 48 +++ lib/subunit/perl/Makefile.PL.in | 20 +++ lib/subunit/perl/lib/Subunit.pm | 162 + lib/subunit/perl/lib/Subunit/Diff.pm | 85 +++ lib/subunit/perl/subunit-diff| 31 lib/subunit/update.sh|3 +- selftest/Subunit.pm | 29 +++- selftest/filter-subunit | 44 ++ selftest/filter-subunit.pl | 100 - selftest/format-subunit | 24 +++- selftest/selftest.pl |6 +- selftest/subunithelper.py| 164 - source3/Makefile.in |2 +- source4/selftest/config.mk |2 +- source4/selftest/knownfail | 86 ++-- 22 files changed, 1292 insertions(+), 168 deletions(-) create mode 100755 lib/subunit/filters/subunit-filter create mode 100755 lib/subunit/filters/subunit-ls create mode 100755 lib/subunit/filters/subunit-notify create mode 100755 lib/subunit/filters/subunit-stats create mode 100755 lib/subunit/filters/subunit-tags create mode 100755 lib/subunit/filters/subunit2gtk create mode 100755 lib/subunit/filters/subunit2junitxml create mode 100755 lib/subunit/filters/subunit2pyunit create mode 100755 lib/subunit/perl/Makefile.PL.in create mode 100644 lib/subunit/perl/lib/Subunit.pm create mode 100644 lib/subunit/perl/lib/Subunit/Diff.pm create mode 100755 lib/subunit/perl/subunit-diff create mode 100755 selftest/filter-subunit delete mode 100755 selftest/filter-subunit.pl Changeset truncated at 500 lines: diff --git a/lib/subunit/filters/subunit-filter b/lib/subunit/filters/subunit-filter new file mode 100755 index 000..c06a03a --- /dev/null +++ b/lib/subunit/filters/subunit-filter @@ -0,0 +1,105 @@ +#!/usr/bin/env python +# subunit: extensions to python unittest to get test results from subprocesses
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0cdc021... selftest: Remove diff-subunit - it's included in subunit and not necessary for normal operation. via c108a2e... format-subunit: Improve formatting, simplify code. via ef3fb75... selftest: Replace perl subunit formatter with python subunit formatter, so we can leverage the work happening in python-subunit. via 0c78368... selftest: Convert format-subunit to Python. from e14a6fb... Fix bug 7307 - man net usershare mistake http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0cdc021ba4cc0f400e6fbce173e0d17dee69ee64 Author: Jelmer Vernooij Date: Tue Mar 30 01:00:16 2010 +0200 selftest: Remove diff-subunit - it's included in subunit and not necessary for normal operation. commit c108a2e74e98e35c72d74a37d1b147396403925e Author: Jelmer Vernooij Date: Tue Mar 30 00:59:04 2010 +0200 format-subunit: Improve formatting, simplify code. commit ef3fb75261d1ce0d10da3e0c636c895aeb8b8441 Author: Jelmer Vernooij Date: Tue Mar 30 00:30:52 2010 +0200 selftest: Replace perl subunit formatter with python subunit formatter, so we can leverage the work happening in python-subunit. commit 0c78368a3108ad7437a20fac7e6da42ecf6f348a Author: Jelmer Vernooij Date: Mon Mar 29 22:25:25 2010 +0200 selftest: Convert format-subunit to Python. --- Summary of changes: selftest/Subunit/Diff.pm | 80 - selftest/diff-subunit.pl | 21 selftest/format-subunit| 267 selftest/output/plain.pm | 246 selftest/subunithelper.py | 169 source3/Makefile.in|2 +- source4/selftest/config.mk |2 +- 7 files changed, 364 insertions(+), 423 deletions(-) delete mode 100644 selftest/Subunit/Diff.pm delete mode 100755 selftest/diff-subunit.pl delete mode 100644 selftest/output/plain.pm create mode 100644 selftest/subunithelper.py Changeset truncated at 500 lines: diff --git a/selftest/Subunit/Diff.pm b/selftest/Subunit/Diff.pm deleted file mode 100644 index de251b3..000 --- a/selftest/Subunit/Diff.pm +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/perl -# Diff two subunit streams -# Copyright (C) Jelmer Vernooij -# Published under the GNU GPL, v3 or later - -package Subunit::Diff; - -use strict; - -use Subunit qw(parse_results); - -sub control_msg() { } -sub report_time($$) { } - -sub output_msg($$) -{ - my ($self, $msg) = @_; - - # No output for now, perhaps later diff this as well ? -} - -sub start_test($$) -{ - my ($self, $testname) = @_; -} - -sub end_test($) -{ - my ($self, $testname, $result, $unexpected, $reason) = @_; - - $self->{$testname} = $result; -} - -sub skip_testsuite($;$) { } -sub start_testsuite($;$) { } -sub end_testsuite($$;$) { } -sub testsuite_count($$) { } - -sub new { - my ($class) = @_; - - my $self = { - }; - bless($self, $class); -} - -sub from_file($) -{ - my ($path) = @_; - my $statistics = { - TESTS_UNEXPECTED_OK => 0, - TESTS_EXPECTED_OK => 0, - TESTS_UNEXPECTED_FAIL => 0, - TESTS_EXPECTED_FAIL => 0, - TESTS_ERROR => 0, - TESTS_SKIP => 0, - }; - - my $ret = new Subunit::Diff(); - open(IN, $path) or return; - parse_results($ret, $statistics, *IN); - close(IN); - return $ret; -} - -sub diff($$) -{ - my ($old, $new) = @_; - my $ret = {}; - - foreach my $testname (keys %$old) { - if ($new->{$testname} ne $old->{$testname}) { - $ret->{$testname} = [$old->{$testname}, $new->{$testname}]; - } - } - - return $ret; -} - -1; diff --git a/selftest/diff-subunit.pl b/selftest/diff-subunit.pl deleted file mode 100755 index fc80c37..000 --- a/selftest/diff-subunit.pl +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/perl -# Diff two subunit streams -# Copyright (C) Jelmer Vernooij -# Published under the GNU GPL, v3 or later - -use Getopt::Long; -use strict; -use FindBin qw($RealBin $Script); -use lib "$RealBin"; -use Subunit::Diff; - -my $old = Subunit::Diff::from_file($ARGV[0]); -my $new = Subunit::Diff::from_file($ARGV[1]); - -my $ret = Subunit::Diff::diff($old, $new); - -foreach my $e (sort(keys %$ret)) { - printf "%s: %s -> %s\n", $e, $ret->{$e}[0], $ret->{$e}[1]; -} - -0; diff --git a/selftest/format-subunit b/selftest/format-subunit index 2224b71..71fa018 100755 --- a/selftest/format-subunit +++ b/selftest/format-subunit @@ -1,77 +1,196 @@ -#!/usr/bin/perl +#!/usr/bin/env python +# vim: expandtab # Pretty-format subunit output -# Copyright (C
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a5e6b55... registry: Fix compilation. via 38fc9df... Revert reordering from commit 51bedf939568717424edd7732e1e315faa333849 via 2d67912... Revert "s4:registry - util.c - add harder checks for inputs on "reg_val_data_string"" via 16427ef... Revert "s4:registry - util.c - move the "REG_NONE" case in the conversion functions on top of the switch" via b1c70d4... Revert "s4:registry - util.c - treat unsupported and binary values as the same in the conversion functions" via cb670f3... Revert "s4:registry - adaptions for "add memory contexts for delete value/key functions"" via f8e67f198. Revert "s4:registry - "util" - make "reg_key_add_abs" consistent with "reg_key_del_abs"" via d90f1a7... Revert of commit 5b6ad54f43741c0c25b35e44cafe5fed352ff133 in registry.h via 541e294... Remove incorrect const, something that was correct in commit 9c3e6249fd984b823a77cab0514601d2a487920a via 3629798... Revert "s4:registry - "util" - remove "const" from "reg_abs_path"" from cac9981... s3:rpc_client: remove more unused code http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a5e6b5589b9d8498740a289dba2d56d3eb14af72 Author: Jelmer Vernooij Date: Mon Mar 29 18:43:38 2010 +0200 registry: Fix compilation. commit 38fc9dfdc6046e21cd8f0127e2cd88f72f81b3b3 Author: Wilco Baan Hofman Date: Sun Mar 28 17:07:09 2010 +0200 Revert reordering from commit 51bedf939568717424edd7732e1e315faa333849 Signed-off-by: Jelmer Vernooij commit 2d6791286b97236136de468ebf4173bd35336b6e Author: Wilco Baan Hofman Date: Sun Mar 28 17:03:08 2010 +0200 Revert "s4:registry - util.c - add harder checks for inputs on "reg_val_data_string"" This reverts commit eb8c8a0ecaa9bfd29f090db21fccdad7751767ae. Conflicts: source4/lib/registry/util.c Signed-off-by: Jelmer Vernooij commit 16427efb749d63b5a54b2b260ea8ac565f63a9e7 Author: Wilco Baan Hofman Date: Sun Mar 28 16:46:53 2010 +0200 Revert "s4:registry - util.c - move the "REG_NONE" case in the conversion functions on top of the switch" This reverts commit 4e6c0e1f6f37a7e04d10dbf7abbf626f52232aaf. Signed-off-by: Jelmer Vernooij commit b1c70d49c9f8e7fe3c9228e92db5e6ad3ad4 Author: Wilco Baan Hofman Date: Sun Mar 28 16:46:30 2010 +0200 Revert "s4:registry - util.c - treat unsupported and binary values as the same in the conversion functions" This reverts commit cc3eec1681bb6d614e688f51e48bd76f6d513e67. Conflicts: source4/lib/registry/util.c Signed-off-by: Jelmer Vernooij commit cb670f366cdc7d3dd457bd40fc37349c4484b54b Author: Wilco Baan Hofman Date: Sun Mar 28 16:30:43 2010 +0200 Revert "s4:registry - adaptions for "add memory contexts for delete value/key functions"" This reverts commit 43170dafbcbe7464bce9b4c6d76532d7d0bf5b9a. Conflicts: source4/lib/registry/dir.c source4/lib/registry/util.c Signed-off-by: Jelmer Vernooij commit f8e67f198ad6e42f7563390012f30fffe43b92f7 Author: Wilco Baan Hofman Date: Sun Mar 28 16:18:46 2010 +0200 Revert "s4:registry - "util" - make "reg_key_add_abs" consistent with "reg_key_del_abs"" This reverts commit 9d8592978e28c492d971a3b5a4c0133febc149ea. Conflicts: source4/lib/registry/util.c Signed-off-by: Jelmer Vernooij commit d90f1a7146385328dfd8e5245e7b1f83eb46e7e1 Author: Wilco Baan Hofman Date: Sun Mar 28 16:12:22 2010 +0200 Revert of commit 5b6ad54f43741c0c25b35e44cafe5fed352ff133 in registry.h Signed-off-by: Jelmer Vernooij commit 541e2942f8dcda970a8b83c7832ea5c09cb38fc8 Author: Wilco Baan Hofman Date: Sun Mar 28 16:03:12 2010 +0200 Remove incorrect const, something that was correct in commit 9c3e6249fd984b823a77cab0514601d2a487920a Signed-off-by: Jelmer Vernooij commit 3629798f72aa9126e115a8f38e0455245794f9c3 Author: Wilco Baan Hofman Date: Sun Mar 28 15:59:53 2010 +0200 Revert "s4:registry - "util" - remove "const" from "reg_abs_path"" This reverts commit 9c3e6249fd984b823a77cab0514601d2a487920a. Signed-off-by: Jelmer Vernooij --- Summary of changes: source4/lib/registry/patchfile.c |2 +- source4/lib/registry/pyregistry.c |2 +- source4/lib/registry/registry.h |3 +- source4/lib/registry/util.c | 88 4 f
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1ec2b2f... ldap.py: Fix syntax error. via 336cd5a... python: Fix rule for generating docs using pydoctor. via 082e7f2... subunit: Update to newer upstream version. via c873329... s4-python: Simplify mechanism for finding included Python modules. via 4bbc3ff... s4-python: Move dnspython to lib/, like the other Python modules via 89aa3b7... s4-python: Format to PEP8, simplify tests. from 87ad4e9... Make the smbta-util manpage xml create smbta-util.8 instead of smbta-tool.8 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1ec2b2f7f328abd0111f1dd871a032ea32f5e573 Author: Jelmer Vernooij Date: Mon Mar 29 18:05:03 2010 +0200 ldap.py: Fix syntax error. commit 336cd5a0a3d35b998b67efc975813ccc8482e6ee Author: Jelmer Vernooij Date: Mon Mar 29 17:35:20 2010 +0200 python: Fix rule for generating docs using pydoctor. commit 082e7f20d7df457c08119eb41fc2f3f8c09ba7ab Author: Jelmer Vernooij Date: Mon Mar 29 16:25:03 2010 +0200 subunit: Update to newer upstream version. commit c87332950043471e52b924f7498b63982ec4302c Author: Jelmer Vernooij Date: Mon Mar 29 16:21:26 2010 +0200 s4-python: Simplify mechanism for finding included Python modules. commit 4bbc3ff037026c72f3249f59c1b5af69a6ad6d69 Author: Jelmer Vernooij Date: Mon Mar 29 16:08:11 2010 +0200 s4-python: Move dnspython to lib/, like the other Python modules This also avoids it from being installed if it's already present on the system. commit 89aa3b766b926d19dac4805a7e72433e497ce872 Author: Jelmer Vernooij Date: Mon Mar 29 15:43:43 2010 +0200 s4-python: Format to PEP8, simplify tests. --- Summary of changes: lib/README |3 + .../samba_external => lib}/dnspython/ChangeLog |0 .../samba_external => lib}/dnspython/LICENSE |0 .../samba_external => lib}/dnspython/PKG-INFO |0 .../python/samba_external => lib}/dnspython/README |0 .../python/samba_external => lib}/dnspython/TODO |0 .../dnspython/dns/__init__.py |0 .../samba_external => lib}/dnspython/dns/dnssec.py |0 .../samba_external => lib}/dnspython/dns/e164.py |0 .../samba_external => lib}/dnspython/dns/edns.py |0 .../dnspython/dns/entropy.py |0 .../dnspython/dns/exception.py |0 .../samba_external => lib}/dnspython/dns/flags.py |0 .../samba_external => lib}/dnspython/dns/inet.py |0 .../samba_external => lib}/dnspython/dns/ipv4.py |0 .../samba_external => lib}/dnspython/dns/ipv6.py |0 .../dnspython/dns/message.py |0 .../samba_external => lib}/dnspython/dns/name.py |0 .../dnspython/dns/namedict.py |0 .../samba_external => lib}/dnspython/dns/node.py |0 .../samba_external => lib}/dnspython/dns/opcode.py |0 .../samba_external => lib}/dnspython/dns/query.py |0 .../samba_external => lib}/dnspython/dns/rcode.py |0 .../samba_external => lib}/dnspython/dns/rdata.py |0 .../dnspython/dns/rdataclass.py|0 .../dnspython/dns/rdataset.py |0 .../dnspython/dns/rdatatype.py |0 .../dnspython/dns/rdtypes/ANY/AFSDB.py |0 .../dnspython/dns/rdtypes/ANY/CERT.py |0 .../dnspython/dns/rdtypes/ANY/CNAME.py |0 .../dnspython/dns/rdtypes/ANY/DLV.py |0 .../dnspython/dns/rdtypes/ANY/DNAME.py |0 .../dnspython/dns/rdtypes/ANY/DNSKEY.py|0 .../dnspython/dns/rdtypes/ANY/DS.py|0 .../dnspython/dns/rdtypes/ANY/GPOS.py |0 .../dnspython/dns/rdtypes/ANY/HINFO.py |0 .../dnspython/dns/rdtypes/ANY/HIP.py |0 .../dnspython/dns/rdtypes/ANY/ISDN.py |0 .../dnspython/dns/rdtypes/ANY/KEY.py |0 .../dnspython/dns/rdtypes/ANY/LOC.py |0 .../dnspython/dns/rdtypes/ANY/MX.py|0 .../dnspython/dns/rdtypes/ANY/NS.py|0 .../dnspython/dns/rdtypes/ANY/NSEC.py |0 .../dnspython/dns/rdtypes/ANY/NSEC3.py |0 .../dnspython/dns/rdtypes/ANY/NSEC3PARAM.py|0 .../dnspython/dns/rdtypes/ANY/NXT.py |0 .../dnspython/dns/rdtypes/ANY/PTR.py |0 .../dnspython/dns/rdtypes/ANY/RP.py|0 .../dnspython/dns/rdtypes/ANY/RRSIG.py |0 .../dnspython/dns/rdtypes/ANY/RT.py|0 .../dnspython/dns/rdtypes/ANY/SIG.py
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ba74823... upgradeprovision: Fix formatting, syntax error. via d18d7cf... s4 upgradeprovision: add information about upgrade in oEMInformation to keep a better trace of different updates via 8d3ff2d... s4: allow upgrade provision to fix acl and missing dir on GPO dirs via ec48d36... provision: make gpo related function more reusable for upgradeprovision via 66375cf... provision: Remove unnecessary whitespace. via f4e3144... selftest: Update locations in README. via 45f389b... selftest: Remove unused BuildFarm output file (now using subunit) from 235cd3e... selftest: Remove html subunit formatter; it's too simple and really belongs in subunit or testrepository upstream. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ba74823c8f42dd3f4f0883163e42888ec35baf32 Author: Jelmer Vernooij Date: Sun Mar 28 22:58:36 2010 +0200 upgradeprovision: Fix formatting, syntax error. commit d18d7cfa27a3f2a088c8f3ea9de4f9d8d89fea38 Author: Matthieu Patou Date: Mon Mar 29 00:37:26 2010 +0400 s4 upgradeprovision: add information about upgrade in oEMInformation to keep a better trace of different updates Signed-off-by: Jelmer Vernooij commit 8d3ff2d41e9ffeb41d55613f645a72fbdda77861 Author: Matthieu Patou Date: Sun Mar 28 22:48:55 2010 +0400 s4: allow upgrade provision to fix acl and missing dir on GPO dirs Signed-off-by: Jelmer Vernooij commit ec48d3693de25d7210c926f27ac859cbf97ef428 Author: Matthieu Patou Date: Tue Feb 23 19:11:58 2010 +0300 provision: make gpo related function more reusable for upgradeprovision Signed-off-by: Jelmer Vernooij commit 66375cfba24fcf92122e83afeecaa14b9b2e3d2e Author: Jelmer Vernooij Date: Sun Mar 28 22:42:31 2010 +0200 provision: Remove unnecessary whitespace. commit f4e314457f5ec7857d59a52cb2318bea8e6f579e Author: Jelmer Vernooij Date: Sun Mar 28 22:42:11 2010 +0200 selftest: Update locations in README. commit 45f389b2538f4e1e45fad72142e11f0427a1eaf2 Author: Jelmer Vernooij Date: Sun Mar 28 21:56:09 2010 +0200 selftest: Remove unused BuildFarm output file (now using subunit) --- Summary of changes: selftest/BuildFarm.pm | 65 --- selftest/README |2 +- source4/scripting/bin/upgradeprovision | 39 +- source4/scripting/python/samba/provision.py | 112 +- 4 files changed, 93 insertions(+), 125 deletions(-) delete mode 100644 selftest/BuildFarm.pm Changeset truncated at 500 lines: diff --git a/selftest/BuildFarm.pm b/selftest/BuildFarm.pm deleted file mode 100644 index 80a91ac..000 --- a/selftest/BuildFarm.pm +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/perl -# Convenience functions for writing output expected by the buildfarm -# Copyright (C) 2009 Jelmer Vernooij -# Published under the GNU GPL, v3 or later - -package BuildFarm; - -use Exporter; -...@isa = qw(Exporter); -...@export_ok = qw(start_testsuite end_testsuite skip_testsuite summary); - -use strict; - -sub start_testsuite($$) -{ - my ($name, $duration) = @_; - my $out = ""; - - $out .= "--==--==--==--==--==--==--==--==--==--==--\n"; - $out .= "Running test $name (level 0 stdout)\n"; - $out .= "--==--==--==--==--==--==--==--==--==--==--\n"; - $out .= scalar(localtime())."\n"; - $out .= "SELFTEST RUNTIME: " . $duration . "s\n"; - $out .= "NAME: $name\n"; - - print $out; -} - -sub end_testsuite($) -{ - my ($name, $duration, $ok, $output, $reason) = @_; - my $out = ""; - - $out .= "TEST RUNTIME: " . $duration . "s\n"; - if ($ok) { - $out .= "ALL OK\n"; - } else { - $out .= "ERROR: $reason\n"; - } - $out .= "==\n"; - if ($ok) { - $out .= "TEST PASSED: $name\n"; - } else { - $out .= "TEST FAILED: $name (status $reason)\n"; - } - $out .= "==\n"; - - print $out; -} - -sub skip_testsuite($) -{ - my ($name) = @_; - - print "SKIPPED: $name\n"; -} - -sub summary($) -{ - my ($duration) = @_; - - print "DURATION: " . $duration . " seconds\n"; -} - -1; diff --git a/selftest/README b/selftest/README index 4ae0436..6a2c406 100644 --- a/selftest/README +++ b/selftest/README @@ -15,7 +15,7 @@ format-subunit.pl, which is used by default as part of "make test". Available testsuites =
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 235cd3e... selftest: Remove html subunit formatter; it's too simple and really belongs in subunit or testrepository upstream. via b607f99... Remove extension from format-subunit. from 9ecc308... s3: Slightly simplify unmap_unix_group http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 235cd3e5c462fd559f9ac58f6336e6a9de4b1000 Author: Jelmer Vernooij Date: Sun Mar 28 21:45:42 2010 +0200 selftest: Remove html subunit formatter; it's too simple and really belongs in subunit or testrepository upstream. commit b607f9968818811759ee744afeebab4880d2c5de Author: Jelmer Vernooij Date: Sun Mar 28 21:42:34 2010 +0200 Remove extension from format-subunit. --- Summary of changes: selftest/{format-subunit.pl => format-subunit} | 20 +-- selftest/output/html.pm| 366 selftest/output/testresults.css| 129 - source3/Makefile.in|4 +- source4/selftest/config.mk |4 +- 5 files changed, 5 insertions(+), 518 deletions(-) rename selftest/{format-subunit.pl => format-subunit} (67%) delete mode 100644 selftest/output/html.pm delete mode 100644 selftest/output/testresults.css Changeset truncated at 500 lines: diff --git a/selftest/format-subunit.pl b/selftest/format-subunit similarity index 67% rename from selftest/format-subunit.pl rename to selftest/format-subunit index 472f51a..2224b71 100755 --- a/selftest/format-subunit.pl +++ b/selftest/format-subunit @@ -7,7 +7,7 @@ =head1 NAME -format-subunit [--format=] [--immediate] < instream > outstream +format-subunit [--immediate] < instream > outstream =head1 SYNOPSIS @@ -21,10 +21,6 @@ Format the output of a subunit stream. Show errors as soon as they happen rather than at the end of the test run. -=item I<--format>=FORMAT - -Choose the format to print. Currently supported are plain or html. - =head1 LICENSE GNU General Public License, version 3 or later. @@ -41,7 +37,6 @@ use FindBin qw($RealBin $Script); use lib "$RealBin"; use Subunit qw(parse_results); -my $opt_format = "plain"; my $opt_help = undef; my $opt_verbose = 0; my $opt_immediate = 0; @@ -49,7 +44,6 @@ my $opt_prefix = "."; my $result = GetOptions ( 'help|h|?' => \$opt_help, - 'format=s' => \$opt_format, 'verbose' => \$opt_verbose, 'immediate' => \$opt_immediate, 'prefix:s' => \$opt_prefix, @@ -73,16 +67,8 @@ my $statistics = { TESTS_SKIP => 0, }; -if ($opt_format eq "plain") { - require output::plain; - $msg_ops = new output::plain("$opt_prefix/summary", $opt_verbose, $opt_immediate, $statistics, undef); -} elsif ($opt_format eq "html") { - require output::html; - mkdir("test-results", 0777); - $msg_ops = new output::html("test-results", $statistics); -} else { - die("Invalid output format '$opt_format'"); -} +require output::plain; +$msg_ops = new output::plain("$opt_prefix/summary", $opt_verbose, $opt_immediate, $statistics, undef); my $expected_ret = parse_results($msg_ops, $statistics, *STDIN); diff --git a/selftest/output/html.pm b/selftest/output/html.pm deleted file mode 100644 index 8e42b65..000 --- a/selftest/output/html.pm +++ /dev/null @@ -1,366 +0,0 @@ -#!/usr/bin/perl -# HTML output for selftest -# Copyright (C) 2008 Jelmer Vernooij -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -package output::html; -use Exporter; -...@isa = qw(Exporter); - -use strict; -use warnings; - -use FindBin qw($RealBin); -use lib "$RealBin/.."; - -sub new($$$) { - my ($class, $dirname, $statistics) = @_; - my $self = { - dirname => $dirname, - active_test => undef, - local_statistics => {}, - statistics => $statistics, - msg => "", -
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On 03/22/10 22:31, Matthias Dieter Wallnöfer wrote: diff --git a/source4/lib/registry/hive.c b/source4/lib/registry/hive.c index 8bf7c9f..c9cb247 100644 --- a/source4/lib/registry/hive.c +++ b/source4/lib/registry/hive.c @@ -91,9 +91,10 @@ _PUBLIC_ WERROR hive_key_add_name(TALLOC_CTX *ctx, desc, key); } -_PUBLIC_ WERROR hive_key_del(const struct hive_key *key, const char *name) +_PUBLIC_ WERROR hive_key_del(TALLOC_CTX *mem_ctx, const struct hive_key *key, +const char *name) { - return key->ops->del_key(key, name); + return key->ops->del_key(mem_ctx, key, name); } ^^^ Why does this need a memory context? The function isn't returning allocated memory in any way. Cheers, Jelmer
Re: [SCM] Samba Shared Repository - branch master updated
} + + name_dup = talloc_strdup(msg, name); + if (name_dup == NULL) { + talloc_free(msg); + return NULL; + } + + ret = ldb_msg_add_string(msg, "value", name_dup); + if (ret != LDB_SUCCESS) { + talloc_free(msg); + return NULL; + } switch (type) { case REG_SZ: case REG_EXPAND_SZ: if ((data.length> 0)&& (data.data != NULL) && (data.data[0] != '\0')) { - convert_string_talloc(mem_ctx, CH_UTF16, CH_UTF8, - (void *)data.data, - data.length, - (void **)&val.data,&val.length, false); - ldb_msg_add_value(msg, "data",&val, NULL); + struct ldb_val *val; + bool ret2; + + val = talloc_zero(msg, struct ldb_val); + if (val == NULL) { + talloc_free(msg); + return NULL; + } + + if (data.length % 2 == 0) { + /* The data is provided as UTF16 string */ + ret2 = convert_string_talloc(mem_ctx, CH_UTF16, CH_UTF8, +(void *)data.data, data.length, +(void **)&val->data,&val->length, +false); + if (!ret2) { + talloc_free(msg); + return NULL; + } ^^ This isn't necessarily true ? What if there is an uneven number of characters in a UTF-8 string? In that case the length of that string would be even. Cheers, Jelmer
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On 03/06/10 20:01, Matthias Dieter Wallnöfer wrote: diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 68639f5..12722c9 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -105,7 +107,8 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, switch (type) { case REG_SZ: case REG_EXPAND_SZ: - if (data.data[0] != '\0') { + if ((data.length> 0)&& (data.data != NULL) + && (data.data[0] != '\0')) { ^^^ Why this overparanoid check ? If data.length is invalid we've got bigger fish to fry. convert_string_talloc(mem_ctx, CH_UTF16, CH_UTF8, (void *)data.data, data.length, @@ -116,23 +119,27 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, } break; - case REG_BINARY: - if (data.length> 0) - ldb_msg_add_value(msg, "data",&data, NULL); - else + case REG_DWORD: + if ((data.length> 0)&& (data.data != NULL)) { ^^^ Again, why this overparanoid check? + ldb_msg_add_string(msg, "data", + talloc_asprintf(mem_ctx, "0x%x", + IVAL(data.data, 0))); + } else { ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL); + } break; - case REG_DWORD: - ldb_msg_add_string(msg, "data", - talloc_asprintf(mem_ctx, "0x%x", - IVAL(data.data, 0))); - break; + case REG_BINARY: default: - ldb_msg_add_value(msg, "data",&data, NULL); + if ((data.length> 0)&& (data.data != NULL) + && (data.data[0] != '\0')) { + ldb_msg_add_value(msg, "data",&data, NULL); + } else { + ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL); + } + break; } The delete doesn't seem right here - an empty value is not the same as no value at all. @@ -709,14 +718,27 @@ static WERROR ldb_set_value(struct hive_key *parent, } } - ret = ldb_add(kd->ldb, msg); - if (ret == LDB_ERR_ENTRY_ALREADY_EXISTS) { - int i; - for (i = 0; i< msg->num_elements; i++) { - if (msg->elements[i].flags != LDB_FLAG_MOD_DELETE) - msg->elements[i].flags = LDB_FLAG_MOD_REPLACE; + /* Try first a "modify" and if this doesn't work do try an "add" */ + for (i = 0; i< msg->num_elements; i++) { + if (msg->elements[i].flags != LDB_FLAG_MOD_DELETE) { + msg->elements[i].flags = LDB_FLAG_MOD_REPLACE; } - ret = ldb_modify(kd->ldb, msg); + } + ret = ldb_modify(kd->ldb, msg); + if (ret == LDB_ERR_NO_SUCH_OBJECT) { + i = 0; + while (i< msg->num_elements) { + if (msg->elements[i].flags == LDB_FLAG_MOD_DELETE) { + ldb_msg_remove_element(msg,&msg->elements[i]); + } else { + ++i; + } + } + ret = ldb_add(kd->ldb, msg); + } + if (ret == LDB_ERR_NO_SUCH_ATTRIBUTE) { + /* ignore this -> the value didn't exist and also now doesn't */ + ret = LDB_SUCCESS; } if (ret != LDB_SUCCESS) { Can you explain the reasoning behind this change? It doesn't seem quite right to ignore LDB_ERR_NO_SUCH_ATTRIBUTE. Why would that ever apply? Cheers, Jelmer
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 24d52dc... Fix the build, add filtered subunit runner. via 4e4e341... Add testrepository configuration. via 86e2b25... More formatting fixes, pointed out by pylint. from 719cecb... s4:RPC-NETLOGON: remove useless rpc callback http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 24d52dc362210328e16545830835361ac82432c4 Author: Jelmer Vernooij Date: Mon Mar 1 16:24:29 2010 +0100 Fix the build, add filtered subunit runner. commit 4e4e341c68473d92516a3e3c612153a792017bb9 Author: Jelmer Vernooij Date: Mon Mar 1 14:42:38 2010 +0100 Add testrepository configuration. commit 86e2b251861055d770327639808fddc84cdb0b56 Author: Jelmer Vernooij Date: Mon Mar 1 05:04:23 2010 +0100 More formatting fixes, pointed out by pylint. --- Summary of changes: .gitignore |1 + source4/.testr.conf|3 + source4/scripting/python/samba/__init__.py | 52 +++ source4/scripting/python/samba/misc.py | 12 ++-- source4/scripting/python/samba/ntacls.py | 10 ++-- source4/scripting/python/samba/provision.py|6 +- source4/scripting/python/samba/provisionbackend.py | 11 ++-- source4/scripting/python/samba/samdb.py|2 +- source4/scripting/python/samba/tests/provision.py |1 + source4/scripting/python/samba/upgradehelpers.py |1 - source4/selftest/config.mk |4 ++ 11 files changed, 59 insertions(+), 44 deletions(-) create mode 100644 source4/.testr.conf Changeset truncated at 500 lines: diff --git a/.gitignore b/.gitignore index b40c794..7f1a9be 100644 --- a/.gitignore +++ b/.gitignore @@ -412,3 +412,4 @@ docs-xml/Samba3-HOWTO/images/idmap-uid2sid.png docs-xml/Samba3-HOWTO/images/pdftoepsonusb.png docs-xml/Samba3-HOWTO/images/pdftosocket.png docs-xml/Samba3-HOWTO/images/trusts1.png +source4/.testrepository diff --git a/source4/.testr.conf b/source4/.testr.conf new file mode 100644 index 000..0ddb369 --- /dev/null +++ b/source4/.testr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_command=make test-subunit-filtered TESTS="$IDLIST" +test_id_list_default= diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 776c274..9cc224b 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -145,17 +145,20 @@ class Ldb(ldb.Ldb): try: res = self.search(base=dn, scope=ldb.SCOPE_SUBTREE, attrs=[], expression="(|(objectclass=user)(objectclass=computer))") -except ldb.LdbError, (ldb.ERR_NO_SUCH_OBJECT, _): -# Ignore no such object errors -return -pass +except ldb.LdbError, (errno, _): +if errno == ldb.ERR_NO_SUCH_OBJECT: +# Ignore no such object errors +return +else: +raise try: for msg in res: self.delete(msg.dn) -except ldb.LdbError, (ldb.ERR_NO_SUCH_OBJECT, _): -# Ignore no such object errors -return +except ldb.LdbError, (errno, _): +if errno != ldb.ERR_NO_SUCH_OBJECT: +# Ignore no such object errors +raise def erase_except_schema_controlled(self): """Erase this ldb, removing all records, except those that are controlled by Samba4's schema.""" @@ -171,9 +174,10 @@ class Ldb(ldb.Ldb): [], controls=["show_deleted:0"]): try: self.delete(msg.dn) -except ldb.LdbError, (ldb.ERR_NO_SUCH_OBJECT, _): -# Ignore no such object errors -pass +except ldb.LdbError, (errno, _): +if errno != ldb.ERR_NO_SUCH_OBJECT: +# Ignore no such object errors +raise res = self.search(basedn, ldb.SCOPE_SUBTREE, "(&(|(objectclass=*)(distinguishedName=*))(!(distinguishedna...@baseinfo)))", @@ -185,9 +189,10 @@ class Ldb(ldb.Ldb): "@OPTIONS", "@PARTITION", "@KLUDGEACL"]: try: self.delete(attr) -except ldb.LdbError, (ldb.ERR_NO_SUCH_OBJECT, _): -# Ignore missing dn errors -pass +except ldb.LdbError, (errno, _): +if errno != ldb.ERR_NO_SUCH_OBJECT: +# Ignore missing dn errors +raise def erase(self): """Erase this ldb, removing a
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8448ece... python: Add 'make pylint' convenience rule. via 31a718a... General cleanups of python code, hinted by pyflakes. via 1ef50d5... Add 'pyflakes' rule. from 6d9c072... ntacl: Use existing infrastructure. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8448ece9de85f0776513d03cc7542c3b2f30f4b4 Author: Jelmer Vernooij Date: Mon Mar 1 04:56:42 2010 +0100 python: Add 'make pylint' convenience rule. commit 31a718aa27bcf3f56347a109f6d0bb553814c052 Author: Jelmer Vernooij Date: Mon Mar 1 04:46:40 2010 +0100 General cleanups of python code, hinted by pyflakes. commit 1ef50d5de4e1341703a35200e4c90ec4fba0ce89 Author: Jelmer Vernooij Date: Mon Mar 1 04:45:43 2010 +0100 Add 'pyflakes' rule. --- Summary of changes: source4/scripting/python/config.mk | 10 + source4/scripting/python/samba/__init__.py |2 +- source4/scripting/python/samba/netcmd/newuser.py |2 +- .../scripting/python/samba/netcmd/pwsettings.py|3 - source4/scripting/python/samba/ntacls.py | 227 ++-- source4/scripting/python/samba/provision.py|5 +- source4/scripting/python/samba/provisionbackend.py | 12 +- source4/scripting/python/samba/schema.py |2 +- source4/scripting/python/samba/tests/dcerpc/sam.py |1 + source4/scripting/python/samba/tests/provision.py |2 - source4/scripting/python/samba/tests/samba3.py | 11 +- source4/scripting/python/samba/tests/samdb.py |4 - source4/scripting/python/samba/tests/upgrade.py|1 - .../scripting/python/samba/torture/torture_samr.py |1 - source4/scripting/python/samba/upgradehelpers.py |3 +- 15 files changed, 134 insertions(+), 152 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk index 390f6c8..c1e1c5d 100644 --- a/source4/scripting/python/config.mk +++ b/source4/scripting/python/config.mk @@ -33,3 +33,13 @@ epydoc:: pythonmods PYTHONPATH=$(pythonbuilddir):../lib/subunit/python epydoc $(EPYDOC_OPTIONS) samba tdb ldb subunit testtools install:: installpython + +PYFLAKES = pyflakes + +pyflakes:: + $(PYFLAKES) $(pyscriptsrcdir)/samba + +PYLINT = pylint + +pylint:: pythonmods + PYTHONPATH=$(pyscriptsrcdir) $(PYLINT) -f parseable samba diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 5c36673..776c274 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -100,7 +100,7 @@ class Ldb(ldb.Ldb): # Allow admins to force non-sync ldb for all databases if lp is not None: nosync_p = lp.get("nosync", "ldb") -if nosync_p is not None and nosync_p == true: +if nosync_p is not None and nosync_p == True: flags |= FLG_NOSYNC self.set_create_perms() diff --git a/source4/scripting/python/samba/netcmd/newuser.py b/source4/scripting/python/samba/netcmd/newuser.py index 651313a..6f12de5 100644 --- a/source4/scripting/python/samba/netcmd/newuser.py +++ b/source4/scripting/python/samba/netcmd/newuser.py @@ -20,7 +20,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import samba.getopt as options -from samba.netcmd import Command, CommandError, Option +from samba.netcmd import Command, Option from getpass import getpass from samba.auth import system_session diff --git a/source4/scripting/python/samba/netcmd/pwsettings.py b/source4/scripting/python/samba/netcmd/pwsettings.py index 30f6f20..50525cc 100644 --- a/source4/scripting/python/samba/netcmd/pwsettings.py +++ b/source4/scripting/python/samba/netcmd/pwsettings.py @@ -22,10 +22,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import sys - import samba.getopt as options -import optparse import ldb from samba.auth import system_session diff --git a/source4/scripting/python/samba/ntacls.py b/source4/scripting/python/samba/ntacls.py index 66af5d5..ad2156a 100644 --- a/source4/scripting/python/samba/ntacls.py +++ b/source4/scripting/python/samba/ntacls.py @@ -19,139 +19,134 @@ # import os -import tdb import samba.xattr_native, samba.xattr_tdb from samba.dcerpc import security, xattr from samba.ndr import ndr_pack, ndr_unpack + class XattrBackendError(Exception): """A generic xattr backend error.""" def checkset_backend(lp,backend,eadbfile): - if backend != None: - if backend == "native": - lp.set("posix:eadb","") -
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6d9c072... ntacl: Use existing infrastructure. from da96d3f... Remove __contains__ from mock object for consistency with actual implementation. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6d9c0724a6dbc8afc736e64a11d4aed0de5776f5 Author: Jelmer Vernooij Date: Mon Mar 1 04:39:53 2010 +0100 ntacl: Use existing infrastructure. --- Summary of changes: source4/scripting/python/samba/netcmd/__init__.py |2 +- source4/scripting/python/samba/netcmd/ntacl.py| 52 ++-- 2 files changed, 27 insertions(+), 27 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py index 09c8cc3..df0154e 100644 --- a/source4/scripting/python/samba/netcmd/__init__.py +++ b/source4/scripting/python/samba/netcmd/__init__.py @@ -18,7 +18,7 @@ # import optparse -from samba import getopt as options, Ldb +from samba import getopt as options import sys diff --git a/source4/scripting/python/samba/netcmd/ntacl.py b/source4/scripting/python/samba/netcmd/ntacl.py index 8c0803f..9b25ca2 100644 --- a/source4/scripting/python/samba/netcmd/ntacl.py +++ b/source4/scripting/python/samba/netcmd/ntacl.py @@ -26,15 +26,13 @@ from samba import Ldb from samba.ndr import ndr_unpack from ldb import SCOPE_BASE -import ldb import os -import sys from samba.auth import system_session from samba.netcmd import ( Command, - SuperCommand, CommandError, +SuperCommand, Option, ) @@ -53,31 +51,33 @@ class cmd_acl_set(Command): Option("--xattr-backend", type="choice", help="xattr backend type (native fs or tdb)", choices=["native","tdb"]), Option("--eadb-file", help="Name of the tdb file where attributes are stored", type="string"), - ] +] takes_args = ["acl","file"] def run(self, acl, file, quiet=False,xattr_backend=None,eadb_file=None, credopts=None, sambaopts=None, versionopts=None): - lp = sambaopts.get_loadparm() - creds = credopts.get_credentials(lp) - path = os.path.join(lp.get("private dir"), lp.get("secrets database") or "secrets.ldb") - creds = credopts.get_credentials(lp) - creds.set_kerberos_state(DONT_USE_KERBEROS) - try: - ldb = Ldb(path, session_info=system_session(), credentials=creds,lp=lp) - except: - print "Unable to read domain SID from configuration files" - sys.exit(1) - attrs = ["objectSid"] - print lp.get("realm") - res = ldb.search(expression="(objectClass=*)",base="flatname=%s,cn=Primary Domains"%lp.get("workgroup"), scope=SCOPE_BASE, attrs=attrs) - if len(res) !=0: - domainsid = ndr_unpack( security.dom_sid,res[0]["objectSid"][0]) - setntacl(lp,file,acl,str(domainsid),xattr_backend,eadb_file) - else: - print "Unable to read domain SID from configuration files" - sys.exit(1) +lp = sambaopts.get_loadparm() +creds = credopts.get_credentials(lp) +path = os.path.join(lp.get("private dir"), lp.get("secrets database") or "secrets.ldb") +creds = credopts.get_credentials(lp) +creds.set_kerberos_state(DONT_USE_KERBEROS) +try: +ldb = Ldb(path, session_info=system_session(), credentials=creds,lp=lp) +except: +# XXX: Should catch a particular exception type +raise CommandError("Unable to read domain SID from configuration files") +attrs = ["objectSid"] +print lp.get("realm") +res = ldb.search(expression="(objectClass=*)", +base="flatname=%s,cn=Primary Domains" % lp.get("workgroup"), +scope=SCOPE_BASE, attrs=attrs) +if len(res) !=0: +domainsid = ndr_unpack(security.dom_sid, res[0]["objectSid"][0]) +setntacl(lp, file, acl, str(domainsid), xattr_backend, eadb_file) +else: +raise CommandError("Unable to read domain SID from configuration files") + class cmd_acl_get(Command): """Set ACLs on a file""" @@ -98,13 +98,13 @@ class cmd_acl_get(Command): takes_args = ["file"] -def run(self
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via da96d3f... Remove __contains__ from mock object for consistency with actual implementation. via e490410... getntacl: Remove manpage for removed utility. via 8edab1b... Fix SharesContainer.__len__. from 20e1d5a... More formatting fixes. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit da96d3fdba8dd317d931d36d101d956e829c07d8 Author: Jelmer Vernooij Date: Mon Mar 1 03:46:56 2010 +0100 Remove __contains__ from mock object for consistency with actual implementation. commit e49041065f1a91ba49667c32964866538b77dad7 Author: Jelmer Vernooij Date: Mon Feb 8 03:26:18 2010 +0100 getntacl: Remove manpage for removed utility. commit 8edab1b96c47e75b2f2c61739f9283fa2ecf5cfe Author: Ricardo Jorge Date: Mon Feb 8 01:13:48 2010 +0100 Fix SharesContainer.__len__. Signed-off-by: Jelmer Vernooij --- Summary of changes: source4/scripting/python/samba/shares.py |2 +- source4/scripting/python/samba/tests/shares.py |3 -- source4/utils/man/getntacl.1.xml | 45 3 files changed, 1 insertions(+), 49 deletions(-) delete mode 100644 source4/utils/man/getntacl.1.xml Changeset truncated at 500 lines: diff --git a/source4/scripting/python/samba/shares.py b/source4/scripting/python/samba/shares.py index 89a312e..b6ddeb3 100644 --- a/source4/scripting/python/samba/shares.py +++ b/source4/scripting/python/samba/shares.py @@ -37,7 +37,7 @@ class SharesContainer(object): return Share(self._lp[name]) def __len__(self): -if "global" in self._lp: +if "global" in self._lp.services(): return len(self._lp)-1 return len(self._lp) diff --git a/source4/scripting/python/samba/tests/shares.py b/source4/scripting/python/samba/tests/shares.py index 9130c36..160e3cf 100644 --- a/source4/scripting/python/samba/tests/shares.py +++ b/source4/scripting/python/samba/tests/shares.py @@ -37,9 +37,6 @@ class MockLoadParm(object): def __getitem__(self, name): return MockService(self.data[name]) -def __contains__(self, name): -return name in self.data - def __len__(self): return len(self.data) diff --git a/source4/utils/man/getntacl.1.xml b/source4/utils/man/getntacl.1.xml deleted file mode 100644 index cbce5f2..000 --- a/source4/utils/man/getntacl.1.xml +++ /dev/null @@ -1,45 +0,0 @@ - -http://www.samba.org/samba/DTD/samba-doc";> - - - - getntacl - 1 - - - - - getntacl - Tool for displaying NT ACLs stored in extended attributes - - - - - getntacl - filename - - - - - DESCRIPTION - - Retrieves the NT security ACL on the specified file, as -stored in the filesystems' extended attribute. - - - - VERSION - - This man page is correct for version 4.0 of the Samba suite. - - - - AUTHOR - - This utility is part of the http://www.samba.org/";>Samba suite, which is developed by the global http://www.samba.org/samba/team/";>Samba Team. - - This manpage was written by Jelmer Vernooij. - - - - -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 20e1d5a... More formatting fixes. via 44c2d69... Fix formatting. via 93d3774... upgradeprovision: Remove unused imports, use shutil.rmtree rather than rmall. via 254e007... upgradeprovision: Move to pythondoc format via 8f1f50d... upgradeprovision: Allow script to be called with pydoc via 2bc3631... upgrade provision: change the meaning of handle_security_desc to be similar to handle_special_case via 5054bdb... upgradeprovision: code cleanup via 3bd1641... upgradeprovision: split the big script to put reusable functions appart from 2238260... s3: Use talloc_tos() in yield_connection() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 20e1d5a72e8a7d8b3334f6f79bf586cedaa96431 Author: Jelmer Vernooij Date: Mon Mar 1 03:41:52 2010 +0100 More formatting fixes. commit 44c2d696bdcb8fecdce8120c7e3ecff1b12ad976 Author: Jelmer Vernooij Date: Mon Mar 1 03:29:47 2010 +0100 Fix formatting. commit 93d377424a0236ad5b1c58973f597ce69e123239 Author: Jelmer Vernooij Date: Mon Mar 1 03:25:07 2010 +0100 upgradeprovision: Remove unused imports, use shutil.rmtree rather than rmall. commit 254e007bd99ebbd351e78b634c483d604ebdcefc Author: Matthieu Patou Date: Sun Feb 21 21:29:36 2010 +0300 upgradeprovision: Move to pythondoc format Signed-off-by: Jelmer Vernooij commit 8f1f50daa5963d336f7505a2605e1008edf3ce29 Author: Matthieu Patou Date: Sun Feb 21 21:28:35 2010 +0300 upgradeprovision: Allow script to be called with pydoc Signed-off-by: Jelmer Vernooij commit 2bc3631db8546a44fb2bb29db8e380ea15c6441a Author: Matthieu Patou Date: Sat Feb 20 10:51:25 2010 +0300 upgrade provision: change the meaning of handle_security_desc to be similar to handle_special_case Signed-off-by: Jelmer Vernooij commit 5054bdb4f2008216f4591be9064002c3750474e4 Author: Matthieu Patou Date: Tue Feb 23 16:45:51 2010 +0300 upgradeprovision: code cleanup Signed-off-by: Jelmer Vernooij commit 3bd16415d29d074c7a8f9bf949a35b7e8f8b61a2 Author: Matthieu Patou Date: Sun Jan 31 22:06:01 2010 +0300 upgradeprovision: split the big script to put reusable functions appart Signed-off-by: Jelmer Vernooij --- Summary of changes: source4/scripting/bin/upgradeprovision | 1637 +++--- source4/scripting/python/samba/upgradehelpers.py | 222 +++ 2 files changed, 1029 insertions(+), 830 deletions(-) create mode 100755 source4/scripting/python/samba/upgradehelpers.py Changeset truncated at 500 lines: diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision index 1d58f5e..180786a 100755 --- a/source4/scripting/bin/upgradeprovision +++ b/source4/scripting/bin/upgradeprovision @@ -1,4 +1,5 @@ #!/usr/bin/python +# vim: expandtab # # Copyright (C) Matthieu Patou 2009 # @@ -21,90 +22,86 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. -import getopt import shutil import optparse import os import sys -import random -import string -import re -import base64 import tempfile -# Find right directory when running from source tree +# Allow to run from s4 source directory (without installing samba) sys.path.insert(0, "bin/python") -from base64 import b64encode - import samba +import samba.getopt as options from samba.credentials import DONT_USE_KERBEROS from samba.auth import system_session, admin_session -from samba import Ldb, DS_DOMAIN_FUNCTION_2000, DS_DOMAIN_FUNCTION_2003, DS_DOMAIN_FUNCTION_2008, DS_DC_FUNCTION_2008_R2 -from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError -import ldb -import samba.getopt as options -from samba.samdb import SamDB +from samba import Ldb +from ldb import SCOPE_SUBTREE, SCOPE_BASE, \ +FLAG_MOD_REPLACE, FLAG_MOD_ADD, FLAG_MOD_DELETE,\ +MessageElement, Message, Dn from samba import param from samba import glue from samba.misc import messageEltFlagToString -from samba.provision import ProvisionNames,provision_paths_from_lp,find_setup_dir,FILL_FULL,provision, get_domain_descriptor, get_config_descriptor, secretsdb_self_join +from samba.provision import find_setup_dir, get_domain_descriptor, get_config_descriptor, secretsdb_self_join from samba.provisionexceptions import ProvisioningError -from samba.schema import get_dnsyntax_attributes, get_linked_attributes, Schema, get_schema_descriptor -from samba.dcerpc import misc, security -from samba.ndr import ndr_pack, ndr_unpack +from samba.schema import get_linked_attributes, Schema, get_schema_descriptor +from samba.dcerpc import security +from samba.ndr import ndr_unpack from samba.dcerpc.misc import SEC_CHAN_BDC +from samba.upgradehelper
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via bb83ffd... net: Fix python 2.4 compatibility. from e00e6a2... s3: Simplify the code a bit: Catch (len==0) early http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit bb83ffdc21a05e7b1d47e34400a466aa1ba88793 Author: Jelmer Vernooij Date: Wed Feb 3 23:55:58 2010 +0100 net: Fix python 2.4 compatibility. --- Summary of changes: source4/utils/net/net.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c index 2d45a4b..3709b0a 100644 --- a/source4/utils/net/net.c +++ b/source4/utils/net/net.c @@ -52,6 +52,11 @@ #include "auth/credentials/credentials.h" #include "scripting/python/modules.h" +/* There's no Py_ssize_t in 2.4, apparently */ +#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5 +typedef int Py_ssize_t; +#endif + static PyObject *py_tuple_from_argv(int argc, const char *argv[]) { PyObject *l; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4291e28... s4-python: Fix formatting. via 0b7910b... upgrade_from_s3: Remove unused imports. via 8562bbd... pyxattr: Move to the same directory as the xattr code. from b35dcd7... s4 includes: Include system/locale.h to get access to http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4291e28a938695593dd90a30d3c2e49defba3e8b Author: Jelmer Vernooij Date: Mon Jan 25 15:17:56 2010 +0100 s4-python: Fix formatting. commit 0b7910b8bf32ba983d1b8e35d3eef8a73d7dd1e6 Author: Jelmer Vernooij Date: Fri Jan 22 12:05:18 2010 +1300 upgrade_from_s3: Remove unused imports. commit 8562bbdce5fd2711f527c3922b684f651f68c7f7 Author: Jelmer Vernooij Date: Fri Jan 22 12:02:51 2010 +1300 pyxattr: Move to the same directory as the xattr code. --- Summary of changes: source4/ntvfs/posix/config.mk | 11 + .../posix}/python/pyxattr_native.c |0 .../posix}/python/pyxattr_tdb.c|0 source4/scripting/python/config.mk | 21 -- source4/scripting/python/samba/provision.py| 41 +--- source4/scripting/python/samba/provisionbackend.py | 13 +++--- source4/scripting/python/samba/upgrade.py |6 +- source4/setup/upgrade_from_s3 |2 - 8 files changed, 38 insertions(+), 56 deletions(-) rename source4/{scripting => ntvfs/posix}/python/pyxattr_native.c (100%) rename source4/{scripting => ntvfs/posix}/python/pyxattr_tdb.c (100%) Changeset truncated at 500 lines: diff --git a/source4/ntvfs/posix/config.mk b/source4/ntvfs/posix/config.mk index 1aaef3f..bf8b573 100644 --- a/source4/ntvfs/posix/config.mk +++ b/source4/ntvfs/posix/config.mk @@ -77,3 +77,14 @@ ntvfs_posix_OBJ_FILES = $(addprefix $(ntvfssrcdir)/posix/, \ $(eval $(call proto_header_template,$(ntvfssrcdir)/posix/vfs_posix_proto.h,$(ntvfs_posix_OBJ_FILES:.o=.c))) +[PYTHON::python_xattr_native] +LIBRARY_REALNAME = samba/xattr_native.$(SHLIBEXT) +PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS python_dcerpc_security pyparam_util WRAP_XATTR + +python_xattr_native_OBJ_FILES = $(ntvfssrcdir)/posix/python/pyxattr_native.o + +[PYTHON::python_xattr_tdb] +LIBRARY_REALNAME = samba/xattr_tdb.$(SHLIBEXT) +PRIVATE_DEPENDENCIES = LIBNDR LIBLDB python_dcerpc_security pyparam_util share + +python_xattr_tdb_OBJ_FILES = $(ntvfssrcdir)/posix/python/pyxattr_tdb.o $(ntvfssrcdir)/posix/xattr_tdb.o diff --git a/source4/scripting/python/pyxattr_native.c b/source4/ntvfs/posix/python/pyxattr_native.c similarity index 100% rename from source4/scripting/python/pyxattr_native.c rename to source4/ntvfs/posix/python/pyxattr_native.c diff --git a/source4/scripting/python/pyxattr_tdb.c b/source4/ntvfs/posix/python/pyxattr_tdb.c similarity index 100% rename from source4/scripting/python/pyxattr_tdb.c rename to source4/ntvfs/posix/python/pyxattr_tdb.c diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk index 2aae592..3d255de 100644 --- a/source4/scripting/python/config.mk +++ b/source4/scripting/python/config.mk @@ -23,27 +23,6 @@ python_glue_OBJ_FILES = $(pyscriptsrcdir)/pyglue.o $(python_glue_OBJ_FILES): CFLAGS+=-I$(ldbsrcdir) -[PYTHON::python_xattr_native] -LIBRARY_REALNAME = samba/xattr_native.$(SHLIBEXT) -PRIVATE_DEPENDENCIES = LIBNDR LIBLDB SAMDB CREDENTIALS python_dcerpc_security pyparam_util WRAP_XATTR - -python_xattr_native_OBJ_FILES = $(pyscriptsrcdir)/pyxattr_native.o - -$(python_xattr_native_OBJ_FILES): CFLAGS+=-I$(ldbsrcdir) - -#ntvfs_common pvfs_acl -#$(ntvfs_posix_OBJ_FILES) -[PYTHON::python_xattr_tdb] -LIBRARY_REALNAME = samba/xattr_tdb.$(SHLIBEXT) -PRIVATE_DEPENDENCIES = LIBNDR LIBLDB python_dcerpc_security pyparam_util share -#dcerpc_server - -python_xattr_tdb_OBJ_FILES = $(pyscriptsrcdir)/pyxattr_tdb.o $(ntvfssrcdir)/posix/xattr_tdb.o -#{$(ntvfssrcdir)/ntvfs_interface.o -#$(ntvfs_posix_OBJ_FILES) - -$(python_xattr_tdb_OBJ_FILES): CFLAGS+=-I$(ldbsrcdir) - _PY_FILES = $(shell find $(pyscriptsrcdir)/samba ../lib/subunit/python -name "*.py") $(eval $(foreach pyfile, $(_PY_FILES),$(call python_py_module_template,$(patsubst $(pyscriptsrcdir)/%,%,$(subst ../lib/subunit/python,,$(pyfile))),$(pyfile diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 036890d..58c172f 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -27,36 +27,31 @@ from base64 import b64encode import os -import sys import pwd import grp import time -import uuid, glue +import uuid import socket import param import registry -import samba -import subprocess -import ldb +import urllib +import ldb -from auth impor
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9ddeac1... pyxattr: Factor out helper functions. via 17d6f56... selftest: Cope with 'multipart' support in subunit. via 8b0f319... pyxattr: Simplify tests. via 05b4e29... pyxattr: Fix tests by not opening tdb files multiple times. via 14b0fed... pyxattr: Fix tests by avoiding opening tdb files multiple times. via 253a232... pyxattr: Fix memory leaks. via 9a25380... pyxattr: Simplify tests. via 7092e22... pyxattr: Fix return value, raise exception, fix memory leak. via 342aff7... pyxattr: Use standard functions for error handling. via 6afb162... pyxattr: Remove unnecessary hacks. via f679def... s4: Fix a few warnings. via 4b11e0c... pidl: Include Python.h first, to avoid warnings. via c42242d... s4: Include Python.h early to avoid double definition errors. from e8a99ac... s3: fix dnsupdate configure check http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9ddeac17f58273730be605a1f08097a15a3204d1 Author: Jelmer Vernooij Date: Thu Jan 21 17:17:02 2010 +1300 pyxattr: Factor out helper functions. commit 17d6f56646b79ba1acecab6eb661cb6205c9b408 Author: Jelmer Vernooij Date: Thu Jan 21 17:16:19 2010 +1300 selftest: Cope with 'multipart' support in subunit. commit 8b0f31994c38b9f349fdda88a74e95a961582902 Author: Jelmer Vernooij Date: Thu Jan 21 16:56:23 2010 +1300 pyxattr: Simplify tests. commit 05b4e29f7f35108a7a17f072dc1329fc14d6b9ea Author: Jelmer Vernooij Date: Thu Jan 21 16:45:06 2010 +1300 pyxattr: Fix tests by not opening tdb files multiple times. commit 14b0fed96c5d5acf9118156d29e469aed584c33d Author: Jelmer Vernooij Date: Thu Jan 21 16:44:20 2010 +1300 pyxattr: Fix tests by avoiding opening tdb files multiple times. commit 253a232d300ac6a5089836eb6d0235d48722 Author: Jelmer Vernooij Date: Thu Jan 21 16:44:12 2010 +1300 pyxattr: Fix memory leaks. commit 9a253808383e1a2777c3c05a25be88ed25c51a13 Author: Jelmer Vernooij Date: Thu Jan 21 16:41:30 2010 +1300 pyxattr: Simplify tests. commit 7092e220b57867c35425f17d09c4cc1031932eda Author: Jelmer Vernooij Date: Thu Jan 21 16:29:15 2010 +1300 pyxattr: Fix return value, raise exception, fix memory leak. commit 342aff75c5400ef6be855094e2fe42f444cc40de Author: Jelmer Vernooij Date: Thu Jan 21 16:28:24 2010 +1300 pyxattr: Use standard functions for error handling. commit 6afb16253399a58ac06b0061cd7ceb112bcd172b Author: Jelmer Vernooij Date: Thu Jan 21 16:18:19 2010 +1300 pyxattr: Remove unnecessary hacks. commit f679def4f2c4d878c8fac49ea248cfadb665168c Author: Jelmer Vernooij Date: Wed Jan 20 16:27:38 2010 +1300 s4: Fix a few warnings. commit 4b11e0c67cbd611b7f295256f0aa6c55a8b88699 Author: Jelmer Vernooij Date: Wed Jan 20 16:27:15 2010 +1300 pidl: Include Python.h first, to avoid warnings. commit c42242d132144fbbdce97bd95f0e24bdf58a2c84 Author: Jelmer Vernooij Date: Wed Jan 20 15:07:09 2010 +1300 s4: Include Python.h early to avoid double definition errors. --- Summary of changes: lib/talloc/pytalloc.c |1 + pidl/lib/Parse/Pidl/Samba4/Python.pm |2 +- selftest/Subunit.pm |2 +- source4/auth/pyauth.c |1 + source4/lib/ldb/tools/cmdline.c |2 + source4/lib/stream/packet.h |1 + source4/librpc/ndr/py_xattr.c |9 +- source4/param/provision.c |2 +- source4/scripting/python/pyxattr_native.c | 48 +++- source4/scripting/python/pyxattr_tdb.c| 54 - source4/scripting/python/samba/tests/xattr.py | 160 +++-- source4/torture/rpc/samba3rpc.c |1 - source4/torture/smb2/acls.c |4 +- source4/utils/net/net.c |2 +- 14 files changed, 130 insertions(+), 159 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c index c6decf3..ad595a1 100644 --- a/lib/talloc/pytalloc.c +++ b/lib/talloc/pytalloc.c @@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include #include "replace.h" #include #include diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 79c72d7..015c54d 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -1124,8 +1124,8 @@ sub Parse($) $self->pidl_hdr(" /* Python wrapper functions auto-generated by pidl */ -#include \"includes.h\" #include +#include \"includes.h\" #include \"librpc/
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 18943bb... selftest: Use SUBUNIT_FORMATTER command, if set in the environment. from 8067bf6... Fix unintentional free of the last value when adding a new value to a key. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 18943bba9c927578201b67e2384568b9789e7c5c Author: Jelmer Vernooij Date: Wed Jan 20 11:05:04 2010 +1300 selftest: Use SUBUNIT_FORMATTER command, if set in the environment. --- Summary of changes: source4/selftest/config.mk | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/selftest/config.mk b/source4/selftest/config.mk index 2804b73..9e2896e 100644 --- a/source4/selftest/config.mk +++ b/source4/selftest/config.mk @@ -16,15 +16,15 @@ ST_DONE_TEST = @test -f $(selftest_prefix)/st_done || { echo "SELFTEST FAILED"; SELFTEST_NOSLOW_OPTS = --exclude=$(srcdir)/selftest/slow SELFTEST_QUICK_OPTS = $(SELFTEST_NOSLOW_OPTS) --quick --include=$(srcdir)/selftest/quick FILTER_XFAIL = $(PERL) $(selftestdir)/filter-subunit.pl --expected-failures=$(srcdir)/selftest/knownfail -FORMAT_TEST = $(PERL) $(selftestdir)/format-subunit.pl --prefix=${selftest_prefix} --format=$(TEST_FORMAT) -FORMAT_TEST_OUTPUT = $(FILTER_XFAIL) | $(FORMAT_TEST) +SUBUNIT_FORMATTER ?= $(PERL) $(selftestdir)/format-subunit.pl --prefix=${selftest_prefix} --format=$(TEST_FORMAT) --immediate +FORMAT_TEST_OUTPUT = $(FILTER_XFAIL) | $(SUBUNIT_FORMATTER) test-subunit:: everything $(ST_RM) $(SELFTEST) --socket-wrapper $(TESTS) $(ST_TOUCH) $(ST_DONE_TEST) slowtest:: everything - $(ST_RM) $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate + $(ST_RM) $(SELFTEST) $(DEFAULT_TEST_OPTIONS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) ifeq ($(RUN_FROM_BUILD_FARM),yes) @@ -34,18 +34,18 @@ test:: everything test -f ${selftest_prefix}/summary && cat ${selftest_prefix}/summary else test:: - $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate + $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) endif kvmtest:: everything $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(DEFAULT_TEST_OPTIONS) \ - --target=kvm --image=$(KVM_IMAGE) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate + --target=kvm --image=$(KVM_IMAGE) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) kvmquicktest:: everything $(ST_RM) $(SELFTEST) $(DEFAULT_TEST_OPTIONS) \ - $(SELFTEST_QUICK_OPTS) --target=kvm --image=$(KVM_IMAGE) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) | $(FORMAT_TEST_OUTPUT) --immediate + $(SELFTEST_QUICK_OPTS) --target=kvm --image=$(KVM_IMAGE) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) testone:: everything @@ -53,23 +53,23 @@ testone:: everything $(ST_DONE_TEST) test-swrap:: everything - $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate + $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) test-swrap-pcap:: everything - $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper-pcap $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate + $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper-pcap $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) test-swrap-keep-pcap:: everything - $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper-keep-pcap $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate + $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) --socket-wrapper-keep-pcap $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) test-noswrap:: everything - $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate + $(ST_RM) $(SELFTEST) $(SELFTEST_NOSLOW_OPTS) $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) quicktest:: all - $(ST_RM) $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) --immediate + $(ST_RM) $(SELFTEST) $(SELFTEST_QUICK_OPTS) --socket-wrapper $(TESTS) $(ST_TOUCH) | $(FORMAT_TEST_OUTPUT) $(ST_DONE_TEST) quicktest-subunit:: all @@ -94,12 +94,12 @@ valgrindtest:: valgrindtest-all valgrindtest-quick:: all SAMBA_VALGRIND="xterm -n server -e $(selftestdir)/valgrind_run $(LD_LIBPATH_OVERRIDE)" \
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8067bf6... Fix unintentional free of the last value when adding a new value to a key. from f8314c2... s4-smbtorture: remove unneeded ncaclrpc dir setup from RPC-SPOOLSS-NOTIFY. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8067bf629c4c4a2a4c1e66af41fc387448d468c6 Author: Wilco Baan Hofman Date: Tue Jan 19 12:06:01 2010 +0100 Fix unintentional free of the last value when adding a new value to a key. Signed-off-by: Jelmer Vernooij --- Summary of changes: source4/lib/registry/regf.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c index a7fed42..a96c7db 100644 --- a/source4/lib/registry/regf.c +++ b/source4/lib/registry/regf.c @@ -1791,11 +1791,9 @@ static WERROR regf_set_value(struct hive_key *key, const char *name, break; } } - /* Free data, if any */ - if (!(vk.data_length & 0x8000)) { - hbin_free(regf, vk.data_offset); - } } + + /* If it's new, create the vk struct, if it's old, free the old data. */ if (old_vk_offset == -1) { vk.header = "vk"; vk.name_length = strlen(name); @@ -1806,7 +1804,13 @@ static WERROR regf_set_value(struct hive_key *key, const char *name, vk.data_name = NULL; vk.flag = 0; } + } else { + /* Free data, if any */ + if (!(vk.data_length & 0x8000)) { + hbin_free(regf, vk.data_offset); + } } + /* Set the type and data */ vk.data_length = data.length; vk.data_type = type; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via aa1fce6... ldap: Fix test failure that seemed to go unreported previously. via a18889f... ldap.py: Remove unused imports. from 4dd0c55... s3: Fix a crash in libsmbclient used against the OpenSolaris CIFS server http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit aa1fce645aed8be48c2fc09c86c2b5844114e93b Author: Jelmer Vernooij Date: Sun Jan 17 12:35:26 2010 +1300 ldap: Fix test failure that seemed to go unreported previously. commit a18889fd77a5db582f32fd563b28d1e4185233a9 Author: Jelmer Vernooij Date: Sun Jan 17 12:26:53 2010 +1300 ldap.py: Remove unused imports. --- Summary of changes: source4/lib/ldb/tests/python/ldap.py | 25 + 1 files changed, 5 insertions(+), 20 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py index 603e192..798047c 100755 --- a/source4/lib/ldb/tests/python/ldap.py +++ b/source4/lib/ldb/tests/python/ldap.py @@ -2,11 +2,9 @@ # -*- coding: utf-8 -*- # This is a port of the original in testprogs/ejs/ldap.js -import getopt import optparse import sys import time -import random import base64 import os @@ -19,29 +17,17 @@ from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError from ldb import ERR_NO_SUCH_OBJECT, ERR_ATTRIBUTE_OR_VALUE_EXISTS from ldb import ERR_ENTRY_ALREADY_EXISTS, ERR_UNWILLING_TO_PERFORM from ldb import ERR_NOT_ALLOWED_ON_NON_LEAF, ERR_OTHER, ERR_INVALID_DN_SYNTAX -from ldb import ERR_NO_SUCH_ATTRIBUTE, ERR_INSUFFICIENT_ACCESS_RIGHTS +from ldb import ERR_NO_SUCH_ATTRIBUTE from ldb import ERR_OBJECT_CLASS_VIOLATION, ERR_NOT_ALLOWED_ON_RDN from ldb import ERR_NAMING_VIOLATION, ERR_CONSTRAINT_VIOLATION from ldb import ERR_UNDEFINED_ATTRIBUTE_TYPE from ldb import Message, MessageElement, Dn from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE -from samba import Ldb, param -from samba import UF_NORMAL_ACCOUNT, UF_TEMP_DUPLICATE_ACCOUNT -from samba import UF_SERVER_TRUST_ACCOUNT, UF_WORKSTATION_TRUST_ACCOUNT -from samba import UF_INTERDOMAIN_TRUST_ACCOUNT +from samba import Ldb +from samba import UF_NORMAL_ACCOUNT +from samba import UF_WORKSTATION_TRUST_ACCOUNT from samba import UF_PASSWD_NOTREQD, UF_ACCOUNTDISABLE -from samba import GTYPE_SECURITY_BUILTIN_LOCAL_GROUP -from samba import GTYPE_SECURITY_GLOBAL_GROUP, GTYPE_SECURITY_DOMAIN_LOCAL_GROUP -from samba import GTYPE_SECURITY_UNIVERSAL_GROUP -from samba import GTYPE_DISTRIBUTION_GLOBAL_GROUP -from samba import GTYPE_DISTRIBUTION_DOMAIN_LOCAL_GROUP -from samba import GTYPE_DISTRIBUTION_UNIVERSAL_GROUP from samba import ATYPE_NORMAL_ACCOUNT, ATYPE_WORKSTATION_TRUST -from samba import ATYPE_SECURITY_GLOBAL_GROUP, ATYPE_SECURITY_LOCAL_GROUP -from samba import ATYPE_SECURITY_UNIVERSAL_GROUP -from samba import ATYPE_DISTRIBUTION_GLOBAL_GROUP -from samba import ATYPE_DISTRIBUTION_LOCAL_GROUP -from samba import ATYPE_DISTRIBUTION_UNIVERSAL_GROUP from subunit.run import SubunitTestRunner import unittest @@ -1827,8 +1813,7 @@ objectclass: user sAMAccountName: """ + user_name + """ nTSecurityDescriptor:: """ + desc_base64) res = self.ldb.search(base=user_dn, attrs=["nTSecurityDescriptor"]) -print res -self.assertRaises(KeyError, lambda: res[0]["nTSecurityDescriptor"]) +self.assertTrue("nTSecurityDescriptor" in res[0]) finally: self.delete_force(self.ldb, user_dn) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2ec5792... subunit/testtools: Include newer version. from 28577aa... Import testtools as well, required for subunit. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2ec5792a4ba0cefa079a6d7e1b0ec2472151e794 Author: Jelmer Vernooij Date: Sat Jan 16 19:56:21 2010 +1300 subunit/testtools: Include newer version. --- Summary of changes: lib/subunit/python/subunit/__init__.py | 17 - lib/subunit/python/subunit/run.py |5 +- .../python/subunit/tests/test_test_protocol.py |4 + lib/subunit/python/testtools/content.py|2 +- lib/subunit/python/testtools/content_type.py |2 +- lib/subunit/python/testtools/matchers.py | 82 lib/subunit/python/testtools/testcase.py | 50 +--- lib/subunit/python/testtools/tests/__init__.py |2 + .../python/testtools/tests/test_matchers.py| 45 +++ .../python/testtools/tests/test_testtools.py | 16 - lib/subunit/python/testtools/utils.py |2 +- 11 files changed, 205 insertions(+), 22 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/subunit/python/subunit/__init__.py b/lib/subunit/python/subunit/__init__.py index 6e8df90..6b65ae4 100644 --- a/lib/subunit/python/subunit/__init__.py +++ b/lib/subunit/python/subunit/__init__.py @@ -213,10 +213,10 @@ class _ParserState(object): def lineReceived(self, line): """a line has been received.""" parts = line.split(None, 1) -if len(parts) == 2: +if len(parts) == 2 and line.startswith(parts[0]): cmd, rest = parts offset = len(cmd) + 1 -cmd = cmd.strip(':') +cmd = cmd.rstrip(':') if cmd in ('test', 'testing'): self.startTest(offset, line) elif cmd == 'error': @@ -,3 +,16 @@ class TestResultStats(unittest.TestResult): def wasSuccessful(self): """Tells whether or not this result was a success""" return self.failed_tests == 0 + + +def get_default_formatter(): +"""Obtain the default formatter to write to. + +:return: A file-like object. +""" +formatter = os.getenv("SUBUNIT_FORMATTER") +if formatter: +return os.popen(formatter, "w") +else: +return sys.stdout + diff --git a/lib/subunit/python/subunit/run.py b/lib/subunit/python/subunit/run.py index 2b90791..01c0b0e 100755 --- a/lib/subunit/python/subunit/run.py +++ b/lib/subunit/python/subunit/run.py @@ -22,7 +22,7 @@ import sys -from subunit import TestProtocolClient +from subunit import TestProtocolClient, get_default_formatter class SubunitTestRunner(object): @@ -41,6 +41,7 @@ if __name__ == '__main__': from unittest import TestProgram parser = optparse.OptionParser(__doc__) args = parser.parse_args()[1] -runner = SubunitTestRunner() +stream = get_default_formatter() +runner = SubunitTestRunner(stream) program = TestProgram(module=None, argv=[sys.argv[0]] + args, testRunner=runner) diff --git a/lib/subunit/python/subunit/tests/test_test_protocol.py b/lib/subunit/python/subunit/tests/test_test_protocol.py index 9e9db18..f10380b 100644 --- a/lib/subunit/python/subunit/tests/test_test_protocol.py +++ b/lib/subunit/python/subunit/tests/test_test_protocol.py @@ -124,6 +124,10 @@ class TestTestProtocolServerStartTest(unittest.TestCase): self.assertEqual(self.client._events, [('startTest', subunit.RemotedTestCase("old mcdonald"))]) +def test_indented_test_colon_ignored(self): +self.protocol.lineReceived(" test: old mcdonald\n") +self.assertEqual([], self.client._events) + def test_start_testing_colon(self): self.protocol.lineReceived("testing: old mcdonald\n") self.assertEqual(self.client._events, diff --git a/lib/subunit/python/testtools/content.py b/lib/subunit/python/testtools/content.py index 00c7823..353e3f0 100644 --- a/lib/subunit/python/testtools/content.py +++ b/lib/subunit/python/testtools/content.py @@ -44,7 +44,7 @@ class Content(object): no charset parameter is present in the MIME type. (This is somewhat arbitrary, but consistent with RFC2617 3.7.1). -:raises: ValueError If the content type is not text/*. +:raises ValueError: If the content type is not text/\*. """ if self.content_type.type != "text": raise ValueError("Not a text type %r&quo
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 28577aa... Import testtools as well, required for subunit. via b6b46b4... subunit: Import new version. via 2e38cb2... Add README about subunit. via 664b74d... Add script for updating the copy of subunit. via 53d7c4c... Fix permissions - net subcommand modules don't need to be executable. from 4e0090c... s4-torture: fixed DsReplicaGetInfo elements http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 28577aae928847e64a0274b5922e26e1f15d9916 Author: Jelmer Vernooij Date: Fri Jan 8 02:09:20 2010 +0100 Import testtools as well, required for subunit. commit b6b46b4978dcaffa0cd9803c43b8a5f1c19e227e Author: Jelmer Vernooij Date: Thu Dec 31 18:48:41 2009 +0100 subunit: Import new version. commit 2e38cb2cbb7520b2630ed85c3df2eb678c737fda Author: Jelmer Vernooij Date: Thu Dec 31 18:32:17 2009 +0100 Add README about subunit. commit 664b74d3669841059224fdf2fc94b53a36613888 Author: Jelmer Vernooij Date: Thu Dec 31 18:31:23 2009 +0100 Add script for updating the copy of subunit. commit 53d7c4c7a27ec351638b35458919c8a267b794db Author: Jelmer Vernooij Date: Thu Dec 31 18:17:23 2009 +0100 Fix permissions - net subcommand modules don't need to be executable. --- Summary of changes: lib/subunit/README |7 + lib/subunit/filters/tap2subunit| 26 + lib/subunit/python/iso8601/LICENSE | 20 + lib/subunit/python/iso8601/README | 26 + lib/subunit/python/iso8601/README.subunit |5 + lib/subunit/python/iso8601/setup.py| 58 + lib/subunit/python/iso8601/test_iso8601.py | 111 ++ lib/subunit/python/subunit/__init__.py | 1107 lib/subunit/python/subunit/chunked.py | 164 +++ lib/subunit/python/subunit/details.py | 109 ++ lib/subunit/python/subunit/iso8601.py | 123 +++ lib/subunit/python/subunit/progress_model.py | 106 ++ lib/subunit/python/subunit/run.py | 46 + lib/subunit/python/subunit/test_results.py | 334 ++ lib/subunit/python/subunit/tests/__init__.py | 44 +- lib/subunit/python/subunit/tests/sample-script.py |7 + lib/subunit/python/subunit/tests/test_chunked.py | 127 +++ lib/subunit/python/subunit/tests/test_details.py | 110 ++ .../python/subunit/tests/test_progress_model.py| 118 +++ .../python/subunit/tests/test_subunit_filter.py| 136 +++ .../python/subunit/tests/test_subunit_stats.py | 83 ++ .../python/subunit/tests/test_subunit_tags.py | 68 ++ .../python/subunit/tests/test_tap2subunit.py | 432 .../python/subunit/tests/test_test_protocol.py | 967 +- .../python/subunit/tests/test_test_results.py | 199 lib/subunit/python/testtools/__init__.py | 58 + lib/subunit/python/testtools/content.py| 91 ++ lib/subunit/python/testtools/content_type.py | 30 + lib/subunit/python/testtools/matchers.py | 169 +++ lib/subunit/python/testtools/run.py| 39 + lib/subunit/python/testtools/runtest.py| 142 +++ lib/subunit/python/testtools/testcase.py | 444 .../python/testtools/testresult/__init__.py| 19 + lib/subunit/python/testtools/testresult/doubles.py | 95 ++ lib/subunit/python/testtools/testresult/real.py| 540 ++ lib/subunit/python/testtools/tests/__init__.py | 28 + lib/subunit/python/testtools/tests/helpers.py | 67 ++ lib/subunit/python/testtools/tests/test_content.py | 72 ++ .../python/testtools/tests/test_content_type.py| 34 + .../python/testtools/tests/test_matchers.py| 113 ++ lib/subunit/python/testtools/tests/test_runtest.py | 185 .../python/testtools/tests/test_testresult.py | 807 ++ .../python/testtools/tests/test_testsuite.py | 56 + .../python/testtools/tests/test_testtools.py | 743 + lib/subunit/python/testtools/testsuite.py | 74 ++ lib/subunit/python/testtools/utils.py | 39 + lib/subunit/tap2subunit| 35 - lib/subunit/update.sh | 16 + source4/lib/ldb/tests/python/acl.py|3 +- source4/lib/ldb/tests/python/ldap.py |3 +- source4/lib/ldb/tests/python/ldap_schema.py|3 +- source4/lib/ldb/tests/python/sec_descriptor.py |3 +- source4/scripting/bin/subunitrun |3 +- source4/scripting/python/config.mk |2 +- source4/selftest/tests.sh |2 +- 55 files changed, 7934 insertio
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c915bd8... linked_attributes: Fix missing dependency on util. from 339afda... testprogs: add support for "print" option in win32 spoolss torture test. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c915bd87185f37f95272b3332aecb470d93a5548 Author: Jelmer Vernooij Date: Sun Jan 3 23:08:46 2010 +0100 linked_attributes: Fix missing dependency on util. --- Summary of changes: source4/dsdb/samdb/ldb_modules/config.mk |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/dsdb/samdb/ldb_modules/config.mk b/source4/dsdb/samdb/ldb_modules/config.mk index 6128dc9..8f7b5d3 100644 --- a/source4/dsdb/samdb/ldb_modules/config.mk +++ b/source4/dsdb/samdb/ldb_modules/config.mk @@ -337,7 +337,7 @@ ldb_subtree_delete_OBJ_FILES = $(dsdbsrcdir)/samdb/ldb_modules/subtree_delete.o [MODULE::ldb_linked_attributes] INIT_FUNCTION = LDB_MODULE(linked_attributes) CFLAGS = -Ilib/ldb/include -PRIVATE_DEPENDENCIES = LIBTALLOC LIBEVENTS SAMDB +PRIVATE_DEPENDENCIES = LIBTALLOC LIBEVENTS SAMDB DSDB_MODULE_HELPERS SUBSYSTEM = LIBLDB # End MODULE ldb_linked_attributes -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a214ebc... ldb: Fix the standalone ldb build. from fef3c91... libreplace: some systems don't have memmem() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a214ebc3d6c93242837ac2a4a8ccaf36c814b119 Author: Jelmer Vernooij Date: Sat Jan 2 02:40:30 2010 +0100 ldb: Fix the standalone ldb build. --- Summary of changes: source4/lib/ldb/ldb.mk | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/ldb/ldb.mk b/source4/lib/ldb/ldb.mk index e87db64..0c9b115 100644 --- a/source4/lib/ldb/ldb.mk +++ b/source4/lib/ldb/ldb.mk @@ -34,26 +34,26 @@ lib/libldb.a: $(OBJS) sample.$(SHLIBEXT): tests/sample_module.o $(MDLD) $(MDLD_FLAGS) -o $@ tests/sample_module.o -bin/ldbadd: tools/ldbadd.o tools/cmdline.o - $(CC) -o bin/ldbadd tools/ldbadd.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) +bin/ldbadd: tools/ldbadd.o tools/cmdline.o tools/ldbutil.o + $(CC) -o bin/ldbadd tools/ldbadd.o tools/cmdline.o tools/ldbutil.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) -bin/ldbsearch: tools/ldbsearch.o tools/cmdline.o - $(CC) -o bin/ldbsearch tools/ldbsearch.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) +bin/ldbsearch: tools/ldbsearch.o tools/cmdline.o tools/ldbutil.o + $(CC) -o bin/ldbsearch tools/ldbsearch.o tools/cmdline.o tools/ldbutil.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) -bin/ldbdel: tools/ldbdel.o tools/cmdline.o - $(CC) -o bin/ldbdel tools/ldbdel.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) +bin/ldbdel: tools/ldbdel.o tools/cmdline.o tools/ldbutil.o + $(CC) -o bin/ldbdel tools/ldbdel.o tools/cmdline.o tools/ldbutil.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) -bin/ldbmodify: tools/ldbmodify.o tools/cmdline.o - $(CC) -o bin/ldbmodify tools/ldbmodify.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) +bin/ldbmodify: tools/ldbmodify.o tools/cmdline.o tools/ldbutil.o + $(CC) -o bin/ldbmodify tools/ldbmodify.o tools/cmdline.o tools/ldbutil.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) -bin/ldbedit: tools/ldbedit.o tools/cmdline.o - $(CC) -o bin/ldbedit tools/ldbedit.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) +bin/ldbedit: tools/ldbedit.o tools/cmdline.o tools/ldbutil.o + $(CC) -o bin/ldbedit tools/ldbedit.o tools/cmdline.o tools/ldbutil.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) -bin/ldbrename: tools/ldbrename.o tools/cmdline.o - $(CC) -o bin/ldbrename tools/ldbrename.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) +bin/ldbrename: tools/ldbrename.o tools/cmdline.o tools/ldbutil.o + $(CC) -o bin/ldbrename tools/ldbrename.o tools/cmdline.o tools/ldbutil.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) -bin/ldbtest: tools/ldbtest.o tools/cmdline.o - $(CC) -o bin/ldbtest tools/ldbtest.o tools/cmdline.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) +bin/ldbtest: tools/ldbtest.o tools/cmdline.o + $(CC) -o bin/ldbtest tools/ldbtest.o tools/cmdline.o tools/ldbutil.o $(LIB_FLAGS) $(LD_EXPORT_DYNAMIC) examples/ldbreader: examples/ldbreader.o $(CC) -o examples/ldbreader examples/ldbreader.o $(LIB_FLAGS) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9085499... heimdal_build: Explicitly specify 'YES' when enabling external libraries. via 0c29640... s4/build: Indicate whether Samba4 is being built against the system Heimdal. from de94857... s4-net: fixed finddcs to use empty SID instead of NULL sid (NDR error) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9085499bbb518bdfa91f9c02103ad058b0b06192 Author: Jelmer Vernooij Date: Fri Jan 1 18:32:37 2010 +0100 heimdal_build: Explicitly specify 'YES' when enabling external libraries. commit 0c2964035888c3af63f274078c75e195153c46be Author: Jelmer Vernooij Date: Fri Jan 1 18:31:44 2010 +0100 s4/build: Indicate whether Samba4 is being built against the system Heimdal. --- Summary of changes: source4/build/smb_build/summary.pm |1 + source4/heimdal_build/external.m4 |8 2 files changed, 5 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/build/smb_build/summary.pm b/source4/build/smb_build/summary.pm index 153c3e2..09f5ff8 100644 --- a/source4/build/smb_build/summary.pm +++ b/source4/build/smb_build/summary.pm @@ -65,6 +65,7 @@ sub show($$) showisexternal($output, "tdb", "LIBTDB"); showisexternal($output, "tevent", "LIBTEVENT"); showisexternal($output, "ldb", "LIBLDB"); + showisexternal($output, "heimdal", "HEIMDAL_KRB5"); print "Developer mode: ".(enabled($config->{developer})?"yes":"no")."\n"; print "Automatic dependencies: ". (enabled($config->{automatic_dependencies}) diff --git a/source4/heimdal_build/external.m4 b/source4/heimdal_build/external.m4 index 3cd8900..ad9443f 100644 --- a/source4/heimdal_build/external.m4 +++ b/source4/heimdal_build/external.m4 @@ -12,7 +12,7 @@ SMB_EXT_LIB(HEIMDAL_KRB5, [${HEIMDAL_KRB5_CFLAGS}], [${HEIMDAL_KRB5_CPPFLAGS}], [${HEIMDAL_KRB5_LDFLAGS}]) -SMB_ENABLE(HEIMDAL_KRB5) +SMB_ENABLE(HEIMDAL_KRB5,YES) AC_DEFINE(HAVE_KRB5,1,[Whether kerberos is available]) HAVE_KRB5=YES AC_DEFINE(HAVE_COM_ERR,1,[Whether com_err is available]) @@ -27,7 +27,7 @@ SMB_EXT_LIB(HEIMDAL_GSSAPI, [${HEIMDAL_GSSAPI_CFLAGS}], [${HEIMDAL_GSSAPI_CPPFLAGS}], [${HEIMDAL_GSSAPI_LDFLAGS}]) -SMB_ENABLE(HEIMDAL_GSSAPI) +SMB_ENABLE(HEIMDAL_GSSAPI,YES) AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available]) HAVE_GSSAPI=YES @@ -40,7 +40,7 @@ SMB_EXT_LIB(HEIMDAL_HDB, [${HEIMDAL_HDB_CFLAGS}], [${HEIMDAL_HDB_CPPFLAGS}], [${HEIMDAL_HDB_LDFLAGS}]) -SMB_ENABLE(HEIMDAL_HDB) +SMB_ENABLE(HEIMDAL_HDB,YES) HEIMDAL_KDC_LIBS="-lkdc" HEIMDAL_KDC_CFLAGS="" @@ -51,4 +51,4 @@ SMB_EXT_LIB(HEIMDAL_KDC, [${HEIMDAL_KDC_CFLAGS}], [${HEIMDAL_KDC_CPPFLAGS}], [${HEIMDAL_KDC_LDFLAGS}]) -SMB_ENABLE(HEIMDAL_KDC) +SMB_ENABLE(HEIMDAL_KDC,YES) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fbb59b2... dsdb: Fix dependencies when building against system ldb. via 94454ad... net: Make arguments available to python commands as sys.argv. via 588b3e6... python: When updating sys.path to include the Samba python path, avoid throwing away the changes made by site.py. via e2c4d82... s4/net: Allow options before arguments for Python commands. via 433f58f... s4/net: Pass all arguments through to the Python commands. via e60a40e... s4/net: Add domainlevel subcommand. via 027f6ad... s4/net: Use d_printf consistently when reporting errors. via 732a763... Use CommandError exception to deal with problems during net commands. via eaf4a9a... s4/net: Make pwsettings a net subcommand. via 8c19cd2... netcmd: Add some basic tests. via 9e603dfb.. s4/net: Support parsing arguments in Python commands. via 9b1a210... net: Support usage/help of subcommands implemented in Python. via c064549... net: Support implementing subcommands in python. from 8b68349... s4:auth: add auth_get_server_info_principal() prototype to auth.h http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fbb59b2dcac1ce4d952c17d010ebf3bcfca863cd Author: Jelmer Vernooij Date: Tue Dec 29 16:08:44 2009 +0100 dsdb: Fix dependencies when building against system ldb. commit 94454ad07393e1fea0b04ede96fe95893ed2d00e Author: Jelmer Vernooij Date: Tue Dec 29 16:08:17 2009 +0100 net: Make arguments available to python commands as sys.argv. commit 588b3e61812978f73d2708ec37da30726ac8026e Author: Jelmer Vernooij Date: Tue Dec 29 16:07:54 2009 +0100 python: When updating sys.path to include the Samba python path, avoid throwing away the changes made by site.py. commit e2c4d8281d726716a00cfe2e3e0352777fc8b66f Author: Jelmer Vernooij Date: Mon Dec 28 21:07:25 2009 +0100 s4/net: Allow options before arguments for Python commands. commit 433f58f5a7490ba470dddc55e37325bb73cdba5c Author: Jelmer Vernooij Date: Mon Dec 28 20:37:48 2009 +0100 s4/net: Pass all arguments through to the Python commands. commit e60a40e287a1febdab98cc6cf81a80a8cb6bcfb2 Author: Jelmer Vernooij Date: Mon Dec 28 16:48:07 2009 +0100 s4/net: Add domainlevel subcommand. commit 027f6ada63b34b5277fa73e5ffa6e436041d9ffb Author: Jelmer Vernooij Date: Mon Dec 28 16:06:04 2009 +0100 s4/net: Use d_printf consistently when reporting errors. commit 732a7630e9db2578c3a46d0836aaf602e1d5c604 Author: Jelmer Vernooij Date: Mon Dec 28 16:05:04 2009 +0100 Use CommandError exception to deal with problems during net commands. commit eaf4a9afb24f2cc3cd1a268dda4ad37637821f9d Author: Jelmer Vernooij Date: Mon Dec 28 16:04:19 2009 +0100 s4/net: Make pwsettings a net subcommand. commit 8c19cd2dea470b5f4a981bfbd4b9e33c11bfde39 Author: Jelmer Vernooij Date: Mon Dec 28 14:17:25 2009 +0100 netcmd: Add some basic tests. commit 9e603dfb95f61a7daf2acc80c9c3120ae9ecf98e Author: Jelmer Vernooij Date: Mon Dec 28 13:53:18 2009 +0100 s4/net: Support parsing arguments in Python commands. commit 9b1a21031187e83de61d999b70a6d1cda7b68444 Author: Jelmer Vernooij Date: Mon Dec 28 01:21:27 2009 +0100 net: Support usage/help of subcommands implemented in Python. commit c064549e2e29b1a7e100300fa7d851451a90a6a7 Author: Jelmer Vernooij Date: Mon Dec 28 01:04:33 2009 +0100 net: Support implementing subcommands in python. --- Summary of changes: source4/auth/credentials/config.mk |2 +- source4/dsdb/config.mk |4 +- source4/dsdb/samdb/ldb_modules/config.mk | 17 +- source4/script/installmisc.sh |2 +- source4/scripting/python/modules.c | 43 +++- source4/scripting/python/modules.h |2 +- source4/scripting/python/samba/getopt.py | 14 +- source4/scripting/python/samba/netcmd/__init__.py | 128 ++ .../scripting/python/samba/netcmd/domainlevel.py | 229 ++ .../scripting/python/samba/netcmd/pwsettings.py| 190 +++ source4/scripting/python/samba/tests/netcmd.py | 34 +++ source4/selftest/tests.sh |1 + source4/setup/domainlevel | 250 source4/setup/pwsettings | 198 source4/utils/net/net.c| 154 - 15 files changed, 794 insertions(+), 474 deletions(-) create mode 100644 source4/scripting/python/samba/netcmd/__init__.py create mode 100644 source4/scripting/python/samba/netcmd/domainlevel.py create mode 100644 source4/scripting/python/samba/netcmd/pwsettings.py create mode 100644
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 72d9359... python: Remove sys.path line rather than updating it when installing to python system path. from ff0f8bd... s3:winbind Make the normal client exit message a bit more understandable http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 72d93599d95cd8bb57823fd0d4934ca4373d162c Author: Jelmer Vernooij Date: Sun Dec 27 17:30:59 2009 +0100 python: Remove sys.path line rather than updating it when installing to python system path. --- Summary of changes: source4/Makefile |2 +- source4/script/installmisc.sh | 40 +++- 2 files changed, 28 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/Makefile b/source4/Makefile index 6a99ea3..0da1ee2 100644 --- a/source4/Makefile +++ b/source4/Makefile @@ -243,7 +243,7 @@ installman:: manpages installdirs @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(mandir) $(MANPAGES) installmisc:: installdirs - @$(SHELL) $(srcdir)/script/installmisc.sh $(srcdir) $(DESTDIR)$(setupdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(pythondir) + @$(SHELL) $(srcdir)/script/installmisc.sh "$(DESTDIR)" $(srcdir) $(DESTDIR)$(setupdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(pythondir) $(PYTHON) installpc:: installdirs @$(SHELL) $(srcdir)/script/installpc.sh $(builddir) $(DESTDIR)$(pkgconfigdir) $(PC_FILES) diff --git a/source4/script/installmisc.sh b/source4/script/installmisc.sh index cb61862..c25b052 100755 --- a/source4/script/installmisc.sh +++ b/source4/script/installmisc.sh @@ -1,28 +1,42 @@ #!/bin/sh # install miscellaneous files -[ $# -eq 5 ] || { -echo "Usage: installmisc.sh SRCDIR SETUPDIR BINDDIR SBINDDIR PYTHONDIR" +[ $# -eq 7 ] || { +echo "Usage: installmisc.sh DESTDIR SRCDIR SETUPDIR BINDDIR SBINDDIR PYTHONDIR PYTHON" exit 1 } -SRCDIR="$1" -SETUPDIR="$2" -BINDIR="$3" -SBINDIR="$4" -PYTHONDIR="$5" +DESTDIR="$1" +SRCDIR="$2" +SETUPDIR="$3" +BINDIR="$4" +SBINDIR="$5" +PYTHONDIR="$6" +PYTHON="$7" cd $SRCDIR || exit 1 +if $PYTHON -c "import sys; sys.exit('$PYTHONDIR' in sys.path)"; then + PYTHON_PATH_NEEDS_FIXING=yes + echo "sys.path in python scripts will be updated to include $PYTHONDIR" +else + PYTHON_PATH_NEEDS_FIXING=no +fi + # fixup a python script to use the right path fix_python_path() { f="$1" -egrep 'sys.path.insert.*bin/python' $f > /dev/null && { - # old systems don't have sed -i :-( - sed "s|\(sys.path.insert.*\)bin/python\(.*\)$|\1$PYTHONDIR\2|g" < $f > $f.$$ || exit 1 - mv -f $f.$$ $f || exit 1 - chmod +x $f -} +if egrep 'sys.path.insert.*bin/python' $f > /dev/null; then +if [ "$PYTHON_PATH_NEEDS_FIXING" = "yes" ]; then +# old systems don't have sed -i :-( +sed "s|\(sys.path.insert.*\)bin/python\(.*\)$|\1$PYTHONDIR\2|g" < $f > $f.$$ || exit 1 +else +# old systems don't have sed -i :-( +sed "s|\(sys.path.insert.*\)bin/python\(.*\)$||g" < $f > $f.$$ || exit 1 +fi +mv -f $f.$$ $f || exit 1 +chmod +x $f +fi } echo "Installing setup templates" -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ef453c6... py_net/libnet: Remove C++-style comments, add more error checking, move initialization of dcerpc subsystem to libnet. via 33699bb... s4-libnet: Simple test for net.SetPassword() python binding via 20c7c27... s4-libnet: Python binding for libnet_SetPassword() via f03e88f... s4-net: Fix 'talloc_free with references ...' error from 078482a... s4:auth: change auth_check_password_send/recv to tevent_req http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ef453c63af3d29c428029aa39a5b59b0317c76ce Author: Jelmer Vernooij Date: Fri Dec 25 14:48:45 2009 +0100 py_net/libnet: Remove C++-style comments, add more error checking, move initialization of dcerpc subsystem to libnet. commit 33699bb1be03f0288562c899aa8f3963ff1cc312 Author: Kamen Mazdrashki Date: Thu Dec 24 05:50:58 2009 +0200 s4-libnet: Simple test for net.SetPassword() python binding Signed-off-by: Jelmer Vernooij commit 20c7c27322e95ab75ea711a825e593b0adac9114 Author: Kamen Mazdrashki Date: Thu Dec 24 05:43:21 2009 +0200 s4-libnet: Python binding for libnet_SetPassword() Signed-off-by: Jelmer Vernooij commit f03e88fa4bc1101ca9031d697f33e36effb669fd Author: Kamen Mazdrashki Date: Thu Dec 24 04:08:12 2009 +0200 s4-net: Fix 'talloc_free with references ...' error Signed-off-by: Jelmer Vernooij --- Summary of changes: source4/libnet/libnet.c|3 + source4/libnet/libnet_passwd.c |8 ++-- source4/libnet/py_net.c| 78 +--- source4/torture/libnet/python/samr-test.py | 62 ++ 4 files changed, 140 insertions(+), 11 deletions(-) create mode 100644 source4/torture/libnet/python/samr-test.py Changeset truncated at 500 lines: diff --git a/source4/libnet/libnet.c b/source4/libnet/libnet.c index b10fb65..86cf80b 100644 --- a/source4/libnet/libnet.c +++ b/source4/libnet/libnet.c @@ -42,6 +42,9 @@ struct libnet_context *libnet_context_init(struct tevent_context *ev, ctx->event_ctx = ev; ctx->lp_ctx = lp_ctx; + /* make sure dcerpc is initialized */ + dcerpc_init(lp_ctx); + /* name resolution methods */ ctx->resolve_ctx = lp_resolve_context(lp_ctx); diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c index cb09e30..8195347 100644 --- a/source4/libnet/libnet_passwd.c +++ b/source4/libnet/libnet_passwd.c @@ -109,11 +109,11 @@ static NTSTATUS libnet_ChangePassword_samr(struct libnet_context *ctx, TALLOC_CT nt_errstr(status)); r->samr.out.error_string = talloc_asprintf(mem_ctx, "samr_ChangePasswordUser3 for '%s\\%s' failed: %s", - r->samr.in.domain_name, r->samr.in.account_name, + r->samr.in.domain_name, r->samr.in.account_name, nt_errstr(status)); } goto disconnect; - } + } /* prepare samr_ChangePasswordUser2 */ encode_pw_buffer(lm_pass.data, r->samr.in.newpassword, STR_ASCII|STR_TERMINATE); @@ -216,7 +216,7 @@ static NTSTATUS libnet_ChangePassword_samr(struct libnet_context *ctx, TALLOC_CT #endif disconnect: /* close connection */ - talloc_free(c.out.dcerpc_pipe); + talloc_unlink(ctx, c.out.dcerpc_pipe); return status; } @@ -627,7 +627,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * disconnect: /* close connection */ - talloc_free(c.out.dcerpc_pipe); + talloc_unlink(ctx, c.out.dcerpc_pipe); return status; } diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 4d3e81c..e5ca5e1 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -1,18 +1,19 @@ -/* +/* Unix SMB/CIFS implementation. Samba utility functions Copyright (C) Jelmer Vernooij 2008 - + Copyright (C) Kamen Mazdrashki 2009 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2a9c227... param: Fix build on systems without ldb installed. from 5b9e98a... provision/pyldb: Avoid linking in static python ldb module. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2a9c22798d829d80f5735899e9a178c3fdfdbd1f Author: Jelmer Vernooij Date: Tue Dec 22 01:24:58 2009 +0100 param: Fix build on systems without ldb installed. --- Summary of changes: source4/param/config.mk |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/param/config.mk b/source4/param/config.mk index 02bbdd5..a5bcea6 100644 --- a/source4/param/config.mk +++ b/source4/param/config.mk @@ -13,7 +13,7 @@ PUBLIC_HEADERS += param/param.h PC_FILES += $(paramsrcdir)/samba-hostconfig.pc [SUBSYSTEM::PROVISION] -PRIVATE_DEPENDENCIES = LIBPYTHON pyparam_util +PRIVATE_DEPENDENCIES = LIBPYTHON pyparam_util LIBLDB PROVISION_OBJ_FILES = $(paramsrcdir)/provision.o $(param_OBJ_FILES) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5b9e98a... provision/pyldb: Avoid linking in static python ldb module. via 1d9a243... ldb_wrap: Fix compilation when using system ldb. via 0110990... tdb: Also build and install tdb manpages from standalone tdb. via 8b278e6... tdb: Fix formatting of API check file. via c8e6279... Fix initialisation of TypeObject samba.param.LoadparmService. from 9b6b01a... s3:winbind: Add a lower-cost alternative to wbinfo -t: wbinfo --ping-dc http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5b9e98a3826f294a9a9451adacdf77839d30244d Author: Jelmer Vernooij Date: Sun Dec 20 18:31:27 2009 +0100 provision/pyldb: Avoid linking in static python ldb module. commit 1d9a243d68539438441a488d09c1200bf22c7462 Author: Jelmer Vernooij Date: Sun Dec 20 18:05:38 2009 +0100 ldb_wrap: Fix compilation when using system ldb. commit 0110990f01390c80b8db423ba7eed486883219de Author: Jelmer Vernooij Date: Sun Dec 20 18:01:24 2009 +0100 tdb: Also build and install tdb manpages from standalone tdb. commit 8b278e6dc11524a93d85d9c804709cef20860873 Author: Jelmer Vernooij Date: Sun Dec 20 17:51:07 2009 +0100 tdb: Fix formatting of API check file. commit c8e62797eb2b78427c9ecb193c878c646145c32a Author: Jelmer Vernooij Date: Sun Dec 20 17:49:48 2009 +0100 Fix initialisation of TypeObject samba.param.LoadparmService. Found by Ricardo Jorge . --- Summary of changes: docs-xml/manpages-3/tdbbackup.8.xml|2 +- docs-xml/manpages-3/tdbdump.8.xml |2 +- docs-xml/manpages-3/tdbtool.8.xml |2 +- lib/tdb/Makefile.in|6 +++- lib/tdb/configure.ac |7 lib/tdb/include/tdb.h |2 +- .../tdb/manpages}/tdbbackup.8.xml |0 .../manpages-3 => lib/tdb/manpages}/tdbdump.8.xml |0 .../manpages-3 => lib/tdb/manpages}/tdbtool.8.xml |0 lib/tdb/tdb.mk | 15 +- lib/tdb/tdb.signatures |2 +- source4/lib/ldb/pyldb.c|4 ++- source4/lib/ldb/pyldb.h|1 - source4/lib/ldb_wrap.c |2 +- source4/param/config.mk|2 +- source4/param/provision.c | 31 ++-- source4/param/pyparam.c|3 ++ source4/param/tests/bindings.py| 10 -- 18 files changed, 74 insertions(+), 17 deletions(-) copy {docs-xml/manpages-3 => lib/tdb/manpages}/tdbbackup.8.xml (100%) copy {docs-xml/manpages-3 => lib/tdb/manpages}/tdbdump.8.xml (100%) copy {docs-xml/manpages-3 => lib/tdb/manpages}/tdbtool.8.xml (100%) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages-3/tdbbackup.8.xml b/docs-xml/manpages-3/tdbbackup.8.xml index 5c42371..78fe32e 100644 --- a/docs-xml/manpages-3/tdbbackup.8.xml +++ b/docs-xml/manpages-3/tdbbackup.8.xml @@ -1,5 +1,5 @@ -http://www.samba.org/samba/DTD/samba-doc";> +http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";> diff --git a/docs-xml/manpages-3/tdbdump.8.xml b/docs-xml/manpages-3/tdbdump.8.xml index 8e42e08..90465e5 100644 --- a/docs-xml/manpages-3/tdbdump.8.xml +++ b/docs-xml/manpages-3/tdbdump.8.xml @@ -1,5 +1,5 @@ -http://www.samba.org/samba/DTD/samba-doc";> +http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";> diff --git a/docs-xml/manpages-3/tdbtool.8.xml b/docs-xml/manpages-3/tdbtool.8.xml index 042c88c..9f96db2 100644 --- a/docs-xml/manpages-3/tdbtool.8.xml +++ b/docs-xml/manpages-3/tdbtool.8.xml @@ -1,5 +1,5 @@ -http://www.samba.org/samba/DTD/samba-doc";> +http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";> diff --git a/lib/tdb/Makefile.in b/lib/tdb/Makefile.in index 93bfe37..3abeec3 100644 --- a/lib/tdb/Makefile.in +++ b/lib/tdb/Makefile.in @@ -31,18 +31,22 @@ PYTHON_CHECK_TARGET = @PYTHON_CHECK_TARGET@ LIB_PATH_VAR = @LIB_PATH_VAR@ tdbdir = @tdbdir@ +EXTRA_TARGETS = @DOC_TARGET@ + TDB_OBJ = @TDB_OBJ@ @LIBREPLACEOBJ@ SONAMEFLAG = @SONAMEFLAG@ VERSIONSCRIPT = @VERSIONSCRIPT@ EXPORTSFILE = @EXPORTSFILE@ +XSLTPROC = @XSLTPROC@ + default: all include $(tdbdir)/tdb.mk include $(tdbdir)/rules.mk -all:: showflags dirs $(PROGS) $(TDB_SOLIB) libtdb.a $(PYTHON_BUILD_TARGET) +all:: showflags dirs $(PROGS) $(TDB_SOLIB) libtdb.a $(PYTHON_BUILD_TARGET) $(EXTRA_TARGETS) install:: all $(TDB_SOLIB): $(TDB_OBJ) diff --git a/lib/tdb/configure.ac b/lib/tdb/configure.ac index 779f596..dac7bb2 100644 --- a/lib/tdb/configure.ac +++ b/lib/tdb/configure.a
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Sat, Nov 28, 2009 at 03:57:21PM +, Matthias Dieter Wallnöfer wrote: > sorry for the remove of the first code block "if not opts.interactive and > (opts.realm is None or opts.domain is None):". I was too fast and thought > maybe this was the problem since the interactive mode didn't work on my box. > Later I discovered that this is due to the split function of the call > socket.getfqdn().split(".", 1)[1].upper()). Therefore I would let in the > error handling like this since it's really a bugfix. > Okay, the first part I will restore Please see my comments about the other code parts as well - I don't think they are correct either. Is there any particular reason for prompting the user twice when we are not able to determine a sane default? Cheers, Jelmer > --- Jelmer Vernooij schrieb am Sa, 28.11.2009: > Von: Jelmer Vernooij > Betreff: Re: [SCM] Samba Shared Repository - branch master updated > An: samba-techni...@lists.samba.org > CC: samba-...@samba.org > Datum: Samstag, 28. November 2009, 15:10 > On Fri, 2009-11-27 at 06:04 -0600, Matthias Dieter Wallnöfer wrote: > > The branch, master has been updated > > via a7fa3a9... s4:provision.py - cosmetic output correction > > via 6b835b0... s4:setup/provision - make the interactive mode work > >again > > from 7504b03... s4:WHATSNEW4.txt - Add also here a comment about the > >"upgrade_from_s3" script > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > - Log - > > commit a7fa3a9703bf9f0c72031c84998f4fb21ba95429 > > Author: Matthias Dieter Wallnöfer > > Date: Fri Nov 27 13:07:52 2009 +0100 > > s4:provision.py - cosmetic output correction > > commit 6b835b0691faab904246e587ffa6ff74b9fb53e2 > > Author: Matthias Dieter Wallnöfer > > Date: Fri Nov 27 13:02:31 2009 +0100 > > s4:setup/provision - make the interactive mode work again > > --- > > Summary of changes: > > source4/scripting/python/samba/provision.py | 2 +- > > source4/setup/provision | 16 +++- > > 2 files changed, 4 insertions(+), 14 deletions(-) > > index ed350dd..f1aa07c 100755 > > --- a/source4/setup/provision > > +++ b/source4/setup/provision > > @@ -122,14 +122,6 @@ def message(text): > > if len(sys.argv) == 1: > > opts.interactive = True > > > > -if not opts.interactive and (opts.realm is None or opts.domain is None): > > - if opts.realm is None: > > - print >>sys.stderr, "No realm set" > > - if opts.domain is None: > > - print >>sys.stderr, "No domain set" > > - parser.print_usage() > > - sys.exit(1) > > - > ^^^ This change isn't necessary to make the interactive mode work (it > explicitly checks for interactive mode not being in use), and it breaks > usage when not in interactive mode because we end up with no > realm/domain being set. > > if opts.interactive: > > from getpass import getpass > > import socket > > @@ -137,19 +129,17 @@ if opts.interactive: > > if default is not None: > > print "%s [%s]: " % (prompt,default), > > else: > > - print "%s: " % (prompt,), > > + print "%s: " % (prompt), > > return sys.stdin.readline().rstrip("\n") or default > > try: > > opts.realm = ask("Realm", socket.getfqdn().split(".", > >1)[1].upper()) > > except IndexError: > > - print >>sys.stderr, "Cannot guess realm from %s" % ( > > socket.getfqdn()) > > - sys.exit(1) > > + opts.realm = ask("Realm", None) > ^^^ We've already asked the user for a realm, why ask twice? Rather, we > should not set a default value if the users FQDN is broken because it > contains no dots. > > try: > > opts.domain = ask("Domain", opts.realm.split(".")[0]) > > except IndexError: > > - print >>sys.stderr, "Cannot guess domain from %s" % ( opts.realm()) > > - sys.exit(1) > > + opts.domain = ask("Domain", None) > ^^^ Same here, let's just get the default value right in the first > place. > Cheers, > Jelmer > __ > Do You Yahoo!? > Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz > gegen Massenmails. > http://mail.yahoo.com -- Jelmer Vernooij - http://jelmer.vernstok.nl/ 17:29:41 up 14 min, 3 users, load average: 0.53, 0.58, 0.44
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, > - Log - > commit 7d400715e9af2056690c03a1a2f45c7f343fa313 > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 21:14:44 2009 +0100 > > s4:registry/util - Don't include the trailing '\0' in the internal data > format but add it on the back-conversion to a string > > As far as I know the registry library saves all data (including) strings > without > the null termination. So do it also here in a similar way. Is there anything in particular that prompted this change? It's unnecessary as talloc_convert_string_convenience should already null-terminate. Cheers, Jelmer signature.asc Description: This is a digitally signed message part
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Fri, 2009-11-27 at 09:42 -0600, Matthias Dieter Wallnöfer wrote: > - Log - > commit 6c3e2417a0639cd7c367de93615c422cf5217456 > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 16:39:27 2009 +0100 > > s4:samba3.py (and test) - deactivate the tests until those parameters are > fixed > > commit 08b3c396d7d534c9bfa29a7cd015a97d504d45a9 > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 16:35:28 2009 +0100 > > s4:upgrade.py - Umlaut problem > > commit 1af31aed0bd430d0af3a52962fa21f5c08309f01 > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 16:34:44 2009 +0100 > > s4:tests.sh - Make also here the change from "upgrade" to > "upgrade_from_s3" > > --- > > Summary of changes: > source4/scripting/python/samba/samba3.py |2 +- > source4/scripting/python/samba/tests/samba3.py |6 +++--- > source4/scripting/python/samba/upgrade.py |2 +- > source4/selftest/tests.sh |2 +- > 4 files changed, 6 insertions(+), 6 deletions(-) Please revert these as well - these tests were working fine previous to your changes, they really shouldn't be disabled without good reason! Cheers, Jelmer signature.asc Description: This is a digitally signed message part
Re: [SCM] Samba Shared Repository - branch master updated
names(self): > """Iterate over the usernames in this Tdb database.""" > @@ -592,9 +592,10 @@ class TdbSam(TdbDatabase): > for entry in hours: > for i in range(8): > user.hours.append(ord(entry) & (2 ** i) == (2 ** i)) > -(user.bad_password_count, data) = unpack_uint16(data) > -(user.logon_count, data) = unpack_uint16(data) > -(user.unknown_6, data) = unpack_uint32(data) > +# FIXME > +#(user.bad_password_count, data) = unpack_uint16(data) > +#(user.logon_count, data) = unpack_uint16(data) > +#(user.unknown_6, data) = unpack_uint32(data) > assert len(data) == 0 > return user > > @@ -683,7 +684,7 @@ class ParamFile(object): > section = None > for i, l in enumerate(open(filename, 'r').xreadlines()): > l = l.strip() > -if not l: > +if not l or l[0] == '#' or l[0] == ';': > continue > if l[0] == "[" and l[-1] == "]": > section = self._sanitize_name(l[1:-1]) > diff --git a/source4/scripting/python/samba/upgrade.py > b/source4/scripting/python/samba/upgrade.py > index 8194552..44b43a1 100644 > --- a/source4/scripting/python/samba/upgrade.py > +++ b/source4/scripting/python/samba/upgrade.py > @@ -92,7 +93,6 @@ def import_sam_account(samldb,acc,domaindn,domainsid): > "ntPwdHash:": acc.nt_password, > }) > > - > def import_sam_group(samldb, sid, gid, sid_name_use, nt_name, comment, > domaindn): > """Upgrade a SAM group. > > @@ -132,7 +132,6 @@ def import_sam_group(samldb, sid, gid, sid_name_use, > nt_name, comment, domaindn) > "samba3SidNameUse": str(sid_name_use) > }) > > - ^^ The two empty lines are intentional here - PEP8 (standard coding style for Python) specifies two empty lines between top-level objects. Please don't remove them. > @@ -157,7 +156,6 @@ def import_idmap(samdb,samba3_idmap,domaindn): >"type": "group", >"unixID": str(gid)}) > > - > def import_wins(samba4_winsdb, samba3_winsdb): > """Import settings from a Samba3 WINS database. > > @@ -208,73 +206,6 @@ def import_wins(samba4_winsdb, samba3_winsdb): > "objectClass": "winsMaxVersion", > "maxVersion": str(version_id)}) > > -def upgrade_provision(samba3, setup_dir, message, credentials, session_info, > smbconf, targetdir): ^^^ Why did you move this function? It makes it very hard to spot what actual changes you made. Cheers, Jelmer signature.asc Description: This is a digitally signed message part
Re: [SCM] Samba Shared Repository - branch master updated
On Fri, 2009-11-27 at 06:04 -0600, Matthias Dieter Wallnöfer wrote: > The branch, master has been updated >via a7fa3a9... s4:provision.py - cosmetic output correction >via 6b835b0... s4:setup/provision - make the interactive mode work > again > from 7504b03... s4:WHATSNEW4.txt - Add also here a comment about the > "upgrade_from_s3" script > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > > - Log - > commit a7fa3a9703bf9f0c72031c84998f4fb21ba95429 > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 13:07:52 2009 +0100 > > s4:provision.py - cosmetic output correction > > commit 6b835b0691faab904246e587ffa6ff74b9fb53e2 > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 13:02:31 2009 +0100 > > s4:setup/provision - make the interactive mode work again > > --- > > Summary of changes: > source4/scripting/python/samba/provision.py |2 +- > source4/setup/provision | 16 +++- > 2 files changed, 4 insertions(+), 14 deletions(-) > index ed350dd..f1aa07c 100755 > --- a/source4/setup/provision > +++ b/source4/setup/provision > @@ -122,14 +122,6 @@ def message(text): > if len(sys.argv) == 1: > opts.interactive = True > > -if not opts.interactive and (opts.realm is None or opts.domain is None): > - if opts.realm is None: > - print >>sys.stderr, "No realm set" > - if opts.domain is None: > - print >>sys.stderr, "No domain set" > - parser.print_usage() > - sys.exit(1) > - ^^^ This change isn't necessary to make the interactive mode work (it explicitly checks for interactive mode not being in use), and it breaks usage when not in interactive mode because we end up with no realm/domain being set. > if opts.interactive: > from getpass import getpass > import socket > @@ -137,19 +129,17 @@ if opts.interactive: > if default is not None: > print "%s [%s]: " % (prompt,default), > else: > - print "%s: " % (prompt,), > + print "%s: " % (prompt), > return sys.stdin.readline().rstrip("\n") or default > try: > opts.realm = ask("Realm", socket.getfqdn().split(".", > 1)[1].upper()) > except IndexError: > - print >>sys.stderr, "Cannot guess realm from %s" % ( > socket.getfqdn()) > - sys.exit(1) > + opts.realm = ask("Realm", None) ^^^ We've already asked the user for a realm, why ask twice? Rather, we should not set a default value if the users FQDN is broken because it contains no dots. > try: > opts.domain = ask("Domain", opts.realm.split(".")[0]) > except IndexError: > - print >>sys.stderr, "Cannot guess domain from %s" % ( > opts.realm()) > - sys.exit(1) > + opts.domain = ask("Domain", None) ^^^ Same here, let's just get the default value right in the first place. Cheers, Jelmer signature.asc Description: This is a digitally signed message part
Re: [SCM] Samba Shared Repository - branch master updated
Hi Matthias, On Fri, 2009-11-27 at 05:26 -0600, Matthias Dieter Wallnöfer wrote: > The branch, master has been updated >via 7504b03... s4:WHATSNEW4.txt - Add also here a comment about the > "upgrade_from_s3" script >via 3d57da8... s4:howto.txt - add a notice about the upgrade > possibilities and fix line spaces >via fd31328... s4:upgrade script - rename it to "upgrade_from_s3" and > do some rework > from d6c60f8... s3-nsstest: drastically shrink size and dependencies > of nsstest binary. > > http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master > > > - Log - > commit 7504b03b541026c84a4f454b7572a3280296a8d9 > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 11:07:11 2009 +0100 > > s4:WHATSNEW4.txt - Add also here a comment about the "upgrade_from_s3" > script > > commit 3d57da80e574f5f47effb41fd45361eec22f119e > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 11:02:20 2009 +0100 > > s4:howto.txt - add a notice about the upgrade possibilities and fix line > spaces > > commit fd313282a24e58570c2fa5b3fdfd0b84d0053363 > Author: Matthias Dieter Wallnöfer > Date: Fri Nov 27 10:50:03 2009 +0100 > > s4:upgrade script - rename it to "upgrade_from_s3" and do some rework > > - Give a better name to the script > - Move it to the location where also "upgradeprovision" resides > - Fix up trailing whitespaces and tabs > > --- > > Summary of changes: > WHATSNEW4.txt | 11 -- > howto4.txt | 18 +++--- > .../upgrade => scripting/bin/upgrade_from_s3} | 37 > +++- > 3 files changed, 41 insertions(+), 25 deletions(-) > rename source4/{setup/upgrade => scripting/bin Please keep the upgrade script under setup/. Its name is too generic to be installed in /bin. Alternatively, perhaps we should rename it to something specific to Samba. This would have broken the build (there are tests for the upgrade script that you haven't changed), please update the blackbox tests as well when renaming binaries. Cheers, Jelmerb signature.asc Description: This is a digitally signed message part
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7248ff6... s3: Remove two more DFSG-nonfree text documents at release time. (Debian bug from df3451a... Fix writing corrupt registries because of hardcoded version string in IDL. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7248ff6d8f71530a211efdcea7eed005a63c9f5c Author: Jelmer Vernooij Date: Sun Nov 15 20:52:11 2009 +0100 s3: Remove two more DFSG-nonfree text documents at release time. (Debian bug --- Summary of changes: release-scripts/create-tarball |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/release-scripts/create-tarball b/release-scripts/create-tarball index 5c9df90..05d77bc 100755 --- a/release-scripts/create-tarball +++ b/release-scripts/create-tarball @@ -203,6 +203,8 @@ function main if [ -d source4 ]; then echo "Removing RFCs" find source4/ -name "rfc*.txt" -exec rm -f {} \; + rm -f source4/ldap_server/devdocs/draft-armijo-ldap-syntax-00.txt + rm -f source4/ldap_server/devdocs/ldapext-ldapv3-vlv-04.txt fi packaging/bin/update-pkginfo ${version} 1 "" -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via df3451a... Fix writing corrupt registries because of hardcoded version string in IDL. via c319b96... Fix NULL pointer dereference in libgpo when listing Local Policy which has no security descriptor. via 5a7d48f... Fix writing corrupt REG_SZ to the registry. via 45bb24e... Fix trailing garbage in the hbin block. from 1e984e6... Added tests for descriptor inheritance on ldap modify. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit df3451aec0e841da311fda837db6e79e09b88e3c Author: Wilco Baan Hofman Date: Thu Oct 15 13:18:52 2009 +0200 Fix writing corrupt registries because of hardcoded version string in IDL. Signed-off-by: Jelmer Vernooij commit c319b965a1a8ab2fe54d7def06f4a41fb193dde3 Author: Wilco Baan Hofman Date: Sun Oct 11 00:12:28 2009 +0200 Fix NULL pointer dereference in libgpo when listing Local Policy which has no security descriptor. Signed-off-by: Jelmer Vernooij commit 5a7d48f82b06738924d6afedd53d79b0202d150a Author: Wilco Baan Hofman Date: Sat Oct 10 21:42:27 2009 +0200 Fix writing corrupt REG_SZ to the registry. Signed-off-by: Jelmer Vernooij commit 45bb24e93914d2fc5253052d75ef7e43a1c2b26c Author: Wilco Baan Hofman Date: Thu Oct 8 12:36:30 2009 +0200 Fix trailing garbage in the hbin block. This specifically fixes a problem showing extra bytes of garbage in list and print in regshell, even though the vk.data_length has the correct size. Signed-off-by: Jelmer Vernooij --- Summary of changes: libgpo/gpo_util.c |7 --- source4/lib/registry/regf.c |5 + source4/lib/registry/regf.idl |2 +- source4/lib/registry/util.c |3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c index 7a23b5c..fdf4c6d 100644 --- a/libgpo/gpo_util.c +++ b/libgpo/gpo_util.c @@ -321,10 +321,11 @@ void dump_gpo(ADS_STRUCT *ads, } dump_gp_ext(gp_ext, lvl); } + if (gpo->security_descriptor) { + DEBUGADD(lvl,("security descriptor:\n")); - DEBUGADD(lvl,("security descriptor:\n")); - - NDR_PRINT_DEBUG(security_descriptor, gpo->security_descriptor); + NDR_PRINT_DEBUG(security_descriptor, gpo->security_descriptor); + } } / diff --git a/source4/lib/registry/regf.c b/source4/lib/registry/regf.c index c5a74c7..a7fed42 100644 --- a/source4/lib/registry/regf.c +++ b/source4/lib/registry/regf.c @@ -261,6 +261,11 @@ static uint32_t hbin_store (struct regf_data *data, DATA_BLOB blob) memcpy(dest.data, blob.data, blob.length); + /* Make sure that we have no tailing garbage in the block */ + if (dest.length > blob.length) { + memset(dest.data + blob.length, 0, dest.length - blob.length); + } + return ret; } diff --git a/source4/lib/registry/regf.idl b/source4/lib/registry/regf.idl index ffd7072..fd58ad2 100644 --- a/source4/lib/registry/regf.idl +++ b/source4/lib/registry/regf.idl @@ -24,7 +24,7 @@ interface regf [noprint] struct regf_version { [value(1)] uint32 major; - [value(3)] uint32 minor; + uint32 minor; [value(0)] uint32 release; [value(1)] uint32 build; }; diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index 038b23f..88b9d18 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -124,8 +124,9 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, case REG_SZ: case REG_EXPAND_SZ: convert_string_talloc_convenience(mem_ctx, iconv_convenience, CH_UNIX, CH_UTF16, -data_str, strlen(data_str), +data_str, strlen(data_str)+1, (void **)&data->data, &data->length, false); + break; case REG_DWORD: { -- Samba Shared Repository
Re: [SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-963-g6a4efcc
Hi Matthias, On Tue, Oct 13, 2009 at 04:18:17PM +0200, Matthias Dieter Wallnöfer wrote: > Jelmer, have you done some more investigations on this one? Sorry, I don't have time to look into this one right now. Chers, Jelmer > > Matthias Dieter Wallnöfer schrieb: > >Hi Jelmer, > > > >could you please look for a solution for this (locale setting - I > >personally don't know much about)? So I can reactivate this code > >snippet. > > > >Matthias > > > >Jelmer Vernooij schrieb: > >>Hi Matthias, > >> > >>On Sat, 2009-10-03 at 09:55 -0500, Matthias Dieter Wallnöfer wrote: > >>>@@ -1254,7 +1254,9 @@ member: CN=ldaptestutf8user > >>>èùéìòà,CN=Users,""" + self.base_dn + """ > >>> self.assertTrue("member" not in res[0]) > >>> print "Testing ldb.search for > >>>(&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))" > >>>-res = ldb.search(expression="(&(cn=ldaptestutf8user > >>>ÈÙÉÌÒÀ)(objectClass=user))") > >>>+# TODO UTF8 users don't seem to work fully anymore > >>>+#res = ldb.search(expression="(&(cn=ldaptestutf8user > >>>ÈÙÉÌÒÀ)(objectClass=user))") > >>>+res = ldb.search(expression="(&(cn=ldaptestutf8user > >>>èùéìòà)(objectclass=user))") > >>> self.assertEquals(len(res), 1, "Could not find > >>>(&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))") > >>> self.assertEquals(str(res[0].dn), > >>>("CN=ldaptestutf8user èùéìòà,CN=Users," + self.base_dn)) > >>>@@ -1275,9 +1277,9 @@ member: CN=ldaptestutf8user > >>>èùéìòà,CN=Users,""" + self.base_dn + """ > >>> ldb.delete(("CN=ldaptestgroup2,CN=Users," + self.base_dn)) > >>> print "Testing ldb.search for > >>>(&(cn=ldaptestutf8user2 ÈÙÉÌÒÀ)(objectClass=user))" > >>>-res = ldb.search(expression="(&(cn=ldaptestutf8user > >>>ÈÙÉÌÒÀ)(objectClass=user))") > >>>- > >>>-#FIXME: self.assert len(res) == 1, "Could not find > >>>(expect space collapse, win2k3 fails) (&(cn=ldaptestutf8user2 > >>>ÈÙÉÌÒÀ)(objectClass=user))" > >>>+# TODO UTF8 users don't seem to work fully anymore > >>>+#res = ldb.search(expression="(&(cn=ldaptestutf8user > >>>ÈÙÉÌÒÀ)(objectClass=user))") > >>>+#self.assertEquals(len(res), 1, "Could not find > >>>(&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))") > >>> print "Testing that we can't get at the > >>>configuration DN from the main search base" > >>> res = ldb.search(self.base_dn, > >>>expression="objectClass=crossRef", scope=SCOPE_SUBTREE, > >>>attrs=["cn"]) > >>>@@ -1360,8 +1362,8 @@ member: CN=ldaptestutf8user > >>>èùéìòà,CN=Users,""" + self.base_dn + """ > >>> self.delete_force(self.ldb, > >>>"cn=ldaptestcomputer,cn=computers," + self.base_dn) > >>> self.delete_force(self.ldb, > >>>"cn=ldaptest2computer,cn=computers," + self.base_dn) > >>> self.delete_force(self.ldb, > >>>"cn=ldaptestcomputer3,cn=computers," + self.base_dn) > >>>-self.delete_force(self.ldb, "cn=ldaptestutf8user > >>>èùéìòà ,cn=users," + self.base_dn) > >>>-self.delete_force(self.ldb, "cn=ldaptestutf8user2 > >>>èùéìòà ,cn=users," + self.base_dn) > >>>+self.delete_force(self.ldb, "cn=ldaptestutf8user > >>>èùéìòà,cn=users," + self.base_dn) > >>>+self.delete_force(self.ldb, "cn=ldaptestutf8user2 > >>>èùéìòà,cn=users," + self.base_dn) > >>> self.delete_force(self.ldb, "cn=ldaptestcontainer," + > >>>self.base_dn) > >>> self.delete_force(self.ldb, "cn=ldaptestcontainer2," > >>>+ self.base_dn) > >>These tests still run fine, but unfortunately we seem to depend on a > >>particular locale being set (in the environment?). We might want to > >>force a particular locale during these tests . > >> > >>Cheers, > >> > >>Jelmer > > > > > --
Re: [SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-963-g6a4efcc
Hi Matthias, On Sat, 2009-10-03 at 09:55 -0500, Matthias Dieter Wallnöfer wrote: > @@ -1254,7 +1254,9 @@ member: CN=ldaptestutf8user èùéìòà,CN=Users,""" + > self.base_dn + """ > self.assertTrue("member" not in res[0]) > > print "Testing ldb.search for (&(cn=ldaptestutf8user > ÈÙÉÌÒÀ)(objectClass=user))" > -res = ldb.search(expression="(&(cn=ldaptestutf8user > ÈÙÉÌÒÀ)(objectClass=user))") > +# TODO UTF8 users don't seem to work fully anymore > +#res = ldb.search(expression="(&(cn=ldaptestutf8user > ÈÙÉÌÒÀ)(objectClass=user))") > +res = ldb.search(expression="(&(cn=ldaptestutf8user > èùéìòà)(objectclass=user))") > self.assertEquals(len(res), 1, "Could not find > (&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))") > > self.assertEquals(str(res[0].dn), ("CN=ldaptestutf8user > èùéìòà,CN=Users," + self.base_dn)) > @@ -1275,9 +1277,9 @@ member: CN=ldaptestutf8user èùéìòà,CN=Users,""" + > self.base_dn + """ > ldb.delete(("CN=ldaptestgroup2,CN=Users," + self.base_dn)) > > print "Testing ldb.search for (&(cn=ldaptestutf8user2 > ÈÙÉÌÒÀ)(objectClass=user))" > -res = ldb.search(expression="(&(cn=ldaptestutf8user > ÈÙÉÌÒÀ)(objectClass=user))") > - > -#FIXME: self.assert len(res) == 1, "Could not find (expect space > collapse, win2k3 fails) (&(cn=ldaptestutf8user2 ÈÙÉÌÒÀ)(objectClass=user))" > +# TODO UTF8 users don't seem to work fully anymore > +#res = ldb.search(expression="(&(cn=ldaptestutf8user > ÈÙÉÌÒÀ)(objectClass=user))") > +#self.assertEquals(len(res), 1, "Could not find > (&(cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))") > > print "Testing that we can't get at the configuration DN from the > main search base" > res = ldb.search(self.base_dn, expression="objectClass=crossRef", > scope=SCOPE_SUBTREE, attrs=["cn"]) > @@ -1360,8 +1362,8 @@ member: CN=ldaptestutf8user èùéìòà,CN=Users,""" + > self.base_dn + """ > self.delete_force(self.ldb, "cn=ldaptestcomputer,cn=computers," + > self.base_dn) > self.delete_force(self.ldb, "cn=ldaptest2computer,cn=computers," + > self.base_dn) > self.delete_force(self.ldb, "cn=ldaptestcomputer3,cn=computers," + > self.base_dn) > -self.delete_force(self.ldb, "cn=ldaptestutf8user èùéìòà ,cn=users," > + self.base_dn) > -self.delete_force(self.ldb, "cn=ldaptestutf8user2 èùéìòà > ,cn=users," + self.base_dn) > +self.delete_force(self.ldb, "cn=ldaptestutf8user èùéìòà,cn=users," + > self.base_dn) > +self.delete_force(self.ldb, "cn=ldaptestutf8user2 èùéìòà,cn=users," > + self.base_dn) > self.delete_force(self.ldb, "cn=ldaptestcontainer," + self.base_dn) > self.delete_force(self.ldb, "cn=ldaptestcontainer2," + self.base_dn) These tests still run fine, but unfortunately we seem to depend on a particular locale being set (in the environment?). We might want to force a particular locale during these tests . Cheers, Jelmer signature.asc Description: This is a digitally signed message part
Re: [SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-833-g54ea150
Hi Matthias, On Thu, Oct 01, 2009 at 07:00:46AM -0500, Matthias Dieter Wallnöfer wrote: > diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c > index 0fe4da9..0dac61b 100644 > --- a/source4/lib/ldb/pyldb.c > +++ b/source4/lib/ldb/pyldb.c > @@ -956,6 +956,10 @@ static PyObject *py_ldb_msg_diff(PyLdbObject *self, > PyObject *args) > } > diff = ldb_msg_diff(PyLdb_AsLdbContext(self), > PyLdbMessage_AsMessage(py_msg_old), PyLdbMessage_AsMessage(py_msg_new)); > + if (!diff) { > + PyErr_SetString(PyExc_KeyError, "Failed to generate the Ldb > Message diff"); > + return NULL; > + } Please don't use KeyError for anything other than a key somewhere not being found (e.g. trying to access an entry in a dictionary that doesn't exist). In this particular case RuntimeError should be more appropriate. Cheers, Jelmer
Re: [SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-817-gc5dba4a
Hi Matthias, On Wed, 2009-09-30 at 09:02 -0500, Matthias Dieter Wallnöfer wrote: > The branch, master has been updated > commit ad549072aa72ce27fd58246b92888d8299043398 > Author: Matthias Dieter Wallnöfer > Date: Tue Sep 22 14:10:52 2009 +0200 > > s4:pyldb - Fixed the return value in "py_ldb_msg_diff" > > The case distinction shouldn't be needed also when "diff" is NULL. > "PyLdbMessage_FromMessage" works with "NULL" arguments. PyLdbMessage_FromMessage may work fine with NULL arguments, I'm quite sure that we don't support the pointer of a PyLdbMessage to be NULL in other places in the Python bindings. Cheers, Jelmer -- Jelmer Vernooij - http://samba.org/~jelmer/ Jabber: jel...@jabber.fsfe.org signature.asc Description: This is a digitally signed message part
[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-766-g830adcd
The branch, master has been updated via 830adcd58d6b1fbc3e693762ab2e8a8cfd7ecab3 (commit) from 5c0edba8c2ade663d630a3b9f3ff0c4862129783 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 830adcd58d6b1fbc3e693762ab2e8a8cfd7ecab3 Author: Jelmer Vernooij Date: Mon Sep 28 15:03:17 2009 +0200 pidl: Avoid using talloc_free as function pointer, since it may be a macro. --- Summary of changes: lib/talloc/pytalloc.c| 10 ++ lib/talloc/pytalloc.h|2 ++ pidl/lib/Parse/Pidl/Samba4/Python.pm |4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c index 646aac8..c6decf3 100644 --- a/lib/talloc/pytalloc.c +++ b/lib/talloc/pytalloc.c @@ -81,3 +81,13 @@ PyObject *py_talloc_default_repr(PyObject *obj) return PyString_FromFormat("<%s talloc object at 0x%p>", type->tp_name, talloc_obj->ptr); } + +static void py_cobject_talloc_free(void *ptr) +{ + talloc_free(ptr); +} + +PyObject *PyCObject_FromTallocPtr(void *ptr) +{ + return PyCObject_FromVoidPtr(ptr, py_cobject_talloc_free); +} diff --git a/lib/talloc/pytalloc.h b/lib/talloc/pytalloc.h index 3bfb272..9b65872 100644 --- a/lib/talloc/pytalloc.h +++ b/lib/talloc/pytalloc.h @@ -52,4 +52,6 @@ PyObject *py_talloc_default_repr(PyObject *py_obj); #define py_talloc_new(type, typeobj) py_talloc_steal(typeobj, talloc_zero(NULL, type)) +PyObject *PyCObject_FromTallocPtr(void *); + #endif /* _PY_TALLOC_H_ */ diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index eb8bd31..c785619 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -998,10 +998,10 @@ sub ConvertScalarToPython($$$) } # Not yet supported - if ($ctypename eq "string_array") { return "PyCObject_FromVoidPtr($cvar, talloc_free)"; } + if ($ctypename eq "string_array") { return "PyCObject_FromTallocPtr($cvar)"; } if ($ctypename eq "ipv4address") { return "PyString_FromString($cvar)"; } if ($ctypename eq "pointer") { - return "PyCObject_FromVoidPtr($cvar, talloc_free)"; + return "PyCObject_FromTallocPtr($cvar)"; } die("Unknown scalar type $ctypename"); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-765-g5c0edba
The branch, master has been updated via 5c0edba8c2ade663d630a3b9f3ff0c4862129783 (commit) via 166f849a5155d821706942e30a6cb7a4724d2348 (commit) from 4a230b5e6ccbd7e8ac3dce875014715b733bb210 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5c0edba8c2ade663d630a3b9f3ff0c4862129783 Author: Jelmer Vernooij Date: Mon Sep 28 12:25:13 2009 +0200 Move samba-specific variable to s4 Makefile. commit 166f849a5155d821706942e30a6cb7a4724d2348 Author: Jelmer Vernooij Date: Mon Sep 28 12:21:06 2009 +0200 make: Use $(base_srcdirs) in 'make clean' rather than keeping a separate list. --- Summary of changes: source4/Makefile|4 +++- source4/build/make/rules.mk |2 -- 2 files changed, 3 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/Makefile b/source4/Makefile index 959d0f4..03b4e73 100644 --- a/source4/Makefile +++ b/source4/Makefile @@ -47,6 +47,8 @@ ALL_PREDEP = basics .NOTPARALLEL: endif +base_srcdirs = $(srcdir) ../librpc/ ../lib/ ../libcli ../libgpo ../nsswitch ../libds + include $(srcdir)/build/make/rules.mk include $(srcdir)/build/make/python.mk zlibsrcdir := ../lib/zlib @@ -153,7 +155,7 @@ include $(srcdir)/static_deps.mk endif clean:: - @find ../libds ../lib ../libcli ../librpc ../libgpo ../nsswitch -name '*.o' -o -name '*.ho' | xargs rm -f + @find $(base_srcdirs) -name '*.o' -o -name '*.ho' | xargs rm -f PUBLIC_HEADERS += ./version.h diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk index 78b4240..b922f7c 100644 --- a/source4/build/make/rules.mk +++ b/source4/build/make/rules.mk @@ -182,8 +182,6 @@ showflags:: @echo ' MDLD_FLAGS = $(MDLD_FLAGS)' @echo ' SHLIBEXT = $(SHLIBEXT)' -base_srcdirs = $(srcdir) ../librpc/ ../lib/ ../libcli ../libgpo ../nsswitch ../libds - etags: etags $(ETAGS_OPTIONS) `find $(base_srcdirs) -name "*.[ch]"` -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-741-gd9ada60
The branch, master has been updated via d9ada600cc81603300a0cfce75179c6aa1ac94cc (commit) via 43267812e17cc7749bb9275574af5eccc74129e5 (commit) via c526a7789694b30b4266c61941686adbf37434a4 (commit) via 95fafa9d8398e86391cbd9ced9ea24a28b069f5f (commit) via db55ea08bca48a3b8d6332f08a9db44f91b6d8db (commit) via c145888cece8e34af7ba11c786f1693f5ffc3791 (commit) via 2dd7c9bc3441c00ba26329d4d1f4f32775a06a75 (commit) via 6a79ad7664ec3cbfa98638e15de6ba24983a84b1 (commit) via 52a17e5c32fdeb585e6217da705b254b5cf13986 (commit) via 9af1c6db0f56854348ef0d3d11f36da16d41f5d0 (commit) from 169ff6efea9b0ea9795effc428de0bd578644a2e (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d9ada600cc81603300a0cfce75179c6aa1ac94cc Author: Jelmer Vernooij Date: Sun Sep 27 17:37:53 2009 +0200 parmlist: Add more tests. commit 43267812e17cc7749bb9275574af5eccc74129e5 Author: Jelmer Vernooij Date: Sun Sep 27 16:49:26 2009 +0200 rpc_server: Fix warnings. commit c526a7789694b30b4266c61941686adbf37434a4 Author: Jelmer Vernooij Date: Sun Sep 27 16:43:01 2009 +0200 librpc: Fix path to ndr_standard pc file. commit 95fafa9d8398e86391cbd9ced9ea24a28b069f5f Author: Jelmer Vernooij Date: Sun Sep 27 16:34:59 2009 +0200 selftest: Prefer system tap2subunit if available. commit db55ea08bca48a3b8d6332f08a9db44f91b6d8db Author: Jelmer Vernooij Date: Sun Sep 27 14:39:58 2009 +0200 parmlist: Add basic tests for test_get_int(). commit c145888cece8e34af7ba11c786f1693f5ffc3791 Author: Jelmer Vernooij Date: Sun Sep 27 14:13:38 2009 +0200 util/parmlist: Add some more comments. commit 2dd7c9bc3441c00ba26329d4d1f4f32775a06a75 Author: Jelmer Vernooij Date: Sat Sep 26 23:59:35 2009 +0200 libutil: Add separate utility code for dealing with settings as a collection of key/value pairs. commit 6a79ad7664ec3cbfa98638e15de6ba24983a84b1 Author: Jelmer Vernooij Date: Sat Sep 26 20:55:18 2009 +0200 gensec: Avoid exposing lp_ctx on the API level. commit 52a17e5c32fdeb585e6217da705b254b5cf13986 Author: Jelmer Vernooij Date: Sat Sep 26 19:41:59 2009 +0200 pygensec: Add initial work on a gensec Python module. commit 9af1c6db0f56854348ef0d3d11f36da16d41f5d0 Author: Wilco Baan Hofman Date: Sat Sep 26 17:05:34 2009 +0200 regshell: Add support for 'cd ..' and cd relative to the root. Signed-off-by: Jelmer Vernooij --- Summary of changes: lib/util/config.mk|1 + lib/util/parmlist.c | 106 lib/util/parmlist.h | 56 + lib/util/tests/parmlist.c | 106 source4/auth/gensec/config.mk |5 + source4/auth/gensec/gensec.c | 22 +++--- source4/auth/gensec/gensec.h |2 +- source4/auth/gensec/pygensec.c| 144 + source4/auth/gensec/spnego.c |2 +- source4/auth/gensec/tests/bindings.py | 35 source4/ldap_server/ldap_backend.c|2 +- source4/lib/registry/tools/regshell.c | 81 +-- source4/librpc/config.mk |2 +- source4/param/generic.c | 89 source4/param/loadparm.c | 24 +++--- source4/param/param.h | 15 +--- source4/rpc_server/common/common.h|2 + source4/selftest/tests.sh |7 ++- source4/torture/local/config.mk |1 + source4/torture/local/local.c |1 + 20 files changed, 602 insertions(+), 101 deletions(-) create mode 100644 lib/util/parmlist.c create mode 100644 lib/util/parmlist.h create mode 100644 lib/util/tests/parmlist.c create mode 100644 source4/auth/gensec/pygensec.c create mode 100644 source4/auth/gensec/tests/bindings.py Changeset truncated at 500 lines: diff --git a/lib/util/config.mk b/lib/util/config.mk index 6dc8354..9f33b0f 100644 --- a/lib/util/config.mk +++ b/lib/util/config.mk @@ -33,6 +33,7 @@ LIBSAMBA-UTIL_OBJ_FILES = $(addprefix $(libutilsrcdir)/, \ talloc_stack.o \ smb_threads.o \ params.o \ + parmlist.o \ util_id.o) PUBLIC_HEADERS += $(addprefix $(libutilsrcdir)/, util.h \ diff --git a/lib/util/parmlist.c b/lib/util/parmlist.c new file mode 100644 index 000..6658fa7 --- /dev/null +++ b/lib/util/parmlist.c @@ -0,0 +1,106 @@ +/* + * Unix SMB/CIFS implementation. + * Copyright (C) Jelmer Vernooij 2009 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of t
[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-730-g6b595a9
The branch, master has been updated via 6b595a93c1eb380ef6120dbbcc0c6e6bb7092deb (commit) from 8940e42d0ab129317d4c505ed2a401c3f5f9b5f9 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6b595a93c1eb380ef6120dbbcc0c6e6bb7092deb Author: Jelmer Vernooij Date: Sat Sep 26 13:53:27 2009 +0200 ldb: Check for talloc using pkg-config before checking manually, so we find version errors. --- Summary of changes: source4/lib/ldb/external/libtalloc.m4 |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/ldb/external/libtalloc.m4 b/source4/lib/ldb/external/libtalloc.m4 index b681541..8c63fcc 100644 --- a/source4/lib/ldb/external/libtalloc.m4 +++ b/source4/lib/ldb/external/libtalloc.m4 @@ -2,6 +2,7 @@ AC_SUBST(TALLOC_OBJ) AC_SUBST(TALLOC_CFLAGS) AC_SUBST(TALLOC_LIBS) -AC_CHECK_HEADER(talloc.h, - [AC_CHECK_LIB(talloc, talloc_init, [TALLOC_LIBS="-ltalloc"]) ], - [PKG_CHECK_MODULES(TALLOC, talloc >= 2.0.0)]) +PKG_CHECK_MODULES(TALLOC, talloc >= 2.0.0, + [ ], + [ AC_CHECK_HEADER(talloc.h, + [ AC_CHECK_LIB(talloc, talloc_init, [TALLOC_LIBS="-ltalloc"])])]) -- Samba Shared Repository