Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
delete file
This fixes the generic rename/delete problem for 3.3.0 and above.
Fixed slightly differently to discussions, user viewable modified
ACLs are not a good idea :-).
Jeremy.
|
|
The new create disposition test in smbtorture RAW-STREAMS verifies
this fix.
|
|
The goal is to move all this variables into a big context structure.
metze
|
|
|
|
|
|
The callers of open_file_ntcreate expect *psbuf to be filled correctly
|
|
Jeremy.
|
|
It doesn't really make sense to check the length of a not-yet-allocated string
:-)
Volker
|
|
Windows returns NT_STATUS_FILE_IS_A_DIRECTORY, as does Samba 3.0. 3.2 and
following returned NT_STATUS_INVALID_PARAMETER which is wrong.
Before I converted reply_open_and_X to create_file() we called
open_file_ntcreate directly. Passing through open&X for a filename that exists
as a directory ends up in open_directory after having tried open_file_ntcreate.
Some check in there returns NT_STATUS_INVALID_PARAMETER. With this additional
FILE_NON_DIRECTORY_FILE flag we get the correct error message back from
create_file_unixpath before trying open_directory().
Survives make test, but as this also touches the other open variants I would
like others to review this.
Volker
|
|
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.
|
|
torture test
smbtorture4's BASE-DELETE:deltest17 was failing against win2k8,
win2k3, and winXPsp2 but passing against samba.
deltest17 does the following:
1. open file -> file is created
2. closes file
3. open file with DOC -> fnum1
4. check that DOC is not reported as being set from fnum1
5. opens file again Read Only -> fnum2
6. check that DOC is not reported as being set from either file handle
7. close fnum1 (the file handle that requested DOC to be set)
8. check if DOC is reported as being set from fnum2
* This is where windows and samba begin to diverge. Windows
reports that the DOC bit is set, while samba reports that it is not set.
9. close fnum2 (the last remaining open handle for the file)
10.See if the file has been deleted.
* On samba the file still exists. On windows the file was deleted.
The way open_file_ntcreate is written now, if an open has the DOC bit
set on the wire, DOC (fsp->initial_delete_on_close) is not set unless:
a. the open creates the file, or b. there is an open file handle with
a share_entry in the struct lck that has the
SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE bit set (let's call it
SM_AIDOC).
My understanding of SM_AIDOC is that it was added to differentiate
between DOC being set on an open that creates a file vs an open that
opens an existing. As described in step 8/10 above, it appears that
windows does not make this differentiation.
To resolve this issue there are three patches. This first patch is a
simple proof of concept change that is sufficient to fix the bug. It
removes the differentiation in open_file_ntcreate, and updates
deltest17 to allow it to pass against win2k3/xp. This makes
open_file_ntcreate more closely match the semantics in open_directory
and rename_internals_fsp. This change also does not break any other
tests in BASE-DELETE or "make test". Specifically test deltest20b
which verifies the CIFSFS rename DOC semantics still passes :).
|
|
|
|
|
|
This allows vfs modules that implement SMB_VFS_CREATE_FILE to access
some of the useful utility functions.
|
|
|
|
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.
|
|
Also removed open_file_ntcreate/open_file from proto.h so they can no
longer be called directly.
|
|
|
|
SMB_VFS_CREATE_FILE
|
|
|
|
Now unix paths can be differentiated from windows paths so the
underlying create_file implementations can convert paths correctly.
|
|
Modify all callers of create_file to go through SMB_VFS_CREATE_FILE
|
|
metze
|
|
metze
|
|
We only check the filename of the basefile now.
metze
|
|
caused us to
run into kernel oplocks on an open for a stream inside a file with stream_xattr module. On
opening the base_fsp we must break existing oplocks." as it broke make test.
Jeremy.
|
|
stream inside a file with stream_xattr module. On opening the base_fsp we must break existing oplocks.
Jeremy.
|
|
the file
(also fix a bad merge of the previous patch from 3.3).
Jeremy.
|
|
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.
|
|
default ACL in place.
Jeremy.
|
|
Jeremy.
|
|
some common code between open_file_ntcreate() and open_directory().
Jeremy.
|
|
Jeremy.
|
|
Jeremy.
|
|
module. Inheritance fails at the moment though.
Jeremy.
|
|
|
|
on the way to get rid of chain_fsp
|
|
Goal is to remove the chain_fsp global variable
|
|
The goal is to get rid of the chain_fsp global variable
|
|
to specific bits every time a security descriptor is set. The S4 torture suite proves
that generic bits are not returned when querying an ACL set using them (ie. only
the specific bits are stored on disk).
Jeremy.
|
|
We don't need to deny a DELETE open on a readonly file (I'm also adding a s4
torture test for this), the set_file_disposition call will return
NT_STATUS_CANNOT_DELETE if the delete-on-close bit is set
on a readonly file (and we already do this).
Jeremy.
|
|
reported by Regan Heath <Regan.Heath@BridgeHeadSoftware.com>.
Jeremy.
|
|
Some of the bits generate INVALID_PARAMETER and some bits
are ignored when they come from a client, that's why we need
to use bits from the ignored range for our internal usage.
metze
(This used to be commit 7b4c8a4e39f310eb450918fa841b0ea1b4af19f7)
|
|
then don't allow create_file() to call down to
create_file_unixpath() with a stream name.
Jeremy.
(This used to be commit 167d611b525db6d103a7f83fd5a19792be4e7745)
|
|
(This used to be commit 510f45d01a19ce1c226755ac42a328241098b2e0)
|
|
No functional change, this is a preparation for more current_user ref removal
(This used to be commit dcaedf345e62ab74ea87f0a3fa1e3199c75c5445)
|
|
current_user_info was "only" used in a debug msg, and current_user.ut.uid is
also available via conn->server_info
(This used to be commit d0386914ff0f7b0f1edc3302fdc6a25f211712fa)
|
|
The current vuid is not only available there, it is also in the current
smb_request structure.
(This used to be commit c8fd5eef32a86888c7a28317f0fdf717a26b7d4c)
|
|
(This used to be commit 368454a27cb53a408ec416cbf37235b304592fb5)
|