summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2012-06-15s3:smbd: change smb2_close.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change smb2_break.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-6/+6
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change reply.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-50/+50
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change pipes.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-3/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change oplock.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-5/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change open.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-4/+4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change nttrans.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-3/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change files.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change fake_file.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change blocking.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-14/+15
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: change aio.c to use fsp_fnum_dbg() for logging fsp->fnum.Michael Adam1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: use FNUM_FIELD_INVALID instead of literal -1Michael Adam4-9/+13
This is in preparation of changing fnum to uint64_t Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:files: factor fsp_free() out of file_free()Michael Adam2-20/+28
To be reused in the durable reconnect code. Pair-Programmed-With: Volker Lendecke <vl@samba.org>
2012-06-15s3:files: reorder file_free() a bitMichael Adam1-16/+18
Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: refactor fsp_new() out of file_new()Michael Adam2-34/+57
Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-06-14s3:smbd: use fsp_persistent_id() as persistent_file_id part for SMB2 (bug #8995)Stefan Metzmacher3-6/+9
It seems to be important to have unique persistent file ids, because windows clients seem to index files by server_guid + persistent_file_id. Which may break, if we just have a 16-bit range per connection and the client connects multiple times. Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent fileid in SMB2. metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jun 14 22:04:13 CEST 2012 on sn-devel-104
2012-06-14s3:smbd: add a fsp_persistent_id() functionStefan Metzmacher2-0/+25
This calculates a 64-bit value that most likely uniquely identifies the files_struct globally to the server. * 32-bit random gen_id * 16-bit truncated open_time * 16-bit fnum (valatile_id) Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent fileid in SMB2. Pair-Programmed-With: Michael Adam <obnox@samba.org> metze
2012-06-14s3:smbd: only set fsp->fh->gen_id for a client connectionStefan Metzmacher1-1/+2
For faked connections, like dfs and printing, we leave it as 0. metze
2012-06-14s3:smbd: try to make fsp->fh->gen_id as globally unique as possibleStefan Metzmacher1-1/+19
This makes sure the value is never 0, it's between 1 and UINT32_MAX. While fsp->fh->gen_id is 'unsigned long' currently (which might by 8 bytes), there's some oplock code which truncates it to uint32_t (using IVAL()). Which means we could reuse fsp->fh->gen_id as persistent file id until we have a final fix, which uses database. See bug #8995 for more details. Based on code from Ira Cooper. Ensure fsp->fh->gen_id starts from a random point. We will use this as the SMB2 persistent_id. metze
2012-06-11s3:smbd: explain parameters to filename_convert call in smbd_smb2_create_send()Michael Adam1-2/+2
Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Jun 11 19:21:51 CEST 2012 on sn-devel-104
2012-06-11s3: Fix Coverity ID 703869 Logically dead codeVolker Lendecke1-10/+6
We "TALLOC_FREE(curr)" and assign prev=curr in the for-loop header. This will lead to "prev"==NULL always. In this loop, we do not need to correctly re-shuffle the linked list, we delete all from the beginning anyway. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Jun 11 17:26:53 CEST 2012 on sn-devel-104
2012-06-11s3: Fix Coverity ID 709049 Dereference before null checkVolker Lendecke1-1/+1
We have dereferenced fsp before. Because smb2 is only handle based, this is a bogus check. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Jun 11 15:30:54 CEST 2012 on sn-devel-104
2012-06-11s3-smbd: Remove unused branches in negprot since security=share was removedAndrew Bartlett1-21/+8
2012-06-10s3: fix build on systems without O_NOFOLLOWBjörn Jacke1-1/+1
2012-06-10Revert "s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()"Stefan Metzmacher1-3/+0
This reverts commit c2716a7d5ccf78f9716b703c22e6cf4d4f179656. This is not needed anymore, as we have file_fsp_smb2() now. metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Jun 10 18:04:21 CEST 2012 on sn-devel-104
2012-06-10s3: handle non-POSIX compliant Tru64, NetBSD and FreeBSD errno on O_NOFOLLOW ↵Björn Jacke1-1/+20
symlink open calls or should we leave the NetBSD and FreeBSD platforms just broken? Actually these two *want* to have broken platforms as they use different errno's than POSIX demands *interntionally*. The POSIX errno ELOOP for O_NOFOLLOW open calls on symlinks is clear and unambiguous. See http://gnats.netbsd.org/43154 for the interesting NetBSD discussion on that. Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Sun Jun 10 16:10:02 CEST 2012 on sn-devel-104
2012-06-10s3:smb2_ioctl: make use of file_fsp_smb2()Stefan Metzmacher1-30/+12
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Jun 10 01:10:15 CEST 2012 on sn-devel-104
2012-06-09s3:smb2_lock: make use of file_fsp_smb2()Stefan Metzmacher1-30/+12
metze
2012-06-09s3:smb2_write: make use of file_fsp_smb2()Stefan Metzmacher1-26/+9
metze
2012-06-09s3:smb2_read: make use of file_fsp_smb2()Stefan Metzmacher1-29/+11
metze
2012-06-09s3:smb2_notify: make use of file_fsp_smb2()Stefan Metzmacher1-26/+9
metze
2012-06-09s3:smb2_setinfo: make use of file_fsp_smb2()Stefan Metzmacher1-29/+12
metze
2012-06-09s3:smb2_getinfo: make use of file_fsp_smb2()Stefan Metzmacher1-29/+12
metze
2012-06-09s3:smb2_find: make use of file_fsp_smb2()Stefan Metzmacher1-26/+9
metze
2012-06-09s3:smb2_break: make use of file_fsp_smb2()Stefan Metzmacher1-32/+13
metze
2012-06-09s3:smb2_close: make use of file_fsp_smb2()Stefan Metzmacher1-30/+15
metze
2012-06-09s3:smb2_flush: make use of file_fsp_smb2()Stefan Metzmacher1-26/+9
metze
2012-06-09s3:smbd: add file_fsp_smb2()Stefan Metzmacher2-0/+46
metze
2012-06-09s3:smb2_write: pass fsp->fnum to init_strict_lock_struct()Stefan Metzmacher1-1/+1
fsp->fnum is the same as in_file_id_volatile. When we start to support durable handles we should pass in_file_id_persistent. metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jun 9 18:50:32 CEST 2012 on sn-devel-104
2012-06-09s3:smb2_read: pass fsp->fnum to init_strict_lock_struct()Stefan Metzmacher1-2/+2
fsp->fnum is the same as in_file_id_volatile. When we start to support durable handles we should pass in_file_id_persistent. metze
2012-06-09s3:smb2_lock: use fsp->fnum as locking contextStefan Metzmacher1-1/+1
fsp->fnum is the same as in_file_id_volatile. When we start to support durable handles we should pass in_file_id_persistent. metze
2012-06-09s3:smb2_lock: use smb2req->compat_chain_fsp instead of looking it up againStefan Metzmacher1-6/+1
metze
2012-06-09s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()Stefan Metzmacher1-0/+3
metze
2012-06-09s3:smb2_close: add missing TALLOC_FREE(subreq) in smbd_smb2_request_close_done()Stefan Metzmacher1-0/+1
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jun 9 13:57:31 CEST 2012 on sn-devel-104
2012-06-09s3:smbd: readd START_PROFILE(smbd_idle)/END_PROFILE(smbd_idle)Stefan Metzmacher1-0/+15
metze
2012-06-08s3:smbd: change set_file_oplock() to return NTSTATUSMichael Adam3-7/+9
Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Jun 8 23:20:20 CEST 2012 on sn-devel-104
2012-06-08s3: Replace an if with a boolean short circuitVolker Lendecke1-5/+3
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-08s3: Assigning ?True:False to a bool is a bit pointlessVolker Lendecke1-3/+2
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-08s3: Remove unnecessary ()Volker Lendecke1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-08s3: Replace an if with a boolean short circuitVolker Lendecke1-5/+3
Signed-off-by: Michael Adam <obnox@samba.org>