1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

112 Commits

Author SHA1 Message Date
Anton Blanchard
a58b89d339 Add missing gcc memory barriers, this bug showed up when doing a
heavy netbench run. :)

Rework ppc spinlocks to be faster.
-
Tim Potter
78207d0fc8 Patch for having spaces in tdb keys, NULL termination fixes and other
stuff.  From Andrew Esh <AEsh@tricord.com>
-
Volker Lendecke
b4f06c3ecf Print an error message if database could not be opened.
Volker
-
Jeremy Allison
38d2e6983a Added mmap fix to pass lock test from HP.
Ok - now we're no longer trying to reach a silly 1k loc target,
change the formatting to be *readable* - eg.
change if (x) y else z to be :
if (x)
    y
else
    z

and other compact sillyness. Oh look - when I did this I found
some areas where we *WEREN'T CHECKING SYSTEM CALL ERROR RETURNS !!!!*
CompSci 101 guys....... :-).
Jeremy.
-
Jeremy Allison
aaa56bb3a3 Fix for rare tdb pattern store failure. Found & fixed by Rusty.
Jeremy.
-
Jeremy Allison
34951876a1 Always check fstat for error.
Jeremy.
-
Jeremy Allison
c8c138c1fb Fix for enumerating large numbers of users.
Jeremy.
-
Andrew Tridgell
1f6240daae removed some debug code -
Jeremy Allison
2d1c6d1f6b Ok - I misspoke.... mmap returns MAP_FAILED, not neccessarily -1 :-).
Jeremy.
-
Jeremy Allison
b77c8b536d When mmap fails it returns -1 *NOT NULL*.
This got regressed somehow.....
Jeremy.
-
Jeremy Allison
fc7830eec8 Fixed potential free of NULL found by SGI speedshop.
Jeremy.
-
Tim Potter
870e9e4e89 Added *.po to .cvsignore files. -
Andrew Tridgell
200b682e9b merged fix for tdb_unpack from 2_2 -
Andrew Tridgell
c20838c635 added list function to tdbtool -
Andrew Tridgell
6e1277df9d - fixed an off-by-1 bug in the delayed deletion code that I believe
was the initial cause of the connections database becoming corrupt.
  Note that this bug only happens when doing deletions within a
  traversal, which is why it has only showed up now
- added delete within traversal testing to tdbtorture
- added a lot more logging to tdb
-
Andrew Tridgell
3ab770484c added a tdb_open_log() function that opens a tdb and enables logging
of messages from the tdb code into the Samba DEBUG() system
just call tdb_open_log() instead of tdb_open() to enable this on
any tdb
-
Andrew Tridgell
ba106b9b07 more portable TDB_LOG macro -
Andrew Tridgell
dda086fdf9 try to make the tailer code much more robust. When a record
can't be merged don't fail the operation, instead just add
it to the free list anyway

added logging to tdb
-
Jeremy Allison
cf5015f159 Added tdb_change_int_atomic() to allow atomic updates of a tdb int value.
Jeremy.
-
Andrew Tridgell
b94cfb6843 make sure that when a tdb expands we fill the expanded area, otherwise ENOSPC could be very bad -
Jeremy Allison
0852465053 Implemented max connections in a similar way to 2.0.x (scan of connection db).
This needs testing !
Tidied up tabs in tdb.c.
Jeremy.
-
Andrew Tridgell
ce6598c465 clearer tdb_mmap code -
Andrew Tridgell
13bf966cb8 merge from 2.2 -
Jeremy Allison
4c6a8273c6 Fix problem with OpenBSD mmap and write not being coherent.
Jeremy.
-
Andrew Tridgell
f52a5014ee merge from 2.2 -
Tim Potter
d05c3cf0f4 Getting medieval with compiler warnings as Jeremy puts it. -
Jeremy Allison
d6889b1954 Fix for True64 treating readonly as a reserved word !
Jeremy.
-
Jeremy Allison
fc76681812 Merge of Andrew's changes in 2.2.
Jeremy.
-
Tim Potter
cda0f211b0 Fixed some compiler warnings. -
Jeremy Allison
e404e00199 Added HAVE_STDARG_H to tdbutil.c
Jeremy.
-
Andrew Tridgell
a500519544 optimise by default -
Jeremy Allison
408672d382 It compiles for me now :-). rpc_server/srv_lsa.c - added fix to allow w2k
clients to join a Samba domain - odd or even domain name length. Needs more testing.
Jeremy.
-
David O'Neill
025f7a092a Changes from APPLIANCE_HEAD:
source/include/proto.h
        - make proto

    source/printing/nt_printing.c
    source/rpc_server/srv_spoolss_nt.c
        - Fix for the overwriting of printerdata entries when WinNT and
          Win2k are modifying printer parameters on PCL printers. Turns out
          that Win2k creates a printer with a NULL devmode entry and then
          expects to set it on *OPEN* (yes this is insane). So we cannot
          return a "default" devmode for a printer - and we must allow an
          open to set it.

    source/tdb/tdb.c
        - Show freelist in an easier format. Show total free.
        - When storing a new record, allocate memory for the key + data
          before the tdb_allocate() as if the malloc fails a (sparse) hole
          is left in the tdb.

    source/tdb/tdbtool.c
        - Show freelist in an easier format. Show total free.

    source/tdb/Makefile
        - cleaned up Makefile dependancies

    source/smbd/lanman.c
        -  Fix for Win9x corrupting it's own parameter string.

    source/printing/printfsp.c
    source/printing/printing.c
    source/rpc_server/srv_spoolss_nt.c
    source/smbd/close.c
        - Added normal close parameter into print_fsp_end() which treats an
          abnormal close as error condition and deletes the spool file.
-
Tim Potter
cef7f58ac5 Set the tdb->map_ptr to NULL if mmap() returns -1. -
Christopher R. Hertel
e651d1d642 The line was:
struct tdb_traverse_lock tl = { tdb->travlocks.next, 0, 0 };

The IRIX compiler complained that the first initialization value was not a
constant and errored out.  Here's what it looks like now:

        struct tdb_traverse_lock tl = { NULL, 0, 0 };
        int ret, count = 0;

        /* This was in the initializaton, above, but the IRIX compiler
         * did not like it.  crh
         */
        tl.next = tdb->travlocks.next;

That worked.

Chris -)-----
-
Jeremy Allison
506b5e34c3 Added lock backouts on fail.
When chaining together long lines of bloody "if" statements, which should
logically be separated, and one of them allocates memory, remember to
*free* it *WHETHER OR NOT THE IF STATEMENTS SUCCEEDED* !!!!
Yes I do consider this a bug in the coding style of Tridge, Rusty, Tim et al. :-).
I'm just pissed 'cos this took 4 hours to track down even with an insure error report
stating me in the face and also Ben Woodward looking over the code with me :-).
Jeremy.
-
Jeremy Allison
dd959fa325 Two tdb bugfixes. First one - ensure that traverse lock is moved before deleting
dead records, else the record is just marked for deletion, not actually deleted.
Second, ensure allocated record is marked as "in use" before free list lock is
released, else other processes in the freelist merge code may try and merge it.
Jeremy.
-
Jeremy Allison
cfc62fecdf Added Tim's fix for read-only crashes.
Jeremy.
-
Jeremy Allison
f3b5e2a172 Fixed bug with tdb_next_lock failing when reaching then end of a hashchain
and the next hashchain is empty.
Jeremy
-
Tim Potter
2c9704c3db tdb_chainunlock() no longer returns a value. -
Jeremy Allison
9dea7b7c25 Changed to sourceforge tdb code. This includes spinlocks (so we now have
a --with-spinlocks option to configure, this does mean the on-disk tdb
format has changed, so 2.2alphaX sites will need to re-create their
tdb's. The upside is no more tdb fragmentation and a +5% on netbench.
Swings and roundabouts....
Jeremy.
-
Jeremy Allison
c9884e16fc Fixed one tdb_read -> rec_free_read call.
Jeremy.
-
Jeremy Allison
7ae54a93e7 Added sorted freelist neighbour merge code to stop tdb fragmentation.
This needs TESTING !!! (It passes tdbtest of course :-).
Jeremy.
-
Jeremy Allison
ee89ca9e68 Added print_freelist command.
Jeremy.
-
Andrew Tridgell
b64e1ae693 change the split threahold for the free list to prevent freelist
fragmentation
-
Andrew Tridgell
03453e2ae5 fixed a potential locking deadlock in tdb -
Jeremy Allison
98764c5df9 rpc_parse/parse_spoolss.c: Updated comment for old version of W2K.
tdb/tdbutil.c: With varargs uint16 is cast to (int).
Jeremy.
-
Andrew Tridgell
6e4a358552 got rid of tdb_writelock() and instead lock a chain. tdb_writelock()
is conceptually flawed
-
Andrew Tridgell
ca443210c8 added tdb_lock_bystring() and tdb_unlock_bystring() -
Jeremy Allison
623bfa6c93 Fixes from Damian at Cisco to tidy up some tdbtool issues.
Jeremy.
-