metze/samba-autobuild/.git
12 years agoAdd 'make pep8' target.
Jelmer Vernooij [Thu, 8 Dec 2011 21:14:55 +0000 (22:14 +0100)]
Add 'make pep8' target.

12 years agoAdd test for PEP8 - currently all errors are ignored, but we warn about them - and...
Jelmer Vernooij [Thu, 8 Dec 2011 20:56:08 +0000 (21:56 +0100)]
Add test for PEP8 - currently all errors are ignored, but we warn about them - and can ratchet if we want to.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  8 23:44:10 CET 2011 on sn-devel-104

12 years agoAdd pep8.
Jelmer Vernooij [Thu, 8 Dec 2011 20:22:35 +0000 (21:22 +0100)]
Add pep8.

12 years agotesttools: Update to new upstream revision.
Jelmer Vernooij [Thu, 8 Dec 2011 20:21:59 +0000 (21:21 +0100)]
testtools: Update to new upstream revision.

12 years agopyldb: Add more docstrings.
Jelmer Vernooij [Thu, 8 Dec 2011 19:28:18 +0000 (20:28 +0100)]
pyldb: Add more docstrings.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  8 22:08:49 CET 2011 on sn-devel-104

12 years agosamba.drs_utils: Use new style classes and exceptions, fix formatting of docstrings...
Jelmer Vernooij [Thu, 8 Dec 2011 19:23:57 +0000 (20:23 +0100)]
samba.drs_utils: Use new style classes and exceptions, fix formatting of docstrings to make pydoctor happy.

12 years agosamba.kcc_utils: Fix formatting to match PEP8, make pydoctor happy.
Jelmer Vernooij [Thu, 8 Dec 2011 19:20:03 +0000 (20:20 +0100)]
samba.kcc_utils: Fix formatting to match PEP8, make pydoctor happy.

12 years agos3-dbwrap: & is not required when taking a function pointer
Volker Lendecke [Thu, 8 Dec 2011 13:02:27 +0000 (14:02 +0100)]
s3-dbwrap: & is not required when taking a function pointer

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Dec  8 16:39:29 CET 2011 on sn-devel-104

12 years agos3-dbwrap: Make dbwrap_fallback_wipe private
Volker Lendecke [Thu, 8 Dec 2011 13:01:27 +0000 (14:01 +0100)]
s3-dbwrap: Make dbwrap_fallback_wipe private

12 years agos3-dbwrap: Avoid an "else" by an early return
Volker Lendecke [Thu, 8 Dec 2011 12:59:33 +0000 (13:59 +0100)]
s3-dbwrap: Avoid an "else" by an early return

12 years agos3-dbwrap: Make dbwrap_fallback_parse_record private
Volker Lendecke [Thu, 8 Dec 2011 12:58:19 +0000 (13:58 +0100)]
s3-dbwrap: Make dbwrap_fallback_parse_record private

We have the private fallback in dbwrap_parse_record anyway

12 years agos3-dbwrap: Make dbwrap_fallback_fetch private
Volker Lendecke [Thu, 8 Dec 2011 12:56:07 +0000 (13:56 +0100)]
s3-dbwrap: Make dbwrap_fallback_fetch private

12 years agos3-dbwrap: use wrappers where appropriate
Volker Lendecke [Thu, 8 Dec 2011 12:51:19 +0000 (13:51 +0100)]
s3-dbwrap: use wrappers where appropriate

12 years agos3-dbwrap: Use simpler code for logging keys
Volker Lendecke [Wed, 7 Dec 2011 13:50:54 +0000 (14:50 +0100)]
s3-dbwrap: Use simpler code for logging keys

12 years agos3: Fix some 64-bit warnings
Volker Lendecke [Fri, 2 Dec 2011 14:03:05 +0000 (15:03 +0100)]
s3: Fix some 64-bit warnings

12 years agos3: Fix some blank line endings
Volker Lendecke [Mon, 5 Dec 2011 09:49:48 +0000 (10:49 +0100)]
s3: Fix some blank line endings

12 years agos3: Fix typos
Volker Lendecke [Thu, 8 Dec 2011 09:30:16 +0000 (10:30 +0100)]
s3: Fix typos

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Dec  8 12:05:55 CET 2011 on sn-devel-104

12 years agoAdd tests for srvsvc python interface. Thanks Dhananjay Sathe
Jelmer Vernooij [Thu, 8 Dec 2011 01:42:28 +0000 (02:42 +0100)]
Add tests for srvsvc python interface. Thanks Dhananjay Sathe

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  8 04:57:52 CET 2011 on sn-devel-104

12 years agoselftest: Some extra assertions.
Jelmer Vernooij [Thu, 8 Dec 2011 01:42:08 +0000 (02:42 +0100)]
selftest: Some extra assertions.

12 years agodbcheck: cope with objects disappearing during checking
Andrew Tridgell [Thu, 8 Dec 2011 00:47:59 +0000 (11:47 +1100)]
dbcheck: cope with objects disappearing during checking

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  8 03:23:49 CET 2011 on sn-devel-104

12 years agosamba_kcc NTDSConnection translation
Dave Craft [Sun, 4 Dec 2011 17:08:56 +0000 (11:08 -0600)]
samba_kcc NTDSConnection translation

This is an advancement of samba_kcc to compute and
commit the modification of a repsFrom on an NC Replica.
The repsFrom is computed according to the MS tech spec
for implied replicas of NTDSConnections.  Proper maintenance
of (DRS options, schedules, etc) from a NTDSConnection are now
all present.  New classes for inter-site transports, sites,
and repsFrom) are now present in kcc_utils.py.  Substantively
this gets intra-site topology generation functional by committing
the repsFrom that were computed from the DSA graph implemented in
prior drops of samba_kcc

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoInvocation of samba_kcc from KCC task
Dave Craft [Sun, 4 Dec 2011 17:06:47 +0000 (11:06 -0600)]
Invocation of samba_kcc from KCC task

Modification to periodic and explicit invocation
paths of the KCC topology generation code.  Managed
via samba_runcmd_send() API.  The samba_kcc script
is invoked if (kccsrv:samba_kcc = true) appears in smb.conf

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoAdd subreq and status to kcc_service struct
Dave Craft [Sun, 4 Dec 2011 17:04:49 +0000 (11:04 -0600)]
Add subreq and status to kcc_service struct

The subreq and status fields in the kcc_service struct
are added for execution management of the external samba_kcc
python script.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoAdd DRSUAPI_DRS_UPDATE_(x) flags
Dave Craft [Sun, 4 Dec 2011 17:01:54 +0000 (11:01 -0600)]
Add DRSUAPI_DRS_UPDATE_(x) flags

DRSUAPI_DRS_UPDATE flags are used in
DRS_MSG_REPMOD_V1 message structure when repsFrom
is modified via RPC.  The RPCs are currently uncoded but
samba_kcc maintains the flags (and uses them to identify
what repsFrom changes are to be executed).  These are currently
helpful to samba_kcc and are intended to ultimately be used in
RPCs.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoAdd NTDSConnection schedule attr blob
Dave Craft [Sun, 4 Dec 2011 17:00:31 +0000 (11:00 -0600)]
Add NTDSConnection schedule attr blob

Add schedule blob to drsblobs to allow
NDR unpacking into a python class.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoAdd samba_kcc load parameter
Dave Craft [Sun, 4 Dec 2011 16:58:16 +0000 (10:58 -0600)]
Add samba_kcc load parameter

Configures parameter to enumerate name of python KCC
topology generator for subsequent use by samba_runcmd_send()
invocation from kcc task

Signed-off-by: Andrew Tridgell <tridge@samba.org>
12 years agoAdd version attribute for pytevent.
Jelmer Vernooij [Wed, 7 Dec 2011 10:57:57 +0000 (11:57 +0100)]
Add version attribute for pytevent.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Dec  7 15:07:49 CET 2011 on sn-devel-104

12 years agoselftest: samba4.samba-tool.domopen now passes, so do not skip
Andrew Bartlett [Wed, 7 Dec 2011 01:56:50 +0000 (12:56 +1100)]
selftest: samba4.samba-tool.domopen now passes, so do not skip

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Dec  7 04:42:02 CET 2011 on sn-devel-104

12 years agos4-selftest re-enable nsstest on libnss_winbind.so
Andrew Bartlett [Wed, 7 Dec 2011 01:51:59 +0000 (12:51 +1100)]
s4-selftest re-enable nsstest on libnss_winbind.so

12 years agos4-kdc: only build hdb plugin if we build against system Heimdal
Andrew Bartlett [Wed, 7 Dec 2011 00:43:01 +0000 (11:43 +1100)]
s4-kdc: only build hdb plugin if we build against system Heimdal

It is not safe to have a system kadmin use our plugin if we do not
share the same libkrb5.

Andrew Bartlett

12 years agoclarify Roadmap, as the shape of Samba 4.0 is much clearer now
Andrew Bartlett [Wed, 9 Nov 2011 23:02:15 +0000 (10:02 +1100)]
clarify Roadmap, as the shape of Samba 4.0 is much clearer now

12 years agoRemove outdated information from the README
Andrew Bartlett [Wed, 9 Nov 2011 22:59:57 +0000 (09:59 +1100)]
Remove outdated information from the README

12 years agos4-dnsupdate: Do not attempt to add the PDC names if we are not a PDC
Andrew Bartlett [Tue, 6 Dec 2011 22:57:07 +0000 (09:57 +1100)]
s4-dnsupdate: Do not attempt to add the PDC names if we are not a PDC

12 years agopydsdb: provide a am_pdc hook like am_rodc to python scripts
Andrew Bartlett [Tue, 6 Dec 2011 22:56:31 +0000 (09:56 +1100)]
pydsdb: provide a am_pdc hook like am_rodc to python scripts

12 years agos4-dns Use match-by-key in GSSAPI server if principal is not specified
Andrew Bartlett [Tue, 6 Dec 2011 03:18:41 +0000 (14:18 +1100)]
s4-dns Use match-by-key in GSSAPI server if principal is not specified

This allows dlz_bind9 to match on exactly the same key as bind9 itself

Andrew Bartlett

Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Dec  7 02:20:10 CET 2011 on sn-devel-104

12 years agoauth: Allow a NULL principal to be obtained from the credentials
Andrew Bartlett [Tue, 6 Dec 2011 04:56:44 +0000 (15:56 +1100)]
auth: Allow a NULL principal to be obtained from the credentials

This is important when trying to let GSSAPI search the keytab.

Andrew Bartlett

12 years agodlz_bind9: Add command line options for URL and debug
Amitay Isaacs [Tue, 6 Dec 2011 01:01:42 +0000 (12:01 +1100)]
dlz_bind9: Add command line options for URL and debug

To specify debug level, use -d <level> in named.conf.
To specify sam db, use -H <path/to/sam.ldb> in named.conf.

The default log level is set to 0. The log level specified in smb.conf
is not used. To set log level, use -d option.

12 years agodlz_bind9: Set debugging output to stderr
Amitay Isaacs [Mon, 5 Dec 2011 23:51:01 +0000 (10:51 +1100)]
dlz_bind9: Set debugging output to stderr

12 years agodlz_bind9: Use client supplied credentials for DNS record update
Amitay Isaacs [Wed, 30 Nov 2011 05:06:08 +0000 (16:06 +1100)]
dlz_bind9: Use client supplied credentials for DNS record update

This creates the DNS records with correct owner and group settings.

12 years agodlz_bind9: For creating a child entry, use only SEC_ADS_CREATE_CHILD
Amitay Isaacs [Tue, 29 Nov 2011 23:37:14 +0000 (10:37 +1100)]
dlz_bind9: For creating a child entry, use only SEC_ADS_CREATE_CHILD

The member servers in AD do not have access to modify the parent, but
do have access to create child DNS records.

12 years agotevent: Install python tevent modules.
Jelmer Vernooij [Tue, 6 Dec 2011 20:18:43 +0000 (21:18 +0100)]
tevent: Install python tevent modules.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Dec  6 23:13:37 CET 2011 on sn-devel-104

12 years agoInstall (platform-independent) python scripts to the PYTHONDIR rather than PYTHONARCHDIR.
Jelmer Vernooij [Tue, 6 Dec 2011 20:08:15 +0000 (21:08 +0100)]
Install (platform-independent) python scripts to the PYTHONDIR rather than PYTHONARCHDIR.

12 years agoAdd stub python module for tevent.
Jelmer Vernooij [Tue, 6 Dec 2011 20:03:21 +0000 (21:03 +0100)]
Add stub python module for tevent.

12 years agolib/util/util_tdb: adhere to coding style for tdb_data_is_empty()
Michael Adam [Tue, 6 Dec 2011 12:46:08 +0000 (13:46 +0100)]
lib/util/util_tdb: adhere to coding style for tdb_data_is_empty()

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  6 15:22:08 CET 2011 on sn-devel-104

12 years agos3:net registry check: replace rawmemchr by functionally equivalent portable strchr
Michael Adam [Tue, 6 Dec 2011 00:17:02 +0000 (01:17 +0100)]
s3:net registry check: replace rawmemchr by functionally equivalent portable strchr

rawmemchr is glibc only - not portable. Remarked by Ira Cooper.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  6 12:20:48 CET 2011 on sn-devel-104

12 years agoRevert "Remove rawmemchr calls - found by Ira Cooper. These are glibc-specific calls...
Michael Adam [Tue, 6 Dec 2011 00:05:39 +0000 (01:05 +0100)]
Revert "Remove rawmemchr calls - found by Ira Cooper. These are glibc-specific calls, makes us completely non-portable."

This reverts commit 82b1702284ba2bb61b23e1f14ce9145d896c36c0.

This is not functionally equivalent, needs to be done differently.

12 years agos3:registry: replace use of rawmemchr by portable equivalent use of strchr.
Michael Adam [Mon, 5 Dec 2011 23:58:24 +0000 (00:58 +0100)]
s3:registry: replace use of rawmemchr by portable equivalent use of strchr.

12 years agoknownfail: Mark some ldap.acl search tests as no longer failing.
Jelmer Vernooij [Mon, 5 Dec 2011 22:08:10 +0000 (23:08 +0100)]
knownfail: Mark some ldap.acl search tests as no longer failing.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Dec  6 00:43:40 CET 2011 on sn-devel-104

12 years agoknownfail: Remove working winbind tests.
Jelmer Vernooij [Mon, 5 Dec 2011 20:26:28 +0000 (21:26 +0100)]
knownfail: Remove working winbind tests.

12 years agoknownfail: The resolve async tests work now.
Jelmer Vernooij [Mon, 5 Dec 2011 18:11:37 +0000 (19:11 +0100)]
knownfail: The resolve async tests work now.

12 years agoknownfail: remove now succeeding local.iconv test.
Jelmer Vernooij [Mon, 5 Dec 2011 17:09:05 +0000 (18:09 +0100)]
knownfail: remove now succeeding local.iconv test.

12 years agoknownfail: remove base.maximum_allowed test, as it appears to be passing now.
Jelmer Vernooij [Mon, 5 Dec 2011 15:54:37 +0000 (16:54 +0100)]
knownfail: remove base.maximum_allowed test, as it appears to be passing now.

12 years agoknownfail: re-add createx test.
Jelmer Vernooij [Mon, 5 Dec 2011 14:29:53 +0000 (15:29 +0100)]
knownfail: re-add createx test.

12 years agoknownfail: Exclude specific list of SMB2 oplock tests.
Jelmer Vernooij [Mon, 5 Dec 2011 13:27:40 +0000 (14:27 +0100)]
knownfail: Exclude specific list of SMB2 oplock tests.

12 years agoknownfail: Remove smb2.compound tests, they pass now.
Jelmer Vernooij [Mon, 5 Dec 2011 01:59:44 +0000 (02:59 +0100)]
knownfail: Remove smb2.compound tests, they pass now.

12 years agoRemove samba4.raw.oplock.brl4. Bug 7928 has been fixed.
Jelmer Vernooij [Mon, 5 Dec 2011 01:00:34 +0000 (02:00 +0100)]
Remove samba4.raw.oplock.brl4. Bug 7928 has been fixed.

12 years agoknownfail: Match on end-of-file, not end-of-file-access.
Jelmer Vernooij [Sun, 4 Dec 2011 23:36:29 +0000 (00:36 +0100)]
knownfail: Match on end-of-file, not end-of-file-access.

12 years agoknownfail: samba4.base.createx_access.createx_access works.
Jelmer Vernooij [Sun, 4 Dec 2011 21:42:22 +0000 (22:42 +0100)]
knownfail: samba4.base.createx_access.createx_access works.

12 years agoknownfail: LogonControl2Ex works.
Jelmer Vernooij [Sun, 4 Dec 2011 20:40:51 +0000 (21:40 +0100)]
knownfail: LogonControl2Ex works.

12 years agoknownfail: Ignore failures for drsuapi tests over other transports as well.
Jelmer Vernooij [Sun, 4 Dec 2011 20:00:43 +0000 (21:00 +0100)]
knownfail: Ignore failures for drsuapi tests over other transports as well.

12 years agosamba4: Remove rpc-handles mixed-shared tests from known failing list.
Jelmer Vernooij [Sun, 4 Dec 2011 19:23:29 +0000 (20:23 +0100)]
samba4: Remove rpc-handles mixed-shared tests from known failing list.

12 years agoselftest: Re-mark some drsuapi tests as known failing.
Jelmer Vernooij [Sun, 4 Dec 2011 15:45:58 +0000 (16:45 +0100)]
selftest: Re-mark some drsuapi tests as known failing.

12 years agowafsamba: Cope with not everything having a final_libs attribute.
Jelmer Vernooij [Sun, 4 Dec 2011 14:36:27 +0000 (15:36 +0100)]
wafsamba: Cope with not everything having a final_libs attribute.

12 years agoselftest: Don't mark drsuapi tests as knownfailing.
Jelmer Vernooij [Sun, 4 Dec 2011 13:59:07 +0000 (14:59 +0100)]
selftest: Don't mark drsuapi tests as knownfailing.

12 years agowafsamba: Use final_libs list to determine if a target needs private libraries, rathe...
Jelmer Vernooij [Sun, 4 Dec 2011 13:58:11 +0000 (14:58 +0100)]
wafsamba: Use final_libs list to determine if a target needs private libraries, rather than direct dependencies list.

12 years agoFix typo.
Jelmer Vernooij [Sun, 4 Dec 2011 13:56:13 +0000 (14:56 +0100)]
Fix typo.

12 years agoselftest: 'samba4.rpc.netlogon on ncalrpc with seal,padcheck.netlogon.DsrEnumerateDom...
Jelmer Vernooij [Sun, 4 Dec 2011 13:22:40 +0000 (14:22 +0100)]
selftest: 'samba4.rpc.netlogon on ncalrpc with seal,padcheck.netlogon.DsrEnumerateDomainTrusts' now succeeds, remove it from the knownfail list.

12 years agoGetForestTrustInformation is implemented, remove it from knownfail.
Jelmer Vernooij [Sun, 4 Dec 2011 04:36:08 +0000 (05:36 +0100)]
GetForestTrustInformation is implemented, remove it from knownfail.

12 years agorap netsessiongetinfo apparently *is* provided by samba3, so don't list it in knownfail.
Jelmer Vernooij [Sun, 4 Dec 2011 04:06:15 +0000 (05:06 +0100)]
rap netsessiongetinfo apparently *is* provided by samba3, so don't list it in knownfail.

12 years agos3-selftest: Don't mark samba3.blackbox.failure.success test as known failing.
Jelmer Vernooij [Sun, 4 Dec 2011 03:38:07 +0000 (04:38 +0100)]
s3-selftest: Don't mark samba3.blackbox.failure.success test as known failing.

12 years agofilter-subunit: Fix default for flapping setting.
Jelmer Vernooij [Sun, 4 Dec 2011 02:55:11 +0000 (03:55 +0100)]
filter-subunit: Fix default for flapping setting.

12 years agoselftest: Display unexpected successes and expected failures.
Jelmer Vernooij [Sun, 4 Dec 2011 00:55:23 +0000 (01:55 +0100)]
selftest: Display unexpected successes and expected failures.

12 years agoselftest: Add --flapping argument to filter-subunit.
Jelmer Vernooij [Sat, 3 Dec 2011 23:23:02 +0000 (00:23 +0100)]
selftest: Add --flapping argument to filter-subunit.

12 years agoselftest: Split out flapping tests into a separate file.
Jelmer Vernooij [Sat, 3 Dec 2011 23:09:04 +0000 (00:09 +0100)]
selftest: Split out flapping tests into a separate file.

12 years agos4-drs: do not try to contact for replication servers that are not anymore in reps*
Matthieu Patou [Sun, 27 Nov 2011 23:28:44 +0000 (00:28 +0100)]
s4-drs: do not try to contact for replication servers that are not anymore in reps*

Servers connection can be removed from repsTo and respFrom either due to
DC demote or topology change by the KCC, if a server is removed from the
reps* it must be effectivly removed from the list of server that we will
contact for getNcChanges and for replicaSync.

Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Dec  5 19:56:09 CET 2011 on sn-devel-104

12 years agos4-resolver: do not use all the A and AAAA records, those after a NS are not the...
Matthieu Patou [Mon, 21 Nov 2011 22:37:03 +0000 (23:37 +0100)]
s4-resolver: do not use all the A and AAAA records, those after a NS are not the one we want to use

12 years agos4-drs: mark WERR_DS_DRA_BUSY as a non error in DsReplicaUpdateRefs
Matthieu Patou [Sun, 27 Nov 2011 11:24:23 +0000 (12:24 +0100)]
s4-drs: mark WERR_DS_DRA_BUSY as a non error in DsReplicaUpdateRefs

12 years agos4: add blackbox test for the demote function
Matthieu Patou [Sun, 4 Dec 2011 23:43:09 +0000 (00:43 +0100)]
s4: add blackbox test for the demote function

12 years agosamba-tool: refuse to demote if the current DC has still roles
Matthieu Patou [Sun, 4 Dec 2011 22:19:55 +0000 (23:19 +0100)]
samba-tool: refuse to demote if the current DC has still roles

12 years agosamba-tool: add a function to cleanly demote a DC
Matthieu Patou [Sun, 4 Dec 2011 22:00:57 +0000 (23:00 +0100)]
samba-tool: add a function to cleanly demote a DC

samba-tool domain demote allow the local DC to properly demote against
Microsoft and Samba DC.

12 years agos4-python: factorize the definition of get_dsServiceName
Matthieu Patou [Sun, 4 Dec 2011 13:23:34 +0000 (14:23 +0100)]
s4-python: factorize the definition of get_dsServiceName

12 years agos4-python: externalize some function to the drs_utils module so that they can be...
Matthieu Patou [Mon, 28 Nov 2011 19:48:59 +0000 (20:48 +0100)]
s4-python: externalize some function to the drs_utils module so that they can be reused

12 years agos4-python: rename conflicting variable with the import option
Matthieu Patou [Mon, 28 Nov 2011 18:31:57 +0000 (19:31 +0100)]
s4-python: rename conflicting variable with the import option

12 years agotdb2: tlist: remove type arg from tlist_top(), tlist_tail()
Rusty Russell [Mon, 5 Dec 2011 06:34:31 +0000 (17:04 +1030)]
tdb2: tlist: remove type arg from tlist_top(), tlist_tail()

With the type canary, it's unnecessary.  Though the implementation is
a bit more awkward since they longer map directly through to list_top/tail.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit a6b5111fe6948e51114c33aa34785c9fd0d403e6)

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Dec  5 12:13:08 CET 2011 on sn-devel-104

12 years agotdb2: display capability information in tdb_summary()
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: display capability information in tdb_summary()

This means we know they're there in future, and what restrictions they
carry.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit b3ca95351517e76b635347b39382b059a66f8388)

12 years agotdb2: add a capability list from the header.
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: add a capability list from the header.

This allows even more extensibility in future: in particular, the top
bits of each capability tell us what to do if we don't understand it:
fail the open, fail to open for write, or don't try to check the
format.

tdb_check needs to understand the capability list so it can know to
skip over it: each element in the list is prefixed with the type tag
and the length.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 35f198de1851a7d57064546b7ced677b6fabee27)

12 years agotdb2: provide tdb_layout_write() rather than implying it by new_tdb_layout arg.
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: provide tdb_layout_write() rather than implying it by new_tdb_layout arg.

Neater API.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 79d603a5f73dfbb655d8d08f67eecb5f2da542d5)

12 years agotdb2: add an internal TDB_CANT_CHECK flag.
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: add an internal TDB_CANT_CHECK flag.

This will be used shortly to indicate that a TDB2 file indicates it
cannot be checked.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit e01d795c8964b791def1e9f68c386b350b3a2a84)

12 years agotdb2: suppress failtest more than once on mmap.
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: suppress failtest more than once on mmap.

Now we test failing mmap, ccanlint -v time has increased from 200 to
330 seconds.  Worse, tests no time out on my laptop.

Fix this, by preventing us from going down that particular rabbit hole.
ccanlint -v now takes 201 seconds again.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit fbae37ba91ec230e34be564084099726cc3a9d47)

12 years agotdb2: simplify failtest helper.
Rusty Russell [Mon, 5 Dec 2011 06:34:30 +0000 (17:04 +1030)]
tdb2: simplify failtest helper.

failtest now culls duplicates for itself (and more efficiently), so
don't replicate the logic here.  It changes things a bit, because
failtest uses backtraces rather than a simple call point to find
duplicates.

Also, fix one case (in run-11-simple-fetch.c) where we simply exited
rather than using failtest_exit().  We got away with it before, because
we never hit that particular failure pattern.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 3d99c9334fe3067c88772547b9c06acec21616ea)

12 years agotdb2: failtest: use a linked list for history, not an array.
Rusty Russell [Mon, 5 Dec 2011 06:33:30 +0000 (17:03 +1030)]
tdb2: failtest: use a linked list for history, not an array.

This avoids a silly realloc, but more importantly it gets us closer to
being runtime extensible, as each history element can be a different
size.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 9571a41e8494f3135557e3ec50c2de856392173e)

12 years agotdb2: consolidate testing failtest suppression routines.
Rusty Russell [Mon, 5 Dec 2011 06:33:19 +0000 (17:03 +1030)]
tdb2: consolidate testing failtest suppression routines.

Less cut & paste means less patching as failtest changes.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 1819a36a3e69565bd7b853503fceb846558a45bd)

12 years agotdb2: fix intermittant failure in run-50-multiple-freelists-fail.c
Rusty Russell [Mon, 5 Dec 2011 06:33:19 +0000 (17:03 +1030)]
tdb2: fix intermittant failure in run-50-multiple-freelists-fail.c

layout.c's TDB creation functions were incorrect in case of a hash
collision, causing occasional failure.  Make it always use the
(previously-failing) seed value, and fix it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 60a487d57979e4364e70c837079f3cf083ddc9c7)

12 years agolib/ccan/cast: fix warnings with -Wextra (specifically -Wmissing-field-initializers)
Rusty Russell [Mon, 5 Dec 2011 06:12:50 +0000 (16:42 +1030)]
lib/ccan/cast: fix warnings with -Wextra (specifically -Wmissing-field-initializers)

As noted by Jan Engelhardt; libHX fixed this already.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit b2cc1341c9464b6da4654fd3fa0aafe934fba578)

12 years agolib/ccan/compiler, ilog: IDEMPOTENT "idempotent does not mean what you think it means"
Rusty Russell [Mon, 5 Dec 2011 06:12:50 +0000 (16:42 +1030)]
lib/ccan/compiler, ilog: IDEMPOTENT "idempotent does not mean what you think it means"

Actually, I don't even think it means that.  But rename it to something
which is sane.

Thanks to David Gibson for reporting.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit e764d0a27d2b6748ea7d343042ec7d6dda1f6aae)

12 years agolib/ccan/asearch: fix example on 64 bit platforms.
Rusty Russell [Mon, 5 Dec 2011 06:12:49 +0000 (16:42 +1030)]
lib/ccan/asearch: fix example on 64 bit platforms.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit a8446c3ef94ae0d5f273656da12aa9a8b3abf658)

12 years agolib/ccan/htable: benchmark against hsearch(3)
Rusty Russell [Mon, 5 Dec 2011 06:12:49 +0000 (16:42 +1030)]
lib/ccan/htable: benchmark against hsearch(3)

Since that has a fixed hash table size and doesn't support delete, we can't
do a thorough comparison, but we can insert and search.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 95757f0e9d979e7c653e9b53bb640deb4f0ea1f9)

12 years agolib/ccan/likely: use htable_type
Rusty Russell [Mon, 5 Dec 2011 06:12:48 +0000 (16:42 +1030)]
lib/ccan/likely: use htable_type

Also general cleanups:
(1) Don't assume that strings are folded by the compiler.
(2) Implement likely_stats_reset().
(3) Return non-const string from likely_stats(), as caller must free it.
(4) Don't use struct info indirection (that was from when we used callbacks?)
(5) Close memory leak in run-debug.c

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 0e5d0e30b30bb07b6605843e5ff224210d8083d8)

12 years agolib/ccan/htable: HTABLE_INITIALIZER() for static initialization.
Rusty Russell [Mon, 5 Dec 2011 06:12:48 +0000 (16:42 +1030)]
lib/ccan/htable: HTABLE_INITIALIZER() for static initialization.

Unfortunately it's a bit of a pain to use for typed hashtables, but it
works.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 60cc720d0797fc49325437ea36a9ffd909c75ed0)

12 years agolib/ccan/htable: clean up interface, document htable_type better.
Rusty Russell [Mon, 5 Dec 2011 06:12:47 +0000 (16:42 +1030)]
lib/ccan/htable: clean up interface, document htable_type better.

We change from htable_new()/htable_free() to htable_init/htable_clear.
We also change HTABLE_DEFINE_TYPE() to be the full name, without automatically
prepending htable_.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 0c3590dc33d644f73bb8587db454c491830aaf26)