summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
AgeCommit message (Collapse)AuthorFilesLines
2010-04-23s3-smbd: group print relate data in own structureSimo Sorce1-2/+2
2010-04-23Allow smb2 create requests to be cancelled.Jeremy Allison1-9/+18
Jeremy.
2010-04-22Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.Jeremy Allison1-1/+1
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-12Move to using 64-bit mid values in our internal open file database.Jeremy Allison1-6/+8
This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
2010-04-09Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison1-26/+26
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-03-15Switch over to using get_currect_XXX() accessor functions.Jeremy Allison1-3/+3
Jeremy.
2010-03-15Rever e80ceb1d7355c8c46a2ed90d5721cf367640f4e8 "Remove more uses of "extern ↵Jeremy Allison1-3/+3
struct current_user current_user;"." As requested by Volker, split this into smaller commits. Jeremy.
2010-03-12Missed a couple more uses of conn->server_info->ptok that need to be ↵Jeremy Allison1-19/+22
get_current_nttok(conn) Centralize the root check into smb1_file_se_access_check() so this is used by modules/vfs_acl_common.c also. Jeremy.
2010-03-12Remove more uses of "extern struct current_user current_user;".Jeremy Allison1-3/+3
Use accessor functions to get to this value. Tidies up much of the user context code. Volker, please look at the changes in smbd/uid.c to familiarize yourself with these changes as I think they make the logic in there cleaner. Cause smbd/posix_acls.c code to look at current user context, not stored context on the conn struct - allows correct use of these function calls under a become_root()/unbecome_root() pair. Jeremy.
2010-03-05Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison1-19/+36
Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy.
2009-12-16Add helpful debug of DACL for errors on ACL access.Jeremy Allison1-2/+10
Jeremy.
2009-12-03Make sure we're not using the old smb_fname data.Jeremy Allison1-1/+1
Jeremy.
2009-12-03Remove smb_fname duplicates that just keep the same information as in ↵Jeremy Allison1-13/+11
fsp->fsp_name. Moving towards making VFS_OPEN/VFS_MKDIR/VFS_RMDIR handle based... Jeremy.
2009-12-02Remove unneeded argument from can_set_delete_on_close(). EnsureJeremy Allison1-2/+2
can_set_delete_on_close() is correctly called before any setting of the disposition bit (clean up the do_unlink() call). Jeremy.
2009-11-25Fix crash due to uninitialized pointer (not a problem in 3.4.x or below).Jeremy Allison1-2/+1
Jeremy.
2009-11-23Remove unused code.Jeremy Allison1-46/+0
Jeremy.
2009-11-23Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"Volker Lendecke1-3/+2
This reverts commit f7b4151a64d8c6851e62255a7139fd00a5fc63a3.
2009-11-23Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke1-2/+2
This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
2009-11-23s3: Move a variable declaration to its only useVolker Lendecke1-1/+1
2009-11-21s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke1-2/+2
2009-11-21s3: Make the implicit reference to Protocol in is_in_path() explicitVolker Lendecke1-2/+3
2009-11-20Fix logic bug where high bits tests was beingJeremy Allison1-1/+1
done on both Windows and POSIX mkdirs instead of only on Windows mkdir (as intended). The variable "file_attributes" had already had FILE_FLAG_POSIX_SEMANTICS removed above in the function if it had already been set. Jeremy.
2009-11-17Remove "store create time" code, cause create time to be storedJeremy Allison1-15/+5
in the "user.DOSATTRIB" EA. From the docs: In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes. This is done in a backwards compatible way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this extended attribute by earlier versions of Samba, but they will not be able to read the create time stored there. Storing the create time separately from the normal filesystem meta-data allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem. Passes make test but will need more testing. Jeremy.
2009-10-06s3: Add access_mask to the flock VFS callAbhidnya P Chirmule1-1/+1
2009-09-04s3:smbd: Fix Coverity ID 937, REVERSE_INULLVolker Lendecke1-2/+2
2009-08-24Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison1-5/+1
Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
2009-08-21Fix bug 6529 - Offline files conflict with Vista and Office 2003Jeremy Allison1-1/+5
On filesystems that can't store less than one second timestamps, round the incoming timestamp set requests so the client can't discover that a time set request has been truncated by the filesystem. Needs backporting to 3.4, 3.3, 3.2 and (even) 3.0. Jeremy
2009-08-19s3:smbd: make smbd_check_open_rights() function non-static for use in SMB2Stefan Metzmacher1-8/+8
metze
2009-08-12Add "store create time" parameter (docs to follow)Jeremy Allison1-0/+9
that stores the create time in the user.DosTimestamps EA. Jeremy.
2009-08-10Ensure the fsp->fsp_name stat_ex struct is alwaysJeremy Allison1-0/+1
up to date after the open. Jeremy.
2009-07-21s3: Plumb smb_filename through map_open_params_to_ntcreateTim Prouty1-4/+6
2009-07-20s3: Plumb smb_filename through open_fake_fileTim Prouty1-11/+2
2009-07-20s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty1-38/+36
2009-07-14TALLOC_FREE(sd) in check_open_rights upon an errorVolker Lendecke1-0/+1
2009-07-08s3: Prepare open.c to switch fsp_name to an smb_filename structTim Prouty1-11/+15
2009-07-08s3: Change the share_mode_lock struct to store a base_name and stream_nameTim Prouty1-24/+47
2009-07-08s3: Plumb smb_filename through dos_mode() and related funtionsTim Prouty1-16/+5
2009-07-08s3: convert unix_mode to take an smb_filenameTim Prouty1-3/+3
2009-07-07s3: Migrate a few functions in open.c to take smb_filenameTim Prouty1-13/+15
2009-07-06s3: Plumb smb_filename around SMB_VFS_CHFLAGSTim Prouty1-36/+32
SMB_VFS_CHFLAGS isn't actually getting the smb_filename struct for now since it only operates on the basefile. This is the strategy for all path-based operations that will never actually operate on a stream. By clarifying the meaning of path based operations that don't take an smb_filename struct, modules that implement streams such as vfs_onefs no longer need to implement SMB_VFS_CHFLAGS to ensure it's only called on the base_name.
2009-07-03For non-existent streams we have to return OBJECT_NAME_NOT_FOUNDVolker Lendecke1-1/+1
See the STREAMERROR s3 torture test. Jeremy, Tim, please check!
2009-07-01s3:smbd: remove unused variables passed to parent_dirname()Stefan Metzmacher1-2/+1
metze
2009-06-25s3: Remove get_full_smb_filename() from open_directory()Tim Prouty1-19/+9
This is possible because open_directory() returns an error if the fname is a stream, so the base_name can be used.
2009-06-25s3: Change set_ea() and its callers to use smb_filenameTim Prouty1-9/+2
2009-06-25Fix bug #6506 - SMBD server doesn't set EAs when a file is overwritten in ↵Jeremy Allison1-1/+2
NT_TRANSACT_CREATE. Reported and verified by Long Li <longli@microsoft.com> Jeremy.
2009-06-24s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty1-53/+73
This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed.
2009-06-19Fix coverity #676. Forward NULL.Jeremy Allison1-0/+6
Jeremy.
2009-06-18Add some const to the stat struct in the dosmode calls.Jeremy Allison1-1/+0
Fix a couple more unix_convert uses to filename_convert. Fix bug in acl_group_override() where an uninitialized struct could be used. Move unix_convert with wildcard use in SMBsearch reply to boilerplate code. Jeremy.
2009-06-17s3: Change SMB_VFS_OPEN to take an smb_filename structTim Prouty1-4/+4
This was a little messy because of all of the vfs modules I had to touch. Most of them were pretty straight forward, but the streams modules required a little attention to handle smb_filename. Since the use of smb_filename enables the vfs modules to access the raw, over-the-wire stream, a little bit of the handling that was being done by split_ntfs_stream_name has now been shifted into the individual stream modules. It may be a little more code, but overall it gives more flexibility to the streams modules, while also allowing correct stream handling.
2009-06-17s3: Plumb smb_filename from create_file all of the way down to fd_openTim Prouty1-190/+245
I used the smb_filename struct everywhere that was feasible for the first pass. There are still some places in this path that need to be changed to use smb_filename, but this is a good start. I also: - Removed fname/path arguments from a few functions that weren't really using them. - Added a utility function for detecting whether an smb_filename is a stream.