1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

85908 Commits

Author SHA1 Message Date
Jeremy Allison
90566fd0de Fix the documentation of the iosize command to explain the new zero default for smbclient.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:56 +02:00
Jeremy Allison
659f5fecd6 Fix the documentation for --send-buffersize for the new default value of zero for smbclient.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:56 +02:00
Jeremy Allison
252a6b6d8a Expand on the documentation of -m max-protocol for SMB2/3 for smbclient.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:56 +02:00
Jeremy Allison
5b60d95abc Add "-e" encrypt transport command line option documentation for smbcacls.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:55 +02:00
Jeremy Allison
646ed6884c Add "max protocol" command line documentation for smbcacls.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:55 +02:00
Jeremy Allison
d9c88a56dc Add new "timeout" command and -t option to smbclient to set the per-operation timeout.
This is needed as once SMB3 encryption is selected the server
response time can be very slow when requesting large numbers
(256) of large encrypted packets (1MB) from a Windows 2012
virtual machine. This allows clients to tune their allowable
wait time.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:55 +02:00
Jeremy Allison
81e1058e20 As SMB3 has transport level encryption, allow smbclient -e to force encryted SMB3 transport.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:55 +02:00
Jeremy Allison
25521c9085 Remove restrictions on setting iosize inside smbclient for SMB2 connections.
Also remove the SMB1 restriction to minimum iosize of 16384 (0x4000):
Now values >= 0 and <= 0xFFFF00 can be set for SMB1, 0 meaning server
defined behaviour. 0 is the new default for iosize, both for SMB1 and SMB2.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-21 17:28:54 +02:00
Jeremy Allison
6e82f70da0 Fix bug #10100 - rpcclient crashes when sending the 'netshareenum 502' command
We are using the wrong variable for the returned count.
Reported by <pisymbol@gmail.com>.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Aug 21 17:30:33 CEST 2013 on sn-devel-104
2013-08-21 17:30:33 +02:00
Volker Lendecke
534af203e3 smbd: Simplify new_break_message_smb1
There's no point in allocating a fixed length array that we throw away
immediately after use.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Aug 20 14:35:21 CEST 2013 on sn-devel-104
2013-08-20 14:35:21 +02:00
Volker Lendecke
e7dab403c0 smbd: Replace a 0-timeout wakeup_send
A tevent_immediate is simpler and is what we want here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-20 12:34:00 +02:00
Karolin Seeger
1808316b12 docs: Fix variable list in man vfs_crossrename.
The varlist entries need a paragraph, otherwise the list is broken and the list
entries end with ".RE".

Fix bug #10076 - varlist in man vfs_crossrename broken.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 20 04:19:42 CEST 2013 on sn-devel-104
2013-08-20 04:19:42 +02:00
Rusty Russell
3e11421e74 Man pages for ntdb tools missing
Copied and modified from tdb man pages.  Avoided reproducing API documentation
which is extensively documented in the ntdb.h header already.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10000

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-19 15:57:50 -07:00
Volker Lendecke
4f96d5753f libsmb: Fix a bunch of Coverity IDs
(fnum != -1) is always true, even if fnum=-1 was initialized. fnum is
a uint16, and the comparison first casts this to 65535, which is always
!= -1.

Also change the initialization to make it clearer what is happening here.

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): Tue Aug 20 00:52:36 CEST 2013 on sn-devel-104
2013-08-20 00:52:36 +02:00
Richard Sharpe
74829fecd7 Fix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.
Windows overloads the EA Length field in the DIRECTORY INFO leves of FIND FIRST/FIND NEXT.

This field indicates either the REPARSE_TAG if the file/folder has a reparse proint or
the EA Length if it has EAs, and is the fundamental reason you cannot have both on a
file or folder.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug 19 22:21:34 CEST 2013 on sn-devel-104
2013-08-19 22:21:34 +02:00
Volker Lendecke
02618cc58a rpc_server: Fix CID 1063255 Resource leak
We would leak a socket 0 here

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug 19 03:10:51 CEST 2013 on sn-devel-104
2013-08-19 03:10:51 +02:00
Volker Lendecke
980c757388 gensec: Fix CID 1063258 Uninitialized scalar variable
Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:16:26 +12:00
Volker Lendecke
2055ce1dbe registry4: Fix CID 1034911 Dereference before null check
curbegin is always != NULL here (curend + 1) and is dereferenced by
strchr.

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:15:20 +12:00
Volker Lendecke
cc983c9a6a smbd: Fix CID 1063259 Uninitialized scalar variable
Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:29 +12:00
Volker Lendecke
cb598ddab6 ldb_map: Fix CID 1034791 Dereference null return value
Add NULL checks

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:27 +12:00
Volker Lendecke
cbb5c1ce39 pyldb: Fix CID 1034792 Dereference null return value
Add a NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:25 +12:00
Volker Lendecke
15bd82550d ldb: Fix CID 1034793 Dereference null return value
Add a proper NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:23 +12:00
Volker Lendecke
6417d9e035 samdb: Fix CID 1034910 Dereference before null check
strncmp("tdb://", sam_name, 6) dereferences sam_name. Check for
NULL before that.

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:21 +12:00
Volker Lendecke
8c4e6f0cba samdb: Fix CID 1034910 Dereference before null check
strncmp("tdb://", sam_name, 6) dereferences sam_name. Check for
NULL before that.

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:19 +12:00
Volker Lendecke
35330aa2c8 samdb: Fix CID 1034910 Dereference before null check
strncmp("tdb://", secrets_ldb, 6) dereferences secrets_ldb. Check for
NULL before that.

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:17 +12:00
Volker Lendecke
f82daa054a registry4: Fix CID 1034911 Dereference before null check
curbegin is always != NULL here (curend + 1) and is dereferenced by
strchr.

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:15 +12:00
Volker Lendecke
817e0ae687 log2pcaphex: Fix nonempty line endings
Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:13 +12:00
Volker Lendecke
0627350458 ldb: Fix a const warning
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Aug 18 10:26:27 CEST 2013 on sn-devel-104
2013-08-18 10:26:27 +02:00
Anand Avati
c8c84b47be vfs_glusterfs: Implement proper mashalling/unmarshalling of ACLs
Use the primitives available in Samba byteorder.h for implementing
proper (un)marshalling of ACL xattrs.
- Incorporated Raghavendra Talur's comments on v3

Signed-off-by: Anand Avati <avati@redhat.com>
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christopher R. Hertel <crh@samba.org>
Tested-by: Jose A. Rivera <jarrpa@redhat.com>

Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Fri Aug 16 20:34:51 CEST 2013 on sn-devel-104
2013-08-16 20:34:51 +02:00
Volker Lendecke
91b0ff7e00 smbd: Do not wait unnecessarily
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Aug 16 18:46:36 CEST 2013 on sn-devel-104
2013-08-16 18:46:36 +02:00
Volker Lendecke
54d9ec7517 smbd: Make break_level2_to_none_async static
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-16 16:52:58 +02:00
Volker Lendecke
6c0758219a tevent: Remove a pointless goto
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-16 16:50:23 +02:00
Matthieu Patou
52ec52b677 loadparm: Use the new fully featured kcc by default
Signed-off-by: Matthieu Patou <mat@matws.net>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 16 04:44:01 CEST 2013 on sn-devel-104
2013-08-16 04:44:01 +02:00
Volker Lendecke
0a42493763 libctdb: Avoid an explicit memset
Give the compiler a chance to use better code. Saves a few bytes of text.

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): Fri Aug 16 01:51:55 CEST 2013 on sn-devel-104
2013-08-16 01:51:55 +02:00
David Disseldorp
e0bda35cf5 torture: support Windows 2k8 response for compress_invalid_buf
Windows Server 2012 returns NT_STATUS_INVALID_USER_BUFFER, Windows
Server 2008r2 returns NT_STATUS_INVALID_PARAMETER. Don't fail the test
if either status is returned.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:49 -07:00
David Disseldorp
2c7c3fd2d6 torture: add more [no-]compress-on-open ioctl tests
compress_create_with_attr: Specifies the FILE_ATTRIBUTE_COMPRESSED
attribute at create time, then checks the created file.

compress_inherit_disable: Creates under a compressed directory, a file
with the NTCREATEX_OPTIONS_NO_COMPRESSION option. Then checks that the
newly created file doesn't inherit the parent compression state.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:45 -07:00
David Disseldorp
337a94f756 torture: add file_attribs arg to file create helper
Allows for the testing of file creation with FILE_ATTRIBUTE_COMPRESSED.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:41 -07:00
David Disseldorp
0ad2ca98ce torture: add compressed file attribute ioctl test
After marking a file for compression via FSCTL_SET_COMPRESSION, the
FILE_ATTRIBUTE_COMPRESSED flag should be present. Test for this.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:37 -07:00
David Disseldorp
e1b45869de torture: check for filesystem compression capability
Only run the compression tests if the compression capability is returned
by the server in response to an SMB2_QUERY_INFO(FS attribute info)
request.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:34 -07:00
David Disseldorp
f47ff9d227 torture: extend FSCTL_[GET/SET]_COMPRESSION tests
Check for inheritance of compression attributes from parent directories.
Also, test error handling for invalid requests.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 13:40:17 -07:00
Stefan Metzmacher
b706ca6e55 s3:libsmb: call smb2cli_logoff() from cli_ulogoff()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 15 10:53:21 CEST 2013 on sn-devel-104
2013-08-15 10:53:21 +02:00
Stefan Metzmacher
1d7bdfc4fe s3:libsmb: make cli_ulogoff_send/recv static
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
e6be68fb5e s3:libsmb: call smb2cli_tdis() from cli_tdis()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
d732e9aab3 s3:libsmb: only set tcon to invalid in smb2cli_tdis*
This matches the behavior of cli_tdis*.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
80d4f64352 s3:libsmb: make cli_tdis_send/recv static
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
ccf7b37191 s3:libsmb: add support for SMB2 in cli_writeall()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
a85d4511e6 s3:libsmb: add SMB2 support to cli_pull*
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Stefan Metzmacher
6896bf0b28 s3:libsmb: add SMB2 support to cli_push*
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
80758e4b07 s3:libsmb: Plumb cli_smb2_set_security_descriptor() inside cli_set_security_descriptor().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00
Jeremy Allison
1db7e90451 s3:libsmb: Plumb cli_smb2_query_security_descriptor() inside cli_query_security_descriptor().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:07 +02:00