summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2010-04-23Allow smb2 create requests to be cancelled.Jeremy Allison4-20/+90
Jeremy.
2010-04-23Fix bug #7384 - dptr_Close has a bitmap leak.Ira Cooper1-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.
2010-04-23At simo's request return struct tevent_req *treq -> treq. For consistency :-(.Jeremy Allison1-80/+80
2010-04-23Rename - no functional change. Stop all variables being called "req".Jeremy Allison1-130/+129
tevent_req -> treq struct smb_request -> smb1req struct smbd_smb2_request -> smb2req Jeremy.
2010-04-23s3-lanman: fix uninitialized variable in api_RDosPrintJobDel().Günther Deschner1-1/+1
Guenther
2010-04-22Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.Jeremy Allison6-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.
2010-04-23s3: Fix a cut&paste error in a debug message in check_oem_password()Volker Lendecke1-1/+2
2010-04-19Now SMB2 error messages are correctly being returned with the 1 byte data ↵Jeremy Allison1-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.
2010-04-19Ensure vectors are always allocated with consistent size. Removes one byte ↵Jeremy Allison1-20/+60
alloc on SMB2 error packet. Always use talloc_zero_array on out vectors - fixes valgrind errors in tevent writes. Jeremy.
2010-04-19Fix valgrind error where a strdup of name reads one byte beyond the end. ↵Jeremy Allison1-1/+2
Ensure buffer returned from inotify is null terminated. Jeremy.
2010-04-19Remove an unused auto variable.Jeremy Allison1-3/+0
Jeremy.
2010-04-19s3-smb2: fix some c++ warnings.Günther Deschner1-3/+3
Guenther
2010-04-19s3-lanman: use spoolss for api_WPrintJobGetInfo().Günther Deschner1-21/+54
Guenther
2010-04-19s3-lanman: use spoolss for api_WPrintJobEnumerate().Günther Deschner1-11/+142
Guenther
2010-04-18Final fix for #7331 - Compound async SMB 2 requests don't work right.Jeremy Allison2-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.
2010-04-17Second part of fix for bug #7331 - Compound async SMB 2 requests don't work ↵Jeremy Allison1-58/+158
right. Cause us to match W2K8R2 by sending an interim compound reply followed by a async reply. Jeremy.
2010-04-17First part of fix for bug #7331 - Compound async SMB 2 requests don't work ↵Jeremy Allison5-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.
2010-04-17s3: Slightly simplify the logic of check_password_complexity()Volker Lendecke1-18/+22
The whole routine was just one if-branch. Do an early return instead.
2010-04-17s3: Fix some nonempty blank linesVolker Lendecke1-7/+7
2010-04-13s3: Cache the username map in gencacheVolker Lendecke1-0/+49
This is for uses with a heavy-weight username map script
2010-04-12Move to using 64-bit mid values in our internal open file database.Jeremy Allison10-123/+125
This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
2010-04-12s3: Little refactoring: Factor out skip_spaceVolker Lendecke1-5/+10
2010-04-12s3: Remove a bogus 0-check, "isspace" can not return true for \0Volker Lendecke1-1/+1
2010-04-12s3: Cache the result of the username map scriptVolker Lendecke1-0/+1
2010-04-09Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison10-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.
2010-04-09s3: Use talloc_tos() as talloc ctx for fd_lines_load() in map_username()Volker Lendecke1-1/+1
2010-04-09s3: TALLOC_FREE(command) correctly in map_username()Volker Lendecke1-0/+2
2010-04-08Stop smb2 from calling into smb1 blocking lock request code.Jeremy Allison5-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.
2010-04-08Simplify call_trans2qfilepathinfo() and smbd_do_qfilepathinfo()Jeremy Allison3-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.
2010-04-08Fix bug #7339 - MSDFS is non-functional in 3.5.xJeremy Allison3-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.
2010-04-08s3-lanman: use spoolss for api_RDosPrintJobDel().Günther Deschner1-15/+59
Guenther
2010-04-08s3-lanman: use spoolss for api_WPrintQueueCtrl().Günther Deschner1-7/+70
Guenther
2010-04-07Start to plumb smb2 into the oplock system. Calls dummy functions for now.Jeremy Allison4-46/+59
Jeremy.
2010-04-07On compound requests, MS-SMB2 says clients MAY use 0xFFFFFFFF for compound ↵Jeremy Allison2-0/+39
tid and 0xFFFFFFFFFFFFFFFF for compound sessionid values. Cope with this. Jeremy.
2010-04-07Don't forget to initialize *p_creds_requested.Jeremy Allison1-0/+1
Jeremy.
2010-04-07s3: add comment about what the FSCTL_QUERY_ALLOCATED_RANGES currently doesBjörn Jacke1-0/+6
2010-04-06Ensure we total up the correct number of creds requested in a compound request.Jeremy Allison1-1/+7
2010-04-06Parameterize "smb2 max read", "smb2 max write", "smb2 max trans".Jeremy Allison4-8/+8
Set to 64k by default. Jeremy.
2010-04-06fix a segfault in the notify subsystemChristian Ambach1-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>
2010-04-05Add FSCTL_QUERY_ALLOCATED_RANGES to the list of Windows ioctls we support.Jeremy Allison1-0/+52
Based on a patch reported and tested by Ira Cooper <samba@ira.wakeful.net>. Jeremy.
2010-04-05Fix issue with aio where r/w lock wasn't kept across aio read operations.Jeremy Allison2-49/+108
Change schedule_aio_read_and_X/schedule_aio_write_and_X to return NTSTATUS. Move the grant and release of the lock into the aio code. Jeremy
2010-04-01Move initialize_async_io_handler() inside of smbd/aio.c.Jeremy Allison2-37/+42
Call from actual aio read or write. No reason to call this globally on startup. Jeremy.
2010-03-31Make smbd_lock_socket/smbd_unlock_socket recursive with a ref_count.Jeremy Allison6-56/+68
As these always call exit_server, make that part of the function. Use _internal functions for the echo client. Metze please check ! Jeremy.
2010-03-31Fix bug 7310 - DOS attribute inconsistency with MS OfficeJeremy Allison1-0/+15
On rename we need to set the archive bit on the renamed file. Jeremy
2010-03-31Merge branch 'master' of ssh://git.samba.org/data/git/sambaJeremy Allison1-1/+13
2010-03-31s3:smbd: handle SMB2 in deadtime_fn() and avoid disconnecting non idle clientsStefan Metzmacher1-1/+13
metze
2010-03-30Second part of fix for bug #6494 - Incorrect FileStatus returned in ↵Jeremy Allison1-1/+19
NT_CREATE_ANDX. Ensure we do this in nttrans create too. Jeremy.
2010-03-30Fix for bug #7233 - print fails with jobs >4GB from Win7 clients.Jeremy Allison1-4/+12
Contains for by Sebastian Kloska <oncaphillis@snafu.de>. Submitter confirms this fixes the problem. Jeremy.
2010-03-29s3: Attempt to fix the build on AIX, shm_ptr seems to be a macro thereVolker Lendecke1-5/+6
2010-03-28s3: Use bitmap_talloc for smb1 server tconsVolker Lendecke1-3/+3