1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

791 Commits

Author SHA1 Message Date
Simo Sorce
a9e8cd0bad r8585: add to ldb and ldap comparison functionality
better pares filters
Approx is currently only a stub need to dig more info to
understand what it really means and how it works exactly
2007-10-10 13:29:41 -05:00
Simo Sorce
a910671bd8 r8530: Now our ldap server is able to fullfill present and substring searches 2007-10-10 13:29:35 -05:00
Andrew Tridgell
6e81e866dc r8523: match a zero message id in ldap replies to the last request sent. Thanks to simo
for noticing that this is needed to catch the server sending a "can't decode request"
error reply
2007-10-10 13:29:35 -05:00
Andrew Tridgell
a58ea6b385 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
2007-10-10 13:29:34 -05:00
Tim Potter
bcfb3a45e4 r8414: Some C++ friendlyness fixes - 'not' is apparently a keyword in C++. 2007-10-10 13:23:00 -05:00
Andrew Tridgell
4e66f682e4 r8407: fixed a bug left over from our old socket code.
Thanks to lha for giving me a login on a netbsd machine to see this
2007-10-10 13:22:58 -05:00
Love Hörnquist Åstrand
56fd21c806 r8394: Make sure the argument to ctype is*(3) macros are unsigned char as
required by ISO C99.
2007-10-10 13:20:14 -05:00
Andrew Tridgell
6a4e8cc991 r8247: remove the free of fullname in nbtname.c for now.
Metze, the ndr_token_store() code is storing temporary pointers into
this string in the token list, which means we are referring to freed
memory when we scan the token list. A better key might be a pointer
into the ndr buffer?
2007-10-10 13:19:25 -05:00
Stefan Metzmacher
d18303a0e2 r8212: fix pushing of nbt_string's:
- we now use an ndr_token_list, for the nbt string label pointer offsets
  this avoids to scan the whole buffer

- we need to check for already send string on a per component basis
  not only for the fullname

e.g.
w2k3 response this in the CLDAP netlogon replies

forest: w2k3.vmnet1.vm.base
dns_name: sub1.
pdc_dns_name: w2k3-104.

and this will be interpreted like

forest: w2k3.vmnet1.vm.base
dns_name: sub1.w2k3.vmnet1.vm.base
pdc_dns_name: w2k3-104.w2k3.vmnet1.vm.base

metze
2007-10-10 13:19:20 -05:00
Jeremy Allison
ff58ecad04 r8174: Check DOS error codes in torture chkpath test.
Jeremy.
2007-10-10 13:19:17 -05:00
Stefan Metzmacher
f308b72b19 r8134: remove unused var
metze
2007-10-10 13:19:12 -05:00
Andrew Tridgell
a3b8a00d7f r8125: fixed an error code mapping based on the updated torture tests 2007-10-10 13:19:11 -05:00
Andrew Tridgell
97cb705713 r8115: added support for 2 more dos error codes found during testing 2007-10-10 13:19:10 -05:00
Andrew Tridgell
f21274e07b r8111: fixed the client library to work against w2k3 with nt status codes
disabled. The main change is to turn off spnego, which cannot work at
all without nt status codes (w2k3 gives a ERRHRD:ERRgeneral error when
you try)

I also modified NT_STATUS_EQUAL() to allow for nt->dos code equality,
but only when nt status codes are disabled in smb.conf. That keeps all
the existing torture code working, while still allowing us to
correctly catch the cases where forced dos error codes are needed

The dos->ntstatus mapping table has been removed completely, as it
doesn't really make sense, is impossible to get right, and with the
new dos status handling isn't needed. When matching a nt status code
to a dos status code it makes far more sense to map from the nt code
to the dos code and compare, rather than the reverse, as the nt->dos
mapping is what windows has to do internally, so there really is a
valid mapping table.
2007-10-10 13:19:09 -05:00
Andrew Tridgell
3136ad9634 r8106: the use of a static string for dos error codes was causing problems in
the torture code. To fix this, get rid of dos_errstr() and instead
move the strings into the nt_errstr() table, using cpp to generate the
strings
2007-10-10 13:19:08 -05:00
Andrew Tridgell
ff5549e87f r8104: - added support for our client library to not negotiate nt status codes, controlled
with 'nt status support' option.

- make nt_errstr() display nice strings for dos status codes encoded
  using NT_STATUS_DOS()

- no longer map between dos and nt status codes in the client library,
  instead return using NT_STATUS_DOS()

- fixed the RAW-CONTEXT test to look for
  NT_STATUS_DOS(ERRSRV, ERRbaduid) instead of NT_STATUS_INVALID_HANDLE
2007-10-10 13:19:08 -05:00
Andrew Tridgell
b4f2d17ace r8003: ensure that we don't try to send a trans request with more than 64k data or params 2007-10-10 13:18:57 -05:00
Andrew Tridgell
2fafc23052 r8002: favor addresses on our local interfaces in NBT name resolution if
possible. This is needed because w2k3 will return bogus IPs in its
name resolution replies when it has an unplugged network interface.
2007-10-10 13:18:57 -05:00
Andrew Bartlett
817160ec1a r7970: This SMB signing code (merged from 3.0) turned out to be bogus.
Andrew Bartlett
2007-10-10 13:18:55 -05:00
Andrew Tridgell
f88a601882 r7941: fixed handling of ASN.1 objects bigger than 64k 2007-10-10 13:18:53 -05:00
Andrew Tridgell
eee528be97 r7865: changed pidl to take a "const void *" instead of a "void *" for the
structure in ndr_push_*() and ndr_print_*(). The push and print
functions really should not modify the structure.

metze, to make this work I had to change your spoolss hand
marshaller. Can you please check it is OK? I think that the IN and OUT
sides of that function are not ever called on the same structure, so I
think that attempt at remembering the value by assigning to
r->in._offered was not doing anything anyway, but please correct me if
I have misunderstood it.

If you really do need to remember something on those structures I'd
suggest the ndr_token_store() and ndr_token_retrieve() functions,
which are used by pidl for just this sort of thing.
2007-10-10 13:18:44 -05:00
Andrew Tridgell
d40bc2fa8d r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
2007-10-10 13:18:44 -05:00
Andrew Tridgell
c435843c66 r7856: fixed warning of 'methods' shadowed variable 2007-10-10 13:18:43 -05:00
Andrew Tridgell
a1155651e7 r7855: fixed a typo 2007-10-10 13:18:43 -05:00
Rafal Szczesniak
7abd634701 r7814: Propagate the change in resolve_name_send function. 2007-10-10 13:18:40 -05:00
Rafal Szczesniak
84315cdf0d r7813: Make async request independent from config file routines.
rafal
2007-10-10 13:18:38 -05:00
Andrew Tridgell
f2b2d2626f r7810: don't give errors when the ldap server sends us reference replies 2007-10-10 13:18:38 -05:00
Andrew Tridgell
8f5c2e8682 r7770: added ldaps support to our ldap client library 2007-10-10 13:18:34 -05:00
Andrew Tridgell
3bdf89b0f7 r7763: fixed some circular dependencies 2007-10-10 13:18:32 -05:00
Andrew Bartlett
3f35cdb218 r7757: Add NTLMv2 support to the NT1 Session setup (ie, not SPNEGO/NTLMSSP)
Session Setup code.

Add a mem_ctx argument to a few of the NTLMv2 support functions, and
add smb.conf options to control client NTLMv2 behaviour.

Andrew Bartlett
2007-10-10 13:18:32 -05:00
Andrew Tridgell
f22c3b84c8 r7749: some bug fixes from testing with socket:testnonblock
- fixed some infinite loops in asn1.c

- ensure asn1 callers know if an error is end of buffer or bad data

- handle npending 0 in ldap server
2007-10-10 13:18:30 -05:00
Andrew Tridgell
73cb4aad22 r7747: - simplified the ldap server buffer handling
- got rid of the special cases for sasl buffers

- added a tls_socket_pending() call to determine how much data is waiting on a tls connection

- removed the attempt at async handling of ldap calls. The buffers/sockets are all async, but the calls themselves
  are sync.
2007-10-10 13:18:30 -05:00
Andrew Tridgell
fed6f4cc6c r7746: - added TLS support to our ldap server
- this involved changing the buffer handling in the ldap server quite a
  lot, as it didn't handle partial packets at all

- removed completely bogus asn1_object_length() function. You can't
  do that with BER/DER
2007-10-10 13:18:30 -05:00
Rafal Szczesniak
b0bae584a4 r7736: Propagate change in resolve_name function. Let's use default methods
in this case.

rafal
2007-10-10 13:18:28 -05:00
Rafal Szczesniak
121cf5ec3e r7735: Extend resolve_name function so that it's possible to pass resolve
methods explicitly or NULL for defaults saved in smb.conf.

rafal
2007-10-10 13:18:28 -05:00
Stefan Metzmacher
3a1ed83fd0 r7731: change debug level to not spam the build-farm smbd log
metze
2007-10-10 13:18:27 -05:00
Andrew Tridgell
0f22306a9c r7725: fixed a bug with partial asn1 frames in the ldap client 2007-10-10 13:18:26 -05:00
Andrew Tridgell
82b1feeafe r7724: added encoding of LDB_OP_NOT search components 2007-10-10 13:18:26 -05:00
Andrew Tridgell
25d500b6e5 r7723: - fix a mismatched asn1 push/pop on bind
- add error checking to ldap_encode()

- fixed the asn1 codes for extended search

- use asn1 context macros
2007-10-10 13:18:26 -05:00
Andrew Tridgell
0603235304 r7722: when we get a zero read, the connection is dead 2007-10-10 13:18:26 -05:00
Andrew Tridgell
09060994c1 r7720: - simplify the asn1 decode of ldap_search() a lot, taking advantage of
the fact that the ldap data structures now use ldb_message_element.

- fixed null termination of elements in ildap
2007-10-10 13:18:26 -05:00
Andrew Tridgell
fc8feee560 r7717: fixed some typos 2007-10-10 13:18:25 -05:00
Andrew Tridgell
de5f265b6c r7716: a single wrapped ldap blob can contain multiple ldap messages 2007-10-10 13:18:25 -05:00
Andrew Tridgell
dc419fc899 r7715: ensure we don't print null strings in ldap_errstr() 2007-10-10 13:18:25 -05:00
Andrew Tridgell
abc9f4bd89 r7713: fixed error display in ildap_search() 2007-10-10 13:18:25 -05:00
Andrew Tridgell
0163d7fe99 r7705: prevent SIGPIPE. this is what causes BASE-NEGNOWAIT to sometimes fail 2007-10-10 13:18:24 -05:00
Andrew Tridgell
1011b1bf51 r7704: - fixed open_nbt_connection() to return NULL when the connection failed
- got rid of smbcli_shutdown() and use talloc_free() instead.
2007-10-10 13:18:23 -05:00
Stefan Metzmacher
6ad7ffab04 r7679: update the documentation of security_description_create()
metze
2007-10-10 13:18:21 -05:00
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