| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ok, here's the fix for the write times breakage
with the new tests in S4 smbtorture.
The key is keeping in the share mode struct
the "old_file_time" as the real write time,
set by all the write and allocation calls,
and the "changed_write_time" as the "sticky"
write time - set by the SET_FILE_TIME calls.
We can set them independently (although I
kept the optimization of not setting the
"old_file_time" is a "changed_write_time"
was already set, as we'll never see it.
This allows us to update the write time
immediately on the SMBwrite truncate case,
SET_END_OF_FILE and SET_ALLOCATION_SIZE calls,
whilst still have the 2 second delay on the
"normal" SMBwrite, SMBwriteX calls.
I think in a subsequent patch I'd like to
change the name of these from "old_file_time"
to "write_time" and "changed_write_time" to
"sticky_write_time" to make this clearer.
I think I also fixed a bug in Metze's original
code in that once a write timestamp had been
set from a "normal" SMBwriteX call the fsp->update_write_time_triggered
variable was set and then never reset - thus
meaning the write timestamp would never get
updated again on subsequent SMBwriteX's.
The new code checks the update_write_time_event
event instead, and doesn't update is there's
an event already scheduled.
Metze especially, please check this over for
your understanding.
Jeremy.
|
| |
|
|
|
|
|
|
|
| |
support it (*BSD and MacOSX).
Should have done this ages ago, sorry.
Jeremy.
|
|
|
|
| |
cannot do sendfile for this file"
|
|
|
|
|
|
| |
xp/2003 explorer freezes browsing shares on samba ipv6 hosts. Caused by missing
reply packet to SMB printclose packet.
Jeremy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
one of our virtualised functions, such as db_open(), but error is only
set when a system call fails, and it is not uncommon for us to fail a
function internally without ever making a system call. That led to us
passing back success when a function had in fact failed.
I found two places where we relied on map_nt_error_from_unix()
returning success when errno==0, but lots and lots of places where we
relied on the reverse, so I fixed those two places.
map_nt_error_from_unix() will now always return an error, returning
NT_STATUS_UNSUCCESSFUL if errno is 0
(cherry picked from commit 69d40ca4c1af925d4b0e59ddc69ef8c26e6501d1)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
case files. Reported by Daniel Johnson <Progman2000@usa.net>.
The smb_set_file_time() call to set the filetimes is failing
because it's using the unmodified name passed in by the
client, not the modified name (matching case on the
disk) that comes out from create_file().
Jeremy.
|
| |
|
|
|
|
| |
This involved replacing the CHECK_NTQUOTA_HANDLE_OK macro by a function.
|
| |
|
|
|
|
|
| |
fsp_belongs_conn only used the vuid struct member anyway, and this is available
in the smb_request structure as well.
|
|
|
|
|
| |
check_fsp only used the vuid struct member anyway, and this is available in the
smb_request structure as well.
|
|
|
|
|
|
| |
How ever could this compile ?
Guenther
|
|
|
|
| |
metze
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now never call file_ntimes() directly, every update
is done via smb_set_file_time().
This let samba3 pass the BASE-DELAYWRITE test.
The write time is only updated 2 seconds after the
first write() on any open handle to the current time
(not the time of the first write).
Each handle which had write requests updates the write
time to the current time on close().
If the write time is set explicit via setfileinfo or setpathinfo
the write time is visible directly and a following close
on the same handle doesn't update the write time.
metze
|
|
|
|
|
|
|
|
|
| |
This is needed to implement the strange write time update
logic later. We need to store 2 time timestamps to
distinguish between the time the file system had before
the first client opened the file and a forced timestamp update.
metze
|
|
|
|
| |
Jeremy.
|
|
|
|
|
| |
as sendfile isn't implemented in the streams vfs modules yet.
Jeremy.
|
| |
|
|
|
|
|
| |
connection paths are equal, not just the conn structs themselves.
Jeremy.
|
|
|
|
|
| |
BATCH20 and RAW-RENAME.
Jeremy.
|
|
|
|
|
|
|
|
| |
create_file calls unix_convert internally, so modifies fname. So we can't use
"fname" after create_file has returned. Use fsp->fsp_name instead.
Found during a lengthy debugging session with Karolin testing the xattr_tdb
module...
|
|
|
|
| |
Karolin
|
|
|
|
|
|
| |
This doesn't matter for most applications, but for offline files it matters as it allows you to set
files offline from windows clients even with HSM systems that refuse to offline newly created files.
Merge from Tridge's v3-0-ctdb tree.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The logic was wrong: A "SMB_VFS_AIO_FORCE()==False" disabled async I/O, whereas
a "SMB_VFS_AIO_FORCE()==True" should enforce it regardless of other settings.
Alexander, please check!
|
| |
|
|
|
|
|
| |
This is a hot code path, and if it has a :, the name will be split later on
anyway.
|
|
|
|
|
|
|
|
|
|
| |
This is the core of the streams support. The main change is that in
files_struct there is now a base_fsp pointer that holds the main file open
while a stream is open. This is necessary to get the rather strange delete
semantics right: You can't delete the main file while a stream is open without
FILE_SHARE_DELETE, and while a stream is open a successful unlink of the main
file leads to DELETE_PENDING for all further access on the main file or any
stream.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operations to VFS
Offline files support and remote storage are for allowing communication with
backup and archiving tools that mark files moved to a tape library as offline.
We translate this info into corresponding CIFS offline file attribute and
mark an exported volume as remote storage.
Async I/O force is to allow selective redirection of I/O operations to asynchronous
processing in case it is viable at VFS module discretion. It is needed for
proper handling of offline files as performing regular I/O on offline file will
block smbd.
Signed-off-by: Alexander Bokovoy <ab@samba.org>
|
|
|
|
| |
This cuts some mallocs on NtCreate&X
|
|
|
|
| |
Michael
|
| |
|
|
|
|
| |
Jeremy.
|
|
|
|
| |
Michael
|
|
|
|
| |
Michael
|
|
|
|
|
|
| |
an extra parameter. This cleans up quite a few places
we were passing it around without needing it.
Jeremy.
|
|
|
|
|
|
| |
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
negotiation works.
Jeremy.
|
| |
|
|
|
|
|
|
|
| |
(128k). Add debug error messages so we can see why
writeX large is denied. Ensure we don't allow recvfile
writes on IPC$.
Jeremy.
|
|
|
|
|
|
|
|
|
|
| |
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
|
|
|
|
|
|
|
| |
the incoming buffer in the non-signed case. Speeds
up writes by over 10% or so. Complete the server
recvfile implementation.
Jeremy.
|