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

59709 Commits

Author SHA1 Message Date
Rusty Russell
5d9de604d9 tdb: cleanup: tdb_nest_lock/tdb_nest_unlock
Because fcntl locks don't nest, we track them in the tdb->lockrecs array
and only place/release them when the count goes to 1/0.  We only do this
for record locks, so we simply place the list number (or -1 for the free
list) in the structure.

To generalize this:

1) Put the offset rather than list number in struct tdb_lock_type.
2) Rename _tdb_lock() to tdb_nest_lock, make it non-static and move the
   allrecord check out to the callers (except the mark case which doesn't
   care).
3) Rename _tdb_unlock() to tdb_nest_unlock(), make it non-static and
   move the allrecord out to the callers (except mark again).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-17 12:26:13 +10:30
Rusty Russell
e9114a7585 tdb: cleanup: rename global_lock to allrecord_lock.
The word global is overloaded in tdb.  The global_lock inside struct
tdb_context is used to indicate we hold a lock across all the chains.

Rename it to allrecord_lock.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-17 12:19:47 +10:30
Rusty Russell
7ab422d6fb tdb: cleanup: rename GLOBAL_LOCK to OPEN_LOCK.
The word global is overloaded in tdb.  The GLOBAL_LOCK offset is used at
open time to serialize initialization (and by the transaction code to block
open).

Rename it to OPEN_LOCK.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-17 12:18:33 +10:30
Rusty Russell
a6e0ef87d2 tdb: make _tdb_transaction_cancel static.
Now tdb_open() calls tdb_transaction_cancel() instead of
_tdb_transaction_cancel, we can make it static.

Signed-off-by: Rusty Russell<rusty@rustcorp.com.au>
2010-02-24 10:39:59 +10:30
Rusty Russell
452b4a5a6e tdb: cleanup: split brlock and brunlock methods.
This is taken from the CCAN code base: rather than using tdb_brlock for
locking and unlocking, we split it into brlock and brunlock functions.

For extra debugging information, brunlock says what kind of lock it is
unlocking (even though fnctl locks don't need this).  This requires an
extra argument to tdb_transaction_unlock() so we know whether the
lock was upgraded to a write lock or not.

We also use a "flags" argument tdb_brlock:
1) TDB_LOCK_NOWAIT replaces lck_type = F_SETLK (vs F_SETLKW).
2) TDB_LOCK_MARK_ONLY replaces setting TDB_MARK_LOCK bit in ltype.
3) TDB_LOCK_PROBE replaces the "probe" argument.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-17 12:17:19 +10:30
Kamen Mazdrashki
fffdce62fc s4/schema: Move msDS-IntId implementation to samldb.c module
msDS-IntId attribute should be replicated, so it must be
implemented in a module that is before repl_meta_data module
(thanks abartlet for pointing this out).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-02-24 12:01:51 +11:00
Steven Danneman
2523b20349 s4/torture/smb2: Add two new SMB2 compound tests
These tests server behavior when a client compounds both synchronous
and asynchronous requests.
2010-02-23 13:15:45 -08:00
Simo Sorce
805f7507e2 s4:cleanup remove unused schannel ldb code 2010-02-23 12:46:51 -05:00
Simo Sorce
1203de99b1 s4:schannel merge code with s3
After looking at the s4 side of the (s)channel :) I found out that it makes
more sense to simply make it use the tdb based code than redo the same changes
done to s3 to simplify the interface.

Ldb is slow, to the point it needs haks to pre-open the db to speed it up, yet
that does not solve the lookup speed, with ldb it is always going to be slower.

Looking through the history it is evident that the schannel database doesn't
really need greate expanadability. And lookups are always done with a single
Key. This seem a perfet fit for tdb while ldb looks unnecessarily complicated.

The schannel database is not really a persistent one. It can be discared during
an upgrade without causing any real issue. all it contains is temproary session
data.
2010-02-23 12:46:50 -05:00
Simo Sorce
1d0938c629 schannel_tdb: make code compilable in both trees 2010-02-23 12:46:50 -05:00
Simo Sorce
3b12c38ac0 s3:schannel streamline interface
Make calling schannel much easier by removing the need to explicitly open the
database. Let the abstraction do it instead.
2010-02-23 12:46:50 -05:00
Simo Sorce
e5ab64a799 s3:schannel fix memory hierarchy
passing mem_ctx was causing creds->sid to be allocated on mem_ctx and not be
child of creds as expected. When later in schannel_check_creds_state() we
stole the creds on a different memory context the sid was left behind and the
memory it points to freed when the temporary context was freed.
2010-02-23 12:46:50 -05:00
Simo Sorce
bb9014d5cb schannel: merge header files
One almost empty header file was simply including another not included by
anything else. Just merge them together.
2010-02-23 12:46:50 -05:00
Simo Sorce
8e2f5fe7c5 s4:schannel more readable check logic
Make the initial schannel check logic more understandable.
Make it easy to define different policies depending on the caller's
security requirements (Integrity/Privacy/Both/None)

This is the same change applied to s3
2010-02-23 12:46:50 -05:00
Simo Sorce
b4c9dc3724 s3:schannel more readable check logic
Make the initial schannel check logic more understandable.
Make it easy to define different policies depending on ther caller's security
requirements (Integrity/Privacy/Both/None)
2010-02-23 12:46:50 -05:00
Simo Sorce
61b7a24f16 s3 move the sitename cache in its own file 2010-02-23 12:46:26 -05:00
Volker Lendecke
c31cf0a1b5 s3: Consolidate some pid_to_procid() calls to procid_self() 2010-02-23 17:20:28 +01:00
Günther Deschner
0278ef8ce3 s3: re-run make samba3-idl.
Guenther
2010-02-23 17:02:37 +01:00
Günther Deschner
d22b54c4eb spoolss: some fixes for devicemode dm extra structs.
Guenther
2010-02-23 17:01:26 +01:00
Günther Deschner
f6497a5807 s3: re-run make samba3-idl.
Guenther
2010-02-23 16:48:51 +01:00
Günther Deschner
2288e16d72 spoolss: add various DM extradata formats (including PostScript and UniDriver).
Guenther
2010-02-23 16:48:37 +01:00
Stefan Metzmacher
a2cd203982 s3:spoolss: construct the devmode the same way for level 2 and 8
metze
2010-02-23 16:41:26 +01:00
Stefan Metzmacher
1e9df26ef9 s3:cli_netlogon: keep the the correct negotiate_flags on the cli->dc structure
This should fix the rpccli_netlogon_set_trust_password() against DC's
without netr_ServerPasswordSet2 support.

This fixes bug #7160.

metze
2010-02-23 16:19:58 +01:00
Stefan Metzmacher
ddfd5b69a0 s3:selftest: $WORKGROUP doesn't exist, we should use $DOMAIN
metze
2010-02-23 16:19:41 +01:00
Volker Lendecke
752bffc53f s3: Consolidate server_id_self into the equivalent procid_self() 2010-02-23 15:30:00 +01:00
Björn Jacke
ce7727c1cc s3: add explicit configure option whether or not to enable dmapi support 2010-02-23 15:25:41 +01:00
Andreas Schneider
975a7a3d1b tstream: Added a typedef for the function prototype. 2010-02-23 13:48:22 +01:00
Andreas Schneider
69d5cea2e5 s4-smb: Migrate named_pipe_server to tsocket. 2010-02-23 13:48:21 +01:00
Andrew Tridgell
394a7ceeeb s4-selftest: disable rndc and dns update in build farm 2010-02-23 13:48:21 +01:00
Andrew Tridgell
7593b6d03b s4-dns: improved logging, and run name check at startup 2010-02-23 13:48:21 +01:00
Andrew Tridgell
cb7ab80ee8 s4-pyglue: added interface_ips() call
This allows a python script to query the internal network interface
lists from Samba
2010-02-23 13:48:20 +01:00
Andrew Tridgell
61af327e5d s4-dns: call out to the dns update command every 10 minutes
This periodically calls samba_dnsupdate to update our DNS entries if
needed
2010-02-23 13:48:20 +01:00
Andrew Tridgell
ae209d488e s4-param: added "dns update command" smb.conf option
defaults to SBINDIR/samba_dnsupdate

This command will do periodic dynamic DNS updates using TSIG-GSS
2010-02-23 13:48:20 +01:00
Andrew Tridgell
95ee01bb30 s4-config: add dyn_SBINDIR 2010-02-23 13:48:19 +01:00
Andreas Schneider
13e2f5f971 libreplace: Remove the obsolete signal type cast.
AC_SIGNAL_TYPE is already obsolete in autoconf. C89 requires signal
handlers to return void, only K&R returned int.
2010-02-23 12:23:45 +01:00
Andreas Schneider
8ac0c9fc67 libutil: Remove obsolete signal type cast. 2010-02-23 12:23:44 +01:00
Andreas Schneider
95a0ab5f11 s4-smbd: Remove obsolete singal type cast from the thread process model. 2010-02-23 12:23:44 +01:00
Andreas Schneider
f33b69753d s3-smb: Remove the obsolete signal type cast.
AC_SIGNAL_TYPE is already obsolete in autoconf. C89 requires signal
handlers to return void, only K&R returned int.
2010-02-23 12:23:43 +01:00
Andreas Schneider
c6c21f489d s3-lib: Remove obsolete signal type cast. 2010-02-23 12:23:43 +01:00
Andreas Schneider
5ad801beb9 s3-libads: Remove obsolete signal type cast. 2010-02-23 12:23:43 +01:00
Andreas Schneider
38b0e6b4d7 s3-nmbd: Remove obsolete signal type cast. 2010-02-23 12:23:42 +01:00
Andreas Schneider
069350d7e4 s3-pam_smbpass: Remove obsolete signal type cast. 2010-02-23 12:23:42 +01:00
Andreas Schneider
b9cf55cfea s3-passdb: Remove obsolete signal type cast. 2010-02-23 12:23:42 +01:00
Andreas Schneider
d9f31fea6a s3-print: Remove obsolete signal type cast. 2010-02-23 12:23:42 +01:00
Stefan Metzmacher
f924b77492 s3:winbindd: never mark external domains as internal!
This way we can endup with silently using builtin_passdb_methods
for an ad domain without an inbound trust.

This fixes bug #7170.

metze
2010-02-23 10:23:32 +01:00
Matthias Dieter Wallnöfer
4ef82accfe s4:netlogon RPC - fix the indentation
Simo, I'm not really sure that those checks are valid. I read MS-NRPC section
3.5.4.1 about LOGONSRV_HANDLEs ("server_name" is of this type). There isn't
stated that the server name has necessarily to be in the DNS form and should
also be valid when it's NULL (if DCE server and client are the same - I don't
know if me make use of it in s4).
2010-02-23 09:53:17 +01:00
Simo Sorce
0c8608bbab s3 Fix the build
I didn't mean to puch the GetForestTrustInformation patch just yet,
now that it is in fix the s3 build ...
2010-02-22 21:18:07 -05:00
Simo Sorce
d4b8be513c s4:netlogon GetTrustedDomainInformation
start implementing calls related to trusted domain information
2010-02-22 18:49:16 -05:00
Simo Sorce
dbcc7ad7e4 s4:netlogon fix segfault 2010-02-22 18:48:36 -05:00
Simo Sorce
6c0cd488e5 ldb:web Fix typo 2010-02-22 18:48:36 -05:00