summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-18s3:smbd: call scavenger_schedule_disconnected() from close normal file for ↵Gregor Beck1-0/+2
durable handles Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:smbd: add a scavenger process for disconnected durable handlesGregor Beck6-0/+570
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-18s3:locking: add function share_mode_cleanup_disconnected()Gregor Beck2-0/+102
For a given file, clean share mode entries for a given persistent file id. Pair-Programmed-With: Michael Adam <obnox@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:locking: improve debug output of parse_share_modes()Gregor Beck1-1/+2
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:locking: no need to make a file_id passed by value a constantGregor Beck2-13/+10
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:locking:brlock: add function brl_cleanup_disconnected()Gregor Beck2-0/+74
For a given file, clean up brl entries belonging to a given persistent file id. Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:locking:brlock: explain the lockdb_clean semantic better in ↵Michael Adam1-1/+5
brl_reconnect_disconnected() Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:locking:brlock: let validate_lock_entries keep entries for disconnected ↵Gregor Beck1-8/+23
servers in traverses We should not remove locks of disconnected opens just like that. When getting the byte range lock record for a newly connected file handle, we still do the clean up, because in that situation, disconnected entries are not valid any more. Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:locking:brlock: improve the comment for the brl self cleaning codeMichael Adam1-3/+6
Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:locking:brlock: use serverids_exist to validate_lock_entriesGregor Beck1-3/+34
...instead of checking each server-id separately which can be expensive in a cluster. Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:smbXsrv_open: add function smbXsrv_open_cleanup()Gregor Beck2-0/+80
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:smbXsrv_open: factor out smbXsrv_open_global_parse_recordGregor Beck1-14/+36
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:net registry check: use tdb_data_string()Gregor Beck1-20/+3
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18util_tdb: add function tdb_data_string()Gregor Beck2-0/+35
Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-18s3:winbindd: avoid usage of procid_self()Stefan Metzmacher1-1/+3
metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-04-18s3:smbd:smb2: fix setting of scavenge timeout when reconnecting durable handlesMichael Adam1-5/+4
The bug fixed with this commit led to reconnected durable handles having a disconnect timeout of 0 msec. This fix re-establishes the original timeout for the reconnected handle. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org>
2013-04-18smbd: Remove NTSTATUS based create_synthetic_smb_fnameVolker Lendecke2-33/+0
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 02:52:40 CEST 2013 on sn-devel-104
2013-04-17smbd: Convert create_file_unixpath to synthetic_smb_fnameVolker Lendecke1-5/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert is_visible_file to synthetic_smb_fnameVolker Lendecke1-4/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert dptr_create to synthetic_smb_fnameVolker Lendecke1-8/+7
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert print_spool_open to synthetic_smb_fnameVolker Lendecke1-3/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert driver_unlink_internals to synthetic_smb_fnameVolker Lendecke1-3/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfstest: Convert cmd_set_nt_acl to synthetic_smb_fnameVolker Lendecke1-4/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfstest: Convert cmd_utime to synthetic_smb_fnameVolker Lendecke1-5/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfstest: Convert cmd_lstat to synthetic_smb_fnameVolker Lendecke1-5/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfstest: Convert cmd_stat to synthetic_smb_fnameVolker Lendecke1-5/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfstest: Convert cmd_rename to synthetic_smb_fnameVolker Lendecke1-9/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfstest: Convert cmd_pathfunc to synthetic_smb_fnameVolker Lendecke1-6/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfstest: Convert cmd_open to synthetic_smb_fnameVolker Lendecke1-4/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfs: Convert dirsort_opendir to synthetic_smb_fnameVolker Lendecke1-7/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17vfs: Convert vfs_scannedonly to synthetic_smb_fnameVolker Lendecke1-16/+12
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert set_create_timespec_ea to synthetic_smb_fnameVolker Lendecke1-8/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>