summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* s3:smbd: keep local and remote tsocket_address per connectionStefan Metzmacher2010-04-272-9/+65
| | | | metze
* Correctly report share types (now Win7 makes RPC calls against us).Jeremy Allison2010-04-261-1/+7
| | | | Jeremy.
* Plumb in get_nt_acl into SMB2.Jeremy Allison2010-04-262-46/+167
| | | | Jeremy.
* s3: use generated rap header.Günther Deschner2010-04-261-0/+1
| | | | Guenther
* When walking the SMB2 requests queue, ensure the request is still "in flight"Jeremy Allison2010-04-261-1/+10
| | | | | | | | | | | | before examining the details. SMB2 requests stay on the queue until their out.vector has been send, only then are they talloc_free'd. Thanks for Ira Cooper <ira@wakeful.net> for giving me the backtrace showing this. Jeremy.
* Fix crash when rescheduling oplock open.Jeremy Allison2010-04-261-0/+9
| | | | Jeremy.
* s3: Simplify (bool != True) to !boolVolker Lendecke2010-04-241-1/+1
|
* Implement oplocks within SMB2. Plumb into the existing SMB1 oplock system.Jeremy Allison2010-04-245-17/+112
| | | | | | Seems to work but needs more tests (to be added). Jeremy.
* When sending the initial async response, this is never part of a chain.Jeremy Allison2010-04-231-1/+1
| | | | | | Get the reply flags correct. Jeremy.
* Don't free the entire tevent_req on cancel, only the part we need (the ↵Jeremy Allison2010-04-231-9/+12
| | | | | | immediate event). Jeremy.
* s3-smbd: group print relate data in own structureSimo Sorce2010-04-235-8/+27
|
* Allow smb2 create requests to be cancelled.Jeremy Allison2010-04-234-20/+90
| | | | Jeremy.
* Fix bug #7384 - dptr_Close has a bitmap leak.Ira Cooper2010-04-231-3/+1
| | | | | | | s3: Fix to dptr_Close This fixes a bitmap "leak" in dptr_Close by making it use the same internal routines the rest of the code does.
* At simo's request return struct tevent_req *treq -> treq. For consistency :-(.Jeremy Allison2010-04-231-80/+80
|
* Rename - no functional change. Stop all variables being called "req".Jeremy Allison2010-04-231-130/+129
| | | | | | | | tevent_req -> treq struct smb_request -> smb1req struct smbd_smb2_request -> smb2req Jeremy.
* s3-lanman: fix uninitialized variable in api_RDosPrintJobDel().Günther Deschner2010-04-231-1/+1
| | | | Guenther
* Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.Jeremy Allison2010-04-226-83/+355
| | | | | | | | Makes SMB2Create call re-entrant internally. Now this infrastructure is in place, oplocks will follow shortly. Tested with Win7 client and with W2K8R2. Jeremy.
* s3: Fix a cut&paste error in a debug message in check_oem_password()Volker Lendecke2010-04-231-1/+2
|
* Now SMB2 error messages are correctly being returned with the 1 byte data ↵Jeremy Allison2010-04-191-51/+49
| | | | | | area, smbd_smb2_request_error_ex() must call smbd_smb2_request_done_ex() in order to do the padding correctly on compound replies. Jeremy.
* Ensure vectors are always allocated with consistent size. Removes one byte ↵Jeremy Allison2010-04-191-20/+60
| | | | | | alloc on SMB2 error packet. Always use talloc_zero_array on out vectors - fixes valgrind errors in tevent writes. Jeremy.
* Fix valgrind error where a strdup of name reads one byte beyond the end. ↵Jeremy Allison2010-04-191-1/+2
| | | | | | Ensure buffer returned from inotify is null terminated. Jeremy.
* Remove an unused auto variable.Jeremy Allison2010-04-191-3/+0
| | | | Jeremy.
* s3-smb2: fix some c++ warnings.Günther Deschner2010-04-191-3/+3
| | | | Guenther
* s3-lanman: use spoolss for api_WPrintJobGetInfo().Günther Deschner2010-04-191-21/+54
| | | | Guenther
* s3-lanman: use spoolss for api_WPrintJobEnumerate().Günther Deschner2010-04-191-11/+142
| | | | Guenther
* Final fix for #7331 - Compound async SMB 2 requests don't work right.Jeremy Allison2010-04-182-4/+20
| | | | | | | | | | | | | | | Don't free the cancelled SMB2 req early, let the cancelation function take care of it. Return a NT_STATUS_CANCELLED when we find and cancel a request. Fix our SMB2 error returns to correctly set the structuresize to 9, and add the expected zero byte (see section 2.2.2 in the SMB2 spec.). This causes Samba to pass the test program in this bug report that W2K8R2 fails (heh heh :-). This is because we always cause compound requests to get to a cancelation point before dealing with a cancel request. Jeremy.
* Second part of fix for bug #7331 - Compound async SMB 2 requests don't work ↵Jeremy Allison2010-04-171-58/+158
| | | | | | | | | right. Cause us to match W2K8R2 by sending an interim compound reply followed by a async reply. Jeremy.
* First part of fix for bug #7331 - Compound async SMB 2 requests don't work ↵Jeremy Allison2010-04-175-105/+367
| | | | | | | | | | | | | | | | right. Gets us handling SMB2 compound async requests similar to W2K8R2 (and triggers the same client bug in the Win7 redirector). Great thanks to Ira Cooper <samba@ira.wakeful.net> for helping with this and to Metze for the wonderful async framework. The one thing I need to fix to make us identical to W2K8R2 is that when a compound request goes async at the end W2K8R2 splits the replies up into a compound non-async reply followed by a separate async reply. Currently we're doing the whole thing in a compound reply. Jeremy.
* s3: Slightly simplify the logic of check_password_complexity()Volker Lendecke2010-04-171-18/+22
| | | | The whole routine was just one if-branch. Do an early return instead.
* s3: Fix some nonempty blank linesVolker Lendecke2010-04-171-7/+7
|
* s3: Cache the username map in gencacheVolker Lendecke2010-04-131-0/+49
| | | | This is for uses with a heavy-weight username map script
* Move to using 64-bit mid values in our internal open file database.Jeremy Allison2010-04-1210-123/+125
| | | | | | | This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
* s3: Little refactoring: Factor out skip_spaceVolker Lendecke2010-04-121-5/+10
|
* s3: Remove a bogus 0-check, "isspace" can not return true for \0Volker Lendecke2010-04-121-1/+1
|
* s3: Cache the result of the username map scriptVolker Lendecke2010-04-121-0/+1
|
* Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison2010-04-0910-72/+154
| | | | | | | | Rename functions to be internally consistent. Next step is to cope queueing single (non-compounded) SMB2 requests to put some code inside the stubs. Jeremy.
* s3: Use talloc_tos() as talloc ctx for fd_lines_load() in map_username()Volker Lendecke2010-04-091-1/+1
|
* s3: TALLOC_FREE(command) correctly in map_username()Volker Lendecke2010-04-091-0/+2
|
* Stop smb2 from calling into smb1 blocking lock request code.Jeremy Allison2010-04-085-0/+66
| | | | | | | | | | | Allocate a uint16_t internal SMB1 mid for an SMB2 request. Add a back pointer from the faked up smb_request struct to the smb2 request. Getting ready to add restart code for blocking locks, share mode violations and oplocks in SMB2. Jeremy.
* Simplify call_trans2qfilepathinfo() and smbd_do_qfilepathinfo()Jeremy Allison2010-04-083-20/+4
| | | | | | | | | | | | Remove the bool ms_dfs_link parameter from smbd_do_qfilepathinfo. It is not possible for this to be a DFS link. Remove the check_msdfs_link() call from call_trans2qfilepathinfo() - the call to filename_convert() above with a ucf_flags of zero *MUST* catch a DFS link and return NT_STATUS_PATH_NOT_COVERED in this case, so the code below checking for msdfs links is redundent. Don't add this to 3.5.x, as it's an optimization but not needed to fix bug #7339 - MSDFS is non-functional in 3.5.x. Jeremy.
* Fix bug #7339 - MSDFS is non-functional in 3.5.xJeremy Allison2010-04-083-1/+5
| | | | | | | | | | | | | | | | | | | | | | | In the refactoring around filename_convert, the split between the functions resolve_dfspath() and resolve_dfspath_wcard() was lost, leaving us only with resolve_dfspath_wcard(). Internally resolve_dfspath_wcard() calls dfs_redirect() only with a "allow_wcards" flag of true, wheras the old resolve_dfspath() would call with a value of false. The loss of this case causes dfs_redirect to always masquerade DFS links as directories, even when they are being queried directly by a trans2 QPATHINFO call. We should only masquerade DFS links as directories when called from a SMBsearch or trans2 findfirst/findnext - which was the intent of the "allow_wcards" flag. This patch adds back an allow_wcards bool parameter to resolve_dfspath_wcard(). This bool is set from the state of the ucf_flags when filename_convert() is called. I will follow this up with a new smbclient-based torture test that will prevent us from ever regressing our DFS support again. Jeremy.
* s3-lanman: use spoolss for api_RDosPrintJobDel().Günther Deschner2010-04-081-15/+59
| | | | Guenther
* s3-lanman: use spoolss for api_WPrintQueueCtrl().Günther Deschner2010-04-081-7/+70
| | | | Guenther
* Start to plumb smb2 into the oplock system. Calls dummy functions for now.Jeremy Allison2010-04-074-46/+59
| | | | Jeremy.
* On compound requests, MS-SMB2 says clients MAY use 0xFFFFFFFF for compound ↵Jeremy Allison2010-04-072-0/+39
| | | | | | tid and 0xFFFFFFFFFFFFFFFF for compound sessionid values. Cope with this. Jeremy.
* Don't forget to initialize *p_creds_requested.Jeremy Allison2010-04-071-0/+1
| | | | Jeremy.
* s3: add comment about what the FSCTL_QUERY_ALLOCATED_RANGES currently doesBjörn Jacke2010-04-071-0/+6
|
* Ensure we total up the correct number of creds requested in a compound request.Jeremy Allison2010-04-061-1/+7
|
* Parameterize "smb2 max read", "smb2 max write", "smb2 max trans".Jeremy Allison2010-04-064-8/+8
| | | | | | Set to 64k by default. Jeremy.
* fix a segfault in the notify subsystemChristian Ambach2010-04-061-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the notify_array cannot be loaded correctly, do not keep the half-baked parsing results in the global variable. This can lead to segfaults next time notify_load is entered and the seqnum has not changed. This has been seen in a case where mixed smbd versions were running in a CTDB cluster (versions with and w/o commit c216d1e6 that changed the notify_entry structure). There will be missed notifications until all smbds are at the same software level, but this should be acceptable and is better than crashing and interrupting client operations. This fix cleans up the notify_array, removes the unparseable data from the TDB and returns a fresh notify_array that can be worked with. The NDR_PRINT_DEBUG had to be moved to only be called when the parsing succeeded, it was seen to cause additional segfaults. The status variable is intentionally left to NT_STATUS_OK to not make callers abort and report errors to the clients and make them disconnect. Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>