summaryrefslogtreecommitdiff
path: root/source3/modules/onefs_open.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-16Ensure we always write the correct incoming mid into the share modeJeremy Allison1-2/+4
table entries.
2011-04-29s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCHAndrew Bartlett1-3/+3
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-29s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIRAndrew Bartlett1-1/+1
This means we use just one constant for this file attribute. Andrew Bartlett
2011-04-05Fix bug #7080 - Quota only shown when logged as root.Jeremy Allison1-2/+2
Remove the final incorrect uses of conn->session_info->utok.uid. When we're in the "admin users" list, then this value is not set to zero. Inspired by the comment on this bug by Dmitry Butskoy <dmitry@butskoy.name>. I'll create a different fix for 3.5.x. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Apr 5 21:53:59 CEST 2011 on sn-devel-104
2011-03-30s3-vfs: include smbd/smbd.h in vfs modules.Günther Deschner1-0/+1
Guenther
2011-02-23Fix bug 7950 - Samba 3.5.x fails BASE-CREATEX_SHAREMODES_DIR smbtorture4 testJeremy Allison1-1/+3
We need to revalidate the pathname once re-constructed from a root fsp. Jeremy.
2011-02-22s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_infoAndrew Bartlett1-3/+3
These variables, of type struct auth_serversupplied_info were poorly named when added into 2001, and in good consistant practice, this has extended all over the codebase in the years since. The structure is also not ideal for it's current purpose. Originally intended to convey the results of the authentication modules, it really describes all the essential attributes of a session. This rename will reduce the volume of a future patch to replaced these with a struct auth_session_info, with auth_serversupplied_info confined to the lower levels of the auth subsystem, and then eliminated. (The new structure will be the output of create_local_token(), and the change in struct definition will ensure that this is always run, populating local groups and privileges). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-07-27s3-smbd: Migrated to new spoolss functions for printing.Simo Sorce1-2/+2
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-05-13Be more forgiving on client oplock break failure (as Windows does). Remove a ↵Jeremy Allison1-1/+1
global. Jeremy.
2010-05-13Treat an open of stream ::$DATA as an open of the base file.Jeremy Allison1-0/+27
This fixes a class of SMB_ASSERT failures when doing stream tests. Jeremy.
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/+2
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-3/+4
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-34/+34
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-05Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison1-8/+14
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-03Remove smb_fname duplicates that just keep the same information as in ↵Jeremy Allison1-7/+0
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-23Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"Volker Lendecke1-2/+1
This reverts commit f7b4151a64d8c6851e62255a7139fd00a5fc63a3.
2009-11-21s3: Make the implicit reference to Protocol in is_in_path() explicitVolker Lendecke1-1/+2
2009-11-17Remove "store create time" code, cause create time to be storedJeremy Allison1-1/+1
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-24s3 onefs: Fix 1 second share mode delay handlingSteven Danneman1-3/+33
When racing to the open and loosing we may get a share_mode violation. In this case handle the 1-second delay via a defferred open properly. This requires us to retrieve the share_mode_lock before deferring open so we don't dereference a NULL pointer assuming we already had the lck because we were the first opener.
2009-09-24s3 onefs: Fix a race condition exists in onefs_open.c between multiple opens ↵Steven Danneman1-5/+19
to the same file. Two openers can stat a file at the same time, see that it doesn't exist, and then both race to open it first. The loser will enter onefs_open_file_ntcreate believing that the file doesnt exist, and thus skip any current state lookups for that file. This includes setting the file_id, and having a valid stat buffer. Normally on first create the file_id will be set during the open, but the second opener in this scenario may fail the open (oplock/share mode) and file_id will not be set, nor will the stat buffer be valid. In the error paths of this patch, we now double check that the file_id and the stat buffer are valid before doing other operations.
2009-09-24s3 onefs: Add some debugging/asserts to give more info when there is bad ↵Zack Kirsch1-9/+24
deferred open state. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-07-20s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules.Tim Prouty1-8/+10
2009-07-08s3: Prepare open.c to switch fsp_name to an smb_filename structTim Prouty1-12/+15
2009-07-08s3: Change the share_mode_lock struct to store a base_name and stream_nameTim Prouty1-15/+7
2009-07-08s3: Plumb smb_filename through dos_mode() and related funtionsTim Prouty1-2/+1
2009-07-08s3: convert unix_mode to take an smb_filenameTim Prouty1-3/+3
2009-07-01s3:onefs_open: remove unused variable passed to parent_dirname()Stefan Metzmacher1-2/+1
metze
2009-06-25s3 onefs: Plumb smb_filename through onefs createfile pathTim Prouty1-176/+200
2009-06-17s3 onefs: Remove dfs resolution from create_file() now that it's being done ↵Tim Prouty1-22/+1
at a higher level
2009-06-17s3: Plumb smb_filename from create_file all of the way down to fd_openTim Prouty1-7/+2
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.
2009-06-15s3 onefs: Change onefs modules to use the new createfile apiTim Prouty1-27/+13
2009-06-10s3: Remove unix_convert handling from createfile implementationsTim Prouty1-30/+4
2009-05-28s3 onefs: update the onefs module to be compliant with stat_exTim Prouty1-19/+19
2009-05-21s3 onefs: Fix invalid argument from the unix_convert smb_filename struct patchTim Prouty1-1/+1
2009-05-20s3: Change unix_convert (and its callers) to use struct smb_filenameTim Prouty1-2/+13
This is the first of a series of patches that change path based operations to operate on a struct smb_filename instead of a char *. This same concept already exists in source4. My goals for this series of patches are to eventually: 1) Solve the stream vs. posix filename that contains a colon ambiguity that currently exists. 2) Make unix_convert the only function that parses the stream name. 3) Clean up the unix_convert API. 4) Change all path based vfs operation to take a struct smb_filename. 5) Make is_ntfs_stream_name() a constant operation that can simply check the state of struct smb_filename rather than re-parse the filename. 6) Eliminate the need for split_ntfs_stream_name() to exist. My strategy is to start from the inside at unix_convert() and work my way out through the vfs layer, call by call. This first patch does just that, by changing unix_convert and all of its callers to operate on struct smb_filename. Since this is such a large change, I plan on pushing the patches in phases, where each phase keeps full compatibility and passes make test. The API of unix_convert has been simplified from: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, bool allow_wcard_last_component, char **pp_conv_path, char **pp_saved_last_component, SMB_STRUCT_STAT *pst) to: NTSTATUS unix_convert(TALLOC_CTX *ctx, connection_struct *conn, const char *orig_path, struct smb_filename *smb_fname, uint32_t ucf_flags) Currently the smb_filename struct looks like: struct smb_filename { char *base_name; char *stream_name; char *original_lcomp; SMB_STRUCT_STAT st; }; One key point here is the decision to break up the base_name and stream_name. I have introduced a helper function called get_full_smb_filename() that takes an smb_filename struct and allocates the full_name. I changed the callers of unix_convert() to subsequently call get_full_smb_filename() for the time being, but I plan to eventually eliminate get_full_smb_filename().
2009-05-19s3 onefs: Removing an incorrect TALLOC_FREEAravind Srinivasan1-1/+0
Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-05-12s3 onefs: Fix ignore sacl parameterTim Prouty1-5/+5
2009-04-01s3 onefs: Quiet a log message about oplocks being requested on streamsTim Prouty1-21/+16
2009-03-31s3 onefs: Add missing newlines to debug statements in the onefs moduleTim Prouty1-4/+5
2009-03-25Add missing newlines to debug statementsSteven Danneman1-2/+2
2009-03-23s3 OneFS: Remove usage of non-existant functionTim Prouty1-9/+0
The function was removed in: c16c90a1cb3b0e2ceadd3dea835a4e69acfc2fae
2009-03-04s3 OneFS: Use the public open_streams_for_deleteTim Prouty1-113/+0
2009-03-03s3 OneFS: Add parameter to ignore streamsTim Prouty1-1/+1
2009-03-01s3 OneFS: Refactor config code and cleanup includesTim Prouty1-0/+3
2009-02-18s3: Fix OneFS bug opening streams with truncating dispositionAravind Srinivasan1-1/+1
Do not attempt to delete streams on a truncating open, if the name we're opening is itself a stream
2009-02-12s3 onefs: rename custom parameter to plural to match previous usageSteven Danneman1-1/+1