Age | Commit message (Collapse) | Author | Files | Lines |
|
Jeremy.
|
|
Confirmed by reporters.
Jeremy.
|
|
This eliminates the last direct caller of create_file_unixpath
|
|
if admin user.
Jeremy.
|
|
delete file (directory fix).
Jeremy.
|
|
Jeremy.
|
|
- Attempt to use syscalls to determine max-open-files value.
- Add in periodic logging when max file limit reached
|
|
This extends the file_id struct to add an additional generic uint64_t
field: extid. For backwards compatibility with dev/inodes stored in
xattr_tdbs and acl_tdbs, the ext id is ignored for these databases.
This patch should cause no functional change on systems that don't use
SMB_VFS_FILE_ID_CREATE to set the extid.
Existing code that uses the smb_share_mode library will need to be
updated to be compatibile with the new extid.
|
|
Do not attempt to delete streams on a truncating open, if the name
we're opening is itself a stream.
Port 176e8857203944bc332844b700749120ce90c891 to standard open path
|
|
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.
|