1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

325 Commits

Author SHA1 Message Date
Stefan Metzmacher
ff322519af r20317: store references to all important naming contexts.
add ldb_get_config_basedn(), ldb_get_schema_basedn()
and ldb_get_root_basedn()

metze
(This used to be commit e28cb83904299fe01e8c0797f5429387f254ed1e)
2007-10-10 14:29:38 -05:00
Stefan Metzmacher
f0eaae956f r20192: I assume a 'break' is the correct thing to do here,
simo,tridge: please check this.

found by the IBM checker

metze
(This used to be commit 5ac373c8b853d4527a095111253f3cb10522f5e8)
2007-10-10 14:29:21 -05:00
Stefan Metzmacher
a3c0f3035d r20189: remove unused struct element
metze
(This used to be commit d20d1872d5ed1176928b85ef9811c6a5177d0148)
2007-10-10 14:29:20 -05:00
Stefan Metzmacher
8e7d87babc r20188: move back to an default attribute handler and not use the '*' attribute
to not conflict with the one that maybe added via the @ATTRIBUTES object

this is just to make the test-tdb-feature.sh torture test happy

There's still a bug when a attribute is registered multiple time
without removing old ldb_schema_attribute instances. But this bug
was there before my changes too and was just triggered by my changes

metze
(This used to be commit 70c4a367433f8c54bdd940eb0a6a24ab976a4063)
2007-10-10 14:29:19 -05:00
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 b97b8f5dcbce006f005e53ca79df3330e62f117b)
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
e55ff42229 r20168: start separating attributes and syntaxes
metze
(This used to be commit 8dda4342f648aa71878ac9eeb7941710e2813aee)
2007-10-10 14:29:17 -05:00
Simo Sorce
07b7d84f06 r20033: Never commit before testing
Never commit before testing
Never commit before testing

:-)
(This used to be commit fdd6ce6b7e288137aeaf62f9869441c73bedbd45)
2007-10-10 14:28:51 -05:00
Simo Sorce
5e583a96d4 r20032: Add ldb_search_exp_fmt()
This functions adds support of a memory context to hook the results to
and a printf style exp_fmt partameter to easily build expressions at once.
(This used to be commit 2a2e181e4bc382d69056cebace9a4ae9897bdfbc)
2007-10-10 14:28:50 -05:00
Stefan Metzmacher
2f1fa42fe8 r20023: handle <SID=...> <WKGUID=...> dn's also in ldb_dn_new_fmt()
metze
(This used to be commit 01e3a5080a38c93c4bbf249b03135314b7e0b3f1)
2007-10-10 14:28:48 -05:00
Stefan Metzmacher
875a920ac2 r19966: we don't need 2 versions of this functions
metze
(This used to be commit 98ab0af4ae0d716f27bc48b699f52d34dc2f8507)
2007-10-10 14:28:41 -05:00
Stefan Metzmacher
6045b6f314 r19964: make debuging easier and report usefull error messages
metze
(This used to be commit f129d78256d965d52e80aedfa76c7c079e611c5f)
2007-10-10 14:28:40 -05:00
Stefan Metzmacher
8534186530 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
(This used to be commit 3c087c89707398d88799367240fe4e6f8b192bb4)
2007-10-10 14:28:40 -05:00
Simo Sorce
921a596cd4 r19910: Make better use of our set of talloc utility functions
(This used to be commit b1197dbeebff062b8ea1e8466d436be82b0b61e0)
2007-10-10 14:28:35 -05:00
Simo Sorce
8ec78bcbbf r19909: Make this one double as fast
(This used to be commit 67b88e49b896f1d783619b8f96554adaeabe80df)
2007-10-10 14:28:35 -05:00
Simo Sorce
096aa31e94 r19907: this function is used a lot
use a binary search to get the right handler
(This used to be commit 789e1088c9ce923ca5a6d703b69810eba3bcd4d0)
2007-10-10 14:28:35 -05:00
Simo Sorce
4f8b4a8ef1 r19906: ldb_attr_cmp is used a lot
remove unneded overhead of a function call
(This used to be commit 3ca25867621af049c6cc52e919fa46dd26c31918)
2007-10-10 14:28:34 -05:00
Volker Lendecke
eee64196a3 r19901: Fix a potential NULL dereference
(This used to be commit 75e6fb9654f10a076ed49b0582b40368e149d30a)
2007-10-10 14:28:33 -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 627ed8b5165c9a1cc0e2c67329b364f9cd8a1726)
2007-10-10 14:28:32 -05:00
Simo Sorce
5b258c3b9d r19887: return "" string only if the dn is a valid one
(This used to be commit 056f90798f6d2cea1debc50f31fea3d740c4a837)
2007-10-10 14:28:32 -05:00
Simo Sorce
ac6fec2f86 r19886: ncName is specific to samba, not the generic ldb engine
(This used to be commit 505afb18fb8ba427bc3d03f41eb309b27bad68f7)
2007-10-10 14:28:32 -05:00
Stefan Metzmacher
6d074bcd4b 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
(This used to be commit cbf4eb16725992bfdfa5a334e0e5547e6df568e6)
2007-10-10 14:28:32 -05:00
Simo Sorce
f4e6be00ac r19871: simplify more
(This used to be commit e9ddb18c83518703f987bf141807639956612dbf)
2007-10-10 14:28:29 -05:00
Simo Sorce
5ab439893b r19870: Simplify code
(This used to be commit c1737f9a52d9e4d118f969a0953a458188143d0d)
2007-10-10 14:28:28 -05:00
Simo Sorce
353b968025 r19869: fix memleaks
(This used to be commit 3a662a2d985bf801284c5dc1123dec6705e6d092)
2007-10-10 14:28:28 -05:00
Simo Sorce
a9e31b33b5 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
(This used to be commit 3929c086d5d0b3f08b1c4f2f3f9602c3f4a9a4bd)
2007-10-10 14:28:22 -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 a580c871d3784602a9cce32d33419e63c8236e63)
2007-10-10 14:28:22 -05:00
Stefan Metzmacher
a7127ad79e r19743: merge from samba3:
remove old unused schema module

metze
(This used to be commit 3c16951b0d88013b34a0213ced79087653713ddf)
2007-10-10 14:28:18 -05:00
Stefan Metzmacher
982f7f9b44 r19742: fix compiler warnings
metze
(This used to be commit 4edeef56dcd185869812bf622c5b496360eb6223)
2007-10-10 14:28:18 -05:00
Stefan Metzmacher
ab7411714b r19740: fix compiler warning
metze
(This used to be commit 666e674504c514033390bf69746fb3c35baf4b2a)
2007-10-10 14:28:17 -05:00
Andrew Bartlett
adae413042 r19731: Modify the ldb_map infrustructure to always map from requested
attributes to backend (remote) attributes.

We can't do a reverse mapping safely where the remote attribute may be
a source for multiple local attributes.  (We end up with the wrong
attributes returned).

In doing this, I've modified the samba3sam.js test to be more
realistic, and fixed some failures in the handling of primaryGroupID.

I've added a new (private) helper function ldb_msg_remove_element() to
avoid a double lookup of the element name.

I've also re-formatted many of the function headers, to fit into
standard editor widths.

Andrew Bartlett
(This used to be commit 186766e3095e71ba716c69e681592e217a3bc420)
2007-10-10 14:28:15 -05:00
Stefan Metzmacher
c046f2e7a3 r19720: - don't pass a pointer reference to ldb_search_default_callback()
as it's ugly when it free's the callers memory on failure!

- only steal the controls on a LDB_REPLY_EXTENDED, LDB_REPLY_DONE
  and ignore them on LDB_REPLY_ENTRY, LDB_REPLY_REFERRAL as we currently
  have not way to return them in a ldb_result (we should fix this!)

metze
(This used to be commit 47da62b15abf48f97ce6fc8dc4627792728349ae)
2007-10-10 14:28:13 -05:00
Stefan Metzmacher
a39db63030 r19719: don't use 'new' as var name samba3 doesn't like it...
metze
(This used to be commit 7a4f46c1c9ec8119db46ffc57d77fcf13ca0c5a8)
2007-10-10 14:28:13 -05:00
Simo Sorce
b7774527fa r19531: Make struct ldb_dn opaque and local to ldb_dn.c
(This used to be commit 889fb983ba1cf8a11424a8b3dc3a5ef76e780082)
2007-10-10 14:24:44 -05:00
Jelmer Vernooij
4fa24df98d r19507: Merge my DSO fixes branch. Building Samba's libraries as shared libraries
works again now, by specifying --enable-dso to configure.
(This used to be commit 7a01235067a4800b07b8919a6a475954bfb0b04c)
2007-10-10 14:24:41 -05:00
Simo Sorce
cc22f65d7b r19490: better to check the return result
(This used to be commit abdc4edbb8f8b8234bad1be05fa92b3f3bc8876c)
2007-10-10 14:24:38 -05:00
Simo Sorce
7f833458ca r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth argument.
This is a pointer to an element pointer. If it is not null it will be
filled with the pointer of the manipulated element.
Will avoid double searches on the elements list in some cases.
(This used to be commit 0fa5d4bc225b83e9f63ac6d75bffc4c08eb6b620)
2007-10-10 14:24:38 -05:00
Simo Sorce
92ec8e5c1e r19454: In standalone build init asq too
(This used to be commit e58b03cd666c6e5df8e5720a62aef23f87be9362)
2007-10-10 14:21:34 -05:00
Simo Sorce
21e63dca9b r19453: Expose helper functions
(This used to be commit ee86e88e4f523d67900b52b5a4d4040a76360c61)
2007-10-10 14:21:34 -05:00
Andrew Tridgell
0cf42c464e r19365: fixed a memory leak in the ldb attribute handling
(This used to be commit d7e07685164141f8fb2c2a6258e1fcb46ff9d06c)
2007-10-10 14:21:17 -05:00
Andrew Tridgell
e36ea2e8eb r19362: - don't need to store the baseinfo message after cache load
- set better names on talloc structures in ldb modules, making leaks
  easier to track down
(This used to be commit 3bf76db42dc6dde5d71083216dba819869b31c75)
2007-10-10 14:21:17 -05:00
Andrew Tridgell
5535b43efd r19361: added a comment
(This used to be commit 1581babfb5a5bbbfc2706dbec9b37b03fe9a5af6)
2007-10-10 14:21:16 -05:00
Andrew Tridgell
888458d434 r19323: fixed a leak in the ldif parse code
(This used to be commit 06387e1cf2d12a74e15a6cdf19e83a28c75cb5fd)
2007-10-10 14:21:08 -05:00
Simo Sorce
3cabd0dcae r19305: Potential memleak on the ldb_context if we don't use a temp mem context
(This used to be commit c989dfbe18a2f700e952f478e258bd626c9eb2f5)
2007-10-10 14:21:05 -05:00
Andrew Tridgell
d0ba572fab r19289: fixed a memory leak in ldb_dn_string_compose()
(This used to be commit 669aa1424c7a931f57856af0cd4a6f6f4a60b823)
2007-10-10 14:21:02 -05:00
Andrew Bartlett
fa67b43ae8 r19264: Clarify behaviour in ldb_search_callback() and provide more
information when modules fail to load.

Andrew Bartlett
(This used to be commit 512ef62f4a63fd90b67757b2c7b2e8ec83969204)
2007-10-10 14:20:59 -05:00
Stefan Metzmacher
bbc056e067 r19196: merge from samba3:
pass always a mem_ctx to functions and a ldb_context where needed

metze
(This used to be commit 67a6a41ba3af840cd8226de73576a90ecf602caa)
2007-10-10 14:20:52 -05:00
Stefan Metzmacher
c403dd11fb r19188: merge from samba3:
fix compiler warnings

metze
(This used to be commit dc139d8715f58b27363266f1426da451907845eb)
2007-10-10 14:20:51 -05:00
Andrew Tridgell
f1f807e66b r19113: fixed another checker warning.
(This used to be commit d12550af01f8d4c135fbf6f429852c31570ec92b)
2007-10-10 14:20:35 -05:00
Andrew Tridgell
36246a191c r19112: fixed a checker warning.
In case you haven't noticed, lots of our packages now run the IBM
checker in the build farm on 'snab'
(This used to be commit b39a79f17c9d8729264436bb774e8bd2b88e12f9)
2007-10-10 14:20:35 -05:00
Volker Lendecke
06ac3dbd9a r19079: talloc_array can fail
(This used to be commit 441ad8a45c390f807a6ec5f27d585aad54f3b210)
2007-10-10 14:20:34 -05:00