1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-20 08:23:50 +03:00
Commit Graph

47 Commits

Author SHA1 Message Date
Simo Sorce
889fb983ba r19531: Make struct ldb_dn opaque and local to ldb_dn.c 2007-10-10 14:24:44 -05:00
Andrew Tridgell
1581babfb5 r19361: added a comment 2007-10-10 14:21:16 -05:00
Andrew Tridgell
669aa1424c r19289: fixed a memory leak in ldb_dn_string_compose() 2007-10-10 14:21:02 -05:00
Stefan Metzmacher
67a6a41ba3 r19196: merge from samba3:
pass always a mem_ctx to functions and a ldb_context where needed

metze
2007-10-10 14:20:52 -05:00
Stefan Metzmacher
dc139d8715 r19188: merge from samba3:
fix compiler warnings

metze
2007-10-10 14:20:51 -05:00
Andrew Tridgell
d12550af01 r19113: fixed another checker warning. 2007-10-10 14:20:35 -05:00
Volker Lendecke
441ad8a45c r19079: talloc_array can fail 2007-10-10 14:20:34 -05:00
Volker Lendecke
78aa689a74 r19076: ldb_dn_copy_partial can fail 2007-10-10 14:20:33 -05:00
Volker Lendecke
84ae80b39b r19075: Fix a potential NULL dereference 2007-10-10 14:20:33 -05:00
Volker Lendecke
2dff8ee8cc r19068: Fix a potential NULL dereference 2007-10-10 14:20:33 -05:00
Andrew Tridgell
a05101d83b r17722: better to use talloc_vasprintf() than vasprintf() directly, as it
depends on less libc functions
2007-10-10 14:16:32 -05:00
Andrew Tridgell
403cbd3355 r17579: make ldb build g++ friendly 2007-10-10 14:15:38 -05:00
Andrew Bartlett
d64987a288 r16936: Correct comment in this comparison function
Andrew Bartlett
2007-10-10 14:10:02 -05:00
Andrew Bartlett
ae7ec0d553 r16832: I should be more careful (and test!) when trying to make compilers and
static checkers happy...

Andrew Bartlett
2007-10-10 14:09:49 -05:00
Andrew Bartlett
3e58350ec2 r16829: Fix a number of issues raised by the IBM checker, or gcc warnings.
In particular, this removes one use of the LDB_DN_NULL_FAILED macro,
which was being used on more than DNs, had an embedded goto, and
confused the IBM checker.

In the password_hash code, ensure that sambaAttr is not, before
checking the number of values.

In GENSEC, note that this switch value can't occour.  This seems to be
the only way to quiet both the IBM checker and gcc, as well as cope
with possibly invalid inputs.

Andrew Bartlet
2007-10-10 14:09:48 -05:00
Gerald Carter
26a2fa97e4 r16100: Patch from Michael Wood <mwood@icts.uct.ac.za>: s/then/than/ for correct grammar 2007-10-10 14:08:59 -05:00
Andrew Bartlett
733b64a733 r16086: Ensure we can never dereference NULL pointers, and that describe what
these two DN comparison functions do.

Andrew Bartlett
2007-10-10 14:08:58 -05:00
Simo Sorce
3b4eb2413b r13333: revert previous commit I will use ldb_caseless_cmp in attrib_handlers
to correctly support utf8 comparisons

add an ldb_attr_Casefold function for attribute names and use it
instead of casefold in the right places
2007-10-10 13:51:45 -05:00
Simo Sorce
afda68d7bf r13328: After the attribute name check cleanup it turned up ldb_caseless_cmp()
was used just in one places and by mistake, as there we should have
been using ldb_attr_cmp()

Remove ldb_caseless_cmp() ... going on with the cleanup and utf8 compliance
effort.

Simo.
2007-10-10 13:51:44 -05:00
Simo Sorce
ac9b8a41ff r13324: From now on check attribute names obey rfc2251
Also add a way to provide utf8 compliant functions
by registering them with ldb_set_utf8_fns()

Next comes code to register samba internal utf8 functions.

Simo.
2007-10-10 13:51:44 -05:00
Stefan Metzmacher
380938e97f r12829: fix ldb headers, to not include '<...>' files in .c files
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later.

metze
2007-10-10 13:50:03 -05:00
Simo Sorce
7ba341d6c3 r12748: Fix wrong handling of separation characters for RDNs
allow escaped separation chars as part of the attr value
of an RDN
2007-10-10 13:49:49 -05:00
Simo Sorce
77125feaff 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.
2007-10-10 13:49:47 -05:00
Andrew Bartlett
2b1c88f628 r10980: Use ldb_attr_cmp and ldb_dn_escape_value
Andrew Bartlett
2007-10-10 13:39:49 -05:00
Stefan Metzmacher
9a9311fa6b r10959: fix compiler warnings
metze
2007-10-10 13:39:48 -05:00
Andrew Bartlett
c0d6126eff r10956: Tridge thought some comments might be a good idea :-)
Andrew Bartlett
2007-10-10 13:39:48 -05:00
Andrew Bartlett
380037ee09 r10953: Add a new function to form a canonicalName out of a DN to ldb_dn.c
Use this new function in the client and server for the CrackNames
case, where we particularly need it.

Andrew Bartlett
2007-10-10 13:39:45 -05:00
Andrew Tridgell
e9e4d81b69 r10918: - fixed standalone ldb build
- added note about allowedAttributesEffective (will be needed for mmc)

- fixed some more ldb warnings
2007-10-10 13:39:43 -05:00
Andrew Tridgell
f6818daecc r10913: This patch isn't as big as it looks ...
most of the changes are fixes to make all the ldb code compile without
warnings on gcc4. Unfortunately That required a lot of casts :-(

I have also added the start of an 'operational' module, which will
replace the timestamp module, plus add support for some other
operational attributes

In ldb_msg_*() I added some new utility functions to make the
operational module sane, and remove the 'ldb' argument from the
ldb_msg_add_*() functions. That argument was only needed back in the
early days of ldb when we didn't use the hierarchical talloc and thus
needed a place to get the allocation function from. Now its just a
pain to pass around everywhere.

Also added a ldb_debug_set() function that calls ldb_debug() plus sets
the result using ldb_set_errstring(). That saves on some awkward
coding in a few places.
2007-10-10 13:39:41 -05:00
Simo Sorce
8ddf4de162 r10231: seem I flipped these, fix. 2007-10-10 13:38:09 -05:00
Andrew Bartlett
d6f57ec921 r9929: Fix indentation
Andrew Bartlett
2007-10-10 13:36:23 -05:00
Simo Sorce
d2055849fb r9394: avoid to use BOOL in ldb 2007-10-10 13:33:33 -05:00
Simo Sorce
796d0ea2fc r9393: Fix ldb standalone build 2007-10-10 13:33:33 -05:00
Simo Sorce
31c69d0655 r9392: Fix ldb_dn_compose to make build farm happy
Add ldb_dn_string_compose so that you can build a dn starting from a
struct ldb_dn base and a set of parameters to be composed in a format
string with the same syntax of printf
2007-10-10 13:33:33 -05:00
Simo Sorce
692e35b779 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
2007-10-10 13:33:32 -05:00
Andrew Tridgell
136ecf5cb2 r9387: regedit uses "New Key #nn" for newly created keys, which conflicts with the stricter
DN rules in ldb. Escape the DN components to cope.

Simo, sorry for making a change in ldb_dn.c while you have changes
pending. Please feel free to revert these and switch reg_backend_ldb.c
to use the new dn construction code.
2007-10-10 13:33:31 -05:00
Stefan Metzmacher
2a107472c3 r9318: fix searches with scope ONE and SUB,
the problem was that ldb_dn_compare_base() just looked at if
both dn's mtach some how, and the following happens:

basedn: CN=bar,DC=foo,DC=com
dn: DC=foo,DC=com

and dn: DC=foo,DC=com was return as result of a sub and base search

and also the ONE search with
basedn: DC=foo,DC=com

returned this

dn: CN=bla,CN=bar,DC=foo,DC=com

metze
2007-10-10 13:33:23 -05:00
Andrew Tridgell
19d789e825 r8517: fixed a crash bug in ldb_dn_compare_base() 2007-10-10 13:29:34 -05:00
Simo Sorce
76d496c308 r8515: ldb_dn_cmp now uses ldb_dn_compare so that the DNs are compared
on a content level not ona form level, his means that the 2 DNs:
a) cn= user, dc=this, dc = is,dc=test
b) cn=user,dc=this,dc=is,dc=test
are now identical even if the string form differ (spaces)
2007-10-10 13:29:33 -05:00
Love Hörnquist Åstrand
56fd21c806 r8394: Make sure the argument to ctype is*(3) macros are unsigned char as
required by ISO C99.
2007-10-10 13:20:14 -05:00
Simo Sorce
4eb5863042 r8373: New wildcard matching code.
This code applies correct ldap standard wildcard matching code
removes WILDCARD matching from tdb @ATTRIBUTES, that's now handled independently
adds some more tests for wildcard matching
fixes dn comparison code in ldb_match
2007-10-10 13:20:13 -05:00
Stefan Metzmacher
5fcaa21d67 r8146: fix compiler warning
metze
2007-10-10 13:19:12 -05:00
Simo Sorce
2e328e6c2f r8084: do not leak memory on errors 2007-10-10 13:19:07 -05:00
Simo Sorce
b1a61cd5d0 r8083: check attribute type is valid (only ascii alphanum chars and '-' char)
fail if not
2007-10-10 13:19:06 -05:00
Simo Sorce
624a73148d 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
2007-10-10 13:19:06 -05:00
Andrew Tridgell
944c5844ab 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.
2007-10-10 13:19:01 -05:00
Simo Sorce
3898cdb0dc r7937: main file was missing 2007-10-10 13:18:53 -05:00