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

166 Commits

Author SHA1 Message Date
Jelmer Vernooij
5e814287ba r25522: Convert to standard bool types. 2007-10-10 15:07:47 -05:00
Andrew Bartlett
0f7135a468 r24259: Rework the objectclass module to use the new schema, rather than the
ldb_subclass list.

Next step will be to have this module also set the objectCategory and
default ntSecurityDescriptor

Andrew Bartlett
2007-10-10 15:01:31 -05:00
Andrew Tridgell
40c0919aaa r23798: updated old Temple Place FSF addresses to new URL 2007-10-10 14:59:15 -05:00
Andrew Tridgell
84b468b2f8 r23795: more v2->v3 conversion 2007-10-10 14:59:14 -05:00
Andrew Bartlett
3111bbdf64 r23703: Start to get Samba4 to again work with LDAP backends, after I turned
on metze's schema work.

Andrew Bartlett
2007-10-10 14:59:06 -05:00
Andrew Bartlett
b96b7b623d r23557: Ensure that we don't reorder the objectClass list, if we don't have
any subclasses loaded yet, or none are applicable.

This fixes MMC so that it at least displays the Samba domain as a
domain, but there is still work to be done.

Andrew Bartlett
2007-10-10 14:53:26 -05:00
Jelmer Vernooij
a90202abca r22762: Some ldb_map changes:
* Change license to LGPL, so it can be used by non-Samba users of
LDB (cleared with Martin as well).

* Include ldb_map in standalone build.

* Move ldb_map to its own directory
2007-10-10 14:52:15 -05:00
Jelmer Vernooij
1093875d59 r22681: Fix standalone ldb build when parent directory name != ldb. 2007-10-10 14:52:00 -05:00
Andrew Bartlett
2b3df7f38d r21496: A number of ldb control and LDAP changes, surrounding the
'phantom_root' flag in the search_options control

- Add in support for LDB controls to the js layer
- Test the behaviour
- Implement support for the 'phantom_root' flag in the partitions module
- Make the LDAP server set the 'phantom_root' flag in the search_options control
  - This replaces the global_catalog flag passed down as an opaque pointer
- Rework the string-format control parsing function into
  ldb_parse_control_strings(), returning errors by ldb_errorstring()
  method, rather than with printf to stderr
- Rework some of the ldb_control handling logic

Andrew Bartlett
2007-10-10 14:48:44 -05:00
Stefan Metzmacher
545f769c2f r21354: fix comment
metze
2007-10-10 14:48:18 -05:00
Andrew Bartlett
26758fc24c r21305: Change the skel module a little, so make it names clearer.
Andrew Bartlett
2007-10-10 14:48:07 -05:00
Stefan Metzmacher
a201d3fc4d r20772: fix segfault caused by ldb_set_default_dns() from init_context hook of the root dse module
metze
2007-10-10 14:40:51 -05:00
Simo Sorce
906630f18e r20670: Make the logic more clear 2007-10-10 14:40:19 -05:00
Simo Sorce
03de577059 r20669: Simplifing more 2007-10-10 14:40:19 -05:00
Simo Sorce
ad58177ee4 r20656: This way the process flow should be much more readable.
We need to make it easier, but this should be a step in
the right direction.
2007-10-10 14:37:27 -05:00
Andrew Bartlett
f28cf842da r20459: LDB map cleanup:
- Replace 'return 0' with return LDB_SUCCESS in more places.

- Do not return NULL attribute values, these are not permitted.
  Instead, fail the whole conversion.

- Cleanup old comments.

Andrew Bartlett
2007-10-10 14:35:51 -05:00
Stefan Metzmacher
6b20123c10 r20198: let the IBM checker ignore the warning about a missing break
statement...

metze
2007-10-10 14:29:22 -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
Simo Sorce
49d1559d36 r19904: port fies from samba3 2007-10-10 14:28:34 -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
Andrew Bartlett
9b9b7bae16 r19733: More work to fix ldb_map. With the wildcard present,
map_attr_find_local() always returns, which is exactly what we don't
want.  Instead, rely on the overwrite behaviour.

Andrew Bartlett
2007-10-10 14:28:16 -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
Simo Sorce
889fb983ba r19531: Make struct ldb_dn opaque and local to ldb_dn.c 2007-10-10 14:24:44 -05:00
Andrew Bartlett
cf1b0cc19f r19521: Fix memory leak.
Andrew Bartlett
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
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
4ad2eba2aa r19452: Warn but don't die if registering against the rootdse is not possible 2007-10-10 14:21:33 -05:00
Simo Sorce
05134a90e3 r19370: Handle errors if talloc_reference fails 2007-10-10 14:21:18 -05:00
Simo Sorce
3e0e2787c1 r19332: ldb_parse_tree leaks 2007-10-10 14:21:11 -05:00
Simo Sorce
bfeaa08fde r19312: This should fix a nasty bug with values and names being freed before the results where used.
Seem that el is hanging out of a request, and the target is put on the final results.

Still one to catch and fix, but this seem to cure most of them
2007-10-10 14:21:07 -05:00
Simo Sorce
6fad80bb09 r19299: Fix possible memleaks 2007-10-10 14:21:04 -05:00
Simo Sorce
7180f38e9e r19129: Add comment to clarify behavior 2007-10-10 14:20:37 -05:00
Andrew Bartlett
72858f8594 r18781: Move the usnCreated and usnChanged handling around again.
This moves these attributes from objectguid into an optional backend
(objectguid), used by ltdb.  For OpenLDAP, the entryUUID module
converts entryCSN into usnChanged.

This also changes the sequence number API, and uses 'time based'
sequence numbers, when an LDAP or similar backend is detected.

To assist this, we also store the last modified time in the TDB,
whenever we change a value.

Andrew Bartlett
2007-10-10 14:19:11 -05:00
Andrew Bartlett
d36d05858b r18770: Avoid crashes and fix up other issues in the client-side paged_searches module.
In particular, we must query the remote server to find out if paged
searches are supported, not the local ldb.

This patch also removes the ue of bool, and returns it to LDB error codes.

Andrew Bartlett
2007-10-10 14:19:10 -05:00
Simo Sorce
34ce1f8e1b r18591: Better defaults for share creation
Fix logic error in paged_results
2007-10-10 14:18:53 -05:00
Andrew Bartlett
81d9a692c1 r18504: Handle mappings for RENAME and KEEP attributes better. We don't need
to mess with the values in these cases.

Where we do convert the values, try and convert substrings.  This
isn't going to be perfect, but we should try rather than segfault.

This also avoids using the wrong arm of the union for the attribute
name

The change in the entryUUID module is to correct the case of
sAMAccountName, due to the case sensitive ldap.js test.

Andrew Bartlett
2007-10-10 14:18:40 -05:00
Andrew Bartlett
bc58792b71 r18495: More work on the LDAP backend (which now passes a lot of our tests!)
This adds a list of attributes that are in our wildcard seaches, but
the remote server requires to be explicitly listed.  This also cleans
up the handling of wildcards in ldb_map to be more consistant.

Also fix the partitions module to rebase the search, if on the GC
port, we do a subtree search.  (Otherwise backends can rightly
complain that the search is not in their scope).

Andrew Bartlett
2007-10-10 14:18:38 -05:00
Andrew Tridgell
254cbf09de r18439: 2nd try at a talloc_move() api. This type with the ** ptr interface
exposed.

Unfortunately this generates a large number of type punning
warnings. We'll have to find some magic to hide those.
2007-10-10 14:18:29 -05:00
Andrew Tridgell
b0de283882 r18438: I should have examined these uses of talloc_move() more
carefully. Most of them are OK, but a couple were not.
2007-10-10 14:18:29 -05:00
Andrew Tridgell
c0d9e7d473 r18436: converted ldb to use talloc_move() instead of talloc_steal() when
appropriate.

Note that I also removed the error checks that were being done on the
result of talloc_steal(). They are pointless as talloc_steal() doesn't
have any failure modes that wouldn't cause a segv anyway, and they
tend to clutter the code
2007-10-10 14:18:29 -05:00
Andrew Tridgell
449fab2c26 r18321: fixed some warnings on AIX 2007-10-10 14:18:08 -05:00
Simo Sorce
41cb3a9258 r18317: Make sure we actually have a valid reply or fail 2007-10-10 14:18:07 -05:00
Andrew Tridgell
eba6c84eff r18301: I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
2007-10-10 14:18:04 -05:00
Stefan Metzmacher
c66cf31afd r17775: use an enum to get rid of compiler warnings
metze
2007-10-10 14:16:40 -05:00
Andrew Bartlett
daa1a61891 r17700: Despite our best hopes, the way module initialisation tends to happen,
we make searches before things are initialised.  Cope with this.

Andrew Bartlett
2007-10-10 14:16:27 -05:00
Andrew Bartlett
5bcfa12cef r17698: The original code assumed that &data->context was a valid talloc
pointer.

This only works when this is the only structure member, but when I
added a new context pointer, it failed.

Andrew Bartlett
2007-10-10 14:16:27 -05:00
Andrew Bartlett
ba00f45357 r17691: Make the structure more public, so we have somewhere for calling
modules to put private data.

Andrew Bartlett
2007-10-10 14:16:25 -05:00
Simo Sorce
07d377f3c2 r17614: Our first "client side' ldb module.
This module has been created with the purpose of being used
for searches against ldap servers without the need to handle
the control manually

You can test it by passing -o modules:paged_searches to ldbsearch

The page search size is set to 500 objects.

Simo.
2007-10-10 14:16:17 -05:00