summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* pytdb: Add support for tdb_add_flags() & tdb_remove_flags()Kirill Smelkov2010-09-192-0/+27
| | | | | | | | | Note, unlike tdb_open where flags is `int', tdb_{add,remove}_flags want flags as `unsigned', so instead of "i" I used "I" in PyArg_ParseTuple. Cc: 597386@bugs.debian.org Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
* lib/util: usec_time_diff takes arguments the other way round than TvalDiff didBjörn Jacke2010-09-171-1/+1
|
* s3/s4: merge msleep and smb_msleepBjörn Jacke2010-09-162-8/+43
| | | | | the merged variant is renamed to smb_msleep as some platforms already have a msleep function.
* tdb: added TDB_NO_FSYNC env variableAndrew Tridgell2010-09-161-0/+4
| | | | this might help reduce test times and load on test machines
* Fix a typoVolker Lendecke2010-09-151-1/+1
|
* tsocket: we return -1 on error, not fdAndrew Tridgell2010-09-151-7/+7
| | | | | | | | | | | | | | | | | | | | | the code used this pattent: if (fd < 0) { ...various cleanups... return fd; } it is much clearer to do this: if (fd < 0) { ...various cleanups... return -1; } as otherwise when reading the code you think this function may return a fd. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* talloc: fixed spelling errors in commentAndrew Tridgell2010-09-151-2/+2
|
* Ensure incoming timespec values correctly wrap at nsecs.Jeremy Allison2010-09-141-0/+7
| | | | Jeremy.
* libreplace: use CLOCK_HIGHRES when availableBjörn Jacke2010-09-141-3/+5
| | | | in Solaris 8 CLOCK_HIGHRES was the (only) name for CLOCK_MONOTONIC
* tdb: add ABI/tdb-1.2.4.sigsStefan Metzmacher2010-09-141-0/+60
| | | | metze
* subunit.pm: Pass through milliseconds in time reports.Jelmer Vernooij2010-09-141-2/+1
|
* lib/tdb: change version to 1.2.4 after hash checking improvmentsStefan Metzmacher2010-09-132-2/+2
| | | | | | | | lib/tdb: change version to 1.2.4 after hash checking improvments metze Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: put example hashes into header, so we notice incorrect hash_fn.Rusty Russell2010-09-133-2/+65
| | | | | | | | | | This is Stefan Metzmacher <metze@samba.org>'s patch with minor changes: 1) Use the TDB_MAGIC constant so both hashes aren't of strings. 2) Check the hash in tdb_check (paranoia, really). 3) Additional check in the (unlikely!) case where both examples hash to 0. 4) Cosmetic changes to var names and complaint message. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: fix tdb_check() on other-endian tdbs.Rusty Russell2010-09-131-1/+1
| | | | | | We must not endian-convert the magic string, just the rest. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: fix tdb_check() on read-only TDBs to actually work.Rusty Russell2010-09-131-5/+17
| | | | | | | | | | Commit bc1c82ea137 "Fix tdb_check() to work with read-only tdb databases." claimed to do this, but tdb_lockall_read() fails on read-only databases. Also make sure we can still do tdb_check() inside a transaction (weird, but we previously allowed it so don't break the API). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* tdb: make check more robust against recovery failures.Rusty Russell2010-09-131-5/+36
| | | | | | | | | | | We can end up with dead areas when we die during transaction commit; tdb_check() fails on such a (valid) database. This is particularly noticable now we no longer truncate on recovery; if the recovery area was at the end of the file we used to remove it that way. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* lib/replace/wscript:Tru64 build - Better use version 600 for _XOPEN_SOURCEMatthias Dieter Wallnöfer2010-09-111-2/+2
| | | | | | | | | | | | | | This means we request the "Single UNIX Specification, Version 3" with C99 compatibility as the Python 2.5 release on the system. This prevents redefinitions with different values. > [ 451/1918] Compiling scripting/python/pyglue.c > cc: Warning: /usr/local/include/python2.5/pyconfig.h, line 951: The redefinition of the macro "_XOPEN_SOURCE" conflicts with a current definition because the replacement lists differ. The redefinition is now in effect. (macroredef) > #define _XOPEN_SOURCE 600 > ----------------------^ > cc: Warning: default/source4/include/config.h, line 54: The redefinition of the macro "_XOPEN_SOURCE" conflicts with a current definition because the replacement lists differ. The redefinition is now in effect. (macroredef) > #define _XOPEN_SOURCE 500 > ----------------------^
* lib/replace:wscript - additional attempt to fix the build on Tru64Matthias Dieter Wallnöfer2010-09-111-1/+3
| | | | | Obviously we really need both definitions ("socklen_t" has been found by "_XOPEN_SOURCE"=500). But now FIONREAD wasn't accessible.
* lib/replace:wscript - don't check twice for type "bool"Matthias Dieter Wallnöfer2010-09-111-2/+1
|
* lib/replace:wscript - attempt to fix the features detection on Tru64Matthias Dieter Wallnöfer2010-09-111-2/+2
| | | | | | | Hopefully now we detect the built-in "socklen_t" https://bugs.internet2.edu/jira/browse/SSPCPP-114 http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN5/0001____.HTM
* libreplace: clock_gettime sets errnoBjörn Jacke2010-09-101-1/+2
|
* lib/util: remove some unused_result warnings.Günther Deschner2010-09-091-2/+7
| | | | Guenther
* lib/util: add time_mono() for monotonic time a la time()Björn Jacke2010-09-072-0/+26
|
* dnspython: Update to latest upstream.Jelmer Vernooij2010-09-0430-104/+225
|
* subunit: Import latest upstream.Jelmer Vernooij2010-09-0413-118/+300
|
* testtools: Import latest upstream.Jelmer Vernooij2010-09-0428-207/+2334
|
* util: added samba_start_debugger()Andrew Tridgell2010-09-042-0/+18
| | | | | This developer function is useful for debugging unusual error conditions
* pidl-python: cope with NULL pointers in more placesAndrew Tridgell2010-09-022-0/+24
| | | | NULL is converted to Py_None
* pytalloc: treat a NULL ptr as Py_NoneAndrew Tridgell2010-09-021-1/+7
|
* tdb/waf: the deps for rt are provided by libreplaceBjörn Jacke2010-08-311-1/+1
|
* replace/waf: add rt to deps at this placeBjörn Jacke2010-08-311-1/+1
|
* lib/util: add nsec_time_diff to calulate diffs from timespecsBjörn Jacke2010-08-312-0/+14
|
* lib/util: add function to query the monotonic clock with the required ↵Björn Jacke2010-08-312-0/+15
| | | | fallback to the realtime clock
* libreplace: make a define for a best effort monotonic clockBjörn Jacke2010-08-311-0/+7
|
* libreplace: add clock_gettime replacement function for systems that don't ↵Björn Jacke2010-08-314-0/+32
| | | | have it
* libreplace/waf: look for clock_gettimeBjörn Jacke2010-08-311-0/+1
|
* libreplace: move detection of clock_gettime to libreplaceBjörn Jacke2010-08-311-0/+43
|
* libreplace: move gettimeofday TZ arg check hereBjörn Jacke2010-08-312-9/+10
|
* lib/util: remove implicit discard_const_p() from SAFE_FREE()Stefan Metzmacher2010-08-281-1/+1
| | | | | | | | This should fix a lot of warnings on IRIX. If callers know what they're doing they can use discard_const_p() on their own. metze
* Revert "lib/tsocket: sa_socklen is a macro on irix, so better use sasocklen"Stefan Metzmacher2010-08-283-39/+39
| | | | | | | | This reverts commit 3d4fb698660381e650d7caeb5b7cff12847c0fb8. This was wrong... The problem was in the caller, sa_len is a macro on irix metze
* lib/tsocket: sa_socklen is a macro on irix, so better use sasocklenStefan Metzmacher2010-08-273-39/+39
| | | | metze
* pytalloc: fixed py_talloc_steal()Andrew Tridgell2010-08-252-1/+9
| | | | | | | | | | | py_talloc_steal() was implemented as a macro which evaluated it's 2nd argument twice. It was often called via a macro with a 2nd argument that was a function call, for example an allocation in py_talloc_new(). This meant it allocated memory twice, and leaked one of them. This re-implements py_talloc_steal() as a function, so that it only does the allocation once.
* s4-pytalloc: use better names for python talloc objectsAndrew Tridgell2010-08-251-0/+2
|
* replace: Fix ifndefs for formatting defines.Jelmer Vernooij2010-08-231-3/+3
| | | | Thanks to Michael Brown for pointing this out.
* libreplace: fixed the strptime() waf testAndrew Tridgell2010-08-231-8/+2
| | | | Thanks to Jelmer for pointing this out
* Use DocBook DTD rather than Samba one, as no Samba-specific things areJelmer Vernooij2010-08-223-3/+3
| | | | used in the tdb manpages.
* smbtorture: Emit correct test results if setup fails.James Peach2010-08-171-15/+31
| | | | | | If the test setup fails, we still need to format the test result for the UI. At leas in the subunit case, the format doesn't specify what to do here, so we fail every test manually with the setup failure message.
* s3: Fix a ton of type-punned warningsVolker Lendecke2010-08-171-4/+4
|
* s3: Fix a typoVolker Lendecke2010-08-151-1/+1
|
* talloc:documentation - explain that "talloc_free" works also with "NULL" ↵Matthias Dieter Wallnöfer2010-08-142-14/+26
| | | | | | | | | | | | | | | | | | | pointers (talloc.c) ... > static inline int _talloc_free_internal(void *ptr, const char *location) > { > struct talloc_chunk *tc; > > if (unlikely(ptr == NULL)) { > return -1; > } > > tc = talloc_chunk_from_ptr(ptr); ... Obviously this never had been documented before.