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

1380 Commits

Author SHA1 Message Date
Stefan Metzmacher
1940fbed15 r19481: - reset the vuid before trying a new session setup
- only touch session->vuid when needed
- it make no sense to set an .spnego.out.vuid

metze
2007-10-10 14:21:41 -05:00
Stefan Metzmacher
97fb407a4c r19480: - clear the whole session struct (only let the pid untouched)
- zero state struct

metze
2007-10-10 14:21:41 -05:00
Andrew Bartlett
c843fce7a0 r19464: Reject passwords that cannot be converted into UCS2.
Andrew Bartlett
2007-10-10 14:21:37 -05:00
Volker Lendecke
03eaf0edf9 r19200: Implement smbcli_rap_netservergetinfo. To be used in RPC-SAMBA3SPOOLSS and
others that might need the server name.

Volker
2007-10-10 14:20:52 -05:00
Günther Deschner
d9562e0f83 r19162: Merge WERR code from Samba 3.
Guenther
2007-10-10 14:20:46 -05:00
Andrew Bartlett
441a4f6262 r18989: Fixes found by these two LDAP testsuites:
- http://www.ee.oulu.fi/research/ouspg/protos/testing/c06/ldapv3/
- http://gleg.net/protover_ldap_sample.shtml

Also fixes found by a subsequent audit of the code for similar issues.
2007-10-10 14:20:26 -05:00
Andrew Tridgell
6cce709d08 r18971: avoid strndup is a few places. Fixes a minor memory leak, and should
fix RPC-LSA on AIX.
2007-10-10 14:20:25 -05:00
Andrew Tridgell
27114fe175 r18968: EWOULDBLOCK should also be mapped to STATUS_MORE_ENTRIES 2007-10-10 14:20:25 -05:00
Andrew Tridgell
bb7835eced r18965: fixed the bug with RPC-NETLOGON and solaris sparc machines. This bug
took a _LONG_ time to find.

The problem was that when encoding/decoding password buffers we use
the pull/push string functions, which by default align unicode
strings. But on solaris sparc the buffer is not aligned always (its a
stack variable, an array of uint8_t). That perfectly OK in C, so we
just tell the pull/push functions not to auto-align.
2007-10-10 14:20:24 -05:00
Andrew Tridgell
6568f30adf r18916: fixed the messaging layer on *BSD systems. When a socket was full we
were getting ENOBUFS, which mapped to NT_STATUS_NO_MEMORY, which in
turn caused the messaging code to loop trying until it gave up.

Now it correctly falls back to select. Messaging speed goes from 3
messages per second to over 7000 on my test vmware box. Not bad for a
one line change :)
2007-10-10 14:20:21 -05:00
Günther Deschner
692746ff8d r18847: Add WERR_NO_SYSTEM_RESOURCES showing up in dfs torture testing.
Guenther
2007-10-10 14:20:15 -05:00
Andrew Tridgell
1e34e4d5a1 r18835: expand IO limits on SMB2. Samba4 now tops out at 16.7MB IOs. 2007-10-10 14:19:16 -05:00
Andrew Tridgell
f55de25ab3 r18715: 0x8 style status returns should also fail here (thanks metze) 2007-10-10 14:19:03 -05:00
Günther Deschner
e2879f6fc2 r18633: Add a couple of new WERR codes encountered with dfs torture testing.
Guenther
2007-10-10 14:18:58 -05:00
Andrew Tridgell
c440e0eed9 r18309: FreeBSD 6.1 has a symbol ldap_new_connection() in the system ldap
library. Even though we don't like to that library, it gets loaded via
nss-ldap, which means nss-ldap calls into the samba ldap lib with the
wrong parameters, and crashes.

We really need to use a completely different namespace in libcli/ldap/
2007-10-10 14:18:06 -05:00
Andrew Tridgell
eba6c84eff r18301: I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
2007-10-10 14:18:04 -05:00
Andrew Tridgell
4860d02565 r18280: more portability tidyups, ensuring we use libreplace everywhere 2007-10-10 14:18:00 -05:00
Andrew Tridgell
f4b4bd945f r18256: use the right status variable 2007-10-10 14:17:57 -05:00
Andrew Tridgell
dbf935d38b r18243: when setting up a composite continuation, if the context has already
finished when we need to trigger the continuation immediately.

Via a fairly complex path, this fixes the problem where all hosts in
the build farm that do not have ipv6 failed a lot of the RPC
tests. This happened because the dcerpc_connect() async code used a
composite_continue() on a context which was already in an error state,
due to the socket backend saying that ipv6 was unavailable
2007-10-10 14:17:54 -05:00
Stefan Metzmacher
135d096776 r18213: don't list LIBREPLACE depdendecies explicit and
always at it as first private dependencies

metze
2007-10-10 14:17:50 -05:00
Andrew Tridgell
fe209e360e r18211: wct is not a size, so don't use size_t
this should fix a pile of printf format warnings
2007-10-10 14:17:50 -05:00
Andrew Tridgell
18542f184f r18130: the move to system/ in libreplace broke some things ... should be
happier now
2007-10-10 14:17:37 -05:00
Andrew Bartlett
556a21faee r18025: Don't try to set a target host if there isn't one (such as with ldapi://).
Andrew Bartlett
2007-10-10 14:17:04 -05:00
Andrew Bartlett
1920cb8b39 r18024: The %c sscanf format I'm using doesn't null terminate.
Andrew Bartlett
2007-10-10 14:17:04 -05:00
Andrew Bartlett
da66b53e6a r18021: Add ldapi support to our LDAP client. To be used for testing an
OpenLDAP backend.

Andrew Bartlett
2007-10-10 14:17:03 -05:00
Jelmer Vernooij
f7afa1cb77 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
2007-10-10 14:16:54 -05:00
Volker Lendecke
bb39360370 r17848: Ok, this did not do it. Still got the same problem. 2007-10-10 14:16:48 -05:00
Volker Lendecke
1a9401738f r17846: Ok, this is a patch that needs further discussion. On Solaris, snprintf seems
to be broken. The %lu modifies apparently can not cope with the high
bit==1. In dom_sid_string I added some printfs and got:

auth: 21
auth: 2666793276
auth: 679821296
auth: 2310223117
auth: 1206
sid=S-1-5-21-8446744072081377596-679821296-8446744071724807437-1206

The "auth:" values are direct printfs, the sid= is the resulting code from
dom_sid_string.

I could not reproduce it with a simple test program, and #ifdef'ing out
HAVE_SNPRINTF in config.h manually does not help either, probably because the
dynamic linker overwrites the symbol in lib/replace.

Checking it in because it fixes the RPC-SAMBA3-SHARESEC test directly on host
"sunx", I would like to see whether it also fixes IRIX and AIX.

Volker
2007-10-10 14:16:48 -05:00
Stefan Metzmacher
f20e251bfd r17586: merge lib/netif into lib/socket and use -lnsl -lsocket on the
configure check for the interfaces.

should fix the build on some old sun boxes

metze
2007-10-10 14:15:39 -05:00
Stefan Metzmacher
8458ee72c5 r17567: add error code I got from DsGetNCChanges
when I don't use the DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION
flag on DsBind

metze
2007-10-10 14:15:38 -05:00
Stefan Metzmacher
96259f0f24 r17430: implement the LDAP_SERVER_PERMISSIVE_MODIFY control in the client
metze
2007-10-10 14:15:24 -05:00
Stefan Metzmacher
40dc7c1787 r17429: implement the LDAP_SERVER_SHOW_DELETED control in the client
metze
2007-10-10 14:15:24 -05:00
Stefan Metzmacher
84e74a759c r17420: add client support for the LDAP_SERVER_DOMAIN_SCOPE control
metze
2007-10-10 14:15:24 -05:00
Stefan Metzmacher
4ccd0f8171 r17419: add client support for the LDAP_SERVER_SEARCH_OPTIONS support.
with this you can limit a search to a specific partitions
or a search over all partitions without getting referrals.
(Witch is the default behavior on the Global Catalog Port)

metze
2007-10-10 14:15:24 -05:00
Stefan Metzmacher
23759a1e9b r17418: add client support for the LDAP_SERVER_SD_FLAGS control
metze
2007-10-10 14:15:23 -05:00
Stefan Metzmacher
e15a015a1d r17414: add new error code
metze
2007-10-10 14:15:23 -05:00
Stefan Metzmacher
8f9e201b9a r17319: make better usage of the composite api
metze
2007-10-10 14:15:11 -05:00
Stefan Metzmacher
683fc25f65 r17318: make better usage of the composite api
metze
2007-10-10 14:15:11 -05:00
Stefan Metzmacher
a16180f202 r17317: - add a composite_create() function that allocates and initialize
the composite_context structue, we should try to convert all code
  to use this because there're a lot of places where the we have
  bugs with this task...
- add a composite_continue_smb2() helper

We should try to hide the internals of the composite code from the users
to avoid errors (and I found a lot of them... and will fix then step by step)

metze
2007-10-10 14:15:10 -05:00
Stefan Metzmacher
fe463bc568 r17278: fix un uninitialized value found by valgrind
metze
2007-10-10 14:15:05 -05:00
Stefan Metzmacher
e231eba828 r17277: we need to trigger an event when we return directly,
otherwise the callers callback function will not be called
and the caller is hanging forever...

metze
2007-10-10 14:15:05 -05:00
Stefan Metzmacher
f2196bf9b6 r17230: don't overwrite the error with NT_STATUS_NO_MEMORY
metze
2007-10-10 14:10:22 -05:00
Andrew Bartlett
003e2ab93c r17222: Change the function prototypes for the GENSEc and TLS socket creation
routines to return an NTSTATUS.  This should help track down errors.

Use a bit of talloc_steal and talloc_unlink to get the real socket to
be a child of the GENSEC or TLS socket.

Always return a new socket, even for the 'pass-though' case.

Andrew Bartlett
2007-10-10 14:10:20 -05:00
Andrew Bartlett
5d7c9c12cb r17197: This patch moves the encryption of bulk data on SASL negotiated security
contexts from the application layer into the socket layer.

This improves a number of correctness aspects, as we now allow LDAP
packets to cross multiple SASL packets.  It should also make it much
easier to write async LDAP tests from windows clients, as they use SASL
by default.  It is also vital to allowing OpenLDAP clients to use GSSAPI
against Samba4, as it negotiates a rather small SASL buffer size.

This patch mirrors the earlier work done to move TLS into the socket
layer.

Unusual in this pstch is the extra read callback argument I take.  As
SASL is a layer on top of a socket, it is entirely possible for the
SASL layer to drain a socket dry, but for the caller not to have read
all the decrypted data.  This would leave the system without an event
to restart the read (as the socket is dry).

As such, I re-invoke the read handler from a timed callback, which
should trigger on the next running of the event loop.  I believe that
the TLS code does require a similar callback.

In trying to understand why this is required, imagine a SASL-encrypted
LDAP packet in the following formation:

+-----------------+---------------------+
| SASL  Packet #1 | SASL Packet #2      |
----------------------------------------+
| LDAP Packet #1       | LDAP Packet #2 |
----------------------------------------+

In the old code, this was illegal, but it is perfectly standard
SASL-encrypted LDAP.  Without the callback, we would read and process
the first LDAP packet, and the SASL code would have read the second SASL
packet (to decrypt enough data for the LDAP packet), and no data would
remain on the socket.

Without data on the socket, read events stop.  That is why I add timed
events, until the SASL buffer is drained.

Another approach would be to add a hack to the event system, to have it
pretend there remained data to read off the network (but that is ugly).

In improving the code, to handle more real-world cases, I've been able
to remove almost all the special-cases in the testnonblock code.  The
only special case is that we must use a deterministic partial packet
when calling send, rather than a random length.  (1 + n/2).  This is
needed because of the way the SASL and TLS code works, and the 'resend
on failure' requirements.

Andrew Bartlett
2007-10-10 14:10:18 -05:00
Stefan Metzmacher
730cdc4475 r17083: - implement SMB2 Cancel in the client
- the 0xffffffffffffffff seqnum is reserved for SMB2 Break (oplock breaks)
  so don't use it in a request. we should someday try to test this...

metze
2007-10-10 14:10:11 -05:00
Volker Lendecke
6718550822 r17082: Add a test that walks and tests denying tconX access via the share security
descriptor. This is something that W2k3 does _not_ pass and probably is not
expected to, it seems the don't check access at tconX time.

Thanks to metze for the hint how in the srvsvc_NetShareInfo1501 struct the
length of the sd can be encoded in idl.

As metze says, there's probably more to the share secdesc, this needs more
testing. This one is here to walk the samba3 code.

Volker
2007-10-10 14:10:11 -05:00
Stefan Metzmacher
1f48e7dca6 r17081: add idle handler support to the smb2 client lib too
metze
2007-10-10 14:10:11 -05:00
Stefan Metzmacher
49b96ac44a r17020: pass the real error to the failing requests
metze
2007-10-10 14:10:08 -05:00
Stefan Metzmacher
8d4fd35b10 r17019: don't timeout on notifies
metze
2007-10-10 14:10:08 -05:00
Stefan Metzmacher
de50e0ccdd r16980: - make struct smb_notify a union and add levels RAW_NOTIFY_NTTRANS,RAW_NOTIFY_SMB2
- parse SMB2 Notify reponse

metze
2007-10-10 14:10:06 -05:00