14 years agos4-ldb: added a TODO about checking the indexlist
Andrew Tridgell [Thu, 22 Oct 2009 01:45:48 +0000 (12:45 +1100)]
s4-ldb: added a TODO about checking the indexlist

14 years agos4-ldb: fixed some memory leaks in new indexing code
Andrew Tridgell [Thu, 22 Oct 2009 01:45:26 +0000 (12:45 +1100)]
s4-ldb: fixed some memory leaks in new indexing code

14 years agos4-ldb: don't try to index non-indexed attributes
Andrew Tridgell [Thu, 22 Oct 2009 01:29:35 +0000 (12:29 +1100)]
s4-ldb: don't try to index non-indexed attributes

14 years agos4-selftest: removed raw.unlink from quicktest
Andrew Tridgell [Thu, 22 Oct 2009 00:19:19 +0000 (11:19 +1100)]
s4-selftest: removed raw.unlink from quicktest

This test takes 40s, and quicktest already covers delete operations in

14 years agos4-ldb: ensure new dn_list elements are not owned by caller
Andrew Tridgell [Thu, 22 Oct 2009 00:16:30 +0000 (11:16 +1100)]
s4-ldb: ensure new dn_list elements are not owned by caller

14 years agos4-ldb: over-allocate index records to save on realloc costs
Andrew Tridgell [Thu, 22 Oct 2009 00:16:00 +0000 (11:16 +1100)]
s4-ldb: over-allocate index records to save on realloc costs

14 years agos4-ldb: fixed tdb error handling in ldb_index.c
Andrew Tridgell [Thu, 22 Oct 2009 00:15:18 +0000 (11:15 +1100)]
s4-ldb: fixed tdb error handling in ldb_index.c

14 years agos4-ldb: delete empty index records
Andrew Tridgell [Thu, 22 Oct 2009 00:14:36 +0000 (11:14 +1100)]
s4-ldb: delete empty index records

14 years agos4-ldb: do more validation of idxptr lists
Andrew Tridgell [Thu, 22 Oct 2009 00:13:28 +0000 (11:13 +1100)]
s4-ldb: do more validation of idxptr lists

14 years agos4-ldb: expose ltdb_err_map and ltdb_delete_noindex
Andrew Tridgell [Thu, 22 Oct 2009 00:06:33 +0000 (11:06 +1100)]
s4-ldb: expose ltdb_err_map and ltdb_delete_noindex

These will be used by ldb_index.c

14 years agos4-ldb: fast path for equal pointers
Andrew Tridgell [Thu, 22 Oct 2009 00:05:15 +0000 (11:05 +1100)]
s4-ldb: fast path for equal pointers

We compare identical ldb_val values surprisingly often

14 years agoselftest: make python run unbuffered
Andrew Tridgell [Thu, 22 Oct 2009 00:04:40 +0000 (11:04 +1100)]
selftest: make python run unbuffered

This makes some output in make test easier to follow

14 years agoutil: fixed place where we could look one byte past end of string
Andrew Tridgell [Thu, 22 Oct 2009 00:03:27 +0000 (11:03 +1100)]
util: fixed place where we could look one byte past end of string

We need to check the length before the value

14 years agoidl-drsblobs: mark some more reserved values as value(0)
Andrew Tridgell [Wed, 21 Oct 2009 23:36:58 +0000 (10:36 +1100)]
idl-drsblobs: mark some more reserved values as value(0)

This prevents valgrind errors when we store these blobs in a database

14 years agos4-ldb: when taking a list intersection, the result can be as long as the first list
Andrew Tridgell [Wed, 21 Oct 2009 11:33:58 +0000 (22:33 +1100)]
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

14 years agos4-ldb: ldb indexing rewrite - part1
Andrew Tridgell [Wed, 21 Oct 2009 11:21:26 +0000 (22:21 +1100)]
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.

14 years agos4-ldb: ldb_oom() for modules
Andrew Tridgell [Wed, 21 Oct 2009 11:18:32 +0000 (22:18 +1100)]
s4-ldb: ldb_oom() for modules

14 years agos4:torture Silence const warning by use of data_blob_const()
Andrew Bartlett [Wed, 21 Oct 2009 23:17:35 +0000 (10:17 +1100)]
s4:torture Silence const warning by use of data_blob_const()

This was inspired by one of mdw's const patches

Andrew Bartlett

14 years agos4:dsdb/samdb/cracknames - Remove unused header and add more "const"
Matthias Dieter Wallnöfer [Sat, 17 Oct 2009 20:20:43 +0000 (22:20 +0200)]
s4:dsdb/samdb/cracknames - Remove unused header and add more "const"

Signed-off-by: Andrew Bartlett <>
14 years agos4:ldb_sort - Add some more "const"
Matthias Dieter Wallnöfer [Sat, 17 Oct 2009 20:30:22 +0000 (22:30 +0200)]
s4:ldb_sort - Add some more "const"

Signed-off-by: Andrew Bartlett <>
14 years agos4:libcli/security/access_check - Add "const" in front of "type"
Matthias Dieter Wallnöfer [Sat, 17 Oct 2009 20:30:43 +0000 (22:30 +0200)]
s4:libcli/security/access_check - Add "const" in front of "type"

Signed-off-by: Andrew Bartlett <>
14 years agos4:smbtorture - Add "const" before "value"
Matthias Dieter Wallnöfer [Sat, 17 Oct 2009 20:39:15 +0000 (22:39 +0200)]
s4:smbtorture - Add "const" before "value"

Signed-off-by: Andrew Bartlett <>
14 years agos4:dsdb Use the 'correct' case for the namingContext values in rootDSE
Andrew Bartlett [Wed, 21 Oct 2009 22:45:14 +0000 (09:45 +1100)]
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

14 years agos4:dsdb Add default modules list to samba3sam
Andrew Bartlett [Wed, 21 Oct 2009 22:22:18 +0000 (09:22 +1100)]
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

14 years agos4:provision - rework the "guess_names" and "make_smbconf" method
Matthias Dieter Wallnöfer [Wed, 21 Oct 2009 17:38:52 +0000 (19:38 +0200)]
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).

14 years agos3:Makefile: add some explicit dependencies to libc
Björn Jacke [Wed, 21 Oct 2009 20:45:18 +0000 (22:45 +0200)]
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/

14 years agos4:provision - important fix for DNS domainname: lower realm
Matthias Dieter Wallnöfer [Wed, 21 Oct 2009 16:46:44 +0000 (18:46 +0200)]
s4:provision - important fix for DNS domainname: lower realm

14 years ago.gitignore: add "partition_proto.h"
Matthias Dieter Wallnöfer [Wed, 21 Oct 2009 15:56:17 +0000 (17:56 +0200)]
.gitignore: add "partition_proto.h"

14 years agoheimdal - hdb/ext.c - fix a "shadows variable" warning
Matthias Dieter Wallnöfer [Wed, 21 Oct 2009 15:35:51 +0000 (17:35 +0200)]
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.

14 years agoS4: ldb_map modules uses defines that are reserved
Torgeir Lerkerød [Tue, 20 Oct 2009 16:33:25 +0000 (18:33 +0200)]
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 <>
Signed-off-by: Stefan Metzmacher <>
14 years agoS4: Building on a system with libintl
Torgeir Lerkerød [Tue, 20 Oct 2009 16:25:53 +0000 (18:25 +0200)]
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 <>
Signed-off-by: Stefan Metzmacher <>
14 years agolib/tdb: make tdbtool use tdb_check() for "check" command
Rusty Russell [Wed, 21 Oct 2009 13:41:34 +0000 (00:11 +1030)]
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 <>
14 years agolib/tdb: add tdb_check()
Rusty Russell [Wed, 21 Oct 2009 13:40:34 +0000 (00:10 +1030)]
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 <>
14 years agolib/tdb: add -t (always use transactions) option to tdbtorture
Rusty Russell [Wed, 21 Oct 2009 13:40:54 +0000 (00:10 +1030)]
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 <>
14 years agolib/tdb: wean off TDB_ERRCODE.
Rusty Russell [Wed, 21 Oct 2009 13:39:43 +0000 (00:09 +1030)]
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 <>
14 years agolib/tdb: TDB_TRACE support (for developers)
Rusty Russell [Tue, 20 Oct 2009 01:49:41 +0000 (12:19 +1030)]
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

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)

Note that the verbose traces compress really well with rzip.

Signed-off-by: Rusty Russell <>
14 years agos4-ldb: allow for non-null terminated ldb_val in ldb_dn_from_ldb_val
Andrew Tridgell [Wed, 21 Oct 2009 11:18:16 +0000 (22:18 +1100)]
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

14 years agos4:dsdb Add note explaining about the partition format upgrade
Andrew Bartlett [Wed, 21 Oct 2009 11:28:29 +0000 (22:28 +1100)]
s4:dsdb Add note explaining about the partition format upgrade

14 years agos4:dsdb Allow loading of old-style partition records
Andrew Bartlett [Wed, 21 Oct 2009 11:27:22 +0000 (22:27 +1100)]
s4:dsdb Allow loading of old-style partition records

This should make upgrades easier

14 years agos4:dsdb Make the 'relative path' code in partitions handle tdb://
Andrew Bartlett [Wed, 21 Oct 2009 07:25:00 +0000 (18:25 +1100)]
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

14 years agos4:ldb_map Fix use-after-free of memory in ldb_map
Andrew Bartlett [Wed, 21 Oct 2009 07:23:18 +0000 (18:23 +1100)]
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

14 years agos4:dsdb talloc_steal the backend module to under the partition
Andrew Bartlett [Wed, 21 Oct 2009 05:09:10 +0000 (16:09 +1100)]
s4:dsdb talloc_steal the backend module to under the partition

14 years agos4:ldb Put ltdb_private under the 'module'
Andrew Bartlett [Wed, 21 Oct 2009 05:08:24 +0000 (16:08 +1100)]
s4:ldb Put ltdb_private under the 'module'

This helps track the memory better, as we can then place it under the partition

Andrew Bartlett

14 years agos4:rpc_server Ensure we talloc_free handles when we delete objects
Andrew Bartlett [Wed, 21 Oct 2009 05:07:22 +0000 (16:07 +1100)]
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

Andrew Bartlett

14 years agos4:dsdb Remove potentially confusing 'partition' control from result
Andrew Bartlett [Wed, 21 Oct 2009 04:21:21 +0000 (15:21 +1100)]
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

14 years agos4:ldb Add new function to create a cut down list of controls
Andrew Bartlett [Wed, 21 Oct 2009 04:20:26 +0000 (15:20 +1100)]
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

14 years agos4:samr Don't leak the whole user onto the long-term handle
Andrew Bartlett [Wed, 21 Oct 2009 04:18:59 +0000 (15:18 +1100)]
s4:samr Don't leak the whole user onto the long-term handle

The user entry is only required for this function, so use
mem_ctx to hold it.

Andrew Bartlett

14 years agolibrpc Make talloc tree in binding tower match the floors
Andrew Bartlett [Wed, 21 Oct 2009 04:17:31 +0000 (15:17 +1100)]
librpc Make talloc tree in binding tower match the floors

This is mostly cosmetics, but helped me see that these are legitimate stuctures
when viewed in the talloc tree.

Also don't put the 'ndr' structure on the long-term tree.

Andrew Bartlett

14 years agos4:epmapper Create a proper talloc tree of endpoint floors
Andrew Bartlett [Wed, 21 Oct 2009 04:15:48 +0000 (15:15 +1100)]
s4:epmapper Create a proper talloc tree of endpoint floors

Andrew Bartlett

14 years agos4:dsdb Allow creation of new partitions
Andrew Bartlett [Mon, 19 Oct 2009 22:12:26 +0000 (09:12 +1100)]
s4:dsdb Allow creation of new partitions

This is a collection of fixes to allow the creation of new partitions,
as well as adding debugging that may be useful in chasing down future

Andrew Bartlett

14 years agos4:provision Use schema to casefold partitions on 'upgrade'.
Andrew Bartlett [Mon, 19 Oct 2009 22:11:04 +0000 (09:11 +1100)]
s4:provision Use schema to casefold partitions on 'upgrade'.

This helps us upgrade from sam.ldb files before the dynamic partitions
work, and ensures we use the right casefolding functions.

Andrew Bartlett

14 years agos4:dsdb Remove default instanceType from repl_meta_data
Andrew Bartlett [Mon, 19 Oct 2009 01:03:50 +0000 (12:03 +1100)]
s4:dsdb Remove default instanceType from repl_meta_data

This is no longer required, as the instancetype module is now above

Andrew Bartlett

14 years agos4:dsdb Remove workaround for two partition head records
Andrew Bartlett [Fri, 16 Oct 2009 05:25:49 +0000 (16:25 +1100)]
s4:dsdb Remove workaround for two partition head records

The problem here has been avoided in repl_meta_data, and so this is no
longer required.

Andrew Bartlett

14 years agos4:dsdb Use 'partition modified' information to update @REPLCHANGED
Andrew Bartlett [Fri, 16 Oct 2009 05:20:15 +0000 (16:20 +1100)]
s4:dsdb Use 'partition modified' information to update @REPLCHANGED

This major rework of repl_meta_data changes it from using a static
list of partitions to a dynamic list created from the controls placed
on returned ldb results.

To process these in one place, the similar but distinct callbacks are
combined into a single replmd_op_callback(), which handles both the
'normal operation' and 'inbound replication' case.

This allows new partitions to be created, and replication events for
these new partitions to be scheduled immediately.

Also in this commit: We no longer specify the target partition for new
or modified objects - instead we allow the partitions module to use
the DN as normal.  THis avoids the issue where we would create two
partition head records.

Andrew Bartlett

14 years agos4:repl Pass schema as argument to replmd_update_rpmd()
Andrew Bartlett [Fri, 16 Oct 2009 04:11:28 +0000 (15:11 +1100)]
s4:repl Pass schema as argument to replmd_update_rpmd()

14 years agos4:dsdb In partitions module, tell the caller what partition was used.
Andrew Bartlett [Wed, 14 Oct 2009 23:49:25 +0000 (10:49 +1100)]
s4:dsdb In partitions module, tell the caller what partition was used.

This means we don't return any control for modifications to the
control records in sam.ldb, but do if they modified one of the actual
data LDB files.

Andrew Bartlett

14 years agos4:ldb Add function to add controls to an LDB reply
Andrew Bartlett [Wed, 14 Oct 2009 23:45:44 +0000 (10:45 +1100)]
s4:ldb Add function to add controls to an LDB reply

14 years agos4:dsdb Load new partitions in a running LDB if metadata changes
Andrew Bartlett [Wed, 14 Oct 2009 04:16:34 +0000 (15:16 +1100)]
s4:dsdb Load new partitions in a running LDB if metadata changes

This allows one instance of LDB to add a partition, and another to use
it without first closing the database.

Andrew Bartlett

14 years agos4:dsdb Only reload partition metadata on search and transaction start
Andrew Bartlett [Wed, 14 Oct 2009 03:13:52 +0000 (14:13 +1100)]
s4:dsdb Only reload partition metadata on search and transaction start

I see no reason to reload it when in a transaction - it can't change
on us anyway (we possibly need to watch for our own changes to
@PARTITION however)

Andrew Bartlett

14 years agos4:dsdb Reload partition metadata if the main db updates
Andrew Bartlett [Wed, 14 Oct 2009 01:57:03 +0000 (12:57 +1100)]
s4:dsdb Reload partition metadata if the main db updates

This uses the fact that the primary DB does not change often.  Before
each operation, we see if the sequence number has changed.

Andrew Bartlett

14 years agos4:provision Test ability to set GUIDs from provision command line
Andrew Bartlett [Tue, 6 Oct 2009 03:11:44 +0000 (14:11 +1100)]
s4:provision Test ability to set GUIDs from provision command line

14 years agos4:provison Allow the NTDS guid on the command line (for testing)
Andrew Bartlett [Tue, 13 Oct 2009 11:11:34 +0000 (22:11 +1100)]
s4:provison Allow the NTDS guid on the command line (for testing)

This allows a blackbox test to confirm this can be set.

Andrew Bartlett

14 years agos4:dsdb Split 'set per-partition metadata' into it's own function
Andrew Bartlett [Wed, 14 Oct 2009 00:09:18 +0000 (11:09 +1100)]
s4:dsdb Split 'set per-partition metadata' into it's own function

This helps us ensure we always set the metadata, even when we are
'adding' a partition that is already in our list.  (We *really* don't
want these getting out of sync, and the extra writes are harmless)

Andrew Bartlett

14 years agos4:Handle reprovision with existing partitions
Andrew Bartlett [Tue, 13 Oct 2009 11:10:28 +0000 (22:10 +1100)]
s4:Handle reprovision with existing partitions

The issue here is that if we don't put the partitions metadata in the
database before we wipe it, we won't wipe the partitions contents, and
so the provision will later fail (entry already exists)

Andrew Bartlett

14 years agos4:dsdb Don't try and casefold DNs during startup for partition load
Andrew Bartlett [Tue, 13 Oct 2009 11:09:14 +0000 (22:09 +1100)]
s4:dsdb Don't try and casefold DNs during startup for partition load

The issue here is that before we load the schema partition, we may not
have the correct casefolding rules.  As such, keep things simple and
use the DN exactly as found in the @PARTITIONS record to find the

Andrew Bartlett

14 years agos4:dsdb Fix partition_create not to return early
Andrew Bartlett [Mon, 12 Oct 2009 12:27:00 +0000 (23:27 +1100)]
s4:dsdb Fix partition_create not to return early

14 years agos4:dsdb Fix tests for samba3sam to pass after partitions module changes
Andrew Bartlett [Mon, 12 Oct 2009 09:49:23 +0000 (20:49 +1100)]
s4:dsdb Fix tests for samba3sam to pass after partitions module changes

This is needed because the new format of the partitions record is a
casefolded DN, not a DN and file combination.

Andrew Bartlett

14 years agos4:dsdb Be strict in selecting on-disk names for partitions
Andrew Bartlett [Mon, 12 Oct 2009 05:37:12 +0000 (16:37 +1100)]
s4:dsdb Be strict in selecting on-disk names for partitions

I really don't want a cn=foo/../bar in my ldb file name.

Andrew Bartlett

14 years agos4:dsdb Set 'notification' after the success of a change.
Andrew Bartlett [Fri, 9 Oct 2009 22:36:44 +0000 (09:36 +1100)]
s4:dsdb Set 'notification' after the success of a change.

This allows the partition to be created before we try and set a
notification on it.  (perhaps extra work required here for partition

Andrew Bartlett

14 years agos4:provision Set @OPTIONS in the provision_init.ldif
Andrew Bartlett [Fri, 9 Oct 2009 22:26:06 +0000 (09:26 +1100)]
s4:provision Set @OPTIONS in the provision_init.ldif

The new partitions code knows to copy these items in when creating a
new parition, so we can set it from the start.

Andrew Bartlett

14 years agos4:dsdb Rework modules create new partitions at runtime
Andrew Bartlett [Fri, 2 Oct 2009 00:28:29 +0000 (10:28 +1000)]
s4:dsdb Rework modules create new partitions at runtime

This is done by passing an extended operation to the partitions module
to extend the @PARTITION record and to extend the in-memory list of

This also splits things up into module parts that belong above and below

Also slit the partitions module into two files due to the complexity
of the code

Andrew Barltett

14 years agos4/drs: prefixMap main interface implementation
Kamen Mazdrashki [Sun, 18 Oct 2009 18:34:21 +0000 (21:34 +0300)]
s4/drs: prefixMap main interface implementation

Currenly implemented functions are:
dsdb_schema_pfm_new(), dsdb_schema_pfm_make_attid()
and dsdb_schema_pfm_oid_from_attid()

14 years agos4/drs(tort): Unit test for prefixMap implementation.
Kamen Mazdrashki [Sun, 18 Oct 2009 18:31:37 +0000 (21:31 +0300)]
s4/drs(tort): Unit test for prefixMap implementation.

Currenly those tests cover only the main part of the interface,
i.e. dsdb_schema_pfm_new(), dsdb_schema_pfm_make_attid()
and dsdb_schema_pfm_oid_from_attid()

14 years agos4/drs(tort): Comment typos fixed in drs_util.c
Kamen Mazdrashki [Sun, 18 Oct 2009 18:28:55 +0000 (21:28 +0300)]
s4/drs(tort): Comment typos fixed in drs_util.c

14 years agos4/drs(tort): fixed '==' to '>='
Kamen Mazdrashki [Sun, 18 Oct 2009 18:28:28 +0000 (21:28 +0300)]
s4/drs(tort): fixed '==' to '>='

ATTID is marked as partial by adding 32768.
Thus the check should be '>= 32768'

14 years agos4-lsa: Fix dcesrv_lsa_EnumTrustDom() and avoid infite windows client loop.
Günther Deschner [Wed, 21 Oct 2009 00:18:54 +0000 (02:18 +0200)]
s4-lsa: Fix dcesrv_lsa_EnumTrustDom() and avoid infite windows client loop.

Found by RPC-LSA-TRUSTED-DOMAIN torture test.


14 years agos3-lsa: Fix _lsa_EnumTrustDom() and avoid infite windows client loop.
Günther Deschner [Wed, 21 Oct 2009 00:17:32 +0000 (02:17 +0200)]
s3-lsa: Fix _lsa_EnumTrustDom() and avoid infite windows client loop.

Found by RPC-LSA-TRUSTED-DOMAIN torture test.


14 years agos4-smbtorture: test whether an lsa_EnumTrustDom implementation would hang up a client.
Günther Deschner [Wed, 21 Oct 2009 00:16:32 +0000 (02:16 +0200)]
s4-smbtorture: test whether an lsa_EnumTrustDom implementation would hang up a client.


14 years agos3-lsa: make s3 pass against RPC-LSA-LOOKUPNAMES again.
Günther Deschner [Wed, 21 Oct 2009 00:45:21 +0000 (02:45 +0200)]
s3-lsa: make s3 pass against RPC-LSA-LOOKUPNAMES again.

Do what W2k8 does and return the builtin domain for a NULL name.


14 years agonsswitch: fix the build of the winbind krb5 locator plugin.
Günther Deschner [Wed, 21 Oct 2009 00:44:44 +0000 (02:44 +0200)]
nsswitch: fix the build of the winbind krb5 locator plugin.


14 years agoTurn on LOCK9 test which will test for regressions in bug 6828.
Jeremy Allison [Wed, 21 Oct 2009 00:53:06 +0000 (17:53 -0700)]
Turn on LOCK9 test which will test for regressions in bug 6828.

14 years agoFix bug 6828 - infinite timeout occurs when byte lock held outside of samba
Jeremy Allison [Wed, 21 Oct 2009 00:52:34 +0000 (17:52 -0700)]
Fix bug 6828 - infinite timeout occurs when byte lock held outside of samba

14 years agoFix comments on new test.
Jeremy Allison [Wed, 21 Oct 2009 00:41:27 +0000 (17:41 -0700)]
Fix comments on new test.

14 years agoAdd local (or NFS) lock test to smbtorture. Checks that local locks
Jeremy Allison [Wed, 21 Oct 2009 00:37:43 +0000 (17:37 -0700)]
Add local (or NFS) lock test to smbtorture. Checks that local locks
conflict with CIFS locks (see bug 6868).

14 years agos4-smbtorture: fix RPC-LSA-LSALOOKUP test against w2k3 and w2k8.
Günther Deschner [Tue, 20 Oct 2009 21:47:40 +0000 (23:47 +0200)]
s4-smbtorture: fix RPC-LSA-LSALOOKUP test against w2k3 and w2k8.

Make sure to split out lsa_LookupName NULL name test so that we can better track
results from bogus names and NULL names.


14 years agoFix "make install" by removing all references to python. Not currently
Jeremy Allison [Tue, 20 Oct 2009 20:42:28 +0000 (13:42 -0700)]
Fix "make install" by removing all references to python. Not currently
needed in source3, and isn't working anyway.

14 years agoRemove pythonmods from the build in source3, it doesn't build anyway
Jeremy Allison [Tue, 20 Oct 2009 20:28:05 +0000 (13:28 -0700)]
Remove pythonmods from the build in source3, it doesn't build anyway
and isn't needed (as far as I can tell).

14 years agoFix the build with the recent linker flag changes.
Jeremy Allison [Tue, 20 Oct 2009 20:09:42 +0000 (13:09 -0700)]
Fix the build with the recent linker flag changes.

14 years agos4-smbtorture: Make it simpler to specify number of trusted domains to create in
Günther Deschner [Tue, 20 Oct 2009 16:34:09 +0000 (18:34 +0200)]
s4-smbtorture: Make it simpler to specify number of trusted domains to create in


14 years agos3-lsa: Fix _lsa_EnumTrustDom().
Günther Deschner [Tue, 20 Oct 2009 16:35:49 +0000 (18:35 +0200)]
s3-lsa: Fix _lsa_EnumTrustDom().

Windows clients were showing a lot of duplicates in their list of trusted

Found by RPC-LSA-TRUSTED-DOMAIN torture test.


14 years agos3-pdb_ldap: fix crash bug in ldapsam_set_trusteddom_pw().
Günther Deschner [Tue, 20 Oct 2009 16:35:16 +0000 (18:35 +0200)]
s3-pdb_ldap: fix crash bug in ldapsam_set_trusteddom_pw().

Thanks Volker for the hint.


14 years agos3:Makefile: rename LDSHFLAG variables to make meaning more obvious
Björn Jacke [Tue, 20 Oct 2009 18:45:46 +0000 (20:45 +0200)]
s3:Makefile: rename LDSHFLAG variables to make meaning more obvious

14 years agos3-lsa: Fix _lsa_CreateAccount() for usage of SEC_FLAG_MAXIMUM_ALLOWED.
Günther Deschner [Tue, 20 Oct 2009 13:54:40 +0000 (15:54 +0200)]
s3-lsa: Fix _lsa_CreateAccount() for usage of SEC_FLAG_MAXIMUM_ALLOWED.

Found by RPC-LSA-PRIVILEGES torture test.


14 years agos3-selftest: enable RPC-LSA-PRIVILEGES against Samba 3.
Günther Deschner [Thu, 16 Jul 2009 16:46:10 +0000 (18:46 +0200)]
s3-selftest: enable RPC-LSA-PRIVILEGES against Samba 3.


14 years agos4-smbtorture: Fix wrong comment in RPC-LSA-TRUSTED-DOMAIN test.
Günther Deschner [Tue, 20 Oct 2009 13:09:32 +0000 (15:09 +0200)]
s4-smbtorture: Fix wrong comment in RPC-LSA-TRUSTED-DOMAIN test.


14 years agos4-smbtorture: split out EnumTrustedDomainsEx test in RPC-LSA-TRUSTED-DOMAINS.
Günther Deschner [Tue, 20 Oct 2009 10:59:49 +0000 (12:59 +0200)]
s4-smbtorture: split out EnumTrustedDomainsEx test in RPC-LSA-TRUSTED-DOMAINS.


14 years agos3-lsa: Allow to lookup 'NT AUTHORITY\Anonymous Logon' as well.
Günther Deschner [Tue, 20 Oct 2009 13:15:06 +0000 (15:15 +0200)]
s3-lsa: Allow to lookup 'NT AUTHORITY\Anonymous Logon' as well.

This is to finally pass RPC-LSA-LOOKUPNAMES test.


14 years agos3-lsa: allow to lookup BUILTIN\ in lsa_LookupNames.
Günther Deschner [Tue, 20 Oct 2009 13:13:56 +0000 (15:13 +0200)]
s3-lsa: allow to lookup BUILTIN\ in lsa_LookupNames.

Found by RPC-LSA-LOOKUPNAMES torture test.


14 years agos3-lsa: When looking up domains in LookupNames, do not strip the sid.
Günther Deschner [Tue, 20 Oct 2009 13:12:58 +0000 (15:12 +0200)]
s3-lsa: When looking up domains in LookupNames, do not strip the sid.

Found by RPC-LSA-LOOKUPNAMES torture test.


14 years agos3-lsa: allow to have NULL strings in lsa LookupName queries.
Günther Deschner [Tue, 20 Oct 2009 13:11:58 +0000 (15:11 +0200)]
s3-lsa: allow to have NULL strings in lsa LookupName queries.

Found by RPC-LSA-LOOKUPNAMES torture test.