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

57096 Commits

Author SHA1 Message Date
Andrew Bartlett
e34106ca8b s4:dsdb 'attrs' must be static (otherwise segv with async)
The async code makes this really easy to mess up...

Andrew Bartlett
2009-10-23 15:43:03 +11:00
Andrew Bartlett
b6200e3047 s4:dsdb Fix samba3sam test again.
We again need to be careful not to call 'ldb_next_request' based functions in the partitions module.

Or, we need to instead go back to having that work, and ditch the
partition_request stuff...

Andrew Bartlett
2009-10-23 15:42:54 +11:00
Andrew Bartlett
7d975bb848 s4:dsdb Add error string in 'no such object' because of 0 replies case 2009-10-23 15:42:33 +11:00
Andrew Bartlett
26b61aca2f s4:dsdb Remove unused variables 2009-10-23 15:42:19 +11:00
Andrew Bartlett
b0eb8a1bbb s4:dsdb Do less allocation when searching for partitions modules
(it didn't help that the previous allocation was on the wrong long-term context)

Andrew Bartlett
2009-10-23 15:42:14 +11:00
Andrew Bartlett
a84abe7053 s4:setup Mark 'cn' in secrets as case insensitive
While this does not matter very much, others may later expect 'cn' to be case
insensitive.

Andrew Bartlett
2009-10-23 15:42:04 +11:00
Andrew Bartlett
b392116c1f s4:secrets Look for LDAP secret with a name that is indexed
This avoids a very common unindexed lookup
2009-10-23 15:41:53 +11:00
Andrew Bartlett
b7f71c9407 s4:gensec Use an index on computerName in schannel.ldb 2009-10-23 15:41:35 +11:00
Andrew Bartlett
44a727479e util:ldb Allow multiple entries to be added in one LDIF snippit 2009-10-23 15:41:25 +11:00
Andrew Bartlett
e5b86d2674 s4:dsdb Split schema loading and schema data management
By splitting the module this way, we can load the schema at startup, after
the partitions module is operational, but we leave the 'mess with details of
entries in the partitions' module to operate only on the partitions module.

Loading the schema later allows us to set the @ATTRIBUTES correctly on all
the databases.

Andrew Bartlett
2009-10-23 15:41:00 +11:00
Andrew Bartlett
bd9aa4d561 s4:dsdb Set partitions metadata as soon as it is set up. 2009-10-23 15:40:49 +11:00
Andrew Tridgell
0fca2b078c s4-selftest: lower some of the timeouts during make test
This speeds up some of the delay based tests by a lot. There is no
need to have long delays during testing.
2009-10-23 15:38:54 +11:00
Andrew Tridgell
0b624d9eff s4-samdb: make sure the static credentials are never freed 2009-10-23 14:54:07 +11:00
Andrew Tridgell
890e7719cf s4-ldb: move the tdb_reopen_all() calls to ldb_wrap.c 2009-10-23 14:52:18 +11:00
Andrew Tridgell
906961cd8c s4-ldb: use ldb_wrap_fork_hook() to cancel child transactions 2009-10-23 14:52:18 +11:00
Andrew Tridgell
a32b338647 s4-ldb: added ldb_transaction_cancel_noerr()
This will be used to allow cancelling of transactions in a child after
a fork()
2009-10-23 14:52:18 +11:00
Andrew Tridgell
a7cc448dc2 s4-server: call the ldb_wrap_fork_hook() after a fork()
This will be used to allow us to cancel any pending transactions
after a fork.
2009-10-23 14:52:18 +11:00
Andrew Tridgell
33756d6374 s4-server: pre-open the main ldb databases in the server
By pre-opening these databases and leaving them open, we allow the new
ldb_wrap_connect() code to share the ldb context between users.
2009-10-23 14:52:18 +11:00
Andrew Tridgell
4ad0397d8a s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()
This allows us to reuse a ldb context if it is open twice, instead
of going through the expensive process of a full ldb open. We can
reuse it if all of the parameters are the same.

The change relies on callers using talloc_unlink() or free of a parent
to close a ldb context.
2009-10-23 14:52:17 +11:00
Andrew Tridgell
05f93c3e8f s4-dsdb: add a static samdb_credentials
Similarly to system_session(), this creates a static
samdb_credentials()
2009-10-23 14:52:17 +11:00
Andrew Tridgell
98e4393df9 s4-dsdb: create a static system_session context
This patch adds a system_session cache, preventing us from having to
recreate it on every ldb open, and allowing us to detect when the same
session is being used in ldb_wrap
2009-10-23 14:52:17 +11:00
Jeremy Allison
4a1a9f5792 Simplify the logic.
Jeremy.
2009-10-22 15:26:22 -07:00
Jeremy Allison
843adc1981 Fix bug 6829 - smbclient does not show special characters properly.
All successful calls to cli_session_setup() *must* be followed by
calls to cli_init_creds() to stash the credentials we successfully
connected with. There were 2 codepaths where this was missing. This
caused smbclient to be unable to open the \srvsvc pipe to do an RPC
netserverenum, and cause it to fall back to a RAP netserverenum,
which uses DOS codepage conversion rather than the full UCS2 of
RPC, so the returned characters were not correct (unless the DOS
codepage was set correctly). Phew. That was fun to track down :-).
Jeremy.
2009-10-22 15:06:38 -07:00
Volker Lendecke
5c6944d33f s3: Remove a pointless #endif/#ifdef pair 2009-10-22 16:33:44 +02:00
Andrew Tridgell
77991fc6f8 s4-lsa: fixed breakage of lsa server 2009-10-22 19:05:02 +11:00
Andrew Tridgell
9c9e853c77 s4-torture: fixed double free in libnet_group test 2009-10-22 18:46:27 +11:00
Matthias Dieter Wallnöfer
2b82b8e2d3 s4:provision - Reintroduce accidentally removed parameters and checks from "guess_names"
abartlet pointed out that those are essential for a safe and consistent provision.
2009-10-22 09:17:27 +02:00
Andrew Tridgell
fc97c60c56 s4-lsa: fixed the lsa server to cope with the new tests from gd 2009-10-22 14:44:47 +11:00
Andrew Tridgell
a109ee71fb s4-ldb: added a TODO about checking the indexlist 2009-10-22 12:47:55 +11:00
Andrew Tridgell
f2988f5cad s4-ldb: fixed some memory leaks in new indexing code 2009-10-22 12:47:55 +11:00
Andrew Tridgell
0fb6e2a52c s4-ldb: don't try to index non-indexed attributes 2009-10-22 12:47:55 +11:00
Andrew Tridgell
a5712ff673 s4-selftest: removed raw.unlink from quicktest
This test takes 40s, and quicktest already covers delete operations in
base.delete
2009-10-22 12:47:55 +11:00
Andrew Tridgell
1b48764f24 s4-ldb: ensure new dn_list elements are not owned by caller 2009-10-22 12:47:55 +11:00
Andrew Tridgell
129298c9b9 s4-ldb: over-allocate index records to save on realloc costs 2009-10-22 12:47:55 +11:00
Andrew Tridgell
d483c3bb96 s4-ldb: fixed tdb error handling in ldb_index.c 2009-10-22 12:47:55 +11:00
Andrew Tridgell
fcd16eab6c s4-ldb: delete empty index records 2009-10-22 12:47:54 +11:00
Andrew Tridgell
936c8f311a s4-ldb: do more validation of idxptr lists 2009-10-22 12:47:54 +11:00
Andrew Tridgell
74ae8b90ae s4-ldb: expose ltdb_err_map and ltdb_delete_noindex
These will be used by ldb_index.c
2009-10-22 12:47:54 +11:00
Andrew Tridgell
c4cb0c520c s4-ldb: fast path for equal pointers
We compare identical ldb_val values surprisingly often
2009-10-22 12:47:54 +11:00
Andrew Tridgell
606ff46447 selftest: make python run unbuffered
This makes some output in make test easier to follow
2009-10-22 12:47:54 +11:00
Andrew Tridgell
dfa0b74516 util: fixed place where we could look one byte past end of string
We need to check the length before the value
2009-10-22 12:47:54 +11:00
Andrew Tridgell
3f5d535972 idl-drsblobs: mark some more reserved values as value(0)
This prevents valgrind errors when we store these blobs in a database
2009-10-22 12:47:53 +11:00
Andrew Tridgell
5f3cbb5f0b s4-ldb: when taking a list intersection, the result can be as long as the first list
Intuitively you would think it couldn't be longer than the minimum of
the two lists, but we are deliberately allowing for duplicates at this
level of the indexing code, which means the result can be longer
2009-10-22 12:47:53 +11:00
Andrew Tridgell
859cf72692 s4-ldb: ldb indexing rewrite - part1
This gets rid of the @IDXPTR approach to in-transaction indexing,
instead using an in-memory tdb to hold index values during a
transaction. This also cleans up a lot of the internal indexing logic,
hopefully making it easier to understand.

One of the big changes is in memory management, with a lot more use
made of talloc tricks to avoid copying dn lists, and shortcuts used to
avoid high intersection and union calculation costs.

The overall result is that a re-provision on my laptop goes from 48s
to a bit over 10s.
2009-10-22 12:47:53 +11:00
Andrew Tridgell
c5de880c40 s4-ldb: ldb_oom() for modules 2009-10-22 12:47:53 +11:00
Andrew Bartlett
c9838f0e13 s4:torture Silence const warning by use of data_blob_const()
This was inspired by one of mdw's const patches

Andrew Bartlett
2009-10-22 10:17:35 +11:00
Matthias Dieter Wallnöfer
60ec0f1ae7 s4:dsdb/samdb/cracknames - Remove unused header and add more "const"
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-10-22 10:02:48 +11:00
Matthias Dieter Wallnöfer
d120e7ebde s4:ldb_sort - Add some more "const"
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-10-22 10:02:43 +11:00
Matthias Dieter Wallnöfer
0defcfb4f7 s4:libcli/security/access_check - Add "const" in front of "type"
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-10-22 10:02:38 +11:00
Matthias Dieter Wallnöfer
24bca52c0b s4:smbtorture - Add "const" before "value"
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-10-22 10:02:27 +11:00