summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2009-09-18s3-smbd: fix get_ea_names_from_file() and check for pnames pointer.Günther Deschner1-1/+3
This fixes smbd from crashing all the time. Jeremy, Volker, please check. Guenther
2009-09-18s3:smbd: Fix an inappropriate pointer return in a bool fnVolker Lendecke1-1/+1
2009-09-17We now pass the Microsoft SMB2 fileio test with EA's and streams...Jeremy Allison4-5/+68
Jeremy.
2009-09-17spnego: share spnego_parse.Günther Deschner4-0/+4
Guenther
2009-09-14Fix bug 6494 - Incorrect FileStatus returned in NT_CREATE_ANDX.Jeremy Allison2-3/+27
Lookup the EA and Stream status on CreateX. Jeremy.
2009-09-09s3:smbd: Add a "hidden" parameter "share:fake_fscaps"Volker Lendecke1-0/+3
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.
2009-09-06Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".Jeremy Allison2-3/+3
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.
2009-09-05Check we read off the compelte event from inotifySimo Sorce1-2/+8
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.
2009-09-04s3:smbd: Fix Coverity ID 937, REVERSE_INULLVolker Lendecke1-2/+2
2009-09-03Hopefully last part of the fix for bug 6651 - smbd SIGSEGV when breaking ↵Jeremy Allison1-2/+2
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.
2009-08-28s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAMEAravind Srinivasan5-24/+92
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>
2009-08-27s3:smbd: teach filename_convert() about fake files (2nd fix for bug #6642)Stefan Metzmacher1-0/+11
metze
2009-08-27s3:smbd: add is_fake_file_path() that takes only the raw path as stringStefan Metzmacher1-14/+22
metze
2009-08-27s3:streams: check for :$DATA only in the backend (fix bug #6642)Stefan Metzmacher1-3/+0
We need to allow "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION" to pass check_path(), so that the Quota Dialog works. metze
2009-08-26s3/smbd: open the share_info.tdb on startup instead of tconxSteven Danneman1-0/+9
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.
2009-08-24Help debug for bug 6651 - smbd SIGSEGV when breaking oplocks.Jeremy Allison1-0/+4
Should help track if we get invoked with an invalid fd from the signal handler. Jeremy.
2009-08-24Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison7-94/+62
Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
2009-08-24Second part of fix for 6529 - Offline files conflict with Vista and Office 2003.Jeremy Allison1-0/+11
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.
2009-08-21Log debug message when hires timestamps are available on theJeremy Allison1-0/+4
share. Jeremy.
2009-08-21Fix bug 6529 - Offline files conflict with Vista and Office 2003Jeremy Allison3-1/+27
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
2009-08-21Fix coverity CID: 932 - forward null.Jeremy Allison1-2/+4
Jeremy.
2009-08-19s3:smbd: implement SMB2 Find (Query Directory)Stefan Metzmacher1-1/+197
metze
2009-08-19s3:smbd: store a dirptr on the files_struct for SMB2 Query DirectoryStefan Metzmacher1-0/+4
metze
2009-08-19s3:smbd: add a generic smbd_dirptr_lanman2_entry() functionStefan Metzmacher2-46/+214
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
2009-08-19s3:smbd: implement all SMB2 Create contexts except "ExtA"Stefan Metzmacher1-8/+217
metze
2009-08-19s3:smbd: make smbd_check_open_rights() function non-static for use in SMB2Stefan Metzmacher2-8/+13
metze
2009-08-19s3:smbd: parse context blobs in SMB2 CreateStefan Metzmacher1-48/+150
metze
2009-08-17s3:smbd: add support for canceling SMB2 Notify calls.Stefan Metzmacher1-0/+17
metze
2009-08-17s3:smbd: add smbd_notify_cancel_by_smbreq()Stefan Metzmacher2-0/+23
This function will be used by the SMB2 notify code. metze
2009-08-17s3:smbd: implement SMB2 Cancel correctly.Stefan Metzmacher13-60/+32
metze
2009-08-14s3:smbd: allow SMB2 Cancel to have the async flag setStefan Metzmacher1-6/+8
metze
2009-08-14s3:smbd: fix parsing of the SMB2 bodyStefan Metzmacher1-5/+7
Maybe there's no dynamic part on the wire. metze
2009-08-12Fix BASE-DELAYWRITE test by removing const from struct smb_filenameJeremy Allison3-21/+21
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.
2009-08-12Add "store create time" parameter (docs to follow)Jeremy Allison5-13/+106
that stores the create time in the user.DosTimestamps EA. Jeremy.
2009-08-12libcli: move some common SMB and SMB2 stuff into libcli/smb/Stefan Metzmacher19-19/+19
This will hold code that's shared between source3 and source4. metze
2009-08-12s3:smbd: as check_path_syntax() changes the string, we need to copy the ↵Stefan Metzmacher1-2/+8
string before metze
2009-08-12s3:smbd: avoid 'goto out' in smbd_smb2_create_send()Stefan Metzmacher1-20/+15
metze
2009-08-12s3:smbd: make sure we don't call conn_free() with a NULL pointer for SMB2Stefan Metzmacher1-1/+3
metze
2009-08-12s3:smbd: correctly invalidate vuids when SMB2 is usedStefan Metzmacher2-0/+5
metze
2009-08-10Ensure the fsp->fsp_name stat_ex struct is alwaysJeremy Allison1-0/+1
up to date after the open. Jeremy.
2009-08-10Refactor the use of create_time and change time to goJeremy Allison4-26/+66
through functions. Will aid in making us pass RAW-SETFILEINFO. Jeremy.
2009-08-08s3:smbd: convert '\\' into '/' in SMB2 CreateStefan Metzmacher1-0/+8
metze
2009-08-08s3:smbd: rename conn => sconn for smbd_server_connection structsStefan Metzmacher15-118/+118
This should avoid confusion between smbd_server_connection and connection_struct variables. metze
2009-08-07Move the checks for null timestamps down below the VFS_NTIMESJeremy Allison1-30/+3
layer (as it's done in onefs). This simplifies greatly the code in smb_set_file_time() w.r.t. changenotify messages. Jeremy.
2009-08-07Correctly send out notify messages for timestamp changes.Jeremy Allison1-5/+3
"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.
2009-08-07s3:smbd: split the dir entry marshalling into smbd_marshall_dir_entry()Stefan Metzmacher1-443/+482
So that we can reuse it for SMB2 Find. metze
2009-08-07s3:smbd: move dptr globals into struct smbd_server_connectionStefan Metzmacher7-88/+135
metze
2009-08-07s3:smbd: remove dirptr and dirpath from connection_structStefan Metzmacher5-48/+46
They're both only used in the context of a function, so we can make them stack variables. metze
2009-08-07s3:smbd: implement get_lanman2_dir_entry() on top of smbd_dirptr_get_entry()Stefan Metzmacher1-229/+215
metze
2009-08-07s3:smbd: let get_dir_entry() use smbd_dirptr_get_entry()Stefan Metzmacher1-139/+89
metze