summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2011-02-11s3: Avoid a select call per smbVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Feb 11 12:13:54 CET 2011 on sn-devel-104
2011-02-10s3:smbd: fix switch indentation level in get_ea_dos_attribute()Michael Adam1-4/+4
Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Thu Feb 10 17:46:12 CET 2011 on sn-devel-104
2011-02-10s3-auth Rename cryptic 'ptok' to security_tokenAndrew Bartlett6-26/+26
This will allow the auth_serversupplied_info struct to be migrated to auth_session_info easier. Adnrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-02-10Put OpenDir() back the way it was - don't overload with an fsp arg. Create ↵Jeremy Allison4-20/+64
OpenDir_fsp for new usage. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Feb 10 02:43:31 CET 2011 on sn-devel-104
2011-02-10Make it clear we're using the open file pathname.Jeremy Allison1-6/+4
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Feb 10 01:06:29 CET 2011 on sn-devel-104
2011-02-09Allow SMB2_FIND to actually use the open fd handle if we support fdopendir. ↵Jeremy Allison6-16/+52
Fallback to pathname opendir if not.
2011-02-09Oops. Need to test for if(!NT_STATUS_IS_OK(..)) for error.Jeremy Allison1-1/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 9 22:06:05 CET 2011 on sn-devel-104
2011-02-09Move to opening an fd on directory opens. Get more careful about symlink races.Jeremy Allison1-1/+37
2011-02-09Remove unneeded stat call.Jeremy Allison1-9/+4
2011-02-09Add fdopendir to the VFS. We will use this to reuse a directory fd already ↵Jeremy Allison1-0/+9
open by NtCreateX. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 9 00:55:22 CET 2011 on sn-devel-104
2011-02-08Pass fsp to dptr_CloseDir(). Cope with setting the fd if we're closing an fd ↵Jeremy Allison4-11/+13
that opendir knows about.
2011-02-08If possible (O_DIRECTORY exists) open an fd for a directory open.Jeremy Allison5-16/+23
Start of the move towards handle-based code for directory access. Currently makes fstat/fchown code work for directories rather than falling back to pathnames. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Feb 8 06:34:41 CET 2011 on sn-devel-104
2011-02-08Use corrcet function instead of cut-and-paste code.Jeremy Allison1-1/+1
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Feb 8 03:23:40 CET 2011 on sn-devel-104
2011-02-07Fix leak in error path.Jeremy Allison1-0/+1
2011-02-06s3: Fix some nonempty blank linesVolker Lendecke1-3/+3
2011-02-05Fix try_chown code. Use new vfs_chown_fsp() which always trys fd first.Jeremy Allison2-75/+72
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 5 03:33:59 CET 2011 on sn-devel-104
2011-02-05Move the "oplock file with byte range locks" check to the correct place, ↵Jeremy Allison2-17/+15
where we're making oplock decisions. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 5 01:18:14 CET 2011 on sn-devel-104
2011-02-02s3-smbd: Added a function to setup rpc services.Andreas Schneider1-90/+2
Move the complete setup of the rpc service to its own file and use callbacks to register at the endpoint mapper.
2011-02-02s3-epmapper: Added a endpoint mapper skeleton.Andreas Schneider1-0/+1
2011-02-02Based on a conversation with Volker, refactor some of the oplock code to ↵Jeremy Allison1-71/+160
make it comprehensible. delay_for_oplocks() did 4 things. 1). Validation of existing oplock types. 2). Check for compatibility with batch oplocks (pass 1). 3). Check for compatibility with exclusive oplocks (pass 2). 4). Set the correct oplock type from the requested value. Refactor into 4 separate functions: 1). find_oplock_types() - does validation of oplock types and returns pointers to specific values. 2). delay_for_batch_oplocks() - the pass 1 phase above. 3). delay_for_exclusive_oplocks() - the pass 2 phase above 4). grant_fsp_oplock_type() - Set the correct oplock type from the requested value. Now separated out this code should be much easier to understand and modify. This also fixes an erroneous SMB_ASSERT which was hidden by the previous complexity of the single delay_for_oplocks() code. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 2 01:52:21 CET 2011 on sn-devel-104
2011-02-01s3-lanman: prefer dcerpc_samr_X functions.Günther Deschner1-83/+237
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Feb 1 16:45:10 CET 2011 on sn-devel-104
2011-02-01Ensure we send the direct levelII oplock break to the correct fid.Pavel Shilovsky1-1/+10
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Feb 1 00:39:56 CET 2011 on sn-devel-104
2011-01-31Fix bug #7928 - Samba problems with kernel oplocks option set to "no"Pavel Shilovsky2-8/+32
We should not grant levelII oplocks on a file with existing byte range locks.
2011-01-31s3:smbd: let smbd_server_connection_loop_once() check for select errorsStefan Metzmacher1-0/+4
metze
2011-01-31Revert "s3: Fix starving the echo responder"Stefan Metzmacher1-17/+0
This reverts commit d5cf6482ed0cd9a11448ca04944b2e01200a7c89. I'll add a more generic fix for this problem. metze
2011-01-31Revert "s3:events: Call all ready fd event handlers on each iteration of the ↵Stefan Metzmacher1-18/+21
main loop" This reverts commit 455fccf86b6544cd17a2571c63a88f8aebff3f74. I'll add a more generic fix for this problem. metze
2011-01-28We need to reply to SMB2_GETINFO_FILE with a class of ↵Jeremy Allison1-1/+32
SMB2_FILE_STANDARD_INFO on an IPC$ share. Otherwise a Win7 client issues this request twice (2xroundtrips) if we return NOT_SUPPORTED. We do the same for SMB1 in call_trans2qpipeinfo() Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 28 22:53:18 CET 2011 on sn-devel-104
2011-01-27Change "security=share" to downgrade to SMB1 from SMB2, rather than trying ↵Jeremy Allison1-8/+0
to fake it.
2011-01-27Looking into printer driver issues, I ran across some peculiarities inDavid Disseldorp1-8/+11
copy_file(): - Firstly, if the source file is zero bytes, NT_STATUS_DISK_FULL is returned. - Secondly, the conditional lseek is confusing. It fires when OPENX_FILE_EXISTS_OPEN is set and I can't see why the lseek is necessary in this case. - Finally, the lseek error path also results in NT_STATUS_DISK_FULL. Proposed fix for first and third point below. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Jan 27 00:59:56 CET 2011 on sn-devel-104
2011-01-26Allow "security = share" with SMB2. We already handle this in smb2/smb2_server.cJeremy Allison1-1/+0
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Jan 26 20:37:29 CET 2011 on sn-devel-104
2011-01-25Fix bug #7863 - Unlink may unlink wrong file when hardlinks are involved.Jeremy Allison5-36/+78
Do this by keeping a linked list of delete on close tokens, one for each filename that identifies a path to the dev/inode. Use the jenkins hash of the pathname to identify the correct token.
2011-01-25Add uint32_t name_hash argument (currently unused) to get_file_infos().Jeremy Allison7-12/+13
Will be used when we store more than one delete on close token.
2011-01-25Add name_hash into the share mode entry struct (as yet only use for renames ↵Jeremy Allison2-1/+10
to identify a specific path).
2011-01-25Add name_hash to files_struct. Set within fsp_set_smb_fname().Jeremy Allison1-1/+32
2011-01-21s3-lanman: remove trailing whitespace.Günther Deschner1-30/+30
Guenther
2011-01-21s3:smbd: use dcerpc_spoolss_X() functionsStefan Metzmacher2-32/+50
metze Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-21s3: Fix a deadlock between smbd and ctdbdVolker Lendecke1-4/+18
Do the notification after we released the share mode lock. Inside notify_fname we take out another tdb lock. With ctdb also accessing our databases, this can lead to deadlocks. Putting this notify after the TALLOC_FREE(lck) above we avoid locking two records simultaneously. Notifies are async and informational only, so calling the notify_fname without holding the share mode lock should not do any harm. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Jan 21 12:29:21 CET 2011 on sn-devel-104
2011-01-21Remove all uses of "./" in pathnames - make canonical. This will become ↵Jeremy Allison1-50/+78
important when we need to guarantee canonical names for hashing. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jan 21 02:59:56 CET 2011 on sn-devel-104
2011-01-20Ensure we don't use "./" in findfirst pathnames. Use a directory open of "." ↵Jeremy Allison1-4/+8
instead.
2011-01-20Make processing of incoming stream rename paths common between reply_mv and ↵Jeremy Allison2-4/+47
ntrename. Ensure we don't depend on "./" in the streams module.
2011-01-20s3:smbd: use anonymous_shared_free() for shared memory signing stateStefan Metzmacher1-0/+7
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Jan 20 07:48:29 CET 2011 on sn-devel-104
2011-01-20lib/util: s/allocate_anonymous_shared/anonymous_shared_allocate/Stefan Metzmacher1-1/+1
metze
2011-01-19s3-smbd: Fixed a possible null pointer dereference.Andreas Schneider1-1/+3
2011-01-17s3: Fix a C++ warningVolker Lendecke1-1/+1
2011-01-14s3: Fix bug 7917: Yet another bug in chain_replyVolker Lendecke1-2/+2
Found by Michael Hanscho <samba@micha.priv.at> with a WinCE client. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Jan 14 17:42:05 CET 2011 on sn-devel-104
2011-01-13s3-lanman: prefer dcerpc_srvsvc_X functions.Günther Deschner1-3/+9
Guenther Signed-off-by: Andreas Schneider <asn@samba.org>
2011-01-07s3-printing: Initiate pcap reload from parent smbdDavid Disseldorp5-40/+65
Since commit 7022554, smbds share a printcap cache (printer_list.tdb), therefore ordering of events between smbd processes is important when updating printcap cache information. Consider the following two process example: 1) smbd1 receives HUP or printcap cache time expiry 2) smbd1 checks whether pcap needs refresh, it does 3) smbd1 marks pcap as refreshed 4) smbd1 forks child1 to obtain cups printer info 5) smbd2 receives HUP or printcap cache time expiry 6) smbd2 checks whether pcap needs refresh, it does not (due to step 3) 7) smbd2 reloads printer shares prior to child1 completion (stale pcap) 8) child1 completion, pcap cache (printer_list.tdb) is updated by smbd1 9) smbd1 reloads printer shares based on new pcap information In this case both smbd1 and smbd2 are reliant on the pcap update performed on child1 completion. The prior commit "reload shares after pcap cache fill" ensures that smbd1 only reloads printer shares following pcap update, however smbd2 continues to present shares based on stale pcap data. This commit addresses the above problem by driving pcap cache and printer share updates from the parent smbd process. 1) smbd0 (parent) receives a HUP or printcap cache time expiry 2) smbd0 forks child0 to obtain cups printer info 3) child0 completion, pcap cache (printer_list.tdb) is updated by smbd0 4) smbd0 reloads printer shares 5) smbd0 notifies child smbds of pcap update via message_send_all() 6) child smbds read fresh pcap data and reload printer shares This architecture has the additional advantage that only a single process (the parent smbd) requests printer information from the printcap backend. Use time_mono in housekeeping functions As suggested by Björn Jacke.
2011-01-07s3-printing: reload shares after pcap cache fillDavid Disseldorp3-7/+12
Since commit eada8f8a, updates to the cups pcap cache are performed asynchronously - cups_cache_reload() forks a child process to request cups printer information and notify the parent smbd on completion. Currently printer shares are reloaded immediately following the call to cups_cache_reload(), this occurs prior to smbd receiving new cups pcap information from the child process. Such behaviour can result in stale print shares as outlined in bug 7836. This fix ensures print shares are only reloaded after new pcap data has been received. Pair-Programmed-With: Lars Müller <lars@samba.org>
2011-01-04s3-rpcecho: Only register rpcecho in the developer build.Andreas Schneider2-0/+4
Autobuild-User: Andreas Schneider <asn@samba.org> Autobuild-Date: Tue Jan 4 18:56:38 CET 2011 on sn-devel-104
2011-01-04s3-smbd: Call the rpc service shutdown functions.Andreas Schneider1-0/+34