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

57072 Commits

Author SHA1 Message Date
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
Andrew Bartlett
925a94b67c s4:dsdb Use the 'correct' case for the namingContext values in rootDSE
This makes the namingContext attributes in the rootDSE a little more pretty, by
using the exact same values as used in the database DNs.

Andrew Bartlett
2009-10-22 09:45:14 +11:00
Andrew Bartlett
f4240973ba s4:dsdb Add default modules list to samba3sam
This is needed because the work to allow existing databases to be loaded now
moves the 'you have an old @PARTITION' record to the presense or absence of
this attribute.

Andrew Bartlett
2009-10-22 09:22:18 +11:00
Matthias Dieter Wallnöfer
33f3d54de4 s4:provision - rework the "guess_names" and "make_smbconf" method
- Cleans it up from unnecessary "lower()/upper()" and parameters which can be
  derived through "lp" calls.
- Substitute the "HOSTNAME" caption in the "smb.conf" templates with
  "NETBIOS_NAME" which fits better.
- Now the "realm" and "domain" parameter of the provision are totally case
  insensitive and the script itself up/downcases them appropriately depending
  on the use (e.g. "realm" upcase for KERBEROS, lowcase for DNS domainname).
2009-10-21 23:43:04 +02:00
Björn Jacke
78a5e26783 s3:Makefile: add some explicit dependencies to libc
Add libc as explicit dependency where we use "-z defs" linker flags. This is
to silence the Sun linker. Otherwise it whines:

malloc  ... (symbol belongs to implicit dependency /lib/libc.so.1)
2009-10-21 22:50:39 +02:00
Matthias Dieter Wallnöfer
47fcde1922 s4:provision - important fix for DNS domainname: lower realm 2009-10-21 18:46:44 +02:00
Matthias Dieter Wallnöfer
925b156a12 .gitignore: add "partition_proto.h" 2009-10-21 17:56:17 +02:00
Matthias Dieter Wallnöfer
9f170bc7ea heimdal - hdb/ext.c - fix a "shadows variable" warning
Renamed the variable "str" in the nested block to "str2" to prevent the collision
with "str" in the main function block.
2009-10-21 17:35:51 +02:00
Torgeir Lerkerød
95ce7dff20 S4: ldb_map modules uses defines that are reserved
On OpenSolaris MAP_RENAME and friends are defined in <sys/mman.h> e.g. mmap and friends. So on these systems MAP_* have a meaning. Cleaned up LDB name space by adding LDB_ in front of MAP_* e.g. MAP_RENAME => LDB_MAP_RENAME

Signed-off-by: Torgeir Lerkerød <torgeir.lerkerod@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-10-21 15:46:38 +02:00
Torgeir Lerkerød
6e5dad49d9 S4: Building on a system with libintl
Heimdal's internal buildsystem uses a different define for checking for libintl than what samba uses. LIBINTL vs HAVE_LIBINTL_H. Since changing heimdals defineswould brake dropin merges of heimdal. This is a simple workaround in line with others in heimdal_build catalog.

Signed-off-by: Torgeir Lerkerød <torgeir.lerkerod@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-10-21 15:46:38 +02:00
Rusty Russell
0944931159 lib/tdb: make tdbtool use tdb_check() for "check" command
Also, set logging function so we get more informative messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:11:34 +10:30
Rusty Russell
022b4d4aa6 lib/tdb: add tdb_check()
ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with
loops in their hash chains.  tdb_check() provides this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:10:34 +10:30
Rusty Russell
0fc6800005 lib/tdb: add -t (always use transactions) option to tdbtorture
This means you can kill it at any time and expect no corruption.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:10:54 +10:30
Rusty Russell
b77f41d58b lib/tdb: wean off TDB_ERRCODE.
It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch.
In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in
the header is useless (the struct tdb_context isn't defined, so it's doubly useless).
Also, we should never set errno, as io.c was doing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:09:43 +10:30
Rusty Russell
703004340c lib/tdb: TDB_TRACE support (for developers)
When TDB_TRACE is defined (in tdb_private.h), verbose tracing of tdb operations is enabled.
This can be replayed using "replay_trace" from http://ccan.ozlabs.org/info/tdb.

The majority of this patch comes from moving internal functions to _<funcname> to
avoid double-tracing.  There should be no additional overhead for the normal (!TDB_TRACE)
case.

Note that the verbose traces compress really well with rzip.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22 00:00:12 +10:30
Andrew Tridgell
1467e5eaab s4-ldb: allow for non-null terminated ldb_val in ldb_dn_from_ldb_val
The strlen() could go past the end of a non-null terminated value
2009-10-21 22:43:58 +11:00
Andrew Bartlett
16a80f1742 s4:dsdb Add note explaining about the partition format upgrade 2009-10-21 22:43:58 +11:00
Andrew Bartlett
d7cf71d9b6 s4:dsdb Allow loading of old-style partition records
This should make upgrades easier
2009-10-21 22:43:57 +11:00
Andrew Bartlett
4209cf9860 s4:dsdb Make the 'relative path' code in partitions handle tdb://
The previous code would fail if the caller used tdb:// in the URL for the
top-level database.

Andrew Bartlett
2009-10-21 22:43:57 +11:00
Andrew Bartlett
fa2e04b640 s4:ldb_map Fix use-after-free of memory in ldb_map
We need to keep the old 'ares' from the remote server around so we can forward
it back to the caller.  We can't send the same controls (from the last search
entry) twice (and it makes no sense anyway).

Andrew Bartlett
2009-10-21 22:43:57 +11:00
Andrew Bartlett
96ec45309a s4:dsdb talloc_steal the backend module to under the partition 2009-10-21 22:43:57 +11:00
Andrew Bartlett
937140bf10 s4:ldb Put ltdb_private under the 'module'
This helps track the memory better, as we can then place it under the partition
hirarchy.

Andrew Bartlett
2009-10-21 22:43:56 +11:00
Andrew Bartlett
a0a787ad78 s4:rpc_server Ensure we talloc_free handles when we delete objects
If we don't talloc_free the handle, we leak the memory onto the long-term
context.

Andrew Bartlett
2009-10-21 22:43:56 +11:00
Andrew Bartlett
398188fb9b s4:dsdb Remove potentially confusing 'partition' control from result
This ensures that the partition control, needed here for repl_meta_data's
internal work, is not pushed up to other callers.

Andrew Bartlett
2009-10-21 22:43:56 +11:00
Andrew Bartlett
bd53628c7a s4:ldb Add new function to create a cut down list of controls
This I hope will be useful for removing controls from the ldb_reply

Andrew Bartlett
2009-10-21 22:43:56 +11:00