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

271 Commits

Author SHA1 Message Date
Andrew Bartlett
50b472a772 s4:libcli/ldap Update headermap.txt (autotools build) and wscript_build for libcli_ldap.h
It took a little while to find where to update this...

Andrew Bartlett
2010-05-21 20:09:07 +10:00
Andrew Bartlett
c8a23147fe s4:libcli/ldap Rename ldap.h to libcli_ldap.h
It is a problem if a samba header is called ldap.h if we also want
to use OpenLDAP's ldap.h

Andrew Bartlett
2010-05-21 17:39:15 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
aa5e08eb83 s4-waf: install the rest of the headers 2010-04-06 20:27:09 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Endi S. Dewata
07669b0704 s4-libcli: Added NULL handlers for DSDB_CONTROL_DN_STORAGE_FORMAT_OID and LDB_CONTROL_AS_SYSTEM_OID
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-03-02 14:06:52 +11:00
Kamen Mazdrashki
8078614814 s4/ldap: Refactor the fix for ldap nested searches
Current implementation synchronizes processing for
all types of LDAP request, not only LDAP_Search ones.

Synchronization for ldap replies processing is done
locally in ldb_ildap module as this concerns only
ildb_callback() function.

Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-02-17 18:03:31 +02:00
Kamen Mazdrashki
a4d0ed5a10 s4/ldap: Fix nested searches SEGFAULT bug
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-29 14:09:53 +01:00
Matthieu Patou
db41a0afc6 s4: fix SD update and password change in upgrade script
- reserve a new Samba OID for recalculate SD control
- fix the update SD function
- fix handling of kvno in the update_machine_account_password function
- fix handling of handles in RPC winreg server

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-28 09:56:06 +11:00
Endi S. Dewata
3a8393c8aa s4:ldbcli - Added encoder/decoder for relax control. 2009-11-19 13:04:47 +11:00
Andrew Bartlett
68639bfd64 s4:libcli/ldap Add 'relax' OID to known network representations
This patch, inspired by a patche by Endi S. Dewata
<edewata@redhat.com>, allows this control to be passed to the LDAP
backend.

Andrew Bartlett
2009-11-12 22:23:22 +11:00
Matthias Dieter Wallnöfer
e9686985cb s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
For KERBEROS applications the realm should be upcase (function "lp_realm") but
for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch
implements the use of both in the right way.
2009-10-14 10:50:43 +02:00
Matthias Dieter Wallnöfer
44df2488e3 s4: fix various warnings (not "const" related ones) 2009-10-02 15:33:48 +02:00
Andrew Bartlett
7496095c1b s4:libcli/ldap Explain why we set a hostname for ldapi:// connections
It is a pretty odd thing to do, and it's only because of the
restrictions of DIGEST-MD5 in Cyrus SASL that we do it.

Andrew Bartlett
2009-08-17 11:08:42 +10:00
Stefan Metzmacher
a3bcbd1775 s4:libcli/ldap: the tls code steals the original socket on its own now
metze
2009-07-31 14:42:05 +02:00
Stefan Metzmacher
c4274e3480 s4:libcli/ldap: add support for new Recycle Bin Feature LDAP Controls
LDAP_SERVER_SHOW_RECYCLED_OID         1.2.840.113556.1.4.2064
LDAP_SERVER_SHOW_DEACTIVATED_LINK_OID 1.2.840.113556.1.4.2065

metze
2009-07-23 18:04:31 +02:00
Andrew Tridgell
a5003de56b fixed the encoding/decoding of the reverse attribute for server side sort 2009-06-10 11:45:53 +10:00
Stefan Metzmacher
f6b0a99cef libcli/ldap: move generic ldap control encoding code to ldap_message.c
As they can we static there, we pass the specific handlers as parameter
where we need to support controls.

metze
2009-02-24 17:55:41 +01:00
Stefan Metzmacher
7b1c5c94f6 s4:libcli/ldap: don't use 'void **out' as arguments as the behavior is not defined in C.
metze
2009-02-24 17:55:41 +01:00
Stefan Metzmacher
18b30e5646 libcli/ldap: move ldap_ndr from source4/ to toplevel
metze
2009-02-24 17:55:40 +01:00
Stefan Metzmacher
ef0fa403f1 libcli/ldap: move ldap_errors.h to the toplevel and install it
metze
2009-02-24 17:55:39 +01:00
Stefan Metzmacher
536318549f libcli/ldap: move ldap_message.[ch] from source4/ to the toplevel
metze
2009-02-24 17:55:39 +01:00
Stefan Metzmacher
1ab9c1a402 s4:libcli/ldap: remove reference to DEBUG()
This prepares using ldap_message.c in source3/ later

metze
2009-02-24 17:55:38 +01:00
Stefan Metzmacher
12184d4132 s4:libcli: split out LIBCLI_LDAP_MESSAGE subsystem
metze
2009-02-24 17:55:37 +01:00
Andrew Tridgell
bb7e6f0f51 Worked around a problem with select/poll/epoll and gnutls
Our packet layer relies on the event system reliably telling us when a
packet is available. When we are using a socket layer like TLS then
things get a bit trickier, as there may be bytes in the encryption
buffer which could be read even if there are no bytes at the socket
level. The GNUTLS library is supposed to prevent this happening by
always leaving some data at the socket level when there is data to be
processed in its buffers, but it seems that this is not always
reliable.

To work around this I have added a new packet option
packet_set_unreliable_select() which tells the packet layer to not
assume that the socket layer has a reliable select, and to instead
keep trying to read from the socket until it gets back no data. This
option is set for the ldap client and server when TLS is negotiated.

This seems to fix the problems with the ldaps tests.
2009-02-18 17:37:45 +11:00
Stefan Metzmacher
3c9ad421fb s4:libcli/ldap: use const char * const *attributes as in all other places
metze
2009-02-13 13:44:36 +01:00
Simo Sorce
380874ef86 Fix the mess with ldb includes.
Separate again the public from the private headers.

Add a new header specific for modules.
Also add service function for modules as now ldb_context and ldb_module are
opaque structures for them.
2009-01-30 01:02:03 -05:00
Stefan Metzmacher
1c8580cfa9 s4:libcli/ldap: convert to tevent_* api
metze
2009-01-03 19:58:56 +01:00
Stefan Metzmacher
5fa0d3d568 s4:socket: use a socket_wrapper aware function to auto close the fd event for sockets
metze
2009-01-03 19:58:53 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
1feab85be6 Rename samba-socket -> samba_socket to fix a couple more compiler
warnings.
2008-12-24 00:15:43 +01:00
Stefan Metzmacher
fc31f2c526 s4:lib/socket: socket_connect_send() and socket_connect_ev() should only wrok with addresses
metze
2008-12-18 13:32:51 +01:00
Stefan Metzmacher
081f8883ba s4: fix LIBEVENTS dependencies and use more forward declarations
We should only include events.h where we really need it
and prefer forward declarations of 'struct event_context'

metze
2008-12-17 11:04:45 +01:00
Andrew Bartlett
30ae74d399 s4:dsdb: add support for DSDB_OPENLDAP_DEREFERENCE_CONTROL
Encode and decode the OpenLDAP dereference control (draft-masarati-ldap-deref-00)

At this time, the ldb_controls infrustructure does not handle request
and reply controls having different formats, so this is purely the
client implementation (ie, there is no decode of the client->server
packet, and no encode of the server->client packet).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:24 +11:00
Andrew Bartlett
fc61ef2afc s4:libcli/ldap: split out a ldap_decode_attribs_bare() function
The OpenLDAP dereference control (draft-masarati-ldap-deref-00) uses
an attribute list, as found in the search reply, but without one
enclosing ASN1_SEQUENCE(0)

This allows the dereference control parsing code to use this as a
helper function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:24 +11:00
Andrew Bartlett
cf5c919c74 Improve debug when SASL search fails 2008-11-17 10:07:09 +11:00
Jelmer Vernooij
b034c519f5 Add gensec_settings structure. This wraps loadparm_context for now, but
should in the future only contain some settings required for gensec.
2008-11-02 02:05:48 +01:00
Jelmer Vernooij
8baf169549 Fix function parameters. 2008-10-23 22:10:08 +02:00
Jelmer Vernooij
44b728958a Use common error definitions. 2008-10-23 15:35:21 +02:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Simo Sorce
b2901da479 LDB ASYNC: misc changes 2008-09-29 04:22:20 +02:00
Simo Sorce
83b0c5d43f Fix nasty bug that would come up only if a client connection to a remote
ldap server suddenly dies.
We were creating a wrong talloc hierarchy, so the event.fde was not
freed automatically as expected. This in turn made the event system call
the ldap io handlers with a null packet structure, causing a segfault.
Fix also the ordering in ldap_connection_dead()
Thanks to Metze for the huge help in tracking down this one.
2008-09-24 01:43:57 -04:00
Andrew Bartlett
403f4f94ff Make up a full hostname for ldapi connections.
The DIGEST-MD5 SASL method requires a hostname, so provide one.

Andrew Bartlett
(This used to be commit edfb2ed1f2)
2008-07-15 15:10:29 +10:00
Andrew Bartlett
ab00b65dde Cleanup ldap_bind_sasl.
With these changes, we don't leak the LDAP socket, and don't reset all
credentials feature flags, just the ones we are actually incompatible
with.

Andrew Bartlett
(This used to be commit 72e52a3011)
2008-07-15 15:08:57 +10:00
Simo Sorce
929adc9efa Make up the right dependencies now that ldb depends on libevents
(This used to be commit 3b8eec7ca3)
2008-06-14 11:59:19 -04:00
Jelmer Vernooij
4c70cda986 Fix a couple (well, little more than that..) of typos.
(This used to be commit a6b5211994)
2008-05-18 23:02:47 +02:00
Jelmer Vernooij
4c8756f147 Create prototype headers from Makefile directory, without smb_build in the middle.
(This used to be commit f4a77b96f9)
2008-05-18 22:30:08 +02:00
Jelmer Vernooij
03643aec88 Use variables for source directory in a couple more places.
(This used to be commit c41bd3005f)
2008-05-18 19:54:27 +02:00
Simo Sorce
4e83011f72 Remove more event_context_init() uses from function calls within deep down the code.
Make sure we pass around the event_context where we need it instead.
All test but a few python ones fail. Jelmer promised to fix them.
(This used to be commit 3045d39162)
2008-04-21 18:12:33 -04:00