summaryrefslogtreecommitdiffstats
path: root/source3/smbd/open.c
Commit message (Collapse)AuthorAgeFilesLines
* s3: only include gen_ndr headers where needed.Günther Deschner2010-05-061-0/+1
| | | | | | | | | | | | | | | | | This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
* s3-smbd: group print relate data in own structureSimo Sorce2010-04-231-2/+2
|
* Allow smb2 create requests to be cancelled.Jeremy Allison2010-04-231-9/+18
| | | | Jeremy.
* Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.Jeremy Allison2010-04-221-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.
* Move to using 64-bit mid values in our internal open file database.Jeremy Allison2010-04-121-6/+8
| | | | | | | This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
* Plumb SMB2 stubs into all the places we defer SMB1 operations.Jeremy Allison2010-04-091-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.
* Switch over to using get_currect_XXX() accessor functions.Jeremy Allison2010-03-151-3/+3
| | | | Jeremy.
* Rever e80ceb1d7355c8c46a2ed90d5721cf367640f4e8 "Remove more uses of "extern ↵Jeremy Allison2010-03-151-3/+3
| | | | | | | | struct current_user current_user;"." As requested by Volker, split this into smaller commits. Jeremy.
* Missed a couple more uses of conn->server_info->ptok that need to be ↵Jeremy Allison2010-03-121-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.
* Remove more uses of "extern struct current_user current_user;".Jeremy Allison2010-03-121-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.
* Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison2010-03-051-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.
* Add helpful debug of DACL for errors on ACL access.Jeremy Allison2009-12-161-2/+10
| | | | Jeremy.
* Make sure we're not using the old smb_fname data.Jeremy Allison2009-12-031-1/+1
| | | | Jeremy.
* Remove smb_fname duplicates that just keep the same information as in ↵Jeremy Allison2009-12-031-13/+11
| | | | | | | | fsp->fsp_name. Moving towards making VFS_OPEN/VFS_MKDIR/VFS_RMDIR handle based... Jeremy.
* Remove unneeded argument from can_set_delete_on_close(). EnsureJeremy Allison2009-12-021-2/+2
| | | | | | can_set_delete_on_close() is correctly called before any setting of the disposition bit (clean up the do_unlink() call). Jeremy.
* Fix crash due to uninitialized pointer (not a problem in 3.4.x or below).Jeremy Allison2009-11-251-2/+1
| | | | Jeremy.
* Remove unused code.Jeremy Allison2009-11-231-46/+0
| | | | Jeremy.
* Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"Volker Lendecke2009-11-231-3/+2
| | | | This reverts commit f7b4151a64d8c6851e62255a7139fd00a5fc63a3.
* Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke2009-11-231-2/+2
| | | | This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
* s3: Move a variable declaration to its only useVolker Lendecke2009-11-231-1/+1
|
* s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke2009-11-211-2/+2
|
* s3: Make the implicit reference to Protocol in is_in_path() explicitVolker Lendecke2009-11-211-2/+3
|
* Fix logic bug where high bits tests was beingJeremy Allison2009-11-201-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.
* Remove "store create time" code, cause create time to be storedJeremy Allison2009-11-171-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.
* s3: Add access_mask to the flock VFS callAbhidnya P Chirmule2009-10-061-1/+1
|
* s3:smbd: Fix Coverity ID 937, REVERSE_INULLVolker Lendecke2009-09-041-2/+2
|
* Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison2009-08-241-5/+1
| | | | | | | | Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
* Fix bug 6529 - Offline files conflict with Vista and Office 2003Jeremy Allison2009-08-211-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
* s3:smbd: make smbd_check_open_rights() function non-static for use in SMB2Stefan Metzmacher2009-08-191-8/+8
| | | | metze
* Add "store create time" parameter (docs to follow)Jeremy Allison2009-08-121-0/+9
| | | | | that stores the create time in the user.DosTimestamps EA. Jeremy.
* Ensure the fsp->fsp_name stat_ex struct is alwaysJeremy Allison2009-08-101-0/+1
| | | | | up to date after the open. Jeremy.
* s3: Plumb smb_filename through map_open_params_to_ntcreateTim Prouty2009-07-211-4/+6
|
* s3: Plumb smb_filename through open_fake_fileTim Prouty2009-07-201-11/+2
|
* s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty2009-07-201-38/+36
|
* TALLOC_FREE(sd) in check_open_rights upon an errorVolker Lendecke2009-07-141-0/+1
|
* s3: Prepare open.c to switch fsp_name to an smb_filename structTim Prouty2009-07-081-11/+15
|
* s3: Change the share_mode_lock struct to store a base_name and stream_nameTim Prouty2009-07-081-24/+47
|
* s3: Plumb smb_filename through dos_mode() and related funtionsTim Prouty2009-07-081-16/+5
|
* s3: convert unix_mode to take an smb_filenameTim Prouty2009-07-081-3/+3
|
* s3: Migrate a few functions in open.c to take smb_filenameTim Prouty2009-07-071-13/+15
|
* s3: Plumb smb_filename around SMB_VFS_CHFLAGSTim Prouty2009-07-061-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.
* For non-existent streams we have to return OBJECT_NAME_NOT_FOUNDVolker Lendecke2009-07-031-1/+1
| | | | | | See the STREAMERROR s3 torture test. Jeremy, Tim, please check!
* s3:smbd: remove unused variables passed to parent_dirname()Stefan Metzmacher2009-07-011-2/+1
| | | | metze
* s3: Remove get_full_smb_filename() from open_directory()Tim Prouty2009-06-251-19/+9
| | | | | This is possible because open_directory() returns an error if the fname is a stream, so the base_name can be used.
* s3: Change set_ea() and its callers to use smb_filenameTim Prouty2009-06-251-9/+2
|
* Fix bug #6506 - SMBD server doesn't set EAs when a file is overwritten in ↵Jeremy Allison2009-06-251-1/+2
| | | | | | | NT_TRANSACT_CREATE. Reported and verified by Long Li <longli@microsoft.com> Jeremy.
* s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty2009-06-241-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.
* Fix coverity #676. Forward NULL.Jeremy Allison2009-06-191-0/+6
| | | | Jeremy.
* Add some const to the stat struct in the dosmode calls.Jeremy Allison2009-06-181-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.
* s3: Change SMB_VFS_OPEN to take an smb_filename structTim Prouty2009-06-171-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.