summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
* s3:smbd: change smb2_read.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-6/+6
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change smb2_notify.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change smb2_lock.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-6/+6
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change smb2_ioctl.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change smb2_getinfo.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-4/+4
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change smb2_flush.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change smb2_find.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change smb2_close.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change smb2_break.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-6/+6
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change reply.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-50/+50
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change pipes.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-3/+3
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change oplock.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-5/+5
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change open.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-4/+4
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change nttrans.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-3/+5
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change files.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change fake_file.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change blocking.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam2012-06-151-14/+15
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: change aio.c to use fsp_fnum_dbg() for logging fsp->fnum.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd: use FNUM_FIELD_INVALID instead of literal -1Michael Adam2012-06-154-9/+13
| | | | | | This is in preparation of changing fnum to uint64_t Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:files: factor fsp_free() out of file_free()Michael Adam2012-06-152-20/+28
| | | | | | To be reused in the durable reconnect code. Pair-Programmed-With: Volker Lendecke <vl@samba.org>
* s3:files: reorder file_free() a bitMichael Adam2012-06-151-16/+18
| | | | | Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:smbd: refactor fsp_new() out of file_new()Michael Adam2012-06-152-34/+57
| | | | | Pair-Programmed-With: Volker Lendecke <vl@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:smbd: use fsp_persistent_id() as persistent_file_id part for SMB2 (bug #8995)Stefan Metzmacher2012-06-143-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
* s3:smbd: add a fsp_persistent_id() functionStefan Metzmacher2012-06-142-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
* s3:smbd: only set fsp->fh->gen_id for a client connectionStefan Metzmacher2012-06-141-1/+2
| | | | | | For faked connections, like dfs and printing, we leave it as 0. metze
* s3:smbd: try to make fsp->fh->gen_id as globally unique as possibleStefan Metzmacher2012-06-141-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
* s3:smbd: explain parameters to filename_convert call in smbd_smb2_create_send()Michael Adam2012-06-111-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
* s3: Fix Coverity ID 703869 Logically dead codeVolker Lendecke2012-06-111-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
* s3: Fix Coverity ID 709049 Dereference before null checkVolker Lendecke2012-06-111-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
* s3-smbd: Remove unused branches in negprot since security=share was removedAndrew Bartlett2012-06-111-21/+8
|
* s3: fix build on systems without O_NOFOLLOWBjörn Jacke2012-06-101-1/+1
|
* Revert "s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()"Stefan Metzmacher2012-06-101-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
* s3: handle non-POSIX compliant Tru64, NetBSD and FreeBSD errno on O_NOFOLLOW ↵Björn Jacke2012-06-101-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
* s3:smb2_ioctl: make use of file_fsp_smb2()Stefan Metzmacher2012-06-101-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
* s3:smb2_lock: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-30/+12
| | | | metze
* s3:smb2_write: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-26/+9
| | | | metze
* s3:smb2_read: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-29/+11
| | | | metze
* s3:smb2_notify: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-26/+9
| | | | metze
* s3:smb2_setinfo: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-29/+12
| | | | metze
* s3:smb2_getinfo: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-29/+12
| | | | metze
* s3:smb2_find: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-26/+9
| | | | metze
* s3:smb2_break: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-32/+13
| | | | metze
* s3:smb2_close: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-30/+15
| | | | metze
* s3:smb2_flush: make use of file_fsp_smb2()Stefan Metzmacher2012-06-091-26/+9
| | | | metze
* s3:smbd: add file_fsp_smb2()Stefan Metzmacher2012-06-092-0/+46
| | | | metze
* s3:smb2_write: pass fsp->fnum to init_strict_lock_struct()Stefan Metzmacher2012-06-091-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
* s3:smb2_read: pass fsp->fnum to init_strict_lock_struct()Stefan Metzmacher2012-06-091-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
* s3:smb2_lock: use fsp->fnum as locking contextStefan Metzmacher2012-06-091-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
* s3:smb2_lock: use smb2req->compat_chain_fsp instead of looking it up againStefan Metzmacher2012-06-091-6/+1
| | | | metze
* s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()Stefan Metzmacher2012-06-091-0/+3
| | | | metze