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

5329 Commits

Author SHA1 Message Date
Volker Lendecke
0275502b9c s3: Remove smbd_server_conn from reply_tcon 2010-06-12 15:42:51 +02:00
Volker Lendecke
d724ac3e8c s3: Remove smbd_server_conn from make_connection_snum 2010-06-12 15:42:51 +02:00
Volker Lendecke
d04a89682a s3: Remove smbd_server_conn from change_to_user 2010-06-12 15:42:50 +02:00
Volker Lendecke
5a2277ca2f s3: Remove smbd_server_conn from reply_ntcancel 2010-06-12 15:42:50 +02:00
Volker Lendecke
e01ee1c77d s3: Remove smbd_server_conn from send_nt_replies 2010-06-12 15:42:50 +02:00
Volker Lendecke
b55a8e8ccf s3: Remove smbd_server_conn from reply_smb2002 2010-06-12 15:42:50 +02:00
Volker Lendecke
a45ea200c6 s3: Explicitly pass sconn to negprot_spnego() 2010-06-12 15:42:50 +02:00
Volker Lendecke
b82fc135a7 s3: Remove some global references to smbd_server_conn 2010-06-12 15:42:50 +02:00
Volker Lendecke
3087986e76 s3: Remove sconn arg from smbd_notify_cancel_by_smbreq 2010-06-12 15:42:50 +02:00
Volker Lendecke
546a264e0e s3: Initialize smb_request->sconn in smbd_smb2_fake_smb_request 2010-06-12 13:05:09 +02:00
Volker Lendecke
46a48edcdf s3: Use "sconn" argument in smbd_[un]lock_socket_internal
Metze, please check!
2010-06-12 11:59:21 +02:00
Volker Lendecke
d7bc5fe734 s3: Pass sconn to init_smb_request() 2010-06-12 11:59:21 +02:00
Volker Lendecke
edfc7eaf6d s3: Add "smbd_server_connection" to smb_request 2010-06-12 11:59:21 +02:00
Volker Lendecke
312a508e88 s3: Fix some nonempty lines 2010-06-12 11:59:21 +02:00
Volker Lendecke
d5cf6482ed s3: Fix starving the echo responder
When both the echo responder and the 445 socket want to send stuff to the
worker smbd, the select loop is not fair. It always chooses the smaller file
descriptor to work on. This can mean that on a busy system the echo responder
never gets around to feed its stuff to the parent.

This fix chooses the async echo responder socket when both the 445 and the echo
responder socket are readable.

Yes, it is a very hackish fix which is required *now* I think. The proper fix
would be to either assign priorities to fd's in tevent, or the from my point of
view better fix would be to make tevent kindof round-robin.

Round-robin would mean that whenever a fd has been dealt with, it is taken off
the list of interested sockets, and only if no other socket is active, all of
the ones waiting are put back. This is a bit like EPOLL_ONESHOT, which I would
like to use for this in the epoll case. Although, I need to do some research if
maybe epoll already guarantees round-robin, I did not find anything in the docs
yet.

Volker
2010-06-11 10:58:54 +02:00
Simo Sorce
5e576a53ab s3:lib make server contexts generic
Pair-programmed-with: Andreas Schneider <asn@samba.org>
2010-06-10 17:30:45 -04:00
Jeremy Allison
aeb25ad0b8 Fix the build in the non WITH_AIO case (sorry). 2010-06-10 14:28:55 -07:00
Jeremy Allison
321d7a6303 Implement AIO in SMB2. Doesn't allow cancel calls yet (to be added).
Jeremy.
2010-06-10 13:20:37 -07:00
Jeremy Allison
edd8940e18 Ensure we correctly setup req->subreq before testing for async. Stops crashes when
XX_send functions set async to stop interim replies being sent.

Jeremy.
2010-06-10 13:19:25 -07:00
Jeremy Allison
b5638a0560 Don't use the autofree context for the globals. This causes child smbd's forked
by modules to crash due to destructors being called (found when using the vfs_aio_fork
module with smb2).

Jeremy.
2010-06-10 13:17:35 -07:00
Karolin Seeger
9fdb69ebcd s3-smbd: Fix typo in comment.
Karolin
2010-06-10 10:35:56 +02:00
Jeremy Allison
d28fa8faab Rename "allow_smb2" -> "using_smb2" and make the usage clearer. 2010-06-09 19:12:02 -07:00
Jeremy Allison
3c0eead9fd Split out the "finished write processing" code into a function so it can be called
by both sync and async code.

Jeremy.
2010-06-09 17:09:11 -07:00
Jeremy Allison
efd0c35a7e Ensure we don't send SMB1 keepalives on an SMB2 connection.
Jeremy.
2010-06-09 17:08:41 -07:00
Jeremy Allison
09e74b675f Split out the "finished read processing" code into a function so it can be called
by both sync and async code.

Jeremy.
2010-06-09 10:48:12 -07:00
Jeremy Allison
34a8324409 Fix a valgrind error found by SMB2-COMPOUND test.
If a file is closed we must also NULL out all chained_fsp
pointers when the fsp is freed to prevent invalid pointer
access.

Jeremy.
2010-06-08 21:20:07 -07:00
Jeremy Allison
0c5d0e1c37 Second part of fix for 7501 - SMB2: CREATE request replies getting mangled.
Based on code from Ira Cooper <samba@ira.wakeful.net>, and also
advice on refactoring the patch into a function call. outbuf vectors
can be reallocated by smb2 processing code, so when returning interim
responses we must not make assumptions about vector size.

Jeremy
2010-06-08 17:44:05 -07:00
Ira Cooper
fd9e02d5f3 Fix for bug 7501 - SMB2: CREATE request replies getting mangled.
Code for dup_smb2_req() was duplicating the wrong vector (i, instead
of i+2) when returning a non-minimal SMB2 response.
2010-06-08 11:20:23 -07:00
Volker Lendecke
7a7f28d96d Revert "s3:smbd Fix segfault if register_existing_vuid() fails"
This reverts commit 8f1cec5faf.
2010-06-08 11:38:08 +02:00
Volker Lendecke
3e502159c7 Revert "s3:smbd Give the kerberos session key a parent"
This reverts commit 4a7f45b7e1.
2010-06-08 11:38:08 +02:00
Volker Lendecke
34b29b1198 Revert "s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS"
This reverts commit edba46ce94.

Conflicts:

	source3/auth/auth_ntlmssp.c
2010-06-08 11:38:08 +02:00
Jeremy Allison
096a3d3eea Make aio_ex owned by a talloc context, not neccessarily on the null context. 2010-06-07 16:26:30 -07:00
Jeremy Allison
d70413fa0c Move "write_though" into aio_ex struct. 2010-06-07 16:25:18 -07:00
Simo Sorce
5da783f4a7 s3:smbd add utility function to check if there are open pipes 2010-06-07 17:25:48 -04:00
Andrew Bartlett
edba46ce94 s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS
It's nicer to have an NTSTATUS return, and in s3compat there may be a
reason other than 'no memory' why this can fail.

Andrew Bartlett
2010-06-07 23:34:29 +10:00
Andrew Bartlett
4a7f45b7e1 s3:smbd Give the kerberos session key a parent
I can't see what would free this, so this should prevent a memory leak.

Andrew Bartlett
2010-06-07 23:34:28 +10:00
Andrew Bartlett
8f1cec5faf s3:smbd Fix segfault if register_existing_vuid() fails
The register_existing_vuid() call will handle both the ntlmssp_end and
vuid invalidation internally, so we don't want to do it again.

Andrew Bartlett
2010-06-07 23:34:28 +10:00
Jeremy Allison
62e0a744e2 Fix a long-standing bug with async io that would only be triggered by SMB2.
On normal or shutdown close, ensure we wait for any pending IO to
complete before returning. Implement a blocking aio_suspend inside
vfs_aio_fork.c. These changes pass make test when the aio_fork module
is used by default on the test shares.

Jeremy.
2010-06-04 21:00:24 -07:00
Jeremy Allison
b12409a480 wait_for_aio_completion() should return 0 on non-aio compiled case. 2010-06-04 11:41:57 -07:00
Jeremy Allison
be5133f1e0 Rename req -> smbreq. 2010-06-04 11:41:38 -07:00
Jeremy Allison
e0acee4919 Change smbd_aio_complete_mid() -> smbd_aio_complete_aio_ex(). Simplifies
the code and eliminates find_aio_ex().

Jeremy.
2010-06-04 11:30:46 -07:00
Andreas Schneider
9097bdddd0 s3-auth: Moved smbd user functions to a generic place.
Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-04 12:12:37 -04:00
Andreas Schneider
fad86ddf55 s3-smbd: Remove unneeded dependency of map_username to globals.c.
Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-04 12:12:08 -04:00
Jeremy Allison
a73b846802 Allow us to cope correctly with NT_STATUS_MORE_PROCESSING_REQUIRED when downgrading from krb5 to NTLMSSP over SMB2.
Jeremy.
2010-06-03 11:50:08 -07:00
Jeremy Allison
e47d77832b Found by Guenther - fix up our fallback paths from krb5 to NTLMSSP when using SMB2.
Jeremy.
2010-06-03 11:18:11 -07:00
Günther Deschner
b6a2cea74d s3-security: use shared "Standard access rights.".
Guenther
2010-06-03 11:00:26 +02:00
Günther Deschner
1bed5254d9 s3-security: remove duplicate Extra W2K flags.
Guenther
2010-06-03 11:00:24 +02:00
Günther Deschner
a75436e3ee s3-security: use shared SECINFO_DACL define.
Guenther
2010-06-03 11:00:12 +02:00
Günther Deschner
e24a59f932 s3-security: use shared SECINFO_SACL define.
Guenther
2010-06-03 10:59:54 +02:00
Günther Deschner
630c27bdad s3-security: use shared SECINFO_GROUP define.
Guenther
2010-06-03 10:59:38 +02:00