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

920 Commits

Author SHA1 Message Date
Andrew Bartlett
872cb0257c Move DRSUAPI per-attribute decryption into a common file
This file (contining metze's decryption routines) is now also be used by
Samba3's DRSUAPI implementation

Andrew Bartlett
2009-04-14 14:19:39 +10:00
Andrew Tridgell
87506b4a19 make the memory usage of possibleInferiors much more efficient 2009-04-09 14:29:36 +10:00
Andrew Tridgell
37254b7a76 fixed the possibleInferiors calculation so it now passes the test
We are probably still using more memory here than we need to. That
needs to be looked at.
2009-04-09 13:46:18 +10:00
Andrew Tridgell
481fb8aa13 slightly nicer output in our possibleInferiors test code 2009-04-09 13:45:23 +10:00
Andrew Tridgell
6abca12aa0 hook the new possibleInferiors calculation into the schema
We now generate possibleInferiors at startup, and return it when
requested
2009-04-09 13:45:04 +10:00
Andrew Bartlett
db29383797 Make the schema_inferiors generation code to compile
Sadly it still segfaults at this stage

Andrew Bartlett
2009-04-08 23:18:49 +10:00
Andrew Tridgell
217628f881 first cut at a C version of the possible inferiors code 2009-04-07 16:34:36 +10:00
Andrew Bartlett
6e6094d780 s4:schema Don't free mem_ctx before it is initilised 2009-04-03 10:33:12 +11:00
Andrew Tridgell
9539e2b508 major upgrade to the ldb attribute handling
This is all working towards supporting the full WSPP schema without a
major performance penalty.

We now use binary searches when looking up classes and attributes. We
also avoid the loop loading the attributes into ldb, by adding a hook
to override the ldb attribute search function in a module. The
attributes can thus be loaded once, and then saved as part of the
global schema. 

Also added support for a few more key attribute syntaxes, as needed
for the full schema.
2009-04-02 16:42:21 +11:00
Andrew Tridgell
2fe17ae61e possibleInferiors is a generated attribute - we can't pull it over DRS
or from ldb
2009-03-31 16:31:16 +11:00
Andrew Tridgell
15e6def45d Merge branch 'master' into wspp-schema 2009-03-31 15:53:17 +11:00
Andrew Tridgell
16a1903c54 use the prepare_commit op in the partition code
This makes multi-partition ldb's much safer
2009-03-31 15:08:36 +11:00
Andrew Tridgell
631e688c82 Merge branch 'master' into wspp-schema 2009-03-31 11:58:37 +11:00
Andrew Tridgell
d88ced1dcc added a --wspp option
Adding --wspp to possibleInferiors.py forces it to use the WSPP
documented algorithm, which doesn't match windows behaviour
2009-03-27 09:31:51 +11:00
Andrew Tridgell
3f37342bc0 fixed possibleinferiors.py so it matches windows behaviour
This test code builds the possibleInferiors for every class in the
schema on a target machine, and compares it to the servers
possibleInferiors attribute.  

The MS-ADTS spec describes how to calculate possibleInferiors for a
object, but it seems to have some bugs. The spec says that we need to
use AUXCLASSES, and it does not mention the use of the SUBCLASS
tree. In trying to match windows behaviour, I found that I needed to
ignore the AUXCLASSES and build a SUBCLASSES tree.
2009-03-26 22:10:02 +11:00
Andrew Tridgell
2a8f367b0f the start of a possibleInferiors test suite
we haven't implemented possibleInferiors yet. This test is meant to
help us understand how it works. It tries to construct
possibleInferiors via searches on other attributes, and compares it to
the servers constructed possibleInferiors attribute for each class in
the servers schema.

see [MS-ADTS] section 3.1.1.4.5.21
2009-03-24 16:28:39 +11:00
Andrew Bartlett
27c6eca04c Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema 2009-03-20 13:22:08 +11:00
Andrew Tridgell
a1ebb85020 added support for parentGUID
This is made up of 4 parts:

  1) change our schema to include the parentGUID attribute type

  2) in the add hook in the objectclass module, get the objectGUID of
  the parent and add it to the message as parentGUID

  3) in the rename hook in the objectclass module, get the objectGUID
  of the new parent, and insert an async modify request after the
  renmam is done

  4) added a simple test suite
2009-03-17 14:18:53 +11:00
Andrew Bartlett
1a06b31b59 s4:password_hash Only store the LM hash if 'lanman auth = yes'
The clients that do only lanman auth are on their way out, the
passwords are case insensitive, it does not support unicode and we
should not store such a poor hash of the password if we can avoid it.

Andrew Bartlett
2009-03-16 11:28:11 +11:00
Andrew Bartlett
1f25b71d19 s4:schema Don't rely on objectCategory 'magic' when loading the schema
The short-to-long name canonicalisation rules use the schema, so
clearly they won't work when loading it.

Andrew Bartlett
2009-03-11 16:36:40 +11:00
Andrew Bartlett
bb6a2c8076 Load the schema with a more efficient single search
This search uses the index, and is not recursive, so should avoid the
major performance problem with the current sorted schema load.

The ad2oLschema code (recently moved to provision-backend) no longer
needs the schema to be sorted.

Andrew Bartlett
2009-03-06 12:18:21 +11:00
Andrew Bartlett
8374d6f0dc Sort output of schema for OpenLDAP during conversion
This avoids the need to assume that the schema is sorted on load,
which happens more often and is a major performace issue in the
Samba4's use of ldb.

Andrew Bartlett
2009-03-06 12:12:24 +11:00
Andrew Bartlett
17aac8cad2 Remove ad2oLschema, insted call it directly from provision-backend
This removes a level of indirection via external binaries in the
provision-backend code, and also makes better use of our internal code
for loading schema from an LDIF file.

Remaining to do: Sort the output again, as the load from LDIF is
unsorted (also needed because the normal LDB load from sorted input is too slow
anyway, and is only needed here).

Andrew Bartlett
2009-03-05 16:52:11 +11:00
Andrew Bartlett
52542e1aff Pull in all the schema information during DRS schema fetch
This includes things such as allowed attributes, which were not
populated into the schema structure before.

Andrew Bartlett
2009-03-04 14:06:11 +11:00
Jelmer Vernooij
94069bd274 s4: Use same function signature for convert_* as s3. 2009-03-01 19:55:46 +01:00
Jelmer Vernooij
9ffb6d2d9e Add allow_badcharcnv argument to all conversion function, for
consistency with Samba 3.
2009-03-01 06:33:40 +01:00
Simo Sorce
1cd7fe7194 Fix headers, ldb_includes.h is a private header,
do not reference it from ldb.h
2009-02-23 17:38:11 -05:00
Andrew Tridgell
fe5b0b595c added a workaround to the handling of unicodePwd for Win7-beta
The Win7-beta domain process has changed. It no longer uses SAMR for
setting the password, and instead uses a ldap modify on a SASL
encrypted ldap connection. We didn't handle that as the unicodePwd
attribute has a dual use, holding the nt style MD4 hases for DRS
replication, but holding a UTF-16 plaintext password for a LDAP
modify.

This patch copes with the ldap unicodePwd modify by recognising the
format and creating the correct attributes on the fly. Note that this
assumes we will never get a unicodePwd attribute set in NT MD4 format
with the first 2 and last 2 bytes set to 0x22 0x00. 

Andrew Bartlett is looking at a more robust solution, possibly using a
flag to say that this modify came via ldap, and not internal ldb
calls.
2009-02-10 17:31:57 +11:00
Stefan Metzmacher
73aea83966 s4:schema_fsmo: s/class/sclass
metze
2009-02-02 13:09:15 +01:00
Stefan Metzmacher
45c26648c3 s4:update_keytab: s/delete/do_delete
metze
2009-02-02 13:09:09 +01:00
Stefan Metzmacher
1441e87e24 s4:service_task: s/private/private_data
metze
2009-02-02 13:08:59 +01:00
Stefan Metzmacher
24d31c0e81 s4:kludge_acl: s/class/sclass
metze
2009-02-02 13:08:41 +01:00
Stefan Metzmacher
2dc838341d s4:dsdb/schema: s/class/sclass
metze
2009-02-02 13:08:40 +01:00
Stefan Metzmacher
b7f2983489 s4:extended_dn_out: s/private/p s/new/nattrs
metze
2009-02-02 13:08:06 +01:00
Stefan Metzmacher
ea157f495f s4:repl_meta_data: fix segfault after ldb changes
metze
2009-01-31 09:44:27 +01:00
Simo Sorce
7acea5a032 Fix proxy module 2009-01-30 20:12:50 -05:00
Simo Sorce
d4aeed879b Fix all other modules to use ldb_module.h instead of ldb_private.h
The only 2 modules escaping the rule so far are rootdse and partitions
2009-01-30 17:07:25 -05:00
Simo Sorce
d93634b7dd Fix misfiled headers.
Some public functions were mistakenly put into ldb_private.h
Revert all modules to only include ldb_module.h
2009-01-30 09:24:48 -05:00
Stefan Metzmacher
27e4032287 s4:fix the build after 380874ef86
metze
2009-01-30 09:36:58 +01:00
Simo Sorce
380874ef86 Fix the mess with ldb includes.
Separate again the public from the private headers.

Add a new header specific for modules.
Also add service function for modules as now ldb_context and ldb_module are
opaque structures for them.
2009-01-30 01:02:03 -05:00
Jelmer Vernooij
b64b78e4cc Allow overriding the function that ships the request in the Samba 3
client code.
2009-01-21 13:40:18 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
bd64688c6a Fix more compiler warnings in various places. 2008-12-23 22:57:11 +01:00
Jelmer Vernooij
c023828962 Fix missing symbols issues when building with shared libraries. 2008-12-22 21:03:09 +01:00
Jelmer Vernooij
2227860a79 Fix more tests, improve repr() functions for various Python types. 2008-12-21 23:05:35 +01:00
Jelmer Vernooij
6efb7ff981 Fix various Python-related bugs. 2008-12-21 07:34:27 +01:00
Andrew Bartlett
012a6524f7 Treat DN+STring as a binary string for now
This matches the way we work with DN+Binary.  We need this for the
OpenLDAP backend.

Andrew Bartlett
2008-12-20 15:11:40 +11:00
Andrew Bartlett
6488afaafe Now store the GUID and SID from a DN over DRSUAPI into ldb.
Until the extended DN work was compleated, there was no way to store
the additional metadata.

Andrew Bartlett
2008-12-20 14:44:39 +11:00
Jelmer Vernooij
01c22153a9 Fix samba3sam test after removal of dom_sid IDL file. 2008-12-18 16:50:54 +00:00
Andrew Bartlett
12a7eeeaf4 s4:dsdb: remove normalise module
The extended_dn_out module provides the functionality now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:29 +11:00