1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

42 Commits

Author SHA1 Message Date
Stefan Metzmacher
c69717755a r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointer
to a ldb_schema_syntax struct.

the default attribute handler is now registered dynamicly as "*"
attribute, instead of having its own code path.

ldb_schema_attribute's can be added to the ldb_schema given a
ldb_schema_syntax struct or the syntax name

we may also need to introduce a ldb_schema_matching_rule,
and add a pointer to a default ldb_schema_matching_rule
in the ldb_schema_syntax.

metze
(This used to be commit b97b8f5dcb)
2007-10-10 14:29:19 -05:00
Simo Sorce
c05c41d352 r19888: make it possible to use default attrib handlers from extensions
list more DN attributes as part of samba attribute handlers
(nCName moved here)
(This used to be commit 627ed8b516)
2007-10-10 14:28:32 -05:00
Simo Sorce
4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
(This used to be commit a580c871d3)
2007-10-10 14:28:22 -05:00
Andrew Bartlett
9d39abf947 r19683: Guard GUID_from_string from walking off the end.
Andrew Bartlett
(This used to be commit 1c3e9b27a7)
2007-10-10 14:25:31 -05:00
Simo Sorce
b7774527fa r19531: Make struct ldb_dn opaque and local to ldb_dn.c
(This used to be commit 889fb983ba)
2007-10-10 14:24:44 -05:00
Andrew Bartlett
abe0c30aba r19520: Try not to read past the end of the ldb buffer.
Andrew Bartlett
(This used to be commit 3a103149a6)
2007-10-10 14:24:43 -05:00
Andrew Tridgell
64eed1e78e r19327: fixed a leak in ldif_canonicalise_objectCategory()
(This used to be commit 5cc92d915b)
2007-10-10 14:21:10 -05:00
Simo Sorce
8492a45f8a r17515: Fix warnings
(This used to be commit 5f78645150)
2007-10-10 14:15:31 -05:00
Stefan Metzmacher
c3e837eaaf r17432: display more GUID values nicely,
they all have rangeLower=16 rangeUpper=16
and attribute syntax 2.5.5.10

metze
(This used to be commit 932f8bec21)
2007-10-10 14:15:25 -05:00
Stefan Metzmacher
07cb71ba50 r17416: display the attributeSecurityGUID nicely.
this attriute is used to group multiple attribute
to a propertySet for access control.

metze
(This used to be commit 96e9d46091)
2007-10-10 14:15:23 -05:00
Stefan Metzmacher
0f6c285fa8 r17415: the ldif handlers can't do search as this now blocks foerever
because the handlers are called within the async callbacks
in side the main search.

Also it makes no sense to give the sddl encoder the sid of the primary
domain when we need a description of a real security_descriptor,
this only makes sense for the defaultSecurityDescriptor...

metze
(This used to be commit 92f133f1ef)
2007-10-10 14:15:23 -05:00
Andrew Bartlett
e071f4abd2 r16965: Take a better stab at comparison functions between string and binary
forms of the objectGUID and objectSID attributes.

Andrew Bartlett
(This used to be commit e7894b49b3)
2007-10-10 14:10:04 -05:00
Andrew Bartlett
4f619f4874 r16067: Remove const, it isn't required and just causes a warning.
Andrew Bartlett
(This used to be commit 272a095728)
2007-10-10 14:08:56 -05:00
Andrew Bartlett
efddd37af8 r16066: The OSX AD plugin uses objectCategory searches a lot, and uses them
both fully qualified and in the 'short' form.  Now we test and support
this query format.

Andrew Bartlett
(This used to be commit 9ddcfacbce)
2007-10-10 14:08:55 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Andrew Tridgell
9c9b42a549 r13078: fixed the ldb comparison function for objectSids
(This used to be commit 3f0600e223)
2007-10-10 13:51:23 -05:00
Stefan Metzmacher
4d1c5a023c r12829: fix ldb headers, to not include '<...>' files in .c files
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later.

metze
(This used to be commit 380938e97f)
2007-10-10 13:50:03 -05:00
Simo Sorce
c908d0b2aa r12733: Merge ldap/ldb controls into main tree
There's still lot of work to do but the patch is stable
enough to be pushed into the main samba4 tree.

Simo.
(This used to be commit 77125feaff)
2007-10-10 13:49:47 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Andrew Tridgell
d811ea17bb r12158: added ldif handlers for the ntSecurityDescriptor attribute, so when
displaying security descriptors in ldbsearch or ldbedit you can see
the SDDL version.

This also allows us to specify security descriptors in our
setup/*.ldif files in SDDL format, which is much more convenient than
the NDR binary format!
(This used to be commit 8185731c18)
2007-10-10 13:47:16 -05:00
Andrew Tridgell
a59bb77733 r11459: display a schemaIDGUID as a guid in ldif, making it easier to work
with schemas in ldbedit
(This used to be commit ddbca6e832)
2007-10-10 13:45:39 -05:00
Jelmer Vernooij
f9447d2a17 r9786: Move ldb_map into ldb/modules/
Move samba3sam to dsdb/
(This used to be commit eb9d615bcd)
2007-10-10 13:35:01 -05:00
Jelmer Vernooij
0a72d9a5f7 r9744: - [upgrade.js] Start working on smb.conf conversion.
- [ldb_map] Support storing non-mappable data in a fallback LDB
(This used to be commit 435e4c6389)
2007-10-10 13:34:55 -05:00
Jelmer Vernooij
8b15ef881d r9712: Bunch of small fixes
Write out basic sam.ldif
(This used to be commit 67593bef7f)
2007-10-10 13:34:52 -05:00
Jelmer Vernooij
df384bfa25 r9699: Add as much attributes the current Samba4 SAM has to the mapping table (ignoring most of them, currently..)
(This used to be commit 5100ae211c)
2007-10-10 13:34:49 -05:00
Jelmer Vernooij
95ed275dbb r9698: Fix a bit of memory management
More minor bugfixes
Support mapping objectclasses and do mapping on 'dn' field as well (not just msg->dn)
(This used to be commit b7b079167d)
2007-10-10 13:34:42 -05:00
Jelmer Vernooij
e1269bafe8 r9690: Extend test + fix several bugs
(This used to be commit 0cff0e03fc)
2007-10-10 13:34:41 -05:00
Jelmer Vernooij
afb62ee775 r9689: valgrind-clean now. Editing works now mostly, you just lose half of your
database every time you do it...
(This used to be commit 40ea2af427)
2007-10-10 13:34:41 -05:00
Jelmer Vernooij
e8635da74d r9686: Another round of bugfixes. Works somewhat now, when running under valgrind ;-)
(This used to be commit 786379064f)
2007-10-10 13:34:41 -05:00
Jelmer Vernooij
7e3838dd2d r9685: Add tests for samba3sam mapping module
Fix a couple of bugs
Move samba3sam backend to lib/ldb/
Remove some more unused parameters
(This used to be commit 7f864d446d)
2007-10-10 13:34:41 -05:00
Jelmer Vernooij
98b303e2eb r9595: Add ldb map module
(This used to be commit e0a0d3f092)
2007-10-10 13:34:33 -05:00
Jelmer Vernooij
47843f2b64 r9591: - Remove empty file
- Fix a couple of typo's
- Fix build of lib/samba3/secrets.c for systems that don't have /usr/include/tdb.h...
(This used to be commit b8c5290063)
2007-10-10 13:34:33 -05:00
Rafal Szczesniak
ebb76f84ad r8810: Fix missing headers. Still doesn't fix the build but getting closer there.
rafal
(This used to be commit bc638cc3d6)
2007-10-10 13:30:07 -05:00
Stefan Metzmacher
d9129a77bd r8228: fix compiler warnings
metze
(This used to be commit 93c1d18021)
2007-10-10 13:19:22 -05:00
Stefan Metzmacher
5a176571d8 r8224: - add objectGUID ldif_handler
- fix some compiler warnings

metze
(This used to be commit e6c39241bf)
2007-10-10 13:19:21 -05:00
Simo Sorce
1c5105065a r8082: large rewite of ldb_dn.c
- we do not support multpiple attribute components anymore, makes code a lot easier
  they will be readded later if we found out they are really used, so far my tests
  show w2k3 do not handle them as well

- fix escaping issues, move component value to be in an ldb_val structure
  still need to handle binary values case

- make cononicalize functions leak less memory by giving a specific memory context

- fix tests scripts so that test-ldap can start
- make test not delete databases on completion so that I can inspect them
(This used to be commit 624a73148d)
2007-10-10 13:19:06 -05:00
Andrew Tridgell
bd7812be31 r8038: - fixed indexing on binary values that need base64 encoding and canonicalisation
- added support for recognising the S- form of objectsid in search
  expressions. I thought this could be done with just a comparison
  modified comparison function, but it turns out it also needs a
  canonicalisation function so that indexing can work
(This used to be commit 7d2bee2c56)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
a06d66a3a6 r8037: a fairly major update to the internals of ldb. Changes are:
- moved the knowledge of attribute types out of ldb_tdb and into the
   generic ldb code. This allows the ldb_match() message match logic
   to be generic, so it can be used by other backend

 - added the generic ability to load attribute handlers, for
   canonicalisation, compare, ldif read and ldif write. In the future
   this will be used by the schema module to allow us to correctly
   obey the attributetype schema elements

 - added attribute handlers for some of the core ldap attribute types,
   Integer, DirectoryString, DN, ObjectClass etc

 - added automatic registration of attribute handlers for well-known
   attribute names 'cn', 'dc', 'dn', 'ou' and 'objectClass'

 - converted the objectSid special handlers for Samba to the new system

 - added more correct handling of indexing in tdb backend based on the
   attribute canonicalisation function

 - added generic support for subclasses, moving it out of the tdb
   backend. This will be used in future by the schema module

 - fixed several bugs in the dn_explode code. It still needs more
   work, but doesn't corrupt ldb dbs any more.
(This used to be commit 944c5844ab)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
bdee131f30 r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
(This used to be commit d40bc2fa8d)
2007-10-10 13:18:44 -05:00
Andrew Tridgell
5be159f304 r7804: added the samba specific ldif handlers into the tree, but don't enable
them just yet. I have tested them, and they work fine, but enabling
them will break code in rpc_server/ and samdb, so we need to fix that
first
(This used to be commit 07d459406b)
2007-10-10 13:18:37 -05:00