summaryrefslogtreecommitdiffstats
path: root/source3/smbd/reply.c
Commit message (Collapse)AuthorAgeFilesLines
* s3: ifdef sendfile code that's only used in other ifdef'ed sendfile codeBjörn Jacke2009-04-151-0/+2
| | | | | This fixes a "defined but not used" compile warning. (cherry picked from commit 1aa65f485b60a80766581e7d3f31565f340aa528)
* Ensure we never enter VFS_CREATE without having initializedJeremy Allison2009-04-151-0/+6
| | | | | | | | sbuf as invalid (if not already read via stat()). Still trying to find the build farm RAW-STREAM errors and it's happening in a openX call.... Jeremy. (cherry picked from commit 940c84fcc75085ee4f1180d4d2a8e718142e4eb6)
* Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS clientJeremy Allison2009-04-151-2/+7
| | | | | | | Looks like the pathname parsing for POSIX paths got broken when the code for doing Windows streams parsing got added. Jeremy. (cherry picked from commit 8d8c25a34241c1b4a1d40d7ad02bd1e1baa605be)
* s3: Add strict lock/unlock calls to the vfs layer to replace is_lockedDave Richards2009-04-151-63/+116
| | | | (cherry picked from commit 2d5e98e7e5a737dde360ab3490fff786fa0703b6)
* Make us pass the RAW-RENAME torture test I just added.Jeremy Allison2009-02-261-0/+10
| | | | | | | Inside a directory, keep a file open and then renaming the directory should fail with ACCESS_DENIED. Jeremy.
* Fix some NetBSD warnings.Jeremy Allison2009-02-251-1/+1
| | | | Jeremy.
* s3: If sendfile returns 0 bytes read, fall back to the normal read pathTim Prouty2009-02-211-0/+24
| | | | | | This allows sendfile implementations that are atomic to avoid having to send zeros or kill the client connection on a short read (usually the file was truncated).
* S3: Make changes to perfcount API set for when a single request leads to ↵todd stecher2009-02-191-2/+15
| | | | | | multiple replies (e.g. reply_echo). Change test and onefs modules to match new api set (thanks Volker!).
* s3: Fix uninitialized variable warning (and bug).Zack Kirsch2009-02-131-1/+1
|
* Add VFS ops for Windows BRL: Lock, Unlock and Cancel:Zack Kirsch2009-02-131-4/+14
| | | | | | | | | | | | | | | | | | | | | | | This patch adds 3 new VFS OPs for Windows byte range locking: BRL_LOCK_WINDOWS, BRL_UNLOCK_WINDOWS and BRL_CANCEL_WINDOWS. Specifically: * I renamed brl_lock_windows, brl_unlock_windows and brl_lock_cancel to *_default as the default implementations of the VFS ops. * The blocking_lock_record (BLR) is now passed into the brl_lock_windows and brl_cancel_windows paths. The Onefs implementation uses it - future implementations may find it useful too. * Created brl_lock_cancel to do what brl_lock/brl_unlock do: set up a lock_struct and call either the Posix or Windows lock function. These happen to be the same for the default implementation. * Added helper functions: increment_current_lock_count() and decrement_current_lock_count(). * Minor spelling correction in brl_timeout_fn: brl -> blr. * Changed blocking_lock_cancel() to return the BLR that it has cancelled. This allows us to assert its the lock that we wanted to cancel. If this assert ever fires, this path will need to take in the BLR to cancel, rather than choosing on its own. * Adds a small helper function: find_blocking_lock_record_by_id(). Used by the OneFS implementation, but could be useful for others.
* s3: Added SMB_VFS_INIT_SEARCH_OP to initialize data at the beginning of SMB ↵Steven Danneman2009-02-091-0/+3
| | | | | | | | search requests. By default this VFS call is a NOOP, but the onefs vfs module takes advantage of it to initialize direntry search caches at the beginning of each TRANS2_FIND_FIRST, TRANS2_FIND_NEXT, SMBffirst, SMBsearch, and SMBunique
* Pass stat buffer down through all levels of VFS_READDIR wrappersSteven Danneman2009-02-091-10/+11
| | | | | | | | | * VFS_OP_READDIR can now provide stat information, take advantage of it if it's available * is_visible_file(): optimistically expect the provided stat buffer is already valid * dptr_ReadDirName(): refactor code for easier readability, functionality is the same
* s3 oplocks: Make the level2 oplock contention API more granularTim Prouty2009-02-091-11/+0
| | | | | | | | | | | | | | | | | | This replaces release_level2_oplocks_on_change with contend_level2_oplock_begin/end in order to contend level2 oplocks throughout an operation rather than just at the begining. This is necessary for some kernel oplock implementations, and also lays the groundwork for better correctness in Samba's standard level2 oplock handling. The next step for non-kernel oplocks is to add additional state to the share mode lock struct that prevents any new opens from granting oplocks while a contending operation is in progress. All operations that contend level 2 oplocks are now correctly spanned except for aio and synchronous writes. The two write paths both have non-trivial error paths that need extra care to get right. RAW-OPLOCK and the rest of 'make test' are still passing with this change.
* S3: New module interface for SMB message statistics gatheringtodd stecher2009-02-091-3/+7
| | | | | | | This changelist allows for the addition of custom performance monitoring modules through smb.conf. Entrypoints in the main message processing code have been added to capture the command, subop, ioctl, identity and message size statistics.
* Fix bug #Bug 6090 renaming or deleting a "not matching/resolving" symlink is ↵Jeremy Allison2009-02-041-6/+28
| | | | | | | | | | failing. Reported by Kukks. Make sure we correctly use LSTAT in all cases where POSIX pathnames are being used. This matters when dealing with symlinks pointing to invalid paths being renamed or deleted not all deletes and renames are done via an nt_create open. Jeremy.
* make send_file_readbraw staticVolker Lendecke2009-01-311-6/+6
|
* Remove the global variable "chain_size"Volker Lendecke2009-01-311-3/+4
|
* s3: Add a new SMB_VFS_GET_ALLOC_SIZE vfs operationTim Prouty2009-01-291-2/+2
| | | | | This allows module implementors to customize what allocation size is returned to the client.
* Extend NTIMES to allow setting create_timetodd stecher2009-01-231-20/+26
| | | | | | | | | 1) Add in smb_file_time struct to clarify code and make room for createtime. 2) Get and set create time from SMB messages. 3) Fixup existing VFS modules + examples Some OS'es allow for the setting of the birthtime through kernel interfaces. This value is generically used for Windows createtime, but is not settable in the code today.
* Correctly calculate the offset for read&xVolker Lendecke2009-01-161-6/+11
|
* Only call sendfile_short_read() if we need it.Jeremy Allison2009-01-131-2/+6
| | | | Jeremy.
* Fix bug noticed by Volker - if sendfile returns zero thenJeremy Allison2009-01-131-2/+66
| | | | | we might have to handle a short send by filling with zeros. Jeremy.
* Fix bug #6019 File corruption in Clustered SMB/NFS environment managed via CTDBJeremy Allison2009-01-131-2/+2
| | | | Jeremy.
* s3:smbd: move all globals and static variables in globals.[ch]Stefan Metzmacher2009-01-081-7/+1
| | | | | | The goal is to move all this variables into a big context structure. metze
* s3: Allow renames of streams via NTRENAME and fix stream error codes on renameTim Prouty2009-01-041-10/+15
| | | | The test_streams_rename2 test in RAW-STREAMS verifies these changes
* Rename parent_dirname_talloc() to parent_dirname()Volker Lendecke2008-12-311-2/+2
|
* recvfile can't be used for printing so farVolker Lendecke2008-12-311-0/+4
|
* Fix an ancient uninitialized variable readVolker Lendecke2008-12-311-1/+2
| | | | The callers of open_file_ntcreate expect *psbuf to be filled correctly
* Fix bug #5986 - Editing a stream is broken (rename problems).Jeremy Allison2008-12-191-1/+3
| | | | Jeremy.
* s3: [3/3]: Fix a delete on close divergence from windows and the associated ↵Tim Prouty2008-12-091-2/+0
| | | | | | | torture test This third patch cleans up by removing all of the code that is made obsolete by the first patch. It should cause no functional changes.
* s3: Change SMB_VFS_CREATE_FILE to take a create_file_flags argumentTim Prouty2008-12-031-9/+9
| | | | | | This replaces the is_dos_path bool with a more future-proof argument. The next step is to plumb INTERNAL_OPEN_ONLY through this flag instead of overridding the oplock_request.
* s3: Modify direct callers of open_file_ntcreate and open_directory to call ↵Tim Prouty2008-12-031-47/+104
| | | | SMB_VFS_CREATE_FILE
* s3: Modify direct callers of create_file_unix_path to call SMB_VFS_CREATE_FILETim Prouty2008-12-031-2/+4
|
* s3: Add new "is_dos_path" argument to SMB_VFS_CREATE_FILETim Prouty2008-12-031-0/+3
| | | | | Now unix paths can be differentiated from windows paths so the underlying create_file implementations can convert paths correctly.
* s3: Add SMB_VFS_CREATE_FILE to the vfs layerTim Prouty2008-12-031-48/+51
| | | | Modify all callers of create_file to go through SMB_VFS_CREATE_FILE
* s3:smbd: give the correct error when trying to replace a streamStefan Metzmacher2008-12-011-0/+6
| | | | metze
* s3:smbd: correctly verify stream names to pass RAW-STREAMSStefan Metzmacher2008-12-011-1/+35
| | | | metze
* s3:smbd: '|' isn't allowed in windows filenamesStefan Metzmacher2008-12-011-1/+1
| | | | metze
* First part of fix for bug #5903 - vfs_streams_xattr breaks contents of the file.Jeremy Allison2008-11-211-1/+8
| | | | | | Restructures parts of open code so that fsp must be allocated before calling open_file_ntcreate(_internal). Also fix up file ref-counting inside files.c. Jeremy.
* Fix bug 5889. "delete veto files = no" seems to break.Jeremy Allison2008-11-111-4/+11
| | | | Jeremy.
* change CHECK_READ to use smb_request instead of inbufVolker Lendecke2008-11-081-3/+3
|
* Add construct_reply_common_req wrapperVolker Lendecke2008-11-041-2/+2
| | | | The goal is to remove the remaining direct calls to construct_reply_common.
* Remove some inbuf references by adding "cmd" to smb_requestVolker Lendecke2008-11-021-8/+6
|
* Remove the inbuf reference from map_checkpath_error()Volker Lendecke2008-11-021-4/+4
|
* Remove a bunch of direct inbuf references by adding "vwv" to smb_requestVolker Lendecke2008-11-021-109/+106
|
* Rename "inbuf" to "base_ptr" in srvstr_get_path_*Volker Lendecke2008-11-021-5/+5
|
* Remove some direct inbuf references by adding smbreq_bufremVolker Lendecke2008-11-021-2/+2
|
* Simplify params of srvstr_pull_buf_talloc()Volker Lendecke2008-11-021-9/+7
| | | | | Now that "req" is available everywhere, use it. Rename srvstr_pull_buf_talloc() to srvstr_pull_req()
* Add srvstr_get_path_req[_wcard]Volker Lendecke2008-11-021-107/+53
|
* Remove a bunch of direct inbuf references by adding "buf" to smb_requestVolker Lendecke2008-11-011-51/+42
|