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

163 Commits

Author SHA1 Message Date
Jeremy Allison
a6f31d6877 Fixes from Damian at Cisco to tidy up some tdbtool issues.
Jeremy.
(This used to be commit 623bfa6c935e2e3acb3145bfbd490758b34d2c70)
2000-10-05 22:19:34 +00:00
Jeremy Allison
bbd7f7bf0f Herb's fixes for profiling & compiler warnings.
Jeremy.
(This used to be commit 7914e9351abb5271ebb4990c3b1fe495d15a4eda)
2000-10-05 18:50:18 +00:00
Jeremy Allison
e26d09685c Added debug so if zero length messages get sent we successfully remove
them (this can happen if smbd processes are shut down at the wrong time).
Jeremy.
(This used to be commit c1de97f96b8c5ad8e5f01a0d17c6387733769442)
2000-10-02 19:28:26 +00:00
Jeremy Allison
49fcb300de Added John Reilly's enumports/addprinter/delprinter scripting code plus the
fix for the Win9x printer drivers.
Changed command names to add "command" string on the end for some consistancy
with the other scripting commands.
Added '%P' option to tdbpack/unpack to store long comment string.
Made port name be "Samba Printer Port" if no enum port script given.
Fixed prs_uint32_pre code to cope with null args.
Jeremy.
(This used to be commit 902ada63799cf27924c72e24e7593a8c9fb5eba9)
2000-07-31 20:41:51 +00:00
Andrew Tridgell
fac26f073b support both read and write locks inside the tdb
(This used to be commit d0a1f96e0f699f8e3ceb0e0d826423cd643803e7)
2000-06-15 15:30:37 +00:00
Andrew Tridgell
28be43dc81 - use read locks when possible
- don't use as many locks on a store
(This used to be commit ee12b10d21022287baf4432d1df743c4b28223b2)
2000-06-15 15:29:39 +00:00
Andrew Tridgell
9857703a53 use the right MMAP flag
(This used to be commit a2f5977ac34d02cd64acd0022cb5bc065eab713f)
2000-06-15 15:28:56 +00:00
Jeremy Allison
6d38ba721c Moved tdb functions that access parse structs into parse_prs.c
to prevent builkd breaking.
Jeremy.
(This used to be commit 6c7adeab0f92844ecefbcb923d0d4763d4c3eaa5)
2000-06-08 01:16:42 +00:00
Jeremy Allison
0164047afb Fixing get/set of security descriptors.
Removed ugly hack for NT printing.
Fixed up tdb parse stuff memory leaks.
Jeremy.
(This used to be commit 8ef41f31c53e14ad057d883810a1cd2301fede2a)
2000-06-07 01:49:23 +00:00
Andrew Tridgell
0090b4ee11 added some debug code to track down pack/unpack problems
(This used to be commit ac9cdab33cddcc5ab00fc21ba79f416f5a9687e7)
2000-06-04 02:29:45 +00:00
Andrew Tridgell
5f7c40f6d0 getting and setting security descriptors on printers now works
this needed some fixes in tdb_unpack(). Tim, you'll need to update
(This used to be commit 9422719ab4c35e4ce3199b62dd632433bf391283)
2000-05-27 09:53:11 +00:00
Andrew Tridgell
9eee36f61d added tdb_pack() and tdb_unpack()
(This used to be commit 6c15495b3087c04890af77149c39e823596bb4dd)
2000-05-24 06:36:58 +00:00
Tim Potter
4cdc54ba24 While we're all making incompatible tdb changes, I changed the implementation
of tdb_{store,get}_int() to store the length of the string key + 1 so the
stored key contains the trailing NULL character.  This allows normal
string library routines to manipulate keys.

Also renamed tdb_get_int() to tdb_fetch_int() to keep the set of verbs
consistent.
(This used to be commit a423c7c5f21dc4046530b85482dee88dcfcbf070)
2000-05-12 06:27:35 +00:00
Andrew Tridgell
dd8c8b0c35 use gcc not insure by default in tdb build
(This used to be commit e20ef3c082f2448587f7d9002d57a897ecde092d)
2000-05-12 05:08:47 +00:00
Andrew Tridgell
afab0b2ca0 an imcompatible tdb format change (sorry!)
this will give us a much nicer migration path for the proposed
semaphore code
(This used to be commit 491ab241897a7252fb088c718de4bdf7f43f4ddc)
2000-05-12 02:57:24 +00:00
Andrew Tridgell
b3d4c0c9f5 when creating the database zero the reserved space
(This used to be commit a5ca60f62bea988e74e2827fbb848770ac5ae444)
2000-05-10 12:58:20 +00:00
Andrew Tridgell
6cf96ff431 - add some reserved space to every tdb, this will be
used for semaphores and future expansion
- update tdb version number to 2
(This used to be commit 5e04885b86791e6ef8b4a316e64d56c6eb05f35d)
2000-05-10 06:02:37 +00:00
Herb Lewis
21b85b2dba Use a prime for default tdb hash size - this makes a difference !
Jeremy.
(This used to be commit 400906e6421c150b591b4bf978a641d5aaf8fd09)
2000-05-10 01:32:51 +00:00
Tim Potter
d4cd46557b Added tdb_store_by_string() and tdb_fetch_by_string() functions to store
data with null terminated string keys.
(This used to be commit d58146321b6fe50e1cc1a73da80c3d2e8c3412dc)
2000-05-09 06:22:12 +00:00
Andrew Tridgell
3cc5f0dd15 fixed typo
(This used to be commit 5341597de6772027034cad7dacbdbd6d2108332a)
2000-05-01 00:48:41 +00:00
Andrew Tridgell
99fbf5c4bc added TDB_INTERNAL, TDB_NOLOCK and TDB_NOMMAP flags.
TDB_INTERNAL replaces the old method of passing a null filename
(This used to be commit 8ec815920d46f205b9f3fff82397c731753c3a10)
2000-05-01 00:41:47 +00:00
Andrew Tridgell
700f72453e - removed all our old wildcard matching code and replaced it with a
call to ms_fnmatch(). This also removes all the Win9X semantics stuff
and a bunch of other associated cruft.

- moved the stat cache code into statcache.c

- fixed the uint16 alignment requirements of ascii_to_unistr() and
  unistr_to_ascii()

- trans2 SMB_FIND_FILE_BOTH_DIRECTORY_INFO returns the short name as
  unicode always (at least thats what NT4 does)

- fixed some errors in the in-memory tdb code. Still ugly, but doesn't
  crash as much
(This used to be commit 03e9cea004bbba72161a5323cf3b4556c94aed8e)
2000-04-30 11:04:28 +00:00
Andrew Tridgell
c0e1c65053 put tdb utility functions in a separate file
(This used to be commit 77009422a075300e5c07a3e75806a7dac47e2113)
2000-04-29 04:05:38 +00:00
Jeremy Allison
ea9b2ed326 Added tdb_get/set_int_byblob, which takes a size_t len and then implemented
the tdb_get/set_int string functions in terms of them. Will be useful in storing
POSIX pending close records (which are ints but indexed by dev/inode pairs).
Jeremy.
(This used to be commit d69e4c6a48746459f973144393529b1f40680d2f)
2000-04-28 02:06:19 +00:00
Andrew Tridgell
dce954d275 added TDB_MODIFY flag - patch from from luke
(This used to be commit 90b574296e06cd6ed4fedc1e5a8ae412a5e78b45)
2000-04-25 01:17:45 +00:00
Andrew Tridgell
b76e942639 dump in a binary format
(This used to be commit 41af3232dba90832684ad8260ce0bb05e077cb02)
2000-04-24 14:36:44 +00:00
Andrew Tridgell
e4f8301edf use an size_t not a ssize_t when checking for out of bounds errors
(This used to be commit 044af3cf977e3172b3b1ce3f71457d5b0a4fc1b2)
2000-04-24 14:36:25 +00:00
Jeremy Allison
4217c939ec locking/locking.c: Fixed placeholder code for POSIX locking.
printing/printing.c: Cast tdb_delete to (tdb_traverse_func) to stop warning.
                     tmpfile gives mirror warning.
smbd/groupname.c: Remember to file_lines_free() on exit.
tdb/tdb.h: Add tdb_traverse_func typedef.
Jeremy
(This used to be commit 204ca1195c86499bd9beb273ce573db7a56ccead)
2000-04-18 20:41:04 +00:00
Andrew Tridgell
4367a3edfb added tdb_get_int() and tdb_store_int()
they are very useful for database versioning
(This used to be commit cc65914cdcceb1fdeeb5d6ec1cf2ea2f865c5092)
2000-04-16 06:23:11 +00:00
Tim Potter
3848759a5e Added standard shell command thing using '!' as first character.
(This used to be commit 829e645f62ffa16041c0cc126174d6fe8f63a2f0)
2000-03-13 01:35:09 +00:00
Tim Potter
9fd3d3963e Check for null tdb context in tdb_exists()
(This used to be commit bbacdb834f9c8f8c34368664def42dabe78d90c9)
2000-03-01 01:10:25 +00:00
Tim Potter
1f6f8c2241 Makefile for tdb directory.
(This used to be commit 60ae73c257e84aa128954f0cf5cf59e7996c68d9)
2000-02-28 00:51:53 +00:00
Tim Potter
0a77ae3f14 Oops - put back filename argument to tdb_open().
(This used to be commit 110ec9923bd2ad729d63f129514f3f1de76de9c1)
2000-02-28 00:38:45 +00:00
Tim Potter
79691801f4 Modifications to tdb_traverse() arguments to remove compile warnings.
(This used to be commit d64456b5889f0ee3a8c2108c13789540bfc3d90c)
2000-02-28 00:37:13 +00:00
Tim Potter
676df39cc7 Allow tdb databases to be created "in memory" without having a file
associated with them.  tdb can then be used as a hash table data
structure.
(This used to be commit b345c0a1058bcde7689bb9566535e9f1c46ee173)
2000-02-28 00:25:37 +00:00
Tim Potter
e4de0e523c Added tdbtool to .cvsignore list.
(This used to be commit 2892f6e534d5084b50287bf3859be74d52978cb7)
2000-02-28 00:22:45 +00:00
Tim Potter
c988b69dfc Updated docs for tdb_traverse.
(This used to be commit 8cbc7dfa031cb66d1f011705b6bd76d56c68cae5)
2000-02-17 00:16:40 +00:00
Tim Potter
590d92c77a More checks for passing NULL tdb contexts to tdb functions.
(This used to be commit 7faa70d254549e60520de1ed1112d41fe9a4d77c)
2000-02-16 22:57:57 +00:00
Tim Potter
f89a1e9999 tdb_traverse() now takes three arguments.
(This used to be commit 2d3e2f8877fb8eb21b4ccf4d7a56f1c625c71780)
2000-02-16 04:56:11 +00:00
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
112faa49e6 don't require readline
(This used to be commit 2dbe70da8db548b3423c6c0de0f282fdf82f0fad)
2000-01-07 03:02:13 +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
8d1d27b43c ignore a few files
(This used to be commit 8767334d8a44db5cb8abf084d185dae6e32db062)
2000-01-03 03:39:04 +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