summaryrefslogtreecommitdiff
path: root/source3
AgeCommit message (Collapse)AuthorFilesLines
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-14s3: Simplify tdb_data_is_cstr a bitVolker Lendecke1-1/+1
The original code contained rawmemchr for performance reasons. I would expect the very common strlen routine to be not much worse performance-wise than rawmemchr. On top, for me this patch simplifies the expression a bit. Signed-off-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jun 14 16:55:58 CEST 2012 on sn-devel-104
2012-06-14s3: Fix a commentVolker Lendecke1-15/+13
The fd count is implicit Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 14 01:53:17 CEST 2012 on sn-devel-104
2012-06-12s3: Make --pw-nt-hash useable in smbclientVolker Lendecke1-0/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jun 12 12:41:10 CEST 2012 on sn-devel-104
2012-06-12s3: Add --pw-nt-hash to popt_common_credentialsVolker Lendecke1-0/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12s3: Add cli_state->pw_nt_hashVolker Lendecke3-1/+10
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12s3: Add user_auth_info->use_pw_nt_hashVolker Lendecke2-0/+17
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12s3-libsmbclient: change vnum to 0.2.0Stefan Metzmacher2-1/+173
metze
2012-06-12s3-libsmbclient: Add OptionUseNTHashVolker Lendecke4-0/+34
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12s3: Add CLI_FULL_CONNECTION_USE_NT_HASHVolker Lendecke1-0/+1
... as an indicator that the password supplied is the NT hash Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12S3: Add ntlmssp_set_password_hashVolker Lendecke2-0/+24
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12s3-libsmbclient: Make SMBC_call_auth_fn staticVolker Lendecke2-10/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12s3:torture: fix use of non-existent word (existant)Michael Adam1-3/+3
2012-06-12s3:printing: fix use of a non-existent word (existant)Michael Adam1-1/+1
2012-06-12s3:vfs:scannedonly: fix use of non-existent word (existant)Michael Adam1-5/+5
2012-06-12libsmbclient: fix use of a non-existent word (existant)Michael Adam1-1/+1
2012-06-12s3: Make vfswrap_audit_file staticVolker Lendecke1-5/+5
Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 12 02:26:31 CEST 2012 on sn-devel-104
2012-06-11s3: Fix Coverity ID 703870 Uninitialized scalar variableVolker Lendecke1-0/+1
According to man 2 recvmsg this might be unnecessary, but it does not hurt either Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-11s3: Save errno around a TALLOC_FREEVolker Lendecke1-0/+3
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-11s3: Fix Coverity ID 703871 Unused pointer valueVolker Lendecke1-0/+4
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-06-11s3-winbindd: add comments about dump_core_setupMatthieu Patou1-0/+11
This patch is related to change 0ea7152ff479e32e25817e4ddb1c2a1569bad81d Comments are added to explain why we call dump_core_setup 3 times. Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Mon Jun 11 21:21:11 CEST 2012 on sn-devel-104
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/test: make dd call more portableBjörn Jacke1-1/+1
using multiplicative suffixes like K, M etc. in dd isn't portable Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Sun Jun 10 23:29:42 CEST 2012 on sn-devel-104
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