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

216 Commits

Author SHA1 Message Date
Andrew Tridgell
75a8b24ed9 flush stdout in test logging fns
(This used to be commit d32ac363a5b4c6978077b1d695c503e22c5782ca)
2001-09-06 05:59:32 +00:00
Andrew Tridgell
fef37db972 use a different test tdb name for tdbtest and tdbtorture
(This used to be commit 931bded1c92c812d6aae101a40f453c925054627)
2001-09-06 05:58:05 +00:00
Andrew Tridgell
1772584c35 actually obey the "use mmap" smb.conf option
(This used to be commit b36c98036bcbaa5545c9637cb632361122033cfd)
2001-09-06 05:45:07 +00:00
Tim Potter
74bee75f10 Renamed rwlock_t type to tdb_rwlock_t to avoid conflict with Solaris 8
header files.
(This used to be commit 888c852f01cec89b380fdf2564444b86d396c442)
2001-08-29 23:49:26 +00:00
Anton Blanchard
66673eeeb4 Add missing gcc memory barriers, this bug showed up when doing a
heavy netbench run. :)

Rework ppc spinlocks to be faster.
(This used to be commit a58b89d33979f53daa2573c31eba024a26c46502)
2001-08-19 13:45:38 +00:00
Tim Potter
ef67997d0f Patch for having spaces in tdb keys, NULL termination fixes and other
stuff.  From Andrew Esh <AEsh@tricord.com>
(This used to be commit 78207d0fc8c4641fbd8f63f469c4135357edfad8)
2001-08-07 23:21:45 +00:00
Volker Lendecke
efe1d83dbb Print an error message if database could not be opened.
Volker
(This used to be commit b4f06c3ecf8af60352bc9e3af9c35c00827faad2)
2001-08-04 18:17:30 +00:00
Jeremy Allison
3538c8bea9 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.
(This used to be commit 38d2e6983a6be8232ae7ce21a950d69dd95ce3e6)
2001-08-02 20:17:40 +00:00
Jeremy Allison
953973c888 Fix for rare tdb pattern store failure. Found & fixed by Rusty.
Jeremy.
(This used to be commit aaa56bb3a3c5f0e4191c9b3efe9b8d92c22cf6c7)
2001-07-31 00:03:24 +00:00
Jeremy Allison
ac26e23139 Always check fstat for error.
Jeremy.
(This used to be commit 34951876a1bfad5aa3fc3bd05b808e150f639a8a)
2001-07-25 18:59:56 +00:00
Jeremy Allison
3a40f80a94 Fix for enumerating large numbers of users.
Jeremy.
(This used to be commit c8c138c1fbb49799a2dd4c6e781bd89f51c0c0c5)
2001-07-05 22:36:25 +00:00
Andrew Tridgell
a594519d28 removed some debug code
(This used to be commit 1f6240daae4c5503d6fbb846d89cae986e010fc8)
2001-07-04 04:39:52 +00:00
Jeremy Allison
460c906190 Ok - I misspoke.... mmap returns MAP_FAILED, not neccessarily -1 :-).
Jeremy.
(This used to be commit 2d1c6d1f6b55a0a78eb8afbe16d2ad8b3253a220)
2001-06-21 19:56:25 +00:00
Jeremy Allison
99c506325f When mmap fails it returns -1 *NOT NULL*.
This got regressed somehow.....
Jeremy.
(This used to be commit b77c8b536d4b6d2162f4932227f01cffb730c645)
2001-06-21 19:50:21 +00:00
Jeremy Allison
f5197e0230 Fixed potential free of NULL found by SGI speedshop.
Jeremy.
(This used to be commit fc7830eec8f5478fc3d3296bb35cb11c94e7d9fa)
2001-06-11 20:56:18 +00:00
Tim Potter
e07b85ab19 Added *.po to .cvsignore files.
(This used to be commit 870e9e4e89dcf910c595cabb28f69ad070942072)
2001-06-01 11:26:20 +00:00
Andrew Tridgell
ad7c3ea0f0 merged fix for tdb_unpack from 2_2
(This used to be commit 200b682e9bbe79897343422f7c870382ed6de40a)
2001-05-30 06:23:05 +00:00
Andrew Tridgell
6315ea80fc added list function to tdbtool
(This used to be commit c20838c6358f02dea7967e28a5f23db70ff464f9)
2001-05-30 06:22:10 +00:00
Andrew Tridgell
9848c067c0 - 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
(This used to be commit 6e1277df9d964c615a3ad876d3b89ff8132081c1)
2001-05-30 05:40:52 +00:00
Andrew Tridgell
964d7a6625 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
(This used to be commit 3ab770484c6775df2c1a6f69427ebe656702c96c)
2001-05-30 03:42:44 +00:00
Andrew Tridgell
40518cf9b4 more portable TDB_LOG macro
(This used to be commit ba106b9b07b23c3dc1b40c8feb10cff173faa07a)
2001-05-29 15:01:23 +00:00
Andrew Tridgell
c0561ff58e 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
(This used to be commit dda086fdf92fded016afc785f7965a375faae5aa)
2001-05-28 13:29:06 +00:00
Jeremy Allison
15e66ba37a Added tdb_change_int_atomic() to allow atomic updates of a tdb int value.
Jeremy.
(This used to be commit cf5015f15935605cf69078bc15251db61ddc48c7)
2001-05-25 00:48:28 +00:00
Andrew Tridgell
e863446e79 make sure that when a tdb expands we fill the expanded area, otherwise ENOSPC could be very bad
(This used to be commit b94cfb6843dc7fc985917395d3e0d953501b9197)
2001-05-15 14:53:06 +00:00
Jeremy Allison
363e378dee 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.
(This used to be commit 0852465053d0c1a23b6cfe6097267291b0595ef8)
2001-05-14 06:15:46 +00:00
Andrew Tridgell
cd2643f8be clearer tdb_mmap code
(This used to be commit ce6598c465e3d1e26592af9b90eb271ee837f290)
2001-05-06 02:05:00 +00:00
Andrew Tridgell
906a512e0b merge from 2.2
(This used to be commit 13bf966cb8ed8df6b02018dceff94c275def8200)
2001-05-06 01:28:17 +00:00
Jeremy Allison
887d796a28 Fix problem with OpenBSD mmap and write not being coherent.
Jeremy.
(This used to be commit 4c6a8273c6dd3e2aeda5a63c4a62aa55bc133099)
2001-05-04 22:23:37 +00:00
Andrew Tridgell
9ce5a03ccb merge from 2.2
(This used to be commit f52a5014ee325f9d91f266f88eac51b6136a75b9)
2001-04-18 16:41:04 +00:00
Tim Potter
af08cd21eb Getting medieval with compiler warnings as Jeremy puts it.
(This used to be commit d05c3cf0f47a3c863adbed7ad4ab8f3248cd072d)
2001-04-16 02:35:35 +00:00
Jeremy Allison
a8410f20c1 Fix for True64 treating readonly as a reserved word !
Jeremy.
(This used to be commit d6889b1954bd863fd04cf43fb25f178b1d1ab67f)
2001-04-14 00:41:15 +00:00
Jeremy Allison
2ef68c7e92 Merge of Andrew's changes in 2.2.
Jeremy.
(This used to be commit fc76681812b1469208ad6c8847afdfc68bc6db49)
2001-04-13 19:12:06 +00:00
Tim Potter
b541683e44 Fixed some compiler warnings.
(This used to be commit cda0f211b0dd41ae72ef3d65b9476c11c6f72de3)
2001-04-11 01:50:12 +00:00
Jeremy Allison
9c9ce2f613 Added HAVE_STDARG_H to tdbutil.c
Jeremy.
(This used to be commit e404e001990409eacf2e620d2269c2b162fa938b)
2001-04-10 21:07:04 +00:00
Andrew Tridgell
abfb84772c optimise by default
(This used to be commit a5005195440d4805054c488cdc450735883064e5)
2001-02-20 10:13:27 +00:00
Jeremy Allison
da20d4e5df 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.
(This used to be commit 408672d38261e34cc3714200617b35464d88f931)
2001-02-13 16:28:48 +00:00
David O'Neill
2506c61ab3 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.
(This used to be commit 025f7a092ad258ff774e3f5e53737f8210cc8af6)
2001-01-29 21:34:08 +00:00
Tim Potter
73ba07b362 Set the tdb->map_ptr to NULL if mmap() returns -1.
(This used to be commit cef7f58ac5cc0c96e1027c7e5ecbb3fb72cb94b6)
2001-01-16 18:33:05 +00:00
Christopher R. Hertel
8f5d55eb36 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 -)-----
(This used to be commit e651d1d642cd1bfac11bec81a30915b95d4424c8)
2000-12-30 23:17:30 +00:00
Jeremy Allison
99c2693c62 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.
(This used to be commit 506b5e34c3ba16768dbc82ba21044787de160c45)
2000-12-15 21:29:06 +00:00
Jeremy Allison
0835c7091c 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.
(This used to be commit dd959fa325c5df8ce0407d8debea76602c8e71cf)
2000-12-13 06:33:53 +00:00
Jeremy Allison
9e9961d2db Added Tim's fix for read-only crashes.
Jeremy.
(This used to be commit cfc62fecdf4c5579ee643df3e701cf6f1fe553ee)
2000-12-11 06:10:32 +00:00
Jeremy Allison
0d658c35eb Fixed bug with tdb_next_lock failing when reaching then end of a hashchain
and the next hashchain is empty.
Jeremy
(This used to be commit f3b5e2a172a777e1c3bbf6ac72fe5c7cdb8324b3)
2000-12-07 17:46:11 +00:00
Tim Potter
6e9eb6a316 tdb_chainunlock() no longer returns a value.
(This used to be commit 2c9704c3db4014ca43b4b13160b9f53ff5f36e3b)
2000-12-06 02:53:36 +00:00
Jeremy Allison
7e4c4721b4 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.
(This used to be commit 9dea7b7c257db487f8ced7dad3fce92fba03ea91)
2000-12-06 00:05:15 +00:00
Jeremy Allison
1cd8538b7a Fixed one tdb_read -> rec_free_read call.
Jeremy.
(This used to be commit c9884e16fc2d13dd62c5a43633c9a38dadc9822c)
2000-12-05 03:44:30 +00:00
Jeremy Allison
1218b41474 Added sorted freelist neighbour merge code to stop tdb fragmentation.
This needs TESTING !!! (It passes tdbtest of course :-).
Jeremy.
(This used to be commit 7ae54a93e756d927419242adf35f46e91e974573)
2000-12-05 03:12:57 +00:00
Jeremy Allison
040de369b2 Added print_freelist command.
Jeremy.
(This used to be commit ee89ca9e68abb23fc26cd1378e02e56d0d725e55)
2000-12-02 01:04:11 +00:00
Andrew Tridgell
e23067ad65 change the split threahold for the free list to prevent freelist
fragmentation
(This used to be commit b64e1ae69314ae110c548f57810c34e620d57075)
2000-12-02 00:53:03 +00:00
Andrew Tridgell
fb3daf3653 fixed a potential locking deadlock in tdb
(This used to be commit 03453e2ae557d7fa119338b71744822093d2f38a)
2000-11-27 06:35:12 +00:00