summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Convert api_RNetUserEnum to use the srv_samr_nt.c directlyVolker Lendecke2009-02-011-26/+77
| | | | | | | This is a sample for other accesses to pdb to go via samr. The goal is to access passdb only via srv_samr_nt.c. If that is done, then we can easily swap in another samr implementation like for example samba4's via a unix domain socket.
* Fix nonempty blank linesVolker Lendecke2009-02-011-58/+57
|
* Just for fun: Move some bytes from bss to textVolker Lendecke2009-02-012-2/+2
|
* Make reply_pipe_read_andx asyncVolker Lendecke2009-01-311-13/+57
|
* Make reply_pipe_write asyncVolker Lendecke2009-01-311-13/+48
|
* Make reply_pipe_write_and_X asyncVolker Lendecke2009-01-311-20/+52
|
* Make-np_write-handle-0-byte-writes-as-NT_STATUS_OKVolker Lendecke2009-01-311-43/+27
|
* Convert api_rpc_trans_reply to async np_*Volker Lendecke2009-01-311-29/+119
|
* make send_file_readbraw staticVolker Lendecke2009-01-311-6/+6
|
* Remove the global variable "chain_size"Volker Lendecke2009-01-314-15/+31
|
* Upgrade POSIX inheritance storage to a new format (version 2). StoresJeremy Allison2009-01-291-200/+360
| | | | | the Windows ACL type and flags if "map acl inherit" is set. Jeremy.
* s3: Add a new SMB_VFS_GET_ALLOC_SIZE vfs operationTim Prouty2009-01-293-43/+17
| | | | | This allows module implementors to customize what allocation size is returned to the client.
* s3:smbd: make smbd_open_one_socket() staticMichael Adam2009-01-291-3/+3
| | | | Michael
* s3:smbd: ignore open_socket_in() failuresStefan Metzmacher2009-01-291-1/+4
| | | | | | | This restores the pre e0232934fbf69a9e72de1d9844b14d70b34a2d6a behavior. metze
* s3:smbd: wait for new connection via fd eventsStefan Metzmacher2009-01-271-211/+227
| | | | metze
* s3:smbd: make mdns registration event driven.Stefan Metzmacher2009-01-272-125/+108
| | | | metze
* s3:smbd: make inetd code path more clearStefan Metzmacher2009-01-271-24/+20
| | | | metze
* s3:smbd: make kernel oplocks event drivenStefan Metzmacher2009-01-276-201/+33
| | | | | | And use signal events for Linux oplocks. metze
* s3:smbd: remove pointless respond_to_all_remaining_local_messages() functionStefan Metzmacher2009-01-272-27/+0
| | | | | | | This the process_kernel_oplock() function never response to messages, it only generates messages to ourself. metze
* s3:smbd: convert aio to use tevent_signalStefan Metzmacher2009-01-273-104/+52
| | | | metze
* s3:smbd: use signal events for SIGTERM, SIGHUP and SIGCHLDStefan Metzmacher2009-01-274-96/+102
| | | | metze
* s3:smbd: move all code that handles a client connection into smbd_process()Stefan Metzmacher2009-01-272-218/+218
| | | | metze
* s3:smbd: we should setup the client socket in the same way in all code pathesStefan Metzmacher2009-01-271-21/+15
| | | | | | We should behave the same in inetd, interactive and deamon modes. metze
* s3:namecache: remove unused namecache_shutdown() functionStefan Metzmacher2009-01-271-2/+0
| | | | metze
* Fix chain_reply for pipe readsVolker Lendecke2009-01-251-1/+11
| | | | | | | | The caller might have over-allocated reply->outbuf. Deal with that. Sorry, Günther, for giving you so much pain ... Volker
* Extend NTIMES to allow setting create_timetodd stecher2009-01-234-69/+97
| | | | | | | | | 1) Add in smb_file_time struct to clarify code and make room for createtime. 2) Get and set create time from SMB messages. 3) Fixup existing VFS modules + examples Some OS'es allow for the setting of the birthtime through kernel interfaces. This value is generically used for Windows createtime, but is not settable in the code today.
* Fix logic error in try_chown - we shouldn't arbitrarily chownJeremy Allison2009-01-221-6/+9
| | | | | to ourselves unless that was passed in. Jeremy.
* Second part of the attemt to fix #4308 - Excel save operation corrupts file ↵Jeremy Allison2009-01-221-131/+144
| | | | | | | | ACLs. If the chown succeeds then the ACL set should also. Ensure this is the case (refactor some of this code to make it simpler to read also). Jeremy.
* Another attempt to fix bug #4308 - Excel save operation corrupts file ACLs.Jeremy Allison2009-01-221-25/+4
| | | | | | | | | | | | | | | | | | | | Simo is completely correct. We should be doing the chown *first*, and fail the ACL set if this fails. The long standing assumption I made when writing the initial POSIX ACL code was that Windows didn't control who could chown a file in the same was as POSIX. In POSIX only root can do this whereas I wasn't sure who could do this in Windows at the time (I didn't understand the privilege model). So the assumption was that setting the ACL was more important (early tests showed many failed ACL set's due to inability to chown). But now we have privileges in smbd, and we must always fail an ACL set when we can't chown first. The key that Simo noticed is that the CREATOR_OWNER bits in the ACL incoming are relative to the *new* owner, not the old one. This is why the old user owner disappears on ACL set - their access was set via the USER_OBJ in the creator POSIX ACL and when the ownership changes they lose their access. Patch is simple - just ensure we do the chown first before evaluating the incoming ACL re-read the owners. We already have code to do this it just wasn't rigorously being applied. Jeremy.
* s3:smbd: we don't need to call message_dispatch() anymore it's event ↵Stefan Metzmacher2009-01-222-26/+2
| | | | | | triggered now metze
* s3:smbd: restructure kernel oplocks codeStefan Metzmacher2009-01-226-136/+117
| | | | | | | | This converts the irix oplocks code to use a fd event and removes the last special case for file descriptors for the main sys_select(). metze