1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-15 05:57:49 +03:00

129 Commits

Author SHA1 Message Date
Tim Potter
dad688d8c6 Removed #ifdef TDB_DEBUG around tdb_dump_all() and tdb_printfreelist()
so that tdbtool can be compiled without having to make clean.
-
Jeremy Allison
21f776df59 Don't core dump when using spinlocks on a read-only tdb. Unfortunately this
means that a read-write opener and a read-only opener are using different
locking mechanisms - this needs to be addressed, but it's hard as the
read-write opener using the spinlocks is usually first, so there's no
way to force them to change down to the fcntl method.
Read only access is less important anyway and can never corrupt the
tdb anyway, so errors in read-only record reads are more tolerable.
Jeremy
-
Jeremy Allison
2b135fba62 Fix for tdb_oob() on TDB_INTERNAL databases.
Jeremy.
-
Anton Blanchard
6612abf827 PPC spinlocks work again. Sorry, my bad. -
Jeremy Allison
a71d9d98b0 Ensure accessing NT member servers works with a Samba PDC. Don't
change these timestamp settings without good reason.
Remove CLEAR_IF_FIRST flag is tdb is read-only.
Jeremy.
-
Andrew Tridgell
2f44756233 fixed compilation of tdbtorture -
Andrew Tridgell
b8d9d1fca3 tdbtorture updates from when I was trying to track down the hp tdb bug -
Jeremy Allison
a3267551d8 Put pwrite code back in expand_file.
Jeremy.
-
Andrew Tridgell
f49518e497 added a hook to reopen all tdb's after the server fork
this prevents the fd seek pointer problem
-
Jeremy Allison
0e75c0fc1a Fix based on Andrew's insight as re-using a tdb after fork means
parent and child share seek pointer. Damn....
Jeremy.
-
Jeremy Allison
b45793ec3f Return correct error code on lock fail in tdb_expand.
Jeremy.
-
Jeremy Allison
e4b41a8f31 Roll back earlier fix after talking with Andrew. The write_lock_record and
unlock are explicitly non-blocking. I will add a comment to this effect later.
Jeremy.
-
Jeremy Allison
313c2e8652 Fixed a couple of nasty bugs only easily seen with no mmap. Firstly,
map_ptr not neccessarily set to NULL if no mmap, secondly, iterating
through a tdb was using SETLK, instead of SETLKW - would almost never
fail with mmap as the time holding the lock was so short, but was
easily seen with read/write. One finaly bug needs tracking down w.r.t.
traversal......
Jeremy.
-
Andrew Tridgell
d32ac363a5 flush stdout in test logging fns -
Andrew Tridgell
931bded1c9 use a different test tdb name for tdbtest and tdbtorture -
Andrew Tridgell
b36c98036b actually obey the "use mmap" smb.conf option -
Tim Potter
888c852f01 Renamed rwlock_t type to tdb_rwlock_t to avoid conflict with Solaris 8
header files.
-
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.
-