summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of "int ret" when we already have errcode.Jeremy Allison2009-10-131-13/+8
| | | | Jeremy.
* Catch one more erroneous use of errno.Jeremy Allison2009-10-131-1/+1
| | | | Jeremy.
* correctly handle aio_error() and errnoOlaf Flebbe2009-10-131-29/+24
|
* Cope with old CIFSFS clients that use SMBunlink to removeJeremy Allison2009-10-081-2/+11
| | | | | symlinks instead of trans2:posix_unlink. Jeremy.
* s3: Fix shadow copy display on Windows 7Volker Lendecke2009-10-081-1/+1
| | | | | Windows 7 is a bit more picky on our NT_STATUS_BUFFER_TOO_SMALL. Announce the right buffer size, the same amount we later check for.
* s3/s4 - Adapt the IDL changes on various locationsMatthias Dieter Wallnöfer2009-10-081-9/+9
|
* Oops. Don't break the build..Jeremy Allison2009-10-071-3/+2
| | | | Jeremy.
* Make the logic a lot clearer and fix the comment to match.Jeremy Allison2009-10-071-15/+10
| | | | Jeremy
* Correct fix for bug 6781 - Cannot rename subfolders in Explorer view with ↵Jeremy Allison2009-10-071-3/+1
| | | | | | | | recent versions of Samba. Without this fix, renaming a directory ./a to ./b, whilst a directory ./aa was already open would fail. Jeremy.
* s3: Add access_mask to the flock VFS callAbhidnya P Chirmule2009-10-062-3/+5
|
* Remove lots of duplicate code and move it into oneJeremy Allison2009-10-024-108/+59
| | | | | | function vfs_stat_fsp(). Stops code looking at fsp->posix_open except for exceptional circumstances. Jeremy.
* Missed one VFS_STAT -> VFS_LSTATJeremy Allison2009-10-021-1/+1
| | | | Jeremy.
* Fix more use of VFS_STAT when posix pathnames selected.Jeremy Allison2009-10-022-19/+50
| | | | Jeremy.
* Fix for CVE-2009-2813.Jeremy Allison2009-10-011-1/+5
| | | | | | | | | | | | | | | =========================================================== == Subject: Misconfigured /etc/passwd file may share folders unexpectedly == == CVE ID#: CVE-2009-2813 == == Versions: All versions of Samba later than 3.0.11 == == Summary: If a user in /etc/passwd is misconfigured to have == an empty home directory then connecting to the home == share of this user will use the root of the filesystem == as the home directory. ===========================================================
* Fix for CVE-2009-2906.Jeremy Allison2009-10-011-5/+25
| | | | | | | | Summary: Specially crafted SMB requests on authenticated SMB connections can send smbd into a 100% CPU loop, causing a DoS on the Samba server.
* allow for outstanding_aio_calls to be decrementedOlaf Flebbe2009-09-301-2/+4
|
* Don't defer a talloc_move'd pointer.Jeremy Allison2009-09-281-1/+1
| | | | Jeremy.
* s3:smbd/password - move list pointers into blocksMatthias Dieter Wallnöfer2009-09-251-6/+6
|
* s3 onefs: Add some debugging/asserts to give more info when there is bad ↵Zack Kirsch2009-09-241-0/+2
| | | | | | deferred open state. Signed-off-by: Tim Prouty <tprouty@samba.org>
* s3: Add more helpful debugging to some of the streams codeTim Prouty2009-09-241-1/+1
|
* vfs catia: Fix the double translation that was happening with createfile and ↵Aravind Srinivasan2009-09-241-3/+5
| | | | | | | | | | | | | | | open. Since the catia translation is implemented for open, it should not also be done in createfile. By removing createfile from catia, translation is now done correctly for the primary open path. In order to support systems that have custom createfile implementations that don't eventually call SMB_VFS_OPEN, SMB_VFS_TRANSLATE_NAME has been expanded to take an additional argument that specifies direction. Signed-off-by: Tim Prouty <tprouty@samba.org>
* s3-smbd: fix get_ea_names_from_file() and check for pnames pointer.Günther Deschner2009-09-181-1/+3
| | | | | | | | This fixes smbd from crashing all the time. Jeremy, Volker, please check. Guenther
* s3:smbd: Fix an inappropriate pointer return in a bool fnVolker Lendecke2009-09-181-1/+1
|
* We now pass the Microsoft SMB2 fileio test with EA's and streams...Jeremy Allison2009-09-174-5/+68
| | | | Jeremy.
* spnego: share spnego_parse.Günther Deschner2009-09-174-0/+4
| | | | Guenther
* Fix bug 6494 - Incorrect FileStatus returned in NT_CREATE_ANDX.Jeremy Allison2009-09-142-3/+27
| | | | | Lookup the EA and Stream status on CreateX. Jeremy.
* s3:smbd: Add a "hidden" parameter "share:fake_fscaps"Volker Lendecke2009-09-091-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.
* Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".Jeremy Allison2009-09-062-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.
* Check we read off the compelte event from inotifySimo Sorce2009-09-051-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.
* s3:smbd: Fix Coverity ID 937, REVERSE_INULLVolker Lendecke2009-09-041-2/+2
|
* Hopefully last part of the fix for bug 6651 - smbd SIGSEGV when breaking ↵Jeremy Allison2009-09-031-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.
* s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAMEAravind Srinivasan2009-08-285-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>
* s3:smbd: teach filename_convert() about fake files (2nd fix for bug #6642)Stefan Metzmacher2009-08-271-0/+11
| | | | metze
* s3:smbd: add is_fake_file_path() that takes only the raw path as stringStefan Metzmacher2009-08-271-14/+22
| | | | metze
* s3:streams: check for :$DATA only in the backend (fix bug #6642)Stefan Metzmacher2009-08-271-3/+0
| | | | | | | We need to allow "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION" to pass check_path(), so that the Quota Dialog works. metze
* s3/smbd: open the share_info.tdb on startup instead of tconxSteven Danneman2009-08-261-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.
* Help debug for bug 6651 - smbd SIGSEGV when breaking oplocks.Jeremy Allison2009-08-241-0/+4
| | | | | | Should help track if we get invoked with an invalid fd from the signal handler. Jeremy.
* Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison2009-08-247-94/+62
| | | | | | | | Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
* Second part of fix for 6529 - Offline files conflict with Vista and Office 2003.Jeremy Allison2009-08-241-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.
* Log debug message when hires timestamps are available on theJeremy Allison2009-08-211-0/+4
| | | | | share. Jeremy.
* Fix bug 6529 - Offline files conflict with Vista and Office 2003Jeremy Allison2009-08-213-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
* Fix coverity CID: 932 - forward null.Jeremy Allison2009-08-211-2/+4
| | | | Jeremy.
* s3:smbd: implement SMB2 Find (Query Directory)Stefan Metzmacher2009-08-191-1/+197
| | | | metze
* s3:smbd: store a dirptr on the files_struct for SMB2 Query DirectoryStefan Metzmacher2009-08-191-0/+4
| | | | metze
* s3:smbd: add a generic smbd_dirptr_lanman2_entry() functionStefan Metzmacher2009-08-192-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
* s3:smbd: implement all SMB2 Create contexts except "ExtA"Stefan Metzmacher2009-08-191-8/+217
| | | | metze
* s3:smbd: make smbd_check_open_rights() function non-static for use in SMB2Stefan Metzmacher2009-08-192-8/+13
| | | | metze
* s3:smbd: parse context blobs in SMB2 CreateStefan Metzmacher2009-08-191-48/+150
| | | | metze
* s3:smbd: add support for canceling SMB2 Notify calls.Stefan Metzmacher2009-08-171-0/+17
| | | | metze
* s3:smbd: add smbd_notify_cancel_by_smbreq()Stefan Metzmacher2009-08-172-0/+23
| | | | | | This function will be used by the SMB2 notify code. metze