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

317 Commits

Author SHA1 Message Date
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
98ab0af4ae r19966: we don't need 2 versions of this functions
metze
2007-10-10 14:28:41 -05:00
Stefan Metzmacher
f129d78256 r19964: make debuging easier and report usefull error messages
metze
2007-10-10 14:28:40 -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
Simo Sorce
67b88e49b8 r19909: Make this one double as fast 2007-10-10 14:28:35 -05:00
Simo Sorce
789e1088c9 r19907: this function is used a lot
use a binary search to get the right handler
2007-10-10 14:28:35 -05:00
Simo Sorce
3ca2586762 r19906: ldb_attr_cmp is used a lot
remove unneded overhead of a function call
2007-10-10 14:28:34 -05:00
Volker Lendecke
75e6fb9654 r19901: Fix a potential NULL dereference 2007-10-10 14:28:33 -05:00
Simo Sorce
627ed8b516 r19888: make it possible to use default attrib handlers from extensions
list more DN attributes as part of samba attribute handlers
(nCName moved here)
2007-10-10 14:28:32 -05:00
Simo Sorce
056f90798f r19887: return "" string only if the dn is a valid one 2007-10-10 14:28:32 -05:00
Simo Sorce
505afb18fb r19886: ncName is specific to samba, not the generic ldb engine 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
3c16951b0d r19743: merge from samba3:
remove old unused schema module

metze
2007-10-10 14:28:18 -05:00
Stefan Metzmacher
4edeef56dc r19742: fix compiler warnings
metze
2007-10-10 14:28:18 -05:00
Stefan Metzmacher
666e674504 r19740: fix compiler warning
metze
2007-10-10 14:28:17 -05:00
Andrew Bartlett
186766e309 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
2007-10-10 14:28:15 -05:00
Stefan Metzmacher
47da62b15a 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
2007-10-10 14:28:13 -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
Jelmer Vernooij
7a01235067 r19507: Merge my DSO fixes branch. Building Samba's libraries as shared libraries
works again now, by specifying --enable-dso to configure.
2007-10-10 14:24:41 -05:00
Simo Sorce
abdc4edbb8 r19490: better to check the return result 2007-10-10 14:24:38 -05:00
Simo Sorce
0fa5d4bc22 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.
2007-10-10 14:24:38 -05:00
Simo Sorce
e58b03cd66 r19454: In standalone build init asq too 2007-10-10 14:21:34 -05:00
Simo Sorce
ee86e88e4f r19453: Expose helper functions 2007-10-10 14:21:34 -05:00
Andrew Tridgell
d7e0768516 r19365: fixed a memory leak in the ldb attribute handling 2007-10-10 14:21:17 -05:00
Andrew Tridgell
3bf76db42d 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
2007-10-10 14:21:17 -05:00
Andrew Tridgell
1581babfb5 r19361: added a comment 2007-10-10 14:21:16 -05:00
Andrew Tridgell
06387e1cf2 r19323: fixed a leak in the ldif parse code 2007-10-10 14:21:08 -05:00
Simo Sorce
c989dfbe18 r19305: Potential memleak on the ldb_context if we don't use a temp mem context 2007-10-10 14:21:05 -05:00
Andrew Tridgell
669aa1424c r19289: fixed a memory leak in ldb_dn_string_compose() 2007-10-10 14:21:02 -05:00
Andrew Bartlett
512ef62f4a r19264: Clarify behaviour in ldb_search_callback() and provide more
information when modules fail to load.

Andrew Bartlett
2007-10-10 14:20:59 -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
Andrew Tridgell
b39a79f17c 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'
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
af72af684b r19074: Merge from 3_0: Fix a potential NULL dereference.
Volker
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 Bartlett
a113e47784 r18978: Fix bug found by:
http://www.ee.oulu.fi/research/ouspg/protos/testing/c06/ldapv3/

The issue here is that if the UTF8 conversion fails, because this
isn't actually UTF8 data, then we need to do a binary compare instead.

Andrew Bartlett
2007-10-10 14:20:26 -05:00
Andrew Tridgell
7e2ec87590 r18942: add a ldb_set_create_perms() function in ldb. I didn't call it
ldb_set_umask() (which is what we had discussed) as it doesn't
actually set the umask (in effect it sets the inverse of the umask -
the perms to be used for the file)
2007-10-10 14:20:22 -05:00
Andrew Tridgell
7a1db8c2a4 r18910: Change ldb_msg_add_string() to not actually add an attribute if the
string is zero length. This allows callers to not have to worry about
creating an invalid ldap attribute.

See extensive discussion on samba-technical list :-)
2007-10-10 14:20:20 -05:00
Stefan Metzmacher
4e2f5ba490 r18903: merge from samba3:
define HAVE_LDB_LDAP and HAVE_LDB_SQLITE3

metze
2007-10-10 14:20:19 -05:00