summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-27Fix bug #9822 - Samba crashing during Win8 sync.Jeremy Allison1-0/+1
When refactoring the dptr desctructor in the fix for bug: 9778 (Samba directory code uses dirfd() without vectoring through a VFS call) I removed the code to NULL out the struct smb_Dir * pointer inside the fsp struct by mistake. Re-add the NULLing out of that pointer when closing a directory pointer associated with an open file. Reporter confirms it fixes the crash. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Sat Apr 27 20:44:55 CEST 2013 on sn-devel-104
2013-04-27torture: Only test leases if supportedVolker Lendecke1-0/+37
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Richard Sharpe <sharpe@samba.org> Autobuild-Date(master): Sat Apr 27 18:09:37 CEST 2013 on sn-devel-104
2013-04-27torture: Use ZERO_STRUCTPN instead of explicit derefVolker Lendecke1-1/+1
Signed-off-by: Volker Lendecke <vl@samba.org>
2013-04-27Check for WRITE_ACCESS on the file before overriding an EACCESS.Jeremy Allison1-0/+4
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sat Apr 27 15:57:17 CEST 2013 on sn-devel-104
2013-04-27Ensure we don't try the open_file_fchmod() if we can't write to the file.Jeremy Allison1-0/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-27Remove indentation around code wrapped by unneeded CAN_WRITE.Jeremy Allison1-23/+20
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-27Add early return in file_set_dosmode() on a read only share.Jeremy Allison1-0/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-27smbd: Do not fetch the record in defer_open_doneVolker Lendecke1-8/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 27 02:06:10 CEST 2013 on sn-devel-104
2013-04-26dbwrap: Allow dbwrap_record_watch_recv to not lock the recordVolker Lendecke1-0/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26smbd: We don't use DEFERRED_OPEN_ENTRY anymoreVolker Lendecke8-226/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26smbd: Remove unused smb2_deferred_open_timerVolker Lendecke1-59/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26smbd: Obsolete MSG_SMB_OPEN_RETRYVolker Lendecke3-46/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26smbd: Remove the unused fsp->pending_break_messages arrayVolker Lendecke3-18/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26smbd: Remove unused reply_to_oplock_break_requestsVolker Lendecke5-27/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26smbd: Obsolete MSG_SMB_BREAK_RESPONSEVolker Lendecke2-63/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26smbd: Ignore OPEN_RETRY and BREAK_RESPONSEVolker Lendecke3-0/+8
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26smbd: Use dbwrap_record_watch_send for defer_openVolker Lendecke2-1/+70
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-25bug 9830: fix panic in nt_printer_publish_adsDavid Disseldorp1-2/+8
Check for ads_find_machine_acct() errors, to ensure a NULL LDAPMessage pointer doesn't get passed to ldap_get_dn(). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-By: Günther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Thu Apr 25 19:01:55 CEST 2013 on sn-devel-104
2013-04-24source4/libcli: Only set ctemp set on successSam Lang1-7/+8
If open fails ctemp.out.name probably won't be valid and strdup will cause a segv. Only set the path if open succeeds. Signed-off-by: Sam Lang <sam.lang@inktank.com> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Apr 24 23:58:44 CEST 2013 on sn-devel-104
2013-04-24Implements a vfs module for cephfs, a distributed file systemSam Lang5-0/+1322
with posix semantics, built on the ceph distributed object storage layer. The ceph vfs module interfaces to the libcephfs userspace API, and is primarily a lightweight wrapper around libcephfs, translating error codes and parameters as necessary. Signed-off-by: Sam Lang <sam.lang@inktank.com> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-24BUG 9817: Fix 'map untrusted to domain' with NTLMv2.Andreas Schneider1-2/+8
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Apr 24 17:14:48 CEST 2013 on sn-devel-104
2013-04-22docs-xml: document dbwrap_tool existsChristian Ambach1-0/+7
Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Apr 22 18:43:42 CEST 2013 on sn-devel-104
2013-04-22s3:utils/dbwrap_tool add exists operationChristian Ambach1-4/+34
Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-22docs: Fix bug 9809 -- missing entry in specfileVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Karolin Seeger <kseeger@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Apr 22 11:35:52 CEST 2013 on sn-devel-104
2013-04-20Fix bug in old create temp SMB request. Only use VFS functions.Jeremy Allison1-53/+64
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Sat Apr 20 21:13:36 CEST 2013 on sn-devel-104
2013-04-20Ensure the RECVFILE path in vfs_pwrite_data() operates on a blocking socket.Jeremy Allison1-1/+12
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 20 01:04:05 CEST 2013 on sn-devel-104
2013-04-19Ensure the RECVFILE path in vfs_write_data() operates on a blocking socket.Jeremy Allison1-1/+12
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Ensure drain_socket() operates on a blocking socket.Jeremy Allison1-2/+15
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Add the internals of is_smb2_recvfile_write.Jeremy Allison1-1/+37
This turns on the real receivefile detection, and completes the receivefile code path changes. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19The guts of the receivefile code changes.Jeremy Allison1-5/+60
If an incoming PDU might qualify, only read SMBD_SMB2_SHORT_RECEIVEFILE_WRITE_LEN = (SMB2_HEADER + SMB2_WRITE_BODY_LEN) bytes rather than the whole PDU. Next time we're called, use is_smb2_recvfile_write() to decide if this is an SMB2_WRITE that fit the receivefile criteria, otherwise just read the rest of the PDU. If we did do a short receivefile read, set up the smb2_req->smb1req->unread_bytes value to show what bytes remain in the TCP buffers. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Add stub static function that will turn on/off receivefile code path.Jeremy Allison1-0/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Add extra fields into struct smbd_smb2_request_read_state to support ↵Jeremy Allison1-0/+3
receivefile. Initialize min_recv_size with the size that will trigger the receivefile write path. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Add macro SMBD_SMB2_SHORT_RECEIVEFILE_WRITE_LEN.Jeremy Allison1-0/+2
This is the 'short' length we'll read in the SMB2_WRITE receivefile code path. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Add utility function get_min_receive_file_size().Jeremy Allison1-0/+11
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Allow smbd_smb2_request_error_ex() to cope with unread bytes on error.Jeremy Allison1-0/+10
Drain the socket if a RECVFILE write failed. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Add function smbd_smb2_unread_bytes().Jeremy Allison2-0/+13
Returns number of bytes left to read for recvfile. Will be used in SMB_2_WRITE_FILE code path. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19If we already have an smb1req attached to the struct smbd_smb2_request, ↵Jeremy Allison1-3/+7
don't recreate it. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19Ensure we don't do an SMB2 aio write if RECVFILE is active.Jeremy Allison1-0/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
2013-04-19samba-tool/dns: Fix a typo in ttl variable nameAmitay Isaacs1-1/+1
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-19fileserver: raise the debug level for share connection from non IPC to 2Matthieu Patou1-1/+1
So that logs of make test are not spamed, the code dates from 1999 maybe at that moment we wanted to have some warning I think nodays it's pretty stable. Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-19s3:locking add NDR debug in share_mode_forallChristian Ambach1-0/+4
Reviewed-by: Volker Lendecke <vl@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Apr 19 15:06:33 CEST 2013 on sn-devel-104
2013-04-19s3:rpc_server increase a debug levelChristian Ambach1-8/+8
those messages are not worth level 0 or 1 and potentially clutter the system logs Reviewed-by: Volker Lendecke <vl@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org>
2013-04-19s3:registry increase a debug levelChristian Ambach1-1/+1
do not clutter the logs Reviewed-by: Volker Lendecke <vl@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org>
2013-04-19s3:smbd stop working on a dead client socketChristian Ambach1-0/+1
when the client has already disconnected, exit server as done in other paths in smbd_process Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-19s3:smbd increase a loglevelChristian Ambach1-5/+5
do not complain too loudly if the socket has already gone Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-19s3:smbstatus do not print orphaned share entriesChristian Ambach1-0/+6
Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-04-19smbd: Fix signing when the async echo handler kicks inVolker Lendecke1-1/+1
This was introduced as a copy&paste error in 5e0258fc932c Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
2013-04-19s4:dsdb: Fix warnings about not set / set but unused / shadowed variablesMatthieu Patou7-20/+5
Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Apr 19 13:15:40 CEST 2013 on sn-devel-104
2013-04-19s3:smbd:smb2:scavenger: fix format error for debugging open_persistent_id in ↵Michael Adam1-4/+5
scavenger_timer() Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Apr 19 01:36:15 CEST 2013 on sn-devel-104
2013-04-18talloc: Simplify _talloc_free_poolmem a bitVolker Lendecke1-2/+14
Early returns are easier to understand than "else if" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 18 22:50:42 CEST 2013 on sn-devel-104