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

237 Commits

Author SHA1 Message Date
Jeremy Allison
f81fdcc935 Merge tridge's tdb updates.
Jeremy.
-
Simo Sorce
66074d3b09 split some security related functions in their own files.
(no need to include all of smbd files to use some basic sec functions)

also minor compile fixes
-
Jeremy Allison
6defe43e6d Portability fixes from schmitz@hp.com (Joachim Schmitz). Bug #549.
Jeremy.
-
Gerald Carter
585764305a fix some warnings found by the Sun C compiler -
Gerald Carter
c17a7dc9a1 sync 3.0 into HEAD for the last time -
Simo Sorce
3101c236b8 port latest changes from SAMBA_3_0 tree -
Gerald Carter
99feae7b5b ading new files from 3.0 -
Gerald Carter
adb98e7b7c trying to get HEAD building again. If you want the code
prior to this merge, checkout HEAD_PRE_3_0_0_BETA_3_MERGE
-
Tim Potter
249a697470 spelling -
Tim Potter
29c6d2f61c Multi-line string constants have been deprecated in newer versions of gcc.
Found by Guenther Deschner.
-
Jeremy Allison
11b914ed84 Fix from Andrew Esh to ensure tdb_pack can't segfault.
Also stop it leaking memory like a sieve !
Jeremy.
-
Andrew Bartlett
49bae02273 strictly, you can't #if on somthing that may or may not be defined.
Andrew Bartlett
-
Rafal Szczesniak
5281ee7e84 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
-
Tim Potter
eb432700c0 Fixed crash bug when calling tdb_unlockkeys() with no locked keys.
woot!
-
Martin Pool
98479f1315 Remove valgrind_strlen function, hopefully no longer needed with
recent Valgrind relases and clashing with -DVALGRIND.
-
Martin Pool
36c6f67d4a Note about using Valgrind with tdbs. -
Martin Pool
e412dd6d7e 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.
-
Jeremy Allison
0fa310cbc3 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.
-
Martin Pool
11c1e712d4 Doc -
Jeremy Allison
3497330ff5 Ensure we overwrite a tdb if the hash size changes.
Jeremy.
-
Jeremy Allison
4ae130bfa8 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.
-
Andrew Bartlett
f087fe546f Keep all the const warnings in one place, by adding a utility function to
make the TDB_DATA.

Andrew Bartlett
-
Gerald Carter
df6e455992 fix tdb_append() prototype -
Jeremy Allison
b515525a06 Added tdb_append() call. Efficiently adds to an entry. Used by new messaging
code. Also added torture tests for it.
Jeremy.
-
Martin Pool
575908cb06 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.
-
Andrew Bartlett
92a777d0ea 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
-
Simo Sorce
eb595efa7e it's getting comic ...
yet another missing piece :-O
-
Jeremy Allison
ff3a8d3728 Fixed auth module code. Added VALGRIND defines to reduce spurious warnings.
Jeremy.
-
Jeremy Allison
19f86f1f72 Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
-
Jeremy Allison
064fa201ab Add chainlock_read functions to get a read lock. Used in *massively*
contended tdb's (and I've got one :-).
Jeremy.
-
Jeremy Allison
10024ed06e 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.
-
Jeremy Allison
bb58a08af4 Add a timeout to tdb_lock_bystring(). Ensure we never have more than
MAX_PRINT_JOBS in a queue.
Jeremy.
-
Jeremy Allison
ece9507ec3 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.
-
Volker Lendecke
a1bade0748 tdbdump also needs signal.h. Thanks to Guenther Deschner <gd@suse.de>
Volker
-
Jeremy Allison
7e19a6b7ad tdb tools need #include <signal.h>
Jeremy.
-
Jeremy Allison
a7781f91d8 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.
-
Andrew Tridgell
4aa7dfb7e7 ensure that we unlock in case we hit a tdb error -
Andrew Tridgell
775b918b8c don't report the faiilure of non-blocking locks. They are supposed to
fail sometimes, thats why they are non-blocking :)
-
Jeremy Allison
b0909cfa14 *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.
-
Andrew Tridgell
ae2f8aa9d0 don't backup to a newer file -
Tim Potter
0cd3952f40 Added tdb_delete_by_string() function. -
Andrew Tridgell
e99b6a2b91 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.
-
Jean-François Micouleau
d0eae50874 fixed tdbtool from core dumping. But the braces to make Chris happy !
J.F.
-
Jeremy Allison
7ddad4061a Merge Herb's idmap endian fix.
Jeremy.
-
Jeremy Allison
1d66e53a64 We cannot set errno=0 in any of the wrapper calls as this breaks UNIX error
returns to the client.
Jeremy.
-
Jeremy Allison
48475a7a69 First cut at fix for the EINTR problem... More needs to be done I think.
Jeremy.
-
Andrew Tridgell
1c92fab405 ignore a few more files -
Andrew Bartlett
c331200600 Extra file for the tdb search code (linked list definition).
Andrew Bartlett
-
Andrew Bartlett
0bdd94cb99 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
-
Andrew Bartlett
a4594d9efe 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
-