1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

119 Commits

Author SHA1 Message Date
Tim Potter
13ac8fd847 Return "Invalid tdb context" instead of crashing when tdb_error called
with NULL tdb context.
(This used to be commit ba9f24c0964054f22cd8f0de32cfeacb88b4800c)
2000-02-15 06:13:38 +00:00
Luke Leighton
bbe275e95b 1) added void* state argument to tdb_traverse. guess what! there were
two places i found where it was appropriate to _use_ that third argument,
in locking.c and brlock.c!  there was a static traverse_function and
i removed the static variable, typecast it to a void*, passed it to
tdb_traverse and re-cast it back to the traverse_function inside the
tdb_traverse function.  this makes the use of tdb_traverse() reentrant,
which is never going to happen, i know, i just don't like to see
statics lying about when there's no need for them.

as i had to do in samba-tng, all uses of tdb_traverse modified to take
the new void* state argument.

2) disabled rpcclient: referring people to use SAMBA_TNG rpcclient.
i don't know how the other samba team members would react if i deleted
rpcclient from cvs main.  damn, that code's so old, it's unreal.
20 rpcclient commands, instead of about 70 in SAMBA_TNG.
(This used to be commit 49d7f0afbc1c5425d53019e234d54ddf205c8e9a)
2000-02-04 04:59:31 +00:00
Jeremy Allison
014bdf941f tdb record read error return check fix from Dave Airlie <airlied@samba.org>.
Jeremy.
(This used to be commit 82c99dc8d8bc79e88f0db651f04fc23508195a51)
2000-01-24 23:12:02 +00:00
Andrew Tridgell
1359195c50 casts and defines to make solaris happy
(This used to be commit 77cf152c02b445f4b6e9de393936dd6e54e6f442)
2000-01-14 08:33:20 +00:00
Andrew Tridgell
5b7f0c733c improved the error checking
(This used to be commit 2a152998a1489dead0edadb06f78b0ad6ede1a3a)
2000-01-08 08:16:02 +00:00
Andrew Tridgell
102e44e446 don't use strcpy
(This used to be commit bf9b1328c5843eb217eff4ca05645498de2def82)
2000-01-07 06:14:43 +00:00
Andrew Tridgell
e91ceacb6c - patch from Rusty to neaten up the code a bit
- fixed a race condition in tdb_open()
(This used to be commit 21d4882f64a65ee1786231eb55b7768bb44921fd)
2000-01-07 03:01:55 +00:00
Andrew Tridgell
1f438ffb7e lower the default hash size a bit
(This used to be commit 51ed6e8cec47642641e6b26682fd6f25624b19ae)
2000-01-05 01:50:06 +00:00
Andrew Tridgell
c0ad729de6 drop the alignment to 4 bytes - this makes tdb more space efficient
and doesn't seem to affect performance
(This used to be commit 1fb293732ed65deba6958000a9f6de7900e21f5c)
2000-01-03 00:52:14 +00:00
Andrew Tridgell
8b1229c3fe updated docs
(This used to be commit c199ec9543d0d84bd5ea29078887684f708c9637)
2000-01-02 23:03:32 +00:00
Andrew Tridgell
9a781a8c6d - added tdb_flags option to tdb_open()
- added TDB_CLEAR_IF_FIRST flag to clear the database if this is the
  first attached process. Useful for non-persistent databases like our
  locking area (this will also make upgrades to new database layouts easier)
- use lock_path() in a couple of places
- leave connections database open while smbd running
- cleaned up some tdb code a little, using macros for constants
(This used to be commit 00e9da3ca577527db392aced62f02c69cfee8f4f)
2000-01-02 23:00:27 +00:00
Andrew Tridgell
7a0bc53221 - optimise tdb_store() a little
- prevent a free of an unallocated pointer
(This used to be commit b35b5c63886823bb8b8d8c5c29ccc7b315a7de30)
2000-01-02 01:40:35 +00:00
Andrew Tridgell
d6a5878c76 fixed more locking bugs - all seems OK now
(This used to be commit 584537961b6134a50089d37328a21c617bc6547b)
1999-12-24 08:45:02 +00:00
Andrew Tridgell
c23a552c58 fixed locking code
(This used to be commit 1f5dc924044fb54b10ac8884d4df1e15902de8be)
1999-12-23 01:14:20 +00:00
Andrew Tridgell
ecfee3f170 fixed a bug in the handling of tdb version number upgrade
(This used to be commit ed7541668e9bc98ae9daf55f817d2de04345e660)
1999-12-22 01:31:09 +00:00
Andrew Tridgell
30cecd8d2c added some paranoia code
(This used to be commit c547ffa9e9ce68a77f63591b37b690a83a956348)
1999-12-22 01:22:14 +00:00
Andrew Tridgell
4e1291a83f converted all our existing shared memory code to use a tdb database
instead of either sysv or mmap shared memory or lock files.

this means we can now completely remove
	locking_shm.c
	locking_slow.c
	shmem.c
	shmem_sysv.c
and lots of other things also got simpler

locking.c got a bit larger, but is much better compartmentalised now
(This used to be commit e48c2d9937eea0667b8cd3332e49c06314ef31e7)
1999-12-21 09:25:59 +00:00
Andrew Tridgell
69d24d869b first cut at using the tdb code for the connections structure, the
SWAT status page and smbstatus. It made the code _much_ simpler, I
wish we'd done a database module a long time ago!
(This used to be commit 4951755413c11d4c5b9af4699a6e622056d52433)
1999-12-21 04:54:30 +00:00
Andrew Tridgell
c2c42b8694 first pass at the database code for Samba. This also includes a test
suite and a very simple tool for manuipulating the databases.

the main code is in tdb/tdb.c and includes both mmap and file based
IO. All databases auto-expand and allow multiple simultaneous writers.

the next step is using this new capability in lots of places in Samba
where we have existing ad-hoc databases
(This used to be commit c89d29cc5e3b6d568928acace01144059f1668b3)
1999-12-21 03:04:37 +00:00