1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

59387 Commits

Author SHA1 Message Date
Andrew Tridgell
32809bd8c1 util: rewrite dlinklist.h so that DLIST_ADD_END() is O(1)
This changes the meaning of the ->prev pointer in our doubly linked
lists to point at the end of the list from the front of the list. That
allows us to implement DLIST_ADD_END() and related functions in O(1)
time, which can be a huge saving in many places in Samba.

This also means that the 'type' argument to various DLIST_*() macros
is no longer needed, but I have left it in for now to keep the
patchset small, which will make it easier to revert if any problems
are found. In the future we should remove the 'type' arguments.

(jra. Move the one use of DLIST_TAIL over to the new macros).
2010-02-10 15:53:58 -08:00
Andrew Tridgell
13ac4ad521 s3-smbd: update to use new DLIST macros
(cherry picked from commit 365b408c458c848a818637d9b36a0423aeb1ba54)
2010-02-10 15:43:49 -08:00
Andrew Tridgell
aa52a0925d s3-registry: update to use new DLIST macros
(cherry picked from commit 3437713ad7e5bccafde30553a8232119fd2a9eb9)
2010-02-10 15:42:00 -08:00
Andrew Tridgell
f592d42047 s3-perfcount: update to use new DLIST macros
(cherry picked from commit a13b507f2d8be7f90c8872094cd0732926a6fcbb)
2010-02-10 15:41:22 -08:00
Andrew Tridgell
4689826e39 s3-locking: update to use DLIST_ADD_AFTER()
(cherry picked from commit 6c6df527e14514027cbcaa6deac25adf04363926)
2010-02-10 15:40:44 -08:00
Andrew Tridgell
d550621561 s3-libsmb: update libsmb to use new DLIST macros
manipulating p->prev directly is not safe any more
(cherry picked from commit 3c650ac1e3e1cdbbabecfddcd29325f20b5dcb48)
2010-02-10 15:38:48 -08:00
Andrew Tridgell
7842b391b9 s3-memcache: update memcache to use new DLIST macros
we don't need a separate lru pointer any more
(cherry picked from commit 4ffd7aca3e38728077bd80c2a65c4efbcfd216fc)
2010-02-10 15:38:31 -08:00
Andrew Tridgell
54fc99e04b s3-ldb: update the old ldb in s3 to use new DLIST macros
(cherry picked from commit a7d8bfd373392eecf4fff33d39b85e1b55ad901d)
2010-02-10 15:38:16 -08:00
Andrew Tridgell
ece7089918 s3-nmbd: update nmbd to use new DLIST_ macros
(cherry picked from commit 4d23d777bc6d4fad20d0f3084fe658635812bee9)
2010-02-10 15:36:37 -08:00
Andrew Tridgell
a5d2fb752c s4-ldb: update ldb_tdb to use new DLIST_ macros
(cherry picked from commit 6ede911654566a7e21ded70dacac68df3b6a1bca)
2010-02-10 15:36:20 -08:00
Jeremy Allison
f017edc59f s4-dsdb: update repl_meta_data.c to use new DLIST_ macros 2010-02-10 15:35:38 -08:00
Jeremy Allison
32575ed70f Temporary changes to dlinklist to keep the implementation static whilst
uses of (list)->prev are moved over to DLIST_PREV. This will be replaced
when the final (new) version of the dlinklist.h header is added.

Jeremy.
2010-02-10 15:30:59 -08:00
Jeremy Allison
f2d7d9774e Revert "Change the default of "nmbd bind explicit broadcast" to "no""
This reverts commit 84fba3c1bc962804259f201d465acfdf0cd3c6a8.

Now we have a "processed packet queue" in nmbd we can go back
to doing this by default.

Jeremy.
2010-02-10 12:42:27 -08:00
Jeremy Allison
c2f3ed48c5 More of the fix for bug #7118 - nmbd problems with socket address.
Add a simple "processed packet queue" cache to stop nmbd responding to
packets received on the broadcast and non-broadcast socket (which
it has opened when "nmbd bind explicit broadcast = yes").

This is a very simple packet queue - it only keeps the packets
processed during a single call to listen_for_packets() (i.e. one
select call). This means that if the delivery notification for a
packet received on both broadcast and non-broadcast addresses
is done in two different select calls, the packet will still be
processed twice. This is a very rare occurrance and we can just
live with it when it does as the protocol is stateless. If this
is ever flagged as a repeatable problem then we can add a longer
lived cache, using timeout processing to clear etc. etc. But without
storing all packets processed we can never be *sure* we've eliminated
the race condition so I'm going to go with this simple solution until
someone proves a more complex one is needed :-).

Jeremy.
2010-02-10 12:32:05 -08:00
Jeremy Allison
84fba3c1bc Change the default of "nmbd bind explicit broadcast" to "no"
until the double processing problem in bug #7118 is fixed.

Jeremy.
2010-02-10 08:39:37 -08:00
Günther Deschner
1cd9df8da2 testprogs: add more error codes for spoolss test.
Guenther
2010-02-10 14:07:31 +01:00
Björn Jacke
9b75650f1a s3: change ldap filter to what really was intended 2010-02-10 13:48:11 +01:00
Rusty Russell
b37b452cb8 tdb: fix recovery reuse after crash
If a process (or the machine) dies after just after writing the
recovery head (pointing at the end of file), the recovery record will filled
with 0x42.  This will not invoke a recovery on open, since rec.magic
!= TDB_RECOVERY_MAGIC.

Unfortunately, the first transaction commit will happily reuse that
area: tdb_recovery_allocate() doesn't check the magic.  The recovery
record has length 0x42424242, and it writes that back into the
now-valid-looking transaction header) for the next comer (which
happens to be tdb_wipe_all in my tests).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-10 16:56:14 +10:30
Rusty Russell
6269cdcd15 tdb: give a name to the invalid recovery area constant (0)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-10 16:56:13 +10:30
Andrew Bartlett
f299fe565a s4:provision Just 'do the right thing' with empty smb.conf files
For some reason, JHT keeps on creating an empty smb.conf file,
expecting it to be the same as a non-existant one.  It is easier to
just realise what he meant.

Andrew Bartlett
2010-02-10 16:18:21 +11:00
Günther Deschner
f8778ba8f4 s4-smbtorture: use test_GetPrinter_level in RPC-SPOOLSS-NOTIFY.
Guenther
2010-02-10 01:00:25 +01:00
Jeremy Allison
8ddc977c14 Fix bug #7122 - Reading a large browselist fails (server returns invalid values in subsequent SMBtrans replies)
There are two problems:

1). The server is off-by-one in the end of buffer space test.
2). The server returns 0 in the totaldata (smb_vwv1) and totalparams (smb_vwv0)
fields in the second and subsequent SMBtrans replies.

This patch fixes both.

Jeremy.
2010-02-09 15:14:38 -08:00
Jeremy Allison
a056eb85ff Missed one check on the memcpy for bug #7063.
Jeremy.
2010-02-09 14:56:12 -08:00
Jeremy Allison
539bbf8653 Second part of fix for bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
Ensure we have no naked memcpy calls. This isn't a crash bug (it's
already checked in the data_blob_talloc_zero() above, but I want to
get into the pattern of having all memcpy's covered by safety checks.

Jeremy.
2010-02-09 14:48:15 -08:00
Jeremy Allison
9ad6f432f3 Fix off-by-one error in working out the limit of the NetServerEnum comment.
Jeremy.
2010-02-09 12:17:08 -08:00
Stefan Metzmacher
bc8242a08e s3:smbd: use StrCaseCmp() instead of strcasecmp
metze
2010-02-09 18:59:16 +01:00
Stefan Metzmacher
1686a5e7e7 s3:smbd: Fix really ugly bool vs. int bug!!!
A comparison function for qsort needs to return an 'int'!
Otherwise you'll get random results depending on the compiler
and the architecture...

metze
2010-02-09 18:59:15 +01:00
Matthias Dieter Wallnöfer
45cbf49477 check_python.m4 - Raise the minimum python version up to 2.4
This is needed since we at the s4 side have some code which requires this. I
think everybody should be fine since we got no complaints on the mailing list
about this change.

Patch template: Jelmer Vernooij <jelmer@samba.org>
2010-02-09 17:53:10 +01:00
Matthias Dieter Wallnöfer
04cf9b81eb pidl - Remove "Py_RETURN_NONE" compatibility code
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Matthias Dieter Wallnöfer
e34637b2a6 s4:Remove "Py_RETURN_NONE" compatibility code
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Karolin Seeger
a0ac6a8632 s3-docs: Fix make manpages3.
Karolin
2010-02-09 17:21:01 +01:00
Karolin Seeger
a5b003e1f7 s3-docs: Add missing para end tag.
Karolin
(cherry picked from commit b78de63ef3cde53e3aabbe46654aac5a335f16a8)
2010-02-09 17:14:38 +01:00
Günther Deschner
7c95d559c3 testprogs: regenerate printlib prototypes for spoolss test.
Guenther
2010-02-09 16:39:37 +01:00
Günther Deschner
73e6212a32 testprogs: print job info levels in EnumJobs() spoolss tests.
Guenther
2010-02-09 16:39:35 +01:00
Günther Deschner
bf7156b6dd testprogs: print datatypes info levels in EnumPrintProcessorDatatypes() spoolss tests.
Guenther
2010-02-09 16:39:35 +01:00
Günther Deschner
dcad5447cf testprogs: print printprocessor info levels in EnumPrintProcessors() spoolss tests.
Guenther
2010-02-09 16:39:34 +01:00
Günther Deschner
5db64e88c7 testprogs: print monitor info levels in EnumMonitors() spoolss tests.
Guenther
2010-02-09 16:39:34 +01:00
Günther Deschner
5afae25724 testprogs: print port info levels in EnumPorts() spoolss tests.
Guenther
2010-02-09 16:39:30 +01:00
Günther Deschner
8088a17128 testprogs: print form info levels in EnumForms(),GetForm() spoolss tests.
Guenther
2010-02-09 16:38:04 +01:00
Stefan Metzmacher
e0472c59c8 s3:selftest: make selftest requires bash for now
So force bash until we removed the dependency to bash.

metze
2010-02-09 12:58:29 +01:00
Stefan Metzmacher
4dc2be2264 s3:passdb: only use gid_to_sid() result if the result is a group of our local sam
Otherwise retry with pdb_gid_to_sid().

metze
2010-02-09 12:57:01 +01:00
Björn Jacke
fb0c032097 s3: fix some wrong newlines in de translation strings 2010-02-09 10:11:33 +01:00
Björn Jacke
d1c7d7d21a vfs_catia: fix return type warnings 2010-02-09 10:11:29 +01:00
Andrew Tridgell
580f955664 s4-torture: allow host-only in unc lists in smbtorture
Allow UNC lists like this:

 192.168.2.1
 192.168.2.2
 192.168.2.3

the share name will be taken from the command line
2010-02-09 14:46:09 +11:00
Jeremy Allison
3f2415c9bf Make "nmbd bind explicit broadcast" on by default.
Fix a comment typo.

Jeremy.
2010-02-08 14:35:02 -08:00
Jeremy Allison
e425162933 Fix bug #6876 for acl_tdb module.
As pointed out by bj@sernet.de, the rmdir module initializer was
duplicated. Fix this properly.

Jeremy.
2010-02-08 11:04:38 -08:00
Stefan Metzmacher
9b5198dd44 s3:libsmb: fix NetServerEnum3 rap calls.
metze
2010-02-08 18:47:41 +01:00
Stefan Metzmacher
30eec0656c s3:smbd: implement api_RNetServerEnum3
This is needed to support large browse lists.

metze
2010-02-08 18:47:41 +01:00
Stefan Metzmacher
495ac46166 s3:smbd: add/improve some DEBUG messages in api_RNetServerEnum2()
metze
2010-02-08 18:46:57 +01:00
Stefan Metzmacher
dc58672c65 s3:smbd: rename api_RNetServerEnum => api_RNetServerEnum2
metze
2010-02-08 18:35:12 +01:00