Age | Commit message (Collapse) | Author | Files | Lines |
|
This fixes smbd from crashing all the time.
Jeremy, Volker, please check.
Guenther
|
|
|
|
Jeremy.
|
|
Guenther
|
|
Lookup the EA and Stream status on CreateX.
Jeremy.
|
|
This is needed to support some special app I've just come across where I had to
set the SPARSE_FILES bit (0x40) to make it work against Samba at all. There
might be others to fake. This is definitely a "Don't touch if you don't know
what you're doing" thing, so I decided to make this an undocumented parametric
parameter.
I know this sucks, so feel free to beat me up on this. But I don't think it
will hurt.
|
|
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed
from sys_read() to sys_recv(). read_socket_with_timeout() is called
with non-fd's (with a pty in chgpasswd.c and with a disk file in
lib/dbwrap_file.c via read_data()). recv works for the disk file,
but not the pty. Change the name of read_socket_with_timeout() to
read_fd_with_timeout() to make this clear (and add comments).
Jeremy.
|
|
The kernel may return a short read, so we must use read_data() to make sure we
read off the full buffer. If somethign bad happens we also need to kill the
inotify watch because the filedescriptor will return out of sync structures if
we read only part of the data.
|
|
|
|
oplocks.
This one is subtle. There is a race condition where a signal can be
queued for oplock break, and then the file can be closed by the client
before the signal can be processed. Currently if this occurs we panic
(we can't match an incoming signal fd with a fsp pointer). Simply log
the error (at debug level 10 right now, might be too much) and then
return without processing the break request. It looks like there is
another race condition with this fix, but here's why it won't happen.
If the signal was pending (caused by a kernel oplock break from a
local file open), and the client closed the file and then re-opened
another file which happened to use the same file descriptor as the
file just closed, then theoretically the oplock break requests could
be processed on the wrong fd. Here's why this should be very rare..
Processing a pending signal always take precedence over an incoming
network request, so as long as the client close request is non-chained
then the break signal should always be harmlessly processed *before*
the open can be called. If the open is chained onto the close, and
the fd on the new open is the same as the old closed fd, then it's
possible this race will occur. However, all that will happen is that
we'll lose the oplock on this file. A shame, but not a fatal event.
Jeremy.
|
|
This vop is designed to work in tandem with SMB_VFS_READDIR to allow
vfs modules to make modifications to arbitrary filenames before
they're consumed by callers. Subsequently the core directory
enumeration code in smbd is now changed to free the memory that may be
allocated in a module. This vop enables the new version of catia in
the following patch.
Signed-off-by: Tim Prouty <tprouty@samba.org>
|
|
metze
|
|
metze
|
|
We need to allow "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION" to pass
check_path(), so that the Quota Dialog works.
metze
|
|
This is a small performance optimization. Instead of opening the tdb
on every smb connection in the forked child process, we now open it in
the parent and share the fd.
This also reduces the total fd usage in the system.
|
|
Should help track if we get invoked with an invalid fd from
the signal handler.
Jeremy.
|
|
Office 2003.
Confirmation from reporter that this fixes the issue in master on ext3/ext4.
Back-ports to follow.
Jeremy.
|
|
ext4 may be able to store ns timestamps, but the only API to *set* timestamps
takes usec, not nsec. Round to usec on set requests.
Jeremy.
|
|
share.
Jeremy.
|
|
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
|
|
Jeremy.
|
|
metze
|
|
metze
|
|
This can we used by SMB2, the key difference between
SMB1 and SMB2 is that with SMB2 entries are aligned
to 8 bytes and there's no padding at the end of the last entry.
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
This function will be used by the SMB2 notify code.
metze
|
|
metze
|
|
metze
|
|
Maybe there's no dynamic part on the wire.
metze
|
|
in smbd_do_qfilepathinfo(). update_stat_ex_mtime() modifies the
stat struct inside the smb_fname so don't make a copy of that
stat struct, use it directly - it's meant to be updated and
represent the state of the file we're returning.
Jeremy.
|
|
that stores the create time in the user.DosTimestamps EA.
Jeremy.
|
|
This will hold code that's shared between source3 and source4.
metze
|
|
string before
metze
|
|
metze
|
|
metze
|
|
metze
|
|
up to date after the open.
Jeremy.
|
|
through functions. Will aid in making us pass RAW-SETFILEINFO.
Jeremy.
|
|
metze
|
|
This should avoid confusion between smbd_server_connection
and connection_struct variables.
metze
|
|
layer (as it's done in onefs). This simplifies greatly the
code in smb_set_file_time() w.r.t. changenotify messages.
Jeremy.
|
|
"change time" has no notify message, so don't send anything
out when we change it. Use FILE_NOTIFY_CHANGE_CREATION correctly
when changing the create time.
Jeremy.
|
|
So that we can reuse it for SMB2 Find.
metze
|
|
metze
|
|
They're both only used in the context of a function,
so we can make them stack variables.
metze
|
|
metze
|
|
metze
|