1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

45 Commits

Author SHA1 Message Date
Stefan Metzmacher
741cb24f7a s3:lib/tldap: make use of tevent_req_set_cleanup_fn()
This is more better than a custom tevent_req destructor.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jan 17 14:34:06 CET 2014 on sn-devel-104
2014-01-17 14:34:06 +01:00
Stefan Metzmacher
5fd9eab20f s3:lib/tldap: make use of tevent_req_defer_callback()
In tldap_msg_received() we call tevent_req_error() for more than
one request, if we do that we need to use tevent_req_defer_callback()
otherwise we're likely to crash, as a triggered callback may
invalidate our state.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-01-17 12:38:09 +01:00
Andreas Schneider
f4761c90fa s3-tldap: Make sure we don't deref a null pointer.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:12 +01:00
Stefan Metzmacher
f3915cf0ec s3:lib: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:47 +01:00
Andreas Schneider
7f8c8d80ef s3-tldap: Fix dead code in tldap_sasl_bind_send().
dn can't be NULL cause it is set to "" in that case.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-21 13:56:00 +01:00
Volker Lendecke
f0ff6f390a Use tevent_req_oom
This fixes a few Coverity errors
2011-06-20 12:33:24 +02:00
Andrew Bartlett
da662b82b8 s3-lib Replace StrnCaseCmp() with strncasecmp_m()
strncasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Jeremy Allison
4f41be356a Fix many const compiler warnings. 2011-05-05 10:41:59 -07:00
Günther Deschner
50883cfeb4 s3-tevent: only include ../lib/util/tevent wrappers where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29 14:00:30 +02:00
Günther Deschner
12476223c6 s3-tsocket: only include ../lib/tsocket/tsocket.h where needed.
Guenther
2011-04-29 12:19:04 +02:00
Volker Lendecke
35c71231ac s3: Remove an unused variable 2011-04-16 15:35:05 +02:00
Volker Lendecke
4828feddb7 s3: Fix early tldap_search cancels
A callback of tldap_search_send might not interested in the rest of the results
and could do a TALLOC_FREE of the search request. In this case, "subreq" is
already free'ed. So we have to set it to pending before the callback is called.
The TALLOC_FREE of the search request will set it to non-pending again via
tldap_msg_destructor.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 20 11:26:57 CET 2011 on sn-devel-104
2011-03-20 11:26:57 +01:00
Günther Deschner
3aa9d3005a s3-build: only include asn1 headers where actually needed.
Guenther
2011-03-16 23:46:18 +01:00
Volker Lendecke
8dfa224c13 s3: Change tldap_entry_attributes to the "array,count" convention
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Mar 14 22:02:35 CET 2011 on sn-devel-104
2011-03-14 22:02:35 +01:00
Volker Lendecke
26051b8aaa s3: Use tlap_simple_recv in tldap_sasl_bind_recv 2011-02-13 12:11:53 +01:00
Volker Lendecke
f6df16d9d2 s3: Add error checking to asn1_read_OctetString_talloc 2011-02-13 12:11:53 +01:00
Volker Lendecke
80accd3946 Fix typos 2011-02-13 12:11:53 +01:00
Volker Lendecke
efa460e291 s3: Align the args in tldap_modify
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Feb 10 23:20:05 CET 2011 on sn-devel-104
2011-02-10 23:20:05 +01:00
Volker Lendecke
b524e58f9a s3: Align tldap_add and tldap_add_send 2011-02-10 22:34:01 +01:00
Andreas Schneider
2c47368d68 s3-lib: Fixed a missing return value in tldap.
s3-lib: Fixed a missing return value in tldap.
2011-01-26 14:20:37 -08:00
Volker Lendecke
dc443ee6e9 s3: Fix two uninitialized variables 2010-07-20 20:35:39 +02:00
Volker Lendecke
e9e80a36e4 tldap: Fix a type-punned warning 2010-06-21 15:03:59 +02:00
Günther Deschner
d7d313851a s3-tldap: only include tldap when actually needed.
Guenther
2010-05-18 00:44:27 +02:00
Volker Lendecke
184afeb57d s3: Make TLDAP_IS_ALPHA and TLDAP_IS_ADH static functions 2010-03-10 14:37:35 +01:00
Simo Sorce
8fa81e9909 Fix typo 2010-03-09 16:42:05 -05:00
Simo Sorce
9f53820de7 s3:tldap add own filter parsing
Also add torture test to check filter parsing.
2010-03-09 15:23:48 -05:00
Stefan Metzmacher
8447600d98 s3:tldap: fix the build - a void function should not return a value
metze
2009-07-15 20:59:34 +02:00
Volker Lendecke
344dbced50 If the connection is down, don't try another write. 2009-06-28 15:51:02 +02:00
Volker Lendecke
ae5e1d9841 tldap_msg_received: Properly free the asn1_struct in case of an error 2009-06-28 15:51:02 +02:00
Volker Lendecke
8e22e38c9c Move read_ldap_done after read_ldap_send 2009-06-27 23:17:49 +02:00
Volker Lendecke
f5321ffea8 Convert tldap to tstream 2009-06-27 23:17:49 +02:00
Volker Lendecke
53b9a24ce3 tldap: Don't fire off more than one read_ldap request during searches 2009-06-27 22:30:14 +02:00
Volker Lendecke
a3eb0a32a9 Reorganize retrieving errors and server-sent controls
This attaches the data to the tldap_message instead of the tevent_req.

It adds tldap_ctx_lastmsg() to retrieve the last message for the users of
the sync wrappers.
2009-06-20 18:54:07 +02:00
Volker Lendecke
22cb9bdfd3 Move asn1_load_nocopy() to lib/util/asn1.c 2009-06-20 18:54:07 +02:00
Volker Lendecke
ecf8cebf32 Move asn1_blob() to lib/util/asn1.c 2009-06-20 18:54:07 +02:00
Volker Lendecke
d45cf0146b tldap control support 2009-06-20 18:54:06 +02:00
Volker Lendecke
63a70ba0ad Prepare control support
We will have arrays of controls passed to tldap.c. Follow a mantra from the
classic book "Thinking Forth" by Leo Brodie: Favor counts over terminators :-)

This makes the parameter lists to tldap pretty long, but everyone will have
wrapper routines anyway, see for example tldap_search_fmt. And the OpenLDAP
manpages call the non-_ext routines deprecated, probably for a reason.
2009-06-20 18:54:06 +02:00
Volker Lendecke
f24e63af2c Fix empty lines 2009-06-20 12:15:21 +02:00
Volker Lendecke
0524d24fb2 Add a missing talloc_move() in tldap_search_recv 2009-06-19 17:37:30 +02:00
Volker Lendecke
663e841ecd Make tevent_req_is_ldap_error public 2009-06-19 14:28:22 +02:00
Volker Lendecke
5cb6bf6f9d Add tldap_context_[gs]etattr
This adds the ability to attach extended information to a tldap_context. This
will become useful once we start to do automatic reconnects for example, a
callback function might want attach a pointer to credentials so that it can
rebind.

The initial user of this will be a cached rootdse, so that things like the
ability to do paged searches can be cached.
2009-06-19 14:28:22 +02:00
Volker Lendecke
baa6ebddcb Add basic tracing of tldap messages 2009-06-12 15:04:21 +02:00
Volker Lendecke
a36a3e4c83 Add debugging facility to tldap, analogous to tevent 2009-06-12 15:04:21 +02:00
Volker Lendecke
83dee900bc Fix syntax of sending a delete request 2009-06-07 11:50:50 +02:00
Volker Lendecke
7194937eea Add the early start of an async ldap library
There's a lot of things this does not do yet: For example it does not parse the
reply blob in the sasl bind, it does not do anything with controls yet, a lot
of the ldap requests are not covered yet. But it provides a basis for me to
play with a pdb_ads passdb module.
2009-06-06 13:10:30 +02:00