Stefan Metzmacher [Mon, 25 Feb 2008 08:47:25 +0000 (09:47 +0100)]
Update documentation after backporting (memory leak) fixes.
metze
Andrew Tridgell [Thu, 18 Oct 2007 00:03:21 +0000 (02:03 +0200)]
r25690: - only use a readonly traverse in ldb_search when not in a transaction. When we are in a transaction then we could be in a top level modify operation (such as rename), so we must use a writeable traverse so that the async callbacks can do the modifies while the search is progressing.
- don't do the lockall operation on the tdb during a ldb search if in
a transaction, as this would prevent modifies by callbacks as well
Andrew Bartlett [Mon, 23 Jul 2007 01:46:39 +0000 (01:46 +0000)]
r23993: Attempt to fix bug #4808, reported by mwallnoefer@yahoo.de. The issue
is that when we all ldb_msg_add_empty(), we might realloc() the
msg->elements array. We need to ensure the source pointer (when
copying an element from the same msg) is still valid, or the data
copied.
Andrew Bartlett
Stefan Metzmacher [Fri, 8 Feb 2008 12:34:33 +0000 (13:34 +0100)]
r23590: Fix realloc leak on failure case from Jim Meyering <jim@meyering.net>.
Jeremy.
(cherry picked from commit
59ba128cb61e77a830ddd8b8e1d5d0fd00f99736)
Andrew Tridgell [Wed, 6 Jun 2007 12:44:04 +0000 (12:44 +0000)]
r23364: add LDB_FLG_NOMMAP flag
Stefan Metzmacher [Fri, 18 May 2007 07:41:43 +0000 (07:41 +0000)]
r22989: allow '@foo' attributes searchable as we allow '@foo' attributes
in all other places too...
metze
Stefan Metzmacher [Tue, 23 Jan 2007 10:37:36 +0000 (10:37 +0000)]
r20969: remove unused function, found my lcov
metze
Stefan Metzmacher [Thu, 11 Jan 2007 12:18:17 +0000 (12:18 +0000)]
r20684: if we don't have any indexes, then we should not waste time
to traverse the whole tdb and unpack each record
metze
(cherry picked from commit
492c79de13eab8db6079f880a8f0857dc7a29fa8)
Andrew Tridgell [Sun, 17 Dec 2006 23:11:46 +0000 (23:11 +0000)]
r20234: metze pointed out that we are re-loading the cache records on each
write. We should only be doing this if another process writes and
changes the seqnum. This avoids the extra cache loads
Stefan Metzmacher [Fri, 15 Dec 2006 22:00:56 +0000 (22:00 +0000)]
r20191: fix bug found by the IBM checker
metze
Stefan Metzmacher [Thu, 14 Dec 2006 10:03:21 +0000 (10:03 +0000)]
r20168: start separating attributes and syntaxes
metze
Stefan Metzmacher [Sat, 25 Nov 2006 14:49:17 +0000 (14:49 +0000)]
r19884: rename ldb_dn_key -> ltdb_index_key to make more clear what it's for...
metze
Stefan Metzmacher [Thu, 16 Nov 2006 11:05:37 +0000 (11:05 +0000)]
r19740: fix compiler warning
metze
Andrew Tridgell [Wed, 18 Oct 2006 21:45:46 +0000 (21:45 +0000)]
r19402: - use the new tdb_lockall_read() to make ldb_search() more efficient,
by avoiding chain locks on each tdb_fetch() within the search
- use the tdb_get_seqnum() call to avoid re-reading the @BASEINFO
record when it hasn't changed.
These speed up the LOCAL-DBSPEED test for ldb from 7k ops/sec to a bit
over 11k ops/sec
Andrew Tridgell [Wed, 18 Oct 2006 21:41:59 +0000 (21:41 +0000)]
r19401: make tdb_lockall() much more efficient, and add a tdb_lockall_read()
call which does a read lock on all chains. These will be used to make
ldb searches more efficient
(cherry picked from commit
de664ec1f8cf179f1d650563272c0de3f7636e2b)
Andrew Tridgell [Tue, 17 Oct 2006 05:50:01 +0000 (05:50 +0000)]
r19365: fixed a memory leak in the ldb attribute handling
Stefan Metzmacher [Fri, 8 Feb 2008 11:37:14 +0000 (12:37 +0100)]
r19363: - don't need to store the baseinfo message after cache load
(cherry picked from commit
8c091bcdece5c17073838ad2367f3f4e22e97c31)
Stefan Metzmacher [Sat, 9 Feb 2008 11:24:36 +0000 (12:24 +0100)]
r19362: - don't need to store the baseinfo message after cache load
(load cache at startup, this fixes the open of a non existing ldb)
metze
(cherry picked parts from commit
3bf76db42dc6dde5d71083216dba819869b31c75)
Andrew Tridgell [Mon, 16 Oct 2006 10:12:43 +0000 (10:12 +0000)]
r19324: fixed a leak on deleting records when no index is in place
(cherry picked from commit
0824b3b8c1003064b0f2c5a3f084f3e711155e8c)
Andrew Tridgell [Mon, 16 Oct 2006 09:28:39 +0000 (09:28 +0000)]
r19323: fixed a leak in the ldif parse code
Andrew Tridgell [Mon, 16 Oct 2006 09:08:43 +0000 (09:08 +0000)]
r19322: fix a minor memory leak in the ltdb cache code
Simo Sorce [Mon, 16 Oct 2006 01:01:37 +0000 (01:01 +0000)]
r19305: Potential memleak on the ldb_context if we don't use a temp mem context
Andrew Tridgell [Sat, 14 Oct 2006 08:26:10 +0000 (08:26 +0000)]
r19274: fix ldbdel and ldbmodify to return an error if the underlying ldb call
fails
Stefan Metzmacher [Fri, 6 Oct 2006 16:17:19 +0000 (16:17 +0000)]
r19146: merge from samba3:
talloc_reference() can fail
metze
Volker Lendecke [Fri, 6 Oct 2006 15:03:41 +0000 (15:03 +0000)]
r19134: Merge the second set of C++ warning fixes from Samba3. I'll leave r19132 to
metze to merge until the questions have been answered.
Volker
Andrew Tridgell [Fri, 6 Oct 2006 06:52:30 +0000 (06:52 +0000)]
r19114: fixed another checker warning and a possible error on allocation
failure
(cherry picked from commit
bc02f7ef96e164a59441e3fd9429221be83fc7e4)
Andrew Tridgell [Fri, 6 Oct 2006 06:42:05 +0000 (06:42 +0000)]
r19113: fixed another checker warning.
Andrew Tridgell [Thu, 24 Aug 2006 07:20:32 +0000 (07:20 +0000)]
r17771: add a comment explaing the odd cast
Andrew Tridgell [Tue, 22 Aug 2006 22:28:37 +0000 (22:28 +0000)]
r17722: better to use talloc_vasprintf() than vasprintf() directly, as it
depends on less libc functions
Stefan Metzmacher [Tue, 22 Aug 2006 18:09:49 +0000 (18:09 +0000)]
r17711: fix compiler warnings
metze
Stefan Metzmacher [Mon, 14 Aug 2006 09:52:58 +0000 (09:52 +0000)]
r17532: merge from SAMBA_3_0 Revision: 17460
First step at fixing the build breakage with the groupmapping test. On Linux,
F_RDLCK is defined to 0, for example NetBSD has it at 1.
Still does not work fully though. Still investigating.
metze
(cherry picked from commit
af08e56442367b5d803f61b8554d85e2fe0ce7e9)
Andrew Bartlett [Mon, 10 Jul 2006 12:51:36 +0000 (12:51 +0000)]
r16916: Implement metze's proposed changes to the tdb logging API.
This clearly links the log function with its private pointer, and
makes the argument list for tdb_open_ex a bit shorter.
Andrew Bartlett
(cherry picked from commit
5d5503e8d8a10ead3ef21a5ffda52cadb9a07727)
Stefan Metzmacher [Mon, 3 Jul 2006 08:16:16 +0000 (08:16 +0000)]
r16776: fix typo
metze
(cherry picked from commit
249bf24a40f78aab181a4cce8c42902859e43238)
Andrew Bartlett [Mon, 3 Jul 2006 06:40:56 +0000 (06:40 +0000)]
r16774: This patch modifies the tdb API to allow the logging function to be used
as part of ldb.
This allows tdb failures to be passed all the way up to Samba's DEBUG
system, which allowed easier debugging.
Unfortunately I had to extend the tdb API, as the logging function
didn't have a context pointer.
I've worked over the 'debug levels' in TDB. Most of them were 0,
which didn't seem right, as some were trace-like messages. We didn't
see any of these previously, except when accessing TDB directly.
Andrew Bartlett
(cherry picked from commit
58898092c1ce043f6d698db5065f372b79109e22)
Simo Sorce [Mon, 5 Jun 2006 00:46:52 +0000 (00:46 +0000)]
r16043: Fix error message
(cherry picked from commit
2898df2cee22f2d478440e9576bec15140909e45)
Volker Lendecke [Tue, 18 Apr 2006 11:26:43 +0000 (11:26 +0000)]
r15120: Minimize the diff between Samba3 and Samba4 tdb: In Samba3 we don't allow C++
keywords. Change "private" -> "private_data".
Volker
(cherry picked from commit
047671567173e808fece41485bbeaaeebab7d4a2)
Volker Lendecke [Mon, 17 Apr 2006 11:42:59 +0000 (11:42 +0000)]
r15100: Port the bugfix for #3569 to Samba4
(cherry picked from commit
5f1d52f232051324082b840f29dd7719a9328bd5)
Andrew Tridgell [Sat, 8 Apr 2006 02:29:48 +0000 (02:29 +0000)]
r14972: fix an uninitialised warning from ibm checker
(cherry picked from commit
9b867d2acffdfdcd5dc1dd5341db19daf11b5e96)
Andrew Tridgell [Wed, 5 Apr 2006 03:51:43 +0000 (03:51 +0000)]
r14916: print errno so I can work out why OpenBSD is failing the test for tdb
in the build farm. msync() is failing.
(cherry picked from commit
4c3f3c414135c2b8fa9ea11a156246b56285b84f)
Andrew Tridgell [Thu, 30 Mar 2006 04:52:39 +0000 (04:52 +0000)]
r14799: added a tdb_get_seqnum() call, and the TDB_SEQNUM flag. This allows
for an extremely lightweight test to see if a tdb has possibly
changed.
(cherry picked from commit
f325ba605ccceca63712c0f2c98961e35e437b3d)
Andrew Tridgell [Wed, 15 Mar 2006 05:50:42 +0000 (05:50 +0000)]
r14431: don't call qsort with a null array
(cherry picked from commit
2c33f577ad5bf8cddec735e75a26c4a4c07d8c51)
Jeremy Allison [Wed, 8 Mar 2006 07:20:10 +0000 (07:20 +0000)]
r14029: Fix resource leak in error codepath. Coverity CID #64.
Jeremy.
(cherry picked from commit
d2e9d5b34baee90060ee9131b3da903309625a56)
Stefan Metzmacher [Fri, 8 Feb 2008 11:19:31 +0000 (12:19 +0100)]
r13900: don't segfault on error
(cherry picked from commit
cf7ad707578ee4dbd5dbf3c83f1f4ede42de3835)
Simo Sorce [Wed, 1 Mar 2006 20:06:34 +0000 (20:06 +0000)]
r13773: Be consistent in the way you get out and free allocated data
(cherry picked from commit
1113d4caa7bea1a7ffb9a50f42c5672bc1d452b4)
Simo Sorce [Wed, 1 Feb 2006 20:48:05 +0000 (20:48 +0000)]
r13289: Check the tree is not NULL
Thanks to Aaron J. Seigo <aseigo@kde.org> for spotting this
(cherry picked from commit
4b5c0493e2276a9eba1bada7c4bac99999a465e2)
Andrew Tridgell [Wed, 1 Feb 2006 05:24:19 +0000 (05:24 +0000)]
r13278: remove a silly strcasecmp() replacement
(cherry picked from commit
6ec71ffbc141df398aff3e11c45e35e15192c66f)
Andrew Tridgell [Wed, 1 Feb 2006 10:50:26 +0000 (10:50 +0000)]
r13283: added two optimisations to the tdb transactions code. The first is to
more agressively coalesce entries in the linked list of the undo
log. The second is to ensure that writes during a transaction into the
hash table don't cause the size of the undo log linked list to grow.
These optimisations don't affect Samba much, but they make a huge
difference to the use of ldb in kde
(cherry picked from commit
a37d9434d1fa181fd3d060ad032ee4ec5135fc52)
Stefan Metzmacher [Fri, 8 Feb 2008 10:50:34 +0000 (11:50 +0100)]
nbt_server: fix crash bug, the wins client interface may not have a nbtsock
metze
Stefan Metzmacher [Fri, 8 Feb 2008 10:49:39 +0000 (11:49 +0100)]
add .gitignore
metze
Stefan Metzmacher [Wed, 30 Jan 2008 10:46:53 +0000 (11:46 +0100)]
Update documentation after memory leak fixes.
metze
Stefan Metzmacher [Wed, 30 Jan 2008 09:41:39 +0000 (10:41 +0100)]
winsdb: fix memory leaks in error pathes
metze
Stefan Metzmacher [Wed, 30 Jan 2008 09:40:16 +0000 (10:40 +0100)]
wrepl_server: fix memory leak in wreplsrv_load_partners()
This allocates only the talloc chunk header,
but it's called very, very often...
metze
Stefan Metzmacher [Wed, 30 Jan 2008 09:36:24 +0000 (10:36 +0100)]
ndr_print: fix the output ndr debug messages only add header line once
metze
Stefan Metzmacher [Wed, 30 Jan 2008 09:34:57 +0000 (10:34 +0100)]
util_str: setup the correct talloc name for strings
metze
Stefan Metzmacher [Wed, 30 Jan 2008 09:30:41 +0000 (10:30 +0100)]
talloc: print out the pointer values in the full report
metze
Stefan Metzmacher [Wed, 23 Jan 2008 11:08:05 +0000 (12:08 +0100)]
smbd: fix SIGHUP and SIGUSR2 interaction
We need to make sure to that we don't dump
the talloc report into the old log fd.
metze
Stefan Metzmacher [Wed, 23 Jan 2008 09:51:07 +0000 (10:51 +0100)]
smbd4wins: don't link against -lgnutls and -lpam
we don't need auth_unix and tls.
metze
Stefan Metzmacher [Wed, 16 Jan 2008 13:03:01 +0000 (14:03 +0100)]
Update documentation after WACK challenges responses bug fix.
metze
Stefan Metzmacher [Wed, 16 Jan 2008 12:57:50 +0000 (13:57 +0100)]
nbt_server: redirect incoming response packets to the correct interface
We may send requests packets (WACK challenges or similar things)
via a different udp socket than the socket we receive the
matching response. We need to setup an unexpected handler
on the nbt sockets and redirect responses to the correct
nbt_socket. (By redirect I mean we use the correct
nbt_socket structure, we're *not* resending the packet
with sendto() via the kernel...)
metze
Stefan Metzmacher [Wed, 16 Jan 2008 13:51:56 +0000 (14:51 +0100)]
libcli/nbt: add nbt_name_socket_handle_response_packet()
Move the last part of nbt_name_socket_recv() into
a new function nbt_name_socket_handle_response_packet()
so that it can be reused by an unexpected handler.
metze
Stefan Metzmacher [Wed, 16 Jan 2008 12:44:11 +0000 (13:44 +0100)]
libcli/nbt: add nbt_set_unexpected_handler()
metze
Stefan Metzmacher [Wed, 16 Jan 2008 12:43:07 +0000 (13:43 +0100)]
nbt_server: add some debug messages which show the used interfaces addresses
metze
Stefan Metzmacher [Mon, 14 Jan 2008 13:41:24 +0000 (14:41 +0100)]
prepare for samba4wins-1.0.7
metze
Stefan Metzmacher [Mon, 14 Jan 2008 13:38:54 +0000 (14:38 +0100)]
mkversion: update to handle git
metze
Stefan Metzmacher [Mon, 14 Jan 2008 12:59:27 +0000 (13:59 +0100)]
smbd: dump talloc memory tree to the logs, when we receive a SIGUSR2.
metze
Stefan Metzmacher [Mon, 14 Jan 2008 12:57:12 +0000 (13:57 +0100)]
wreplsrv: don't log scavenging events at level 0
metze
Stefan Metzmacher [Mon, 14 Jan 2008 12:56:25 +0000 (13:56 +0100)]
wreplsrv: log a successful replication cycle at level 1
metze
Stefan Metzmacher [Mon, 14 Jan 2008 12:52:14 +0000 (13:52 +0100)]
wreplsrv: log replication failures at log level 0
metze
Stefan Metzmacher [Mon, 14 Jan 2008 08:18:42 +0000 (09:18 +0100)]
libcli/nbt: fix wack timeout handling
If the client gets a WACK response, the server
sends a timeout to the client. Possible
values are between 9 and 105 seconds.
Because w2k3 servers have a bug and always return
a value of 5 seconds, we need a workarround.
Always using a fixed value of 30 seconds is bad
as we could timeout to early.
Now we use the value from the server if it's in the
valid range and otherwise we use the upper limit
of the valid range (105s).
metze
Stefan Metzmacher [Mon, 14 Jan 2008 08:10:37 +0000 (09:10 +0100)]
NBT-WINS: test if the server ignores resent packets
metze
Stefan Metzmacher [Fri, 11 Jan 2008 18:10:30 +0000 (19:10 +0100)]
NBT-WINS: we don't need the slow low port tests for every name
metze
Stefan Metzmacher [Fri, 11 Jan 2008 18:05:33 +0000 (19:05 +0100)]
NBT-WINS: if we're bound to port 137 trigger WACK reponses with timeouts
metze
Stefan Metzmacher [Fri, 11 Jan 2008 18:01:50 +0000 (19:01 +0100)]
NBT-WINS: try to bind to port 137 in the NBT-WINS test
metze
Stefan Metzmacher [Fri, 11 Jan 2008 16:02:26 +0000 (17:02 +0100)]
torture: fix the build with --enable-developer
metze
Stefan Metzmacher [Fri, 11 Jan 2008 15:11:59 +0000 (16:11 +0100)]
winsserver: we need to ignore duplicated name register requests.
This fixes the following bug:
While we reply with a WACK response to a client.
Instead of waiting for the final reply some
windows client just resends the request using
the same name_trn_id in the nbt_name_packet.
We handled this as a new request and send a
WACK response (and the challenges) again.
Then the first request gets its final success
response, but the when we try to send the success
for the "second" request we notice that
the record was changed in between and we return
an error.
Windows 2003 (and I assume all other versions as well)
detect the packet is just a resent of a currently pending
request and ignores it.
So we now keep a list of all pending WINS name register
requests which result in a WACK response. On each incoming
name register request we search through the list to find
duplicate requests and ignore them. In theory we should
do that for all requests, but name register requests
are the only requests we response async and only
if we have to go via the WACK code path.
metze
Stefan Metzmacher [Fri, 11 Jan 2008 06:08:39 +0000 (07:08 +0100)]
import samba4wins-1.0.6 patches
metze
Stefan Metzmacher [Fri, 11 Jan 2008 06:05:42 +0000 (07:05 +0100)]
import samba4wins-1.0.5 patches
metze
Stefan Metzmacher [Fri, 11 Jan 2008 06:03:14 +0000 (07:03 +0100)]
import samba4wins-1.0.4 patches
metze
Stefan Metzmacher [Fri, 11 Jan 2008 05:59:26 +0000 (06:59 +0100)]
import samba4wins-1.0.3 patches
metze
Stefan Metzmacher [Fri, 11 Jan 2008 05:55:26 +0000 (06:55 +0100)]
import samba4wins-1.0.2 patches
metze
Stefan Metzmacher [Fri, 11 Jan 2008 05:30:02 +0000 (06:30 +0100)]
import samba4wins-1.0.1 patches
metze
Stefan Metzmacher [Wed, 9 Jan 2008 18:13:38 +0000 (19:13 +0100)]
import samba4wins-1.0.0 patches
metze
Stefan Metzmacher [Thu, 26 Jan 2006 12:59:55 +0000 (12:59 +0000)]
r13163: as we don't import the raw magic configure vars for
libdir, datadir, sysconfdir,localstatedir into our Makefile
we need to expand them in configure
I'll maybe rework this later but for now this works
metze
Jelmer Vernooij [Thu, 26 Jan 2006 11:48:45 +0000 (11:48 +0000)]
r13161: Remove optional password as second parameter. Improve return values a bit.
Jelmer Vernooij [Thu, 26 Jan 2006 11:47:45 +0000 (11:47 +0000)]
r13160: Fix some of the smbclient testsuite (after failures on the buildfarm)
Jelmer Vernooij [Thu, 26 Jan 2006 10:18:26 +0000 (10:18 +0000)]
r13158: Fix setup and ejs paths
Jelmer Vernooij [Thu, 26 Jan 2006 08:27:48 +0000 (08:27 +0000)]
r13157: Fix installation of js files
Jelmer Vernooij [Thu, 26 Jan 2006 06:35:13 +0000 (06:35 +0000)]
r13156: Add some tests for smbclient
Jelmer Vernooij [Thu, 26 Jan 2006 06:33:45 +0000 (06:33 +0000)]
r13155: Large amount of updates to smbclient to:
- Remove global variables (pass things around as variables, add a 'struct smbclient_context')
- Get rid of pstring
- Fix up some of the return values
- Fix some generally weird code
Jelmer Vernooij [Thu, 26 Jan 2006 06:29:59 +0000 (06:29 +0000)]
r13154: Add some const
Andrew Bartlett [Thu, 26 Jan 2006 05:57:53 +0000 (05:57 +0000)]
r13153: Try to move closer to FHS. This probably breaks everything...
Andrew Bartlett
Andrew Bartlett [Thu, 26 Jan 2006 05:05:26 +0000 (05:05 +0000)]
r13152: Jelmer assures me that this won't break anything, but does make it
much clearer where things go.
Andrew Bartlett
Andrew Bartlett [Thu, 26 Jan 2006 02:02:47 +0000 (02:02 +0000)]
r13150: Correct comment.
Andrew Bartlett
Andrew Bartlett [Thu, 26 Jan 2006 01:59:07 +0000 (01:59 +0000)]
r13149: DEBUG is a bad choice for 'net', it should print to stderr
Andrew Bartlett
Andrew Bartlett [Wed, 25 Jan 2006 22:47:10 +0000 (22:47 +0000)]
r13144: This seems to be required for Samba4 to talk to Samba4, and to get the
same session key. I need to understand this more, but it works
samba/samba, and I don't have access to windows doing AES (longhorn)
yet.
Andrew Bartlett
Stefan Metzmacher [Wed, 25 Jan 2006 12:54:30 +0000 (12:54 +0000)]
r13131: windows sends termination here, this fixes access with regedit
metze
Stefan Metzmacher [Wed, 25 Jan 2006 12:19:49 +0000 (12:19 +0000)]
r13129: fix the memory hierachie
metze
Stefan Metzmacher [Wed, 25 Jan 2006 12:19:13 +0000 (12:19 +0000)]
r13128: init the private_data to NULL
so so that we don't crash when ntvfs_connect() fails
metze
Jelmer Vernooij [Tue, 24 Jan 2006 23:38:43 +0000 (23:38 +0000)]
r13123: Some small doc updates.
Stefan Metzmacher [Tue, 24 Jan 2006 19:37:44 +0000 (19:37 +0000)]
r13117: the caller may reference the winsdb_addr struct,
and as a winsdb_record has a short lifetime, it's no problem
to not free unused addresses directly
metze