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

793 Commits

Author SHA1 Message Date
Andrew Tridgell
b34a29dcf2 r7665: - added a ildap_*() interface to our internal ldap library. This
interface is very similar to the traditional ldap interface, and will
  be used as part of a ldb backend based on the current ldb_ldap backend

- fixed some allocation issues in ldb_msg.c
2007-10-10 13:18:19 -05:00
Andrew Tridgell
72c6988767 r7654: - add a timeout to all smb requests (default 60 seconds)
- add a request destructor, to make it safe to destroy a pending
   request with talloc_free()
2007-10-10 13:18:17 -05:00
Andrew Tridgell
3a3025485b r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
2007-10-10 13:18:15 -05:00
Andrew Tridgell
2e3c660b2f r7626: a new ldap client library. Main features are:
- hooked into events system, so requests can be truly async and won't
   interfere with other processing happening at the same time

 - uses NTSTATUS codes for errors (previously errors were mostly
   ignored). In a similar fashion to the DOS error handling, I have
   reserved a range of the NTSTATUS code 32 bit space for LDAP error
   codes, so a function can return a LDAP error code in a NTSTATUS

 - much cleaner packet handling
2007-10-10 13:18:14 -05:00
Andrew Tridgell
b316e1c2d3 r7599: it turns out we were not using the ldif code in libcli/ldap/ at all,
so best to just remove it. If we need it again, then it will be easy
to just use a wrapper around the ldb code.
2007-10-10 13:18:13 -05:00
Andrew Tridgell
bcd4671aca r7598: take advantage of struct data_blob and struct ldb_val being the same
structure in a couple of places
2007-10-10 13:18:13 -05:00
Andrew Tridgell
87fc307339 r7596: next step in ldap cleanup. I'm aiming to get rid of the cut&pasted
ldif parsing code in libcli/ldap/ldap_ldif.c, and instead use the ldb
ldif code. To do that I have changed the ldap code to use 'struct
ldb_message_element' instead of 'struct ldap_attribute'. They are
essentially the same structure anyway, so by making them really the
same it will be much easier to use the ldb code in libcli/ldap/

I have also made 'struct ldb_val' the same as a DATA_BLOB, which will
simplify data handling in quite a few places (I haven't yet removed
all the code that maps between these two, that will come later)
2007-10-10 13:18:12 -05:00
Andrew Tridgell
912d0427f5 r7593: simplified the memory management in the ldap code. Having a mem_ctx
element in a structure is not necessary any more.
2007-10-10 13:18:12 -05:00
Tim Potter
64fb327ccf r7569: Fix typo in comments. 2007-10-10 13:18:10 -05:00
Andrew Tridgell
041bce5913 r7567: added wire parsing of NOT and extended ldap search requests. This
allows us to parse and handle the complex queries we are getting from
w2k, such as

(|(|(&(!(groupType:1.2.840.113556.1.4.803=1))(groupType:1.2.840.113556.1.4.803=2147483648)(groupType:1.2.840.113556.1.4.804=6))(samAccountType=805306368))(samAccountType=805306369))
2007-10-10 13:18:10 -05:00
Andrew Tridgell
1a81d28456 r7566: added support for LDAPString types in the asn.1 library 2007-10-10 13:18:10 -05:00
Andrew Tridgell
96620ab2ee r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_tree
instead of a search expression. This allows our ldap server to pass
  its ASN.1 parsed search expressions straight to ldb, instead of going
  via strings.

- updated all the ldb modules code to handle the new interface

- got rid of the separate ldb_parse.h now that the ldb_parse
  structures are exposed externally

- moved to C99 structure initialisation in ldb

- switched ldap server to using ldb_search_bytree()
2007-10-10 13:18:06 -05:00
Andrew Tridgell
235cf625e2 r7524: make the ldap ASN.1 filter parse code go via a struct
ldb_parse_tree. This also fixes the error handling.

next step will be to pass the parse tree straight into ldb, avoiding
the string encoding completely.
2007-10-10 13:18:06 -05:00
Andrew Tridgell
0e9f18c448 r7519: rip the copy of the ldap expression parser out of libcli/ldap/ and use
the original one in lib/ldb/ instead. Having two copies of this code
is silly.
2007-10-10 13:18:04 -05:00
Andrew Tridgell
b7fefe76a2 r7483: ensure we try reading from a socket if epoll says we can, and don't
just do the write. This is needed because the write could return
-1/EAGAIN for dgram sockets, if the socket buffer is nearly full. The
epoll loop then goes on forever.

This was causing some failures in 'make test'
2007-10-10 13:17:58 -05:00
Tim Potter
340ad67cad r7482: Rename smbcli_send_tconX() to smbcli_tconX() so as not to get it
confused with an async function.
2007-10-10 13:17:58 -05:00
Tim Potter
b0ad51f2ce r7455: Remove some talloc contexts that aren't used. 2007-10-10 13:17:54 -05:00
Volker Lendecke
29f7e430ac r7436: As far as I see it, these are the last two "real" ones for Samba4 on AIX to
build. The remaining patch (not now) is to convert the javascript stuff not to
use // style comments.

Volker
2007-10-10 13:17:53 -05:00
Volker Lendecke
96d9b7fc98 r7435: Another little step, sorry for the spam... :-) 2007-10-10 13:17:53 -05:00
Volker Lendecke
c1ccaa0cc9 r7433: Another little AIX one... 2007-10-10 13:17:53 -05:00
Volker Lendecke
43e1bd870d r7430: Next step in AIX build 2007-10-10 13:17:52 -05:00
Jelmer Vernooij
fca195ce07 r7377: Integrate browse service stuff more nicely
Add notes on mailslots
Add TODO list for pidl, including some plans on switching
over to using [string] attributes for pidl.
2007-10-10 13:17:48 -05:00
Andrew Tridgell
9da5379048 r7230: use socket_pending() to get rid of the max packet size limits in the
cldap code
2007-10-10 13:17:29 -05:00
Andrew Tridgell
2a9efbdae6 r7229: use socket_pending() to get rid of the max packet size limits in the
nbt and dgram layers
2007-10-10 13:17:29 -05:00
Tim Potter
d7d48adce9 r7010: Merge libcli/libsmb.mk into libcli/config.mk 2007-10-10 13:17:05 -05:00
Tim Potter
b896daf11c r6933: Add a couple of helper functions for creating nbt names. 2007-10-10 13:16:58 -05:00
Tim Potter
e6b53ce177 r6930: Use NBT_NAME_CLIENT instead of the number 0. 2007-10-10 13:16:57 -05:00
Tim Potter
9b319fc56f r6929: LIBCLI_NBT depends on LIB_SECURITY_NDR for various security descriptor
utilities.
2007-10-10 13:16:57 -05:00
Tim Potter
e1864a7ac9 r6851: Typo in comment. 2007-10-10 13:16:51 -05:00
Jelmer Vernooij
b9d0ae93ba r6839: Add support for building subsystems as shared libraries. This can be
done by setting:
OUTPUT_TYPE = SHARED_LIBRARY
in the [SUBSYSTEM::...] section belonging to a subsystem.

The idea is to allow multiple values to OUTPUT_TYPE simultaneously
(e.g. OUTPUT_TYPE = SHARED_LIBRARY, STATIC_LIBRARY, OBJLIST )
2007-10-10 13:16:50 -05:00
Andrew Tridgell
eb7979d9de r6817: - fixed empty ldap search elements in filters
- added support for guids in cldap netlogon searches.

the cldap server now passes the LDAP-CLDAP torture test
2007-10-10 13:16:47 -05:00
Andrew Tridgell
1d6ab9aaef r6766: some more cldap tests ...
my best guess now is that w2k3 converts the & in the cldap query to an |
for the ldap search. at least it behaves roughly like that.
2007-10-10 13:16:42 -05:00
Andrew Tridgell
7c1d0f449d r6764: added support for DomainGuid, DomainSid, AAC, and User attributes in
cldap netlogon queries
2007-10-10 13:16:42 -05:00
Andrew Tridgell
8890dd3ac3 r6763: added functions in libcli/ldap/ to binary encode some NDR structures into
ldap friendly filter strings
2007-10-10 13:16:42 -05:00
Andrew Tridgell
b644ff6fe1 r6745: - escape spaces in binary ldap blobs
- expose the ldap filter string parsing outside of ldap.c
2007-10-10 13:16:40 -05:00
Andrew Tridgell
992858e1b9 r6744: added support for reply packets in libcli/cldap/ 2007-10-10 13:16:40 -05:00
Stefan Metzmacher
b6a1734699 r6732: - move sasl send recv code to the ldap lib
- support 'modrdn' ldif

metze
2007-10-10 13:16:39 -05:00
Andrew Tridgell
2b36f1dfdd r6726: support binary search elements in ldap_decode() 2007-10-10 13:16:38 -05:00
Andrew Tridgell
04af0e7c5d r6724: added "cldap port" smb.conf parameter 2007-10-10 13:16:37 -05:00
Andrew Tridgell
bd27e626c2 r6720: added support for the remaining 2 types of CLDAP netlogon
response.

To work around the fact that the type of the returned data is not
encoded in the packet, this required adding ndr_pull_union_blob()
which allows us to pull a blob into a union with a specified switch
value, in this case the switch value comes from the calling NtVer field.
2007-10-10 13:16:37 -05:00
Rafal Szczesniak
f7aaa0bfca r6708: Another type of monitor message.
rafal
2007-10-10 13:16:36 -05:00
Andrew Bartlett
77b67da5b8 r6702: Revert -r 6699, as I think this is a win2k v win2k3 issue.
Andrew Bartlett
2007-10-10 13:16:36 -05:00
Andrew Bartlett
6d7f1daaf2 r6699: Windows clients seem to ask for CIFS/, ie in upper case, so match it.
Andrew Bartlett
2007-10-10 13:16:35 -05:00
Andrew Tridgell
cbeffe830b r6693: first version of cldap client library, with async interface 2007-10-10 13:16:35 -05:00
Andrew Tridgell
a3f64357af r6692: used idr_get_new_random() in the nbt client library 2007-10-10 13:16:35 -05:00
Andrew Tridgell
a0fa871c3f r6691: fixed a comment 2007-10-10 13:16:34 -05:00
Andrew Tridgell
d5353b6342 r6689: minor ldap client library work
- added support for binary encoded search filters
 - fixed some const handling
 - changed the message type to an enum, to help debugging
2007-10-10 13:16:34 -05:00
Rafal Szczesniak
47a7a6c3fc r6614: Basic approach to monitoring messages for composite functions.
rafal
2007-10-10 13:16:30 -05:00
Andrew Bartlett
7a93ac49c2 r6462: Move the arcfour sbox state into it's own structure, and allocate it
with talloc() for the NTLMSSP system.

Andrew Bartlett
2007-10-10 13:11:39 -05:00
Andrew Bartlett
5a6a57cd93 r6460: Push the client credentials into NTLMSSP, allowing logins of the form
user@REALM for the first time.

Fix the build for smbencrypt.c

Andrew Bartlett
2007-10-10 13:11:39 -05:00