1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-19 04:23:48 +03:00
Commit Graph

66 Commits

Author SHA1 Message Date
Andrew Tridgell
84b468b2f8 r23795: more v2->v3 conversion 2007-10-10 14:59:14 -05:00
Simo Sorce
e24812016f r22696: Make sure this is an ascii char
spotted by Volker
2007-10-10 14:52:02 -05:00
Volker Lendecke
75ba82dee0 r22694: It seems that AIX 5.3 with XLC has difficulties with <ctype.h>. This is
an attempt to work around this: Maybe it helps if we include other stuff
first.

This raises a question however: Do we want the DN handling to be locale
dependent? isalpha() can return different things depending on the
current locale.
2007-10-10 14:52:02 -05:00
Jelmer Vernooij
1093875d59 r22681: Fix standalone ldb build when parent directory name != ldb. 2007-10-10 14:52:00 -05:00
Stefan Metzmacher
beb816fb78 r20952: when a component is changed we need to rebuild the linearized string
metze
2007-10-10 14:43:59 -05:00
Andrew Bartlett
ef1ca30180 r20373: When adding a base to a "" DN, don't precede it with a comma (,)
Andrew Bartlett
2007-10-10 14:30:18 -05:00
Stefan Metzmacher
b97b8f5dcb 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
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
01e3a5080a r20023: handle <SID=...> <WKGUID=...> dn's also in ldb_dn_new_fmt()
metze
2007-10-10 14:28:48 -05:00
Stefan Metzmacher
3c087c8970 r19954: allow more special dn's:
this works now against w2k3:

bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<GUID=44087590-dd95-435c-adc1-ec20a50807be>" -s base
bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<SID=S-1-5-21-769185814-1958994947-1641909093-513>" -s base
bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<WKGUID=AB8153B7768811D1ADED00C04FD8D5CD,DC=w2k3,dc=vmnet1,dc=vm,dc=base>" -s base

and we should try to implement this in the server too...

metze
2007-10-10 14:28:40 -05:00
Simo Sorce
b1197dbeeb r19910: Make better use of our set of talloc utility functions 2007-10-10 14:28:35 -05:00
Volker Lendecke
75e6fb9654 r19901: Fix a potential NULL dereference 2007-10-10 14:28:33 -05:00
Simo Sorce
056f90798f r19887: return "" string only if the dn is a valid one 2007-10-10 14:28:32 -05:00
Stefan Metzmacher
cbf4eb1672 r19885: special dn's were not casefolded before rev 19831,
act like this again...

also when we already have a casefoled value we should not call ldb_dn_casefold_internal()

metze
2007-10-10 14:28:32 -05:00
Simo Sorce
e9ddb18c83 r19871: simplify more 2007-10-10 14:28:29 -05:00
Simo Sorce
c1737f9a52 r19870: Simplify code 2007-10-10 14:28:28 -05:00
Simo Sorce
3a662a2d98 r19869: fix memleaks 2007-10-10 14:28:28 -05:00
Simo Sorce
3929c086d5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
2007-10-10 14:28:22 -05:00
Simo Sorce
a580c871d3 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.
2007-10-10 14:28:22 -05:00
Stefan Metzmacher
7a4f46c1c9 r19719: don't use 'new' as var name samba3 doesn't like it...
metze
2007-10-10 14:28:13 -05:00
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