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

852 Commits

Author SHA1 Message Date
Andrew Bartlett
2a87ed1111 r17301: Add a new function to copy a list of attributes, while adding one to
the end.

Andrew Bartlett
2007-10-10 14:15:08 -05:00
Andrew Bartlett
778debedea r17300: Try to fix some segfaults in ldb_ildap module, when the remote server
drops the connection.  The reconnect code needs to be hooked in here.

Andrew Bartlett
2007-10-10 14:15:08 -05:00
Andrew Bartlett
4827a6b171 r17225: Fix the build by fixing the spelling of START-TLS.
Andrew Bartlett
2007-10-10 14:10:21 -05:00
Simo Sorce
523e8f3ed4 r17195: Start thinking how to implement extended operations.
Ad supports three extended operations:
- start tls
- dynamic objects
- fast binds

none of these are a priority.
2007-10-10 14:10:18 -05:00
Simo Sorce
c6aa60c7e6 r17186: "async" word abuse clean-up part 2 2007-10-10 14:10:17 -05:00
Simo Sorce
25fc735404 r17185: Oh, I wanted to do this for sooo long time.
Finally acknowledge that ldb is inherently async and does not have a dual personality anymore
Rename all ldb_async_XXX functions to ldb_XXX except for ldb_async_result, it is now ldb_reply
to reflect the real function of this structure.

Simo.
2007-10-10 14:10:16 -05:00
Stefan Metzmacher
5c1e6c08c7 r17113: build tdb and ldb standalone with the same sizes of 'off_t' as from samba
metze
2007-10-10 14:10:13 -05:00
Stefan Metzmacher
ac9d69d257 r17112: - fix the build of the ldap ldb backend with newer openldap header files.
- use the correct timeout variable (simo you should do a standalone build before commiting:-)

metze
2007-10-10 14:10:13 -05:00
Andrew Bartlett
87573e2ee4 r17031: When I first revived the objectclass sorting module, simo complained
that it should handle the add without a search.

Now that I'm working on better behaviour with an LDAP backend, I've
fixed the module to do just that.  For an ADD, and a MODIFY with the
REPLACE flag, we do not need the search step.

Andrew Bartlett
2007-10-10 14:10:09 -05:00
Andrew Bartlett
a1161cb30e r16972: Replace the sequence_number function pointer in ldb with the ldb flags.
The function pointer was meant to be unused, this patch fixes
partition.c to use ldb_sequence_number().  (No backend provided the
pointer any more).

Set the flags onto the ldb structure, so that all backends opened by
the partitions module inherit the flags.

Set the read-ony flag when accessed as the global catalog

Modify the LDAP server to track that this query is for the global
catalog (by incoming port), and set a opqaue pointer.

Next step is to read that opaque pointer in the partitions module.

Andrew Bartlett
2007-10-10 14:10:04 -05:00
Andrew Bartlett
e7894b49b3 r16965: Take a better stab at comparison functions between string and binary
forms of the objectGUID and objectSID attributes.

Andrew Bartlett
2007-10-10 14:10:04 -05:00
Andrew Bartlett
f7fb168ab6 r16937: Add const, to make it clear that it is invalid to talloc_free() the DN
at this point.

Andrew Bartlett
2007-10-10 14:10:02 -05:00
Andrew Bartlett
d64987a288 r16936: Correct comment in this comparison function
Andrew Bartlett
2007-10-10 14:10:02 -05:00
Andrew Bartlett
dd6ca33422 r16932: Consistanly use the macro for these DNs and attributes.
Andrew Bartlett
2007-10-10 14:10:01 -05:00
Andrew Bartlett
5d5503e8d8 r16916: Implement metze's proposed changes to the tdb logging API.
This clearly links the log function with its private pointer, and
makes the argument list for tdb_open_ex a bit shorter.

Andrew Bartlett
2007-10-10 14:09:59 -05:00
Andrew Bartlett
6a8c9af9ba r16908: Set an error string if we can't find a backend for an operation.
Andrew Bartlett
2007-10-10 14:09:58 -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
Andrew Bartlett
0828739951 r16825: Make ldb_sainity_check() set an error string. This makes it much
easier to chase down what modules or application code gets wrong.

Ensure not to leave memory allocated on failure in ldb_search()

Andrew Bartlett
2007-10-10 14:09:47 -05:00
Simo Sorce
b9b6bb3e89 r16784: - make some function in ldb static, they not need to be exported anywhere
- fix a bad segfault
  Andrew please make test before committing.

Simo.
2007-10-10 14:09:45 -05:00
Andrew Bartlett
58898092c1 r16774: This patch modifies the tdb API to allow the logging function to be used
as part of ldb.

This allows tdb failures to be passed all the way up to Samba's DEBUG
system, which allowed easier debugging.

Unfortunately I had to extend the tdb API, as the logging function
didn't have a context pointer.

I've worked over the 'debug levels' in TDB.  Most of them were 0,
which didn't seem right, as some were trace-like messages.  We didn't
see any of these previously, except when accessing TDB directly.

Andrew Bartlett
2007-10-10 14:09:45 -05:00
Andrew Bartlett
b49a4fbb57 r16264: Add, but do not yet enable, the partitions module.
This required changes to the rootDSE module, to allow registration of
partitions.  In doing so I renamed the 'register' operation to
'register_control' and 'register_partition', which changed a few more
modules.

Due to the behaviour of certain LDAP servers, we create the baseDN
entry in two parts: Firstly, we allow the admin to export a simple
LDIF file to add to their server.  Then we perform a modify to add the
remaining attributes.

To delete all users in partitions, we must now search and delete all
objects in the partition, rather than a simple search from the root.
Against LDAP, this might not delete all objects, so we allow this to
fail.

In testing, we found that the 'Domain Controllers' container was
misnamed, and should be 'CN=', rather than 'OU='.

To avoid the Templates being found in default searches, they have been
moved to CN=Templates from CN=Templates,${BASEDN}.

Andrew Bartlett
2007-10-10 14:09:09 -05:00
Andrew Bartlett
28883f7193 r16172: Translate the ldb error codes into appropriate messages for the
transaction cases.

Andrew Bartlett
2007-10-10 14:09:04 -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
Tim Potter
d44ee8c43b r16090: Fix standalone build after the rename of enum ldb_request_type in
r15944.

Hey idra I think a better rename would be to keep the LDB_REQ suffix
here to remain consistent with the other enums (e.g ldb_reply_type,
ldb_async_wait_type and ldb_async_state).
2007-10-10 14:08:58 -05:00
Tim Potter
8f44d0a2d6 r16089: Make doxygen target work if $DOXYGEN variable is empty. 2007-10-10 14:08:58 -05:00
Andrew Bartlett
8912c4e057 r16087: Fix silly cut-and-paste typo that cost me much of my afternoon...
This only affects my new partitions module, which I will post soon,
but should be fixed anyway.

Andrew Bartlett
2007-10-10 14:08:58 -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
Andrew Bartlett
9ede8edbaf r16085: Set the error string if we fail to find a valid op to execute. Helps
in chasing down bugs :-)

Andrew Bartlett
2007-10-10 14:08:58 -05:00
Andrew Bartlett
6841262230 r16084: Add private prototype for new ldb_connect_backend() function.
Andrew Bartlett
2007-10-10 14:08:57 -05:00
Andrew Bartlett
fbe7d0ca90 r16083: Make it possible to initialise a backend module, without it setting up
the whole ldb structure.

Because the sequence number was a fn pointer on the main ldb context,
turn it into a full request (currently sync).

Andrew Bartlett
2007-10-10 14:08:57 -05:00
Simo Sorce
3511120602 r16071: tdb has nested transactions
change the code to exploit that in ldb

I still have to reintroduce transactions when you call ldb_request directly,
I have some plans I hop to be able to develop in the next weekend
2007-10-10 14:08:56 -05:00
Andrew Bartlett
272a095728 r16067: Remove const, it isn't required and just causes a warning.
Andrew Bartlett
2007-10-10 14:08:56 -05:00
Andrew Bartlett
9ddcfacbce r16066: The OSX AD plugin uses objectCategory searches a lot, and uses them
both fully qualified and in the 'short' form.  Now we test and support
this query format.

Andrew Bartlett
2007-10-10 14:08:55 -05:00
Andrew Bartlett
1a868b451a r16062: objectCategory is a DN, and needs to be matched as such.
Andrew Bartlett
2007-10-10 14:08:55 -05:00
Andrew Bartlett
8455aafb15 r16053: Allow entries without an objectClass. We need this to permit the
cn=rootDSE entry.

(it was also crashing, as 'ac' wasn't initialised at this point)

Andrew Bartlett
2007-10-10 14:08:53 -05:00
Simo Sorce
b52e5d6a0c r16036: Add a couple of new functions to corretly deal with timeouts.
Check timeouts are correctly verified.
Some minor fixed and removal of unused code.
2007-10-10 14:08:52 -05:00
Andrew Bartlett
f72079029a r16028: Re-add the objectclass module, in the new async scheme.
Add a test to show that we need this, and to prove it works (for add
at least).

Andrew Bartlett
2007-10-10 14:08:51 -05:00
Andrew Bartlett
b607acf6f0 r16007: If no error string was setup by the backend, ensure that we always get
at least a generic error, even when inside a transaction.

This helps debugging ldb/js interactions a lot...

Andrew Bartlett
2007-10-10 14:08:49 -05:00
Stefan Metzmacher
941f93f93f r15981: we need to initialize 'ret' before 'goto failed'
metze
2007-10-10 14:08:46 -05:00
Stefan Metzmacher
53ec76d8d2 r15979: some farmating...
metze
2007-10-10 14:08:46 -05:00
Stefan Metzmacher
7b9d711920 r15978: - pass the error code back to the caller...
- we were giving OPERATIONS_ERROR in all cases:-(
- we now pass ALREADY_EXIST fine to the caller,
  and the code in libnet_site.c is happy again.
- this bug wasn't noticed for a long time because
  the ldb_ildap code always passed SUCCESS to it's caller

metze
2007-10-10 14:08:45 -05:00
Stefan Metzmacher
54e5aeff87 r15964: fix error handling in ldb_ildap backend
metze
2007-10-10 14:08:45 -05:00
Stefan Metzmacher
11b49a4405 r15963: fix warnings
metze
2007-10-10 14:08:45 -05:00
Stefan Metzmacher
a3d1ce6d3b r15955: fix whitespaces
metze
2007-10-10 14:08:44 -05:00
Simo Sorce
bbda863f07 r15945: Check ltdb_modified results 2007-10-10 14:08:43 -05:00
Simo Sorce
55d97ef88f r15944: rename LDB_ASYNC_ADD -> LDB_ADD, LDB_ASYNC_MODIFY -> LDB_MODIFY, etc... 2007-10-10 14:08:43 -05:00
Simo Sorce
51083de795 r15942: Remove the sync internal ldb calls altogether.
This means that some modules have been disabled as well as they
have not been ported to the async interface

One of them is the ugly objectclass module.
I hope that the change in samldb module will make the MMC happy
without the need of this crappy module, we need proper handling
in a decent schema module.

proxy and ldb_map have also been disabled
ldb_sqlite3 need to be ported as well (currenlty just broken).
2007-10-10 14:08:43 -05:00
Simo Sorce
f0c1d08d50 r15932: Remove per request creds
They have never benn used and make little sense too imo
2007-10-10 14:08:41 -05:00
Simo Sorce
7d65105e88 r15927: Optimize ldb module traverse while keeping the API intact.
I was sick of jumping inot each module for each request,
even the ones not handle by that module.
2007-10-10 14:08:41 -05:00