summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
* Fix more POSIX path lstat calls. Fix bug where close can returnJeremy Allison2009-02-251-5/+17
| | | | | | | | | failure if we have a pending modtime and the containing directory of the file has been renamed (there is no POSIX "update time by fd" call). This can't happen on Windows as the rename will fail if there are open files beneath it. Will add a torture test for this. Jeremy.
* Make test for open modes more robust against other bits.Jeremy Allison2009-02-251-1/+1
| | | | Jeremy.
* Fix bug in processing of open modes in POSIX open.Jeremy Allison2009-02-251-0/+2
| | | | | | | Was missing case of "If file exists open. If file doesn't exist error." Damn damn damn. CIFSFS client will have to have fallback cases for this error for a long time. Jeremy.
* Fix some NetBSD warnings.Jeremy Allison2009-02-251-1/+1
| | | | Jeremy.
* Allow set attributes on a stream fnum to be redirected to the base filename.Jeremy Allison2009-02-241-2/+10
| | | | | Fixes the new RAW-STREAMS torture test. Jeremy.
* s3 OneFS: Fix a double free in an error pathTim Prouty2009-02-231-3/+2
|
* More warning fixes for Solaris.Jeremy Allison2009-02-234-30/+30
| | | | Jeremy.
* s3: If sendfile returns 0 bytes read, fall back to the normal read pathTim Prouty2009-02-211-0/+24
| | | | | | This allows sendfile implementations that are atomic to avoid having to send zeros or kill the client connection on a short read (usually the file was truncated).
* Remove the static "chal" from ntlmssp.c:get_challenge()Volker Lendecke2009-02-212-6/+6
|
* Do not close an fd we know is -1Volker Lendecke2009-02-211-1/+0
|
* S3: Detect max_open_files from systemtodd stecher2009-02-201-0/+12
| | | | | - Attempt to use syscalls to determine max-open-files value. - Add in periodic logging when max file limit reached
* s3: Refactor of madvise() usage in c441f58dSteven Danneman2009-02-201-7/+0
| | | | | * move to reinit_after_fork() to protect all Samba daemons * only protect parent processes
* s3: Make change notify immediately return a catch-all packet on underlying errorSteven Danneman2009-02-201-1/+14
| | | | | | | * This allows a problem in the underlying CN backend to be bubbled up to the general CN layer so a catch-all reply can be returned * We now also return a catch-all response immediately if the server-side event queue becomes too big
* s3: Modifications to generic notify structures to allow implementation of ↵Steven Danneman2009-02-201-0/+2
| | | | | | | | | | | | | | OneFS notify. The OneFS kernel based change notify system takes an fd of the directory to watch in it's initialization syscall. Since we already have this directory open, this commit plumbs that fd down to the VFS layer via the notify_entry struct. We also need to know if the watch is taken out on a snapshot directory. The full file_id struct is also passed down to make this determination. The file_id marshalling wrappers are hand written here, but should eventually be auto-generated by moving the struct file_id into the idl.
* s3: Change the vfs_GetWd cache to use the file_id structTim Prouty2009-02-191-12/+3
|
* s3: Add extid to the dev/inode pairTim Prouty2009-02-194-17/+20
| | | | | | | | | | | 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.
* s3: Modify SMB_VFS_FILE_ID_CREATE to take a stat structTim Prouty2009-02-191-0/+18
| | | | | Since file_id_create_dev is incompatible with the concept of file_ids, it is now static and in the one file that needs it.
* S3: Dumb down debug spew in perfcount module codetodd stecher2009-02-191-4/+4
|
* S3: Make changes to perfcount API set for when a single request leads to ↵todd stecher2009-02-191-2/+15
| | | | | | multiple replies (e.g. reply_echo). Change test and onefs modules to match new api set (thanks Volker!).
* s3: Fix bug opening streams with truncating dispositionTim Prouty2009-02-181-1/+1
| | | | | | | 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
* S3: Stop creating SMBD cores when failing to create a pipe.todd stecher2009-02-181-0/+4
| | | | | | This was uncovered when the MAX FD limit was hit, causing an instant core and invoking error reporting. This fix causes SMBD to exit, but without building a core.
* S3: Allow SMBD processes to survive in low memory condidtionstodd stecher2009-02-181-0/+7
| | | | | | This commit adds a configure argument which allows for setting MADV_PROTECT in the madvise() API. With this enabled the kernel won't kill SMBD when it's running low on memory.
* make receive_smb_raw_talloc more readableTim Prouty2009-02-161-4/+4
|
* Rename lp_smb_perfcount_module() to lp_perfcount_module() to match the ↵Volker Lendecke2009-02-141-1/+1
| | | | parameter name
* Make smb_load_perfcount_module staticVolker Lendecke2009-02-141-1/+1
|
* Attempt to fix the build on Solaris 8Volker Lendecke2009-02-141-1/+1
|
* Fix a valgrind errorVolker Lendecke2009-02-141-1/+5
|
* s3: Fix uninitialized variable warning (and bug).Zack Kirsch2009-02-131-1/+1
|
* Noted by Vericode analysis. Correctly use chroot().Jeremy Allison2009-02-131-1/+5
| | | | Jeremy.
* Add VFS ops for Windows BRL: Lock, Unlock and Cancel:Zack Kirsch2009-02-133-53/+75
| | | | | | | | | | | | | | | | | | | | | | | This patch adds 3 new VFS OPs for Windows byte range locking: BRL_LOCK_WINDOWS, BRL_UNLOCK_WINDOWS and BRL_CANCEL_WINDOWS. Specifically: * I renamed brl_lock_windows, brl_unlock_windows and brl_lock_cancel to *_default as the default implementations of the VFS ops. * The blocking_lock_record (BLR) is now passed into the brl_lock_windows and brl_cancel_windows paths. The Onefs implementation uses it - future implementations may find it useful too. * Created brl_lock_cancel to do what brl_lock/brl_unlock do: set up a lock_struct and call either the Posix or Windows lock function. These happen to be the same for the default implementation. * Added helper functions: increment_current_lock_count() and decrement_current_lock_count(). * Minor spelling correction in brl_timeout_fn: brl -> blr. * Changed blocking_lock_cancel() to return the BLR that it has cancelled. This allows us to assert its the lock that we wanted to cancel. If this assert ever fires, this path will need to take in the BLR to cancel, rather than choosing on its own. * Adds a small helper function: find_blocking_lock_record_by_id(). Used by the OneFS implementation, but could be useful for others.
* Remove typedef struct blocking_lock_record and move references to struct ↵Zack Kirsch2009-02-131-19/+19
| | | | blocking_lock_record.
* Remove an unused extern referenceVolker Lendecke2009-02-101-2/+0
|
* Convert api_NetUserGetGroups to use samr instead of pdbVolker Lendecke2009-02-101-50/+68
|
* s3: Added SMB_VFS_INIT_SEARCH_OP to initialize data at the beginning of SMB ↵Steven Danneman2009-02-093-3/+20
| | | | | | | | search requests. By default this VFS call is a NOOP, but the onefs vfs module takes advantage of it to initialize direntry search caches at the beginning of each TRANS2_FIND_FIRST, TRANS2_FIND_NEXT, SMBffirst, SMBsearch, and SMBunique
* Pass stat buffer down through all levels of VFS_READDIR wrappersSteven Danneman2009-02-094-96/+103
| | | | | | | | | * VFS_OP_READDIR can now provide stat information, take advantage of it if it's available * is_visible_file(): optimistically expect the provided stat buffer is already valid * dptr_ReadDirName(): refactor code for easier readability, functionality is the same
* Add an optional SMB_STRUCT_SMB parameter to VFS_OP_READDIRSteven Danneman2009-02-091-2/+2
| | | | | | | | * this allows VFS implementations that prefetch stat information on readdir to return it through one VFS call * backwards compatibility is maintained by passing in NULL * if the system readdir doesn't return stat info, the stat struct is set to invalid
* s3 OneFS: Add kernel oplocks implementationTim Prouty2009-02-092-0/+805
| | | | | | | | | A few functions in oplocks_onefs.c need to be accessed from the onefs vfs module. It would be ideal if oplocks were implemented at the vfs layer, but since they aren't yet, a new header is added to source3/include to make these functions available to the onefs vfs module. oplocks_onefs.o doesn't need to be linked into the onefs vfs module explicitly, since it is already linked into smbd by default.
* s3 oplocks: Remove oplocks before handling delete on close semanticsTim Prouty2009-02-091-4/+5
| | | | | | Unlinking a file while still holding an oplock can cause problems with kernel oplocks. This simply releases the oplock before actually unlinking the file.
* s3 oplocks: Add capabilites flags field to the kernel_oplocks structTim Prouty2009-02-092-2/+32
| | | | | | | | | | | | | | | | Here is a short description for each of the new capability flags: KOPLOCKS_LEVEL2_SUPPORTED: Level 2 oplocks are supported natively in the kernel. KOPLOCKS_DEFERRED_OPEN_NOTIFICATION: The kernel notifies deferred openers when they can retry the open. KOPLOCKS_TIMEOUT_NOTIFICATION: The kernel notifies smbds when an oplock break times out. KOPLOCKS_OPLOCK_BROKEN_NOTIFICATION: The kernel notifies smbds when an oplock is broken.
* s3 oplocks: Make the level2 oplock contention API more granularTim Prouty2009-02-097-27/+62
| | | | | | | | | | | | | | | | | | This replaces release_level2_oplocks_on_change with contend_level2_oplock_begin/end in order to contend level2 oplocks throughout an operation rather than just at the begining. This is necessary for some kernel oplock implementations, and also lays the groundwork for better correctness in Samba's standard level2 oplock handling. The next step for non-kernel oplocks is to add additional state to the share mode lock struct that prevents any new opens from granting oplocks while a contending operation is in progress. All operations that contend level 2 oplocks are now correctly spanned except for aio and synchronous writes. The two write paths both have non-trivial error paths that need extra care to get right. RAW-OPLOCK and the rest of 'make test' are still passing with this change.
* s3 oplocks: Differentiate between releasing an oplock vs. downgrading to ↵Tim Prouty2009-02-093-4/+4
| | | | | | | Level 2 for kernel oplocks Pass in an extra argument when releasing an oplock so kernel oplock implementations can support downgrading from Level 1 to Level 2.
* s3 vfs: Add a destructor to the fsp extension data APITim Prouty2009-02-091-1/+7
| | | | | I'm not certain if the dummy pointer is needed in struct vfs_fsp_data, but I added it to be consistent with the comment below.
* S3: New module interface for SMB message statistics gatheringtodd stecher2009-02-0911-35/+278
| | | | | | | This changelist allows for the addition of custom performance monitoring modules through smb.conf. Entrypoints in the main message processing code have been added to capture the command, subop, ioctl, identity and message size statistics.
* Fix memleaks in chain_reply for async requestsVolker Lendecke2009-02-071-0/+2
|
* Convert api_RNetGroupEnum to use samr instead of pdbVolker Lendecke2009-02-071-30/+81
|
* Close samr_handle if open_domain failedVolker Lendecke2009-02-071-0/+1
|
* Don't try and delete a default ACL from a file.Günter Kukkukk2009-02-051-4/+8
|
* Fix bug #Bug 6090 renaming or deleting a "not matching/resolving" symlink is ↵Jeremy Allison2009-02-043-30/+88
| | | | | | | | | | 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.
* Fix bug #6082 - smbd_gpfs_getacl failed: Windows client can´t rename or ↵Jeremy Allison2009-02-022-18/+49
| | | | | | | | | 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.
* Add two new parameters to control how we verify kerberos tickets. Removes ↵Dan Sledz2009-02-012-3/+3
| | | | | | | | | | | | | | | | | | | | | | | lp_use_kerberos_keytab parameter. The first is "kerberos method" and replaces the "use kerberos keytab" with an enum. Valid options are: secrets only - use only the secrets for ticket verification (default) system keytab - use only the system keytab for ticket verification dedicated keytab - use a dedicated keytab for ticket verification. secrets and keytab - use the secrets.tdb first, then the system keytab For existing installs: "use kerberos keytab = yes" corresponds to secrets and keytab "use kerberos keytab = no" corresponds to secrets only The major difference between "system keytab" and "dedicated keytab" is that the latter method relies on kerberos to find the correct keytab entry instead of filtering based on expected principals. The second parameter is "dedicated keytab file", which is the keytab to use when in "dedicated keytab" mode. This keytab is only used in ads_verify_ticket.