summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2010-06-09Split out the "finished write processing" code into a function so it can be ↵Jeremy Allison1-40/+62
called by both sync and async code. Jeremy.
2010-06-09Ensure we don't send SMB1 keepalives on an SMB2 connection.Jeremy Allison1-0/+6
Jeremy.
2010-06-09Split out the "finished read processing" code into a function so it can be ↵Jeremy Allison1-36/+75
called by both sync and async code. Jeremy.
2010-06-08Fix a valgrind error found by SMB2-COMPOUND test.Jeremy Allison3-0/+31
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-08Second part of fix for 7501 - SMB2: CREATE request replies getting mangled.Jeremy Allison1-67/+67
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-08Fix for bug 7501 - SMB2: CREATE request replies getting mangled.Ira Cooper1-3/+1
Code for dup_smb2_req() was duplicating the wrong vector (i, instead of i+2) when returning a non-minimal SMB2 response.
2010-06-08Revert "s3:smbd Fix segfault if register_existing_vuid() fails"Volker Lendecke1-12/+4
This reverts commit 8f1cec5faf4e26de8b9797777059e99f2a66558b.
2010-06-08Revert "s3:smbd Give the kerberos session key a parent"Volker Lendecke1-2/+0
This reverts commit 4a7f45b7e1cef13bc28d7ee50dd4b5519bdec397.
2010-06-08Revert "s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS"Volker Lendecke2-5/+4
This reverts commit edba46ce94c335411ab337eeb4ef6f88fb3aae80. Conflicts: source3/auth/auth_ntlmssp.c
2010-06-07Make aio_ex owned by a talloc context, not neccessarily on the null context.Jeremy Allison1-8/+12
2010-06-07Move "write_though" into aio_ex struct.Jeremy Allison1-5/+5
2010-06-07s3:smbd add utility function to check if there are open pipesSimo Sorce1-8/+3
2010-06-07s3:auth Change auth_ntlmssp_server_info API to return NTSTATUSAndrew Bartlett2-4/+5
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-07s3:smbd Give the kerberos session key a parentAndrew Bartlett1-0/+2
I can't see what would free this, so this should prevent a memory leak. Andrew Bartlett
2010-06-07s3:smbd Fix segfault if register_existing_vuid() failsAndrew Bartlett1-4/+12
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-04Fix a long-standing bug with async io that would only be triggered by SMB2.Jeremy Allison1-5/+5
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-04wait_for_aio_completion() should return 0 on non-aio compiled case.Jeremy Allison1-1/+1
2010-06-04Rename req -> smbreq.Jeremy Allison1-26/+26
2010-06-04Change smbd_aio_complete_mid() -> smbd_aio_complete_aio_ex(). SimplifiesJeremy Allison1-32/+4
the code and eliminates find_aio_ex(). Jeremy.
2010-06-04s3-auth: Moved smbd user functions to a generic place.Andreas Schneider2-406/+0
Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-04s3-smbd: Remove unneeded dependency of map_username to globals.c.Andreas Schneider3-7/+3
Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-03Allow us to cope correctly with NT_STATUS_MORE_PROCESSING_REQUIRED when ↵Jeremy Allison1-1/+7
downgrading from krb5 to NTLMSSP over SMB2. Jeremy.
2010-06-03Found by Guenther - fix up our fallback paths from krb5 to NTLMSSP when ↵Jeremy Allison1-8/+29
using SMB2. Jeremy.
2010-06-03s3-security: use shared "Standard access rights.".Günther Deschner1-1/+1
Guenther
2010-06-03s3-security: remove duplicate Extra W2K flags.Günther Deschner1-1/+1
Guenther
2010-06-03s3-security: use shared SECINFO_DACL define.Günther Deschner4-12/+12
Guenther
2010-06-03s3-security: use shared SECINFO_SACL define.Günther Deschner2-2/+2
Guenther
2010-06-03s3-security: use shared SECINFO_GROUP define.Günther Deschner4-7/+7
Guenther
2010-06-03s3-security: use shared SECINFO_OWNER define.Günther Deschner4-7/+7
Guenther
2010-06-03s3-security: remove some more shared secdesc defines.Günther Deschner1-3/+3
Guenther
2010-06-02Ensure we remove SMB2 cancel requests from the active queueJeremy Allison1-0/+1
now we don't remove them in the talloc destructor. Jeremy.
2010-06-02Fix a crash bug found by Ira Cooper <samba@ira.wakeful.net>.Jeremy Allison1-4/+5
A create call comes in, goes async (on the oplock request). At a later time (just before a cancel request is received) it completes, and goes through smbd_smb2_request_reply() to send the reply to the create call. However, the output socket queue is full, so when tstream_writev_queue_send() is called from smbd_smb2_request_reply(), the smb2req stays on the "being processed" queue on sconn->smb2.requests, as only when tstream_writev_queue_send() completes is smbd_smb2_request_writev_done() get called, which will TALLOC_FREE the smb2req (and thus take if off the queue). The cancel comes in, gets processed and looks through the requests on the queue, and BANG - hits the smb2req that has already been processed and is outgoing.... Remove the request from the queue once tstream_writev_queue_send() is called and not in the talloc destructor function. Jeremy.
2010-06-02Move to using a DATA_BLOB inside of struct aio_extra, not a char *.Jeremy Allison1-16/+16
Will make using AIO in SMB2 easier. Jeremy.
2010-06-01SMB2: Fix rename on Windows 7.Ira Cooper1-8/+0
This removes some code Jeremy (jra) suspected was bad. It turns out that the command window rename command will not work with the offending code in place. With it removed the bug is gone, and rename works.
2010-06-01Don't use sigev_value.sival_int to just store the mid, use ↵Jeremy Allison1-38/+26
sigev_value.sival_ptr to store the private data structure. This allows easier use from SMB2. Ensure aio is initialized before the aio_pending_size check else aio will never be used. Jeremy.
2010-05-31s3-smbd: remove unused sconn from token_contains_name().Günther Deschner1-1/+0
Guenther
2010-05-31s3:smbd map_username() doesn't need sconn anymoreSimo Sorce4-8/+6
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31s3:smbd user_ok doesn't need sconn anymoreSimo Sorce1-7/+6
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31s3:smbd user_in_list() doesn't need sconn anymoreSimo Sorce2-6/+5
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31s3:smbd user_in_network() doesn't need sconn anymoreSimo Sorce2-7/+6
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31s3:smbd make yp cache local.Simo Sorce3-20/+8
The my_yp_domain variable is just a static cache needed to avoid making over and over expensive and potentially blocking calls to yp_get_default_domain(). Instead of keeping this onto the smbd_server_connection struct, just keep it local to the only function ever using this variable. This disentagle this function (and a number of calling functions) from having to pass around smbd_server_connection and thus having to link against smbd. It also removes a few ifdefs. Nothing changes from a global/local pov, as the smbd_server_connection variable passed around is also a global one. Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31ntlmssp: Make the ntlmssp.h from source3/ a common headerAndrew Bartlett3-3/+3
The code is not yet in common, but I hope to fix that soon. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31s3:auth Remove AUTH_NTLMSSP_STATE typedef.Andrew Bartlett3-5/+5
typedefs are no longer preferred Samba style. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31s3:auth Make AUTH_NTLMSSP_STATE a private structure.Andrew Bartlett3-38/+28
This makes it a little easier for it to writen in terms of GENSEC in future. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31s3: Fix some debug messagesVolker Lendecke1-4/+4
2010-05-31s3-build: only use ndr_security.h where needed.Günther Deschner5-0/+5
Guenther
2010-05-29s3:smbd Use the right num_sidsSimo Sorce1-1/+1
We use s_i->ptok->num_sids everywhere else in this call and then suddenly we reference s_i->num_sids
2010-05-28s3:smbd move messaging_context and memcache into globals.cAndrew Bartlett2-26/+27
This helps vfstest, which previously had duplicate copies of these functions. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28s3:smbd split reload services/printers functions from server.cAndrew Bartlett2-82/+109
This helps vfstest, as it previously had duplicate copies of these functions. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28s3:smbd split smbd/server.c into smbd/server.c and smbd/server_exit.cAndrew Bartlett2-146/+173
Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>