Andreas Schneider
b70bb81a19
s3:lib: Fix size types in tldap_find_first_star()
...
This fixes compilation with -Wstrict-overflow=2
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-03-21 20:43:19 +01:00
Andreas Schneider
654b76739a
s3:tldap: Comment code for to LDAP escaping version
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-02-19 19:17:12 +01:00
Andreas Schneider
c96dc78aa6
s3:tldap: Fix parsing LDAPv2 escaped strings
...
Yes, this is outdated, but the missing 'break' produces a compiler
warning.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-02-19 19:17:12 +01:00
Volker Lendecke
649deb63c5
tldap: Allow dropping messages in tldap_search()
...
For probing whether a connection is a live a rootdse search might be
interesting where we don't really care for the result, only success or
failure of the operation.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-03-18 05:05:24 +01:00
Volker Lendecke
830fd785a2
tldap: Add tldap_get/set_stream
...
This will be used to replace a nonencrypted socket with a sasl sealed one.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-04-15 15:32:11 +02:00
Volker Lendecke
9219756a36
tldap: Add a missing TALLOC_FREE(frame)
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-02-08 22:32:23 +01:00
Volker Lendecke
7434723ecd
tldap: Parse a search entry only if it is one
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Feb 3 18:12:44 CET 2016 on sn-devel-144
2016-02-03 18:12:43 +01:00
Volker Lendecke
f09cebd4fc
tldap: Make tldap_search use tldap_search_all
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03 15:04:11 +01:00
Volker Lendecke
0d1165a424
tldap: Add tldap_pending_reqs()
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03 15:04:11 +01:00
Volker Lendecke
d29c45ce41
tldap: Add tldap_search_all
...
Signed-off-by: Volker Lendecke <vl@samba.org>
TLDAPRC
Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03 15:04:11 +01:00
Volker Lendecke
b6244ae257
tldap: Avoid a "ret == false"
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03 15:04:11 +01:00
Volker Lendecke
2c3cf3ce60
lib: Introduce TLDAPRC
...
Make ldap return codes type safe
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03 15:04:11 +01:00
Volker Lendecke
2bd88bff04
tldap: Parse the sasl output blob
...
Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03 15:04:11 +01:00
Volker Lendecke
3673752f68
tldap: Slightly simplify tldap_search_cb
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03 15:04:11 +01:00
Volker Lendecke
22f06c2e6f
tldap: Mark server down if read failed
...
This matches tldap_msg_sent
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2016-02-03 15:04:11 +01:00
Volker Lendecke
551e268ac3
tldap: Use struct initializer in tldap_search
...
Avoids a call to ZERO_STRUCT
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Jan 11 01:31:59 CET 2016 on sn-devel-144
2016-01-11 01:31:59 +01:00
Volker Lendecke
8842235a82
tldap: Avoid includes.h
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-01-10 22:24:17 +01:00
Volker Lendecke
5021974f2a
lib: Introduce util_tsock.h
...
This avoids includes.h in source3/lib/util_tsock.c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-01-10 22:24:17 +01:00
Volker Lendecke
3df9e9c7ae
tldap: tevent_req_create NULLs out "state"
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-01-10 22:24:17 +01:00
Volker Lendecke
e48184935e
tldap: Use "size_t" for talloc_array_length result
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-01-10 22:24:17 +01:00
Volker Lendecke
8215409153
tldap: Remove an unneeded "return;"
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-01-10 22:24:17 +01:00
Volker Lendecke
245064d5a3
tldap: Remove unneeded vars
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-01-10 22:24:17 +01:00
Volker Lendecke
57a0bc9a9f
lib: Use asn1_has_error()
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-06 00:54:18 +01:00
Jeremy Allison
a2f779fd5f
s3: tldap: Ensure all asn1_XX returns are checked.
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2014-09-26 00:51:16 +02:00
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