1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
Commit Graph

233 Commits

Author SHA1 Message Date
Gerald Carter
4093bf7ff8 sync 3.0 into HEAD for the last time
(This used to be commit c17a7dc9a1)
2003-09-09 04:07:32 +00:00
Simo Sorce
04bf12b176 port latest changes from SAMBA_3_0 tree
(This used to be commit 3101c236b8)
2003-08-02 20:06:57 +00:00
Gerald Carter
1caa6b23e4 ading new files from 3.0
(This used to be commit 99feae7b5b)
2003-07-16 05:42:34 +00:00
Gerald Carter
4a090ba06a trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE
(This used to be commit adb98e7b7c)
2003-07-16 05:34:56 +00:00
Tim Potter
3bd3125d5a spelling
(This used to be commit 249a697470)
2003-05-14 00:38:58 +00:00
Tim Potter
6e83ee3d50 Multi-line string constants have been deprecated in newer versions of gcc.
Found by Guenther Deschner.
(This used to be commit 29c6d2f61c)
2003-04-14 01:41:53 +00:00
Jeremy Allison
ba9f9afe8b Fix from Andrew Esh to ensure tdb_pack can't segfault.
Also stop it leaking memory like a sieve !
Jeremy.
(This used to be commit 11b914ed84)
2003-04-10 19:08:42 +00:00
Andrew Bartlett
ef07127b30 strictly, you can't #if on somthing that may or may not be defined.
Andrew Bartlett
(This used to be commit 49bae02273)
2003-03-15 06:31:23 +00:00
Rafal Szczesniak
e583dd6278 Fresh meat in trusted domains code:
- packing/unpacking utility functions for trusted domain
   password struct; can be used to prepare buffer to store
   in secrets.tdb or (soon) passdb backend
 - similiar functions for DOM_SID
 - respectively modified secrets_(fetch|store) routines
 - new auth mapping code utilising introduced is_trusted_domain
   function
 - added tdb (un)packing of single bytes



Rafal
(This used to be commit 5281ee7e84)
2003-03-14 17:12:40 +00:00
Tim Potter
5e7f809f8f Fixed crash bug when calling tdb_unlockkeys() with no locked keys.
woot!
(This used to be commit eb432700c0)
2003-03-13 05:52:49 +00:00
Martin Pool
2e01ef5957 Remove valgrind_strlen function, hopefully no longer needed with
recent Valgrind relases and clashing with -DVALGRIND.
(This used to be commit 98479f1315)
2003-03-11 07:25:48 +00:00
Martin Pool
6f7ac2dcab Note about using Valgrind with tdbs.
(This used to be commit 36c6f67d4a)
2003-03-11 07:23:43 +00:00
Martin Pool
ee28d38fbc When opening an existing DB, don't require the hash_size specified to
the open call to be the same as that of the existing tdb.  The
specified hash_size is only used if the tdb needs to be (re)created.

With this patch in place, tdbtool can open the printing tdbs, which
are created with a hash_size of 5000.  Before it would fail with EIO.
(This used to be commit e412dd6d7e)
2003-03-11 04:21:14 +00:00
Jeremy Allison
14401bb368 Ensure tdb error code is set for corrupt and i/o errors before calling
the log function. This allows the log function to take action.
Jeremy.
(This used to be commit 0fa310cbc3)
2003-02-20 18:54:12 +00:00
Martin Pool
dc75b89bfc Doc
(This used to be commit 11c1e712d4)
2003-02-14 06:34:59 +00:00
Jeremy Allison
0716caac8b Ensure we overwrite a tdb if the hash size changes.
Jeremy.
(This used to be commit 3497330ff5)
2003-02-04 23:40:17 +00:00
Jeremy Allison
b102e79e75 Add 3 second timeout when terminating server and sending print notify
messages. Stops build-up of large numbers of smbd's waiting to terminate
on large print throughput.
Jeremy.
(This used to be commit 4ae130bfa8)
2003-01-30 23:55:13 +00:00
Andrew Bartlett
fd88966c47 Keep all the const warnings in one place, by adding a utility function to
make the TDB_DATA.

Andrew Bartlett
(This used to be commit f087fe546f)
2003-01-12 12:23:37 +00:00
Gerald Carter
0cd43ecb80 fix tdb_append() prototype
(This used to be commit df6e455992)
2003-01-11 02:30:34 +00:00
Jeremy Allison
8e7dfa50b0 Added tdb_append() call. Efficiently adds to an entry. Used by new messaging
code. Also added torture tests for it.
Jeremy.
(This used to be commit b515525a06)
2003-01-11 00:07:40 +00:00
Martin Pool
3419ef3fb6 tdb_chainlock_with_timeout: Add TODO: If we time out waiting for a
lock, it might be nice to use F_GETLK to get the pid of the process
currently holding the lock and print that as part of the debugging
message.

I'd like to have this in appliance_head, but the code is too different
so I won't worry for now.
(This used to be commit 575908cb06)
2003-01-09 07:23:23 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
(This used to be commit 92a777d0ea)
2003-01-02 09:07:17 +00:00
Simo Sorce
1a37c02890 it's getting comic ...
yet another missing piece :-O
(This used to be commit eb595efa7e)
2002-12-17 01:38:48 +00:00
Jeremy Allison
7dd847ba9c Fixed auth module code. Added VALGRIND defines to reduce spurious warnings.
Jeremy.
(This used to be commit ff3a8d3728)
2002-12-11 23:54:46 +00:00
Jeremy Allison
f023d6129b Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
(This used to be commit 19f86f1f72)
2002-11-23 02:52:38 +00:00
Jeremy Allison
02c58f3fb9 Add chainlock_read functions to get a read lock. Used in *massively*
contended tdb's (and I've got one :-).
Jeremy.
(This used to be commit 064fa201ab)
2002-11-09 03:37:01 +00:00
Jeremy Allison
47955b2f6c Merge of scalable printing code fix... Needs testing.
Also tidied up some of Richard's code (I don't think he uses the compiler
flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like
I do :-) :-).
Jeremy.
(This used to be commit 10024ed06e)
2002-11-07 02:38:42 +00:00
Jeremy Allison
9c94d1a2f7 Add a timeout to tdb_lock_bystring(). Ensure we never have more than
MAX_PRINT_JOBS in a queue.
Jeremy.
(This used to be commit bb58a08af4)
2002-10-04 22:53:30 +00:00
Jeremy Allison
c60f6f066e Make explicit the difference between a tdb key with no data attached, and
a non existent entry. Stop a malloc(0) being called in the first case.
Jeremy.
(This used to be commit ece9507ec3)
2002-09-26 21:00:25 +00:00
Volker Lendecke
7eb8c5e8d0 tdbdump also needs signal.h. Thanks to Guenther Deschner <gd@suse.de>
Volker
(This used to be commit a1bade0748)
2002-09-23 15:00:09 +00:00
Jeremy Allison
0ce509e2f5 tdb tools need #include <signal.h>
Jeremy.
(This used to be commit 7e19a6b7ad)
2002-09-19 17:36:29 +00:00
Jeremy Allison
8b46126a07 Never, *ever* hold a mutex lock in the message database where there may
be traversals being attempted. Yes, this was from bitter experience (and
an out of control server :-). Also allow callers to break out of a tdb_chainlock
with sigalarm if desired.
Jeremy.
(This used to be commit a7781f91d8)
2002-09-17 23:45:21 +00:00
Andrew Tridgell
a6ace770eb ensure that we unlock in case we hit a tdb error
(This used to be commit 4aa7dfb7e7)
2002-08-30 06:56:12 +00:00
Andrew Tridgell
ae10baa5fc don't report the faiilure of non-blocking locks. They are supposed to
fail sometimes, thats why they are non-blocking :)
(This used to be commit 775b918b8c)
2002-07-15 03:51:53 +00:00
Jeremy Allison
25148a148c *Experimental* new large-scaling printer code. Splits printing.tdb into
a separate tdb per printer, but only keeps (currently one) tdb open at
a time (although this is easily changed by changing a #define). Needs
scalability testing with large numbers of printers now....
Jeremy.
(This used to be commit b0909cfa14)
2002-07-11 00:06:29 +00:00
Andrew Tridgell
310e85d7fb don't backup to a newer file
(This used to be commit ae2f8aa9d0)
2002-06-28 03:52:22 +00:00
Tim Potter
8c64bd92bf Added tdb_delete_by_string() function.
(This used to be commit 0cd3952f40)
2002-06-03 06:04:14 +00:00
Andrew Tridgell
c33cf24bcd auto-recover from the fairly common case of a non-clean tdb shutdown
while deleting a record. This leaves us with a non-free record on the
free list.
(This used to be commit e99b6a2b91)
2002-05-22 01:32:12 +00:00
Jean-François Micouleau
9d0ff4b777 fixed tdbtool from core dumping. But the braces to make Chris happy !
J.F.
(This used to be commit d0eae50874)
2002-04-30 16:54:14 +00:00
Jeremy Allison
dec3433303 Merge Herb's idmap endian fix.
Jeremy.
(This used to be commit 7ddad4061a)
2002-04-27 18:56:47 +00:00
Jeremy Allison
ca2e14ddc3 We cannot set errno=0 in any of the wrapper calls as this breaks UNIX error
returns to the client.
Jeremy.
(This used to be commit 1d66e53a64)
2002-04-19 21:45:02 +00:00
Jeremy Allison
302b581ddc First cut at fix for the EINTR problem... More needs to be done I think.
Jeremy.
(This used to be commit 48475a7a69)
2002-04-19 02:08:52 +00:00
Andrew Tridgell
f70836df9e ignore a few more files
(This used to be commit 1c92fab405)
2002-04-16 12:27:54 +00:00
Andrew Bartlett
cd58107e6e Extra file for the tdb search code (linked list definition).
Andrew Bartlett
(This used to be commit c331200600)
2002-04-14 09:45:09 +00:00
Andrew Bartlett
07e6ff5fcf Partly based on the work by mimir (Rafal Szczesniak
<mimir@diament.ists.pwr.wroc.pl>) this patch allows samba to correctly
enumerate its trusted domains - by exaimining the keys in the secrets.tdb file.

This patch has been tested with both NT4 and rpcclient/wbinfo, and adds
some extra functionality to talloc and rpc_parse to allow it to deal with
already unicode strings.

Finally, this cleans up some const warnings that were in net_rpc.c by pushing
another dash of const into the rpc client code.

Andrew Bartlett
(This used to be commit 0bdd94cb99)
2002-04-14 09:44:16 +00:00
Andrew Bartlett
2248a88909 Make our atomic increment code actually do this during its first/second run.
The previous code would return the same value for both the initial and second
call, only incrementing on later calls.

Andrew Bartlett
(This used to be commit a4594d9efe)
2002-04-13 03:23:08 +00:00
Jeremy Allison
4ad0ff29bf Added Shirish's client side caching policy change.
Jeremy.
(This used to be commit 16015c07ea)
2002-04-10 01:04:13 +00:00
Tim Potter
45d3315e32 When printing a tdb log message display "unnamed" instead of "unknown" if
the tdb has not been named.
(This used to be commit 3e7985c60e)
2002-04-09 23:03:17 +00:00
Simo Sorce
68518222a7 uint32 store and fectch functions, a signed int is not enough sometimes
(This used to be commit f07b2b3d52)
2002-04-07 22:04:39 +00:00
Simo Sorce
4f80466480 better check of called function's return
tdbtorture say it's ok
(This used to be commit af0fa4cf7c)
2002-04-07 22:02:09 +00:00