metze/samba/wip.git
11 years agotorture: Reproducer for 64c0367
Volker Lendecke [Tue, 7 Aug 2012 15:12:19 +0000 (17:12 +0200)]
torture: Reproducer for 64c0367

Signed-off-by: Jeremy Allison <jra@samba.org>
11 years agotdb/test: fix build on OSF/1
Björn Jacke [Fri, 10 Aug 2012 19:50:22 +0000 (21:50 +0200)]
tdb/test: fix build on OSF/1

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Aug 10 23:33:20 CEST 2012 on sn-devel-104

11 years agoRevert "s3:smbd: include smbXsrv.h before smbd/proto.h to have the smbXsrv_ structs...
Stefan Metzmacher [Fri, 10 Aug 2012 09:58:39 +0000 (11:58 +0200)]
Revert "s3:smbd: include smbXsrv.h before smbd/proto.h to have the smbXsrv_ structs available"

This reverts commit 98ccca8dca70b87d04a93c8ef5232a071ab7c2af.

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 10 17:35:38 CEST 2012 on sn-devel-104

11 years agoRevert "s3:smbd: Include smbXsrv.h before vfs.h (in smbd.h) so that the smbXsrv struc...
Stefan Metzmacher [Fri, 10 Aug 2012 09:56:21 +0000 (11:56 +0200)]
Revert "s3:smbd: Include smbXsrv.h before vfs.h (in smbd.h) so that the smbXsrv structures are available"

This reverts commit e332bfaff51e54638bd37cd1fe08e57608e16e86.

11 years agoRevert "s3:smb: include "smbXsrv.h" before "vfs.h""
Stefan Metzmacher [Fri, 10 Aug 2012 09:58:28 +0000 (11:58 +0200)]
Revert "s3:smb: include "smbXsrv.h" before "vfs.h""

This reverts commit db0c233624e633b3cc1a6e0e44dccc09aaa121f2.

11 years agos3:smbXsrv.idl: remove smbXsrv_*0 defines
Stefan Metzmacher [Fri, 10 Aug 2012 09:55:13 +0000 (11:55 +0200)]
s3:smbXsrv.idl: remove smbXsrv_*0 defines

This makes ctags more usable.

metze

11 years agos3:param: fix compiler warnings with FN_GLOBAL_CONST_STRING()
Stefan Metzmacher [Fri, 10 Aug 2012 10:05:15 +0000 (12:05 +0200)]
s3:param: fix compiler warnings with FN_GLOBAL_CONST_STRING()

metze

11 years agobuild: rename security → samba-security
Björn Jacke [Fri, 10 Aug 2012 09:37:28 +0000 (11:37 +0200)]
build: rename security → samba-security

there is a libsecurity on OSF1 which clasheѕ with our security lib. see bug #9023.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Aug 10 14:22:21 CEST 2012 on sn-devel-104

11 years agonsswitch: add ABI checking and symbol versions to libwbclient
Andrew Bartlett [Fri, 10 Aug 2012 00:17:31 +0000 (10:17 +1000)]
nsswitch: add ABI checking and symbol versions to libwbclient

This will ensure that we do not unintentionally break the ABI.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 10 04:08:54 CEST 2012 on sn-devel-104

11 years agos4-dsdb: Explain better what records are written during schema set
Andrew Bartlett [Thu, 9 Aug 2012 22:44:04 +0000 (08:44 +1000)]
s4-dsdb: Explain better what records are written during schema set

This is controlled by setting write_indices_and_attributes.

Andrew Bartlett

11 years agolib/ldb: Use tdb_parse_record and a callback rather than tdb_fetch()
Andrew Bartlett [Thu, 9 Aug 2012 12:46:48 +0000 (22:46 +1000)]
lib/ldb: Use tdb_parse_record and a callback rather than tdb_fetch()

This avoid allocation at the tdb layer as we will allocate this
with talloc right away anyway.

Andrew Bartlett

11 years agoRemove smb_panic() from unix_strlower(). Just rely on error code return.
Jeremy Allison [Thu, 9 Aug 2012 00:32:50 +0000 (17:32 -0700)]
Remove smb_panic() from unix_strlower(). Just rely on error code return.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  9 23:52:53 CEST 2012 on sn-devel-104

11 years agoCorrectly check for errors in strlower_m() returns.
Jeremy Allison [Thu, 9 Aug 2012 00:01:00 +0000 (17:01 -0700)]
Correctly check for errors in strlower_m() returns.

11 years agoFix strlower_m() to return an error indication.
Jeremy Allison [Wed, 8 Aug 2012 22:56:58 +0000 (15:56 -0700)]
Fix strlower_m() to return an error indication.

11 years agoCheck error returns on strnorm().
Jeremy Allison [Wed, 8 Aug 2012 22:49:34 +0000 (15:49 -0700)]
Check error returns on strnorm().

11 years agoCheck error returns from strupper_m() (in all reasonable places).
Jeremy Allison [Wed, 8 Aug 2012 22:35:28 +0000 (15:35 -0700)]
Check error returns from strupper_m() (in all reasonable places).

11 years agoFix missing ads_destroy in error path.
Jeremy Allison [Wed, 8 Aug 2012 22:21:33 +0000 (15:21 -0700)]
Fix missing ads_destroy in error path.

11 years agoChange strupper_m() to return a value.
Jeremy Allison [Wed, 8 Aug 2012 19:16:40 +0000 (12:16 -0700)]
Change strupper_m() to return a value.

11 years agoFix bad return in unix_strupper.
Jeremy Allison [Wed, 8 Aug 2012 19:10:01 +0000 (12:10 -0700)]
Fix bad return in unix_strupper.

11 years agoPrepare to remove smb_panic() from unix_strlower().
Jeremy Allison [Wed, 8 Aug 2012 19:07:54 +0000 (12:07 -0700)]
Prepare to remove smb_panic() from unix_strlower().

11 years agoFix bad return values in unix_strlower/unix_strupper.
Jeremy Allison [Wed, 8 Aug 2012 19:06:34 +0000 (12:06 -0700)]
Fix bad return values in unix_strlower/unix_strupper.

11 years agos4:torture:basic: check the return status of the last open in deltest16
Michael Adam [Thu, 9 Aug 2012 09:12:55 +0000 (11:12 +0200)]
s4:torture:basic: check the return status of the last open in deltest16

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Aug  9 18:01:50 CEST 2012 on sn-devel-104

11 years agos4:torture:basic: fix a message typo in the delete17 test
Michael Adam [Wed, 8 Aug 2012 21:36:52 +0000 (23:36 +0200)]
s4:torture:basic: fix a message typo in the delete17 test

11 years agos4:torture:basic: fix abundance of spaces in deltest6
Michael Adam [Thu, 9 Aug 2012 10:56:48 +0000 (12:56 +0200)]
s4:torture:basic: fix abundance of spaces in deltest6

11 years agos4:torture:basic:delete: fix 4 vs 8 spc tab formatting in check_delete_on_close()
Michael Adam [Wed, 8 Aug 2012 15:29:04 +0000 (17:29 +0200)]
s4:torture:basic:delete: fix 4 vs 8 spc tab formatting in check_delete_on_close()

11 years agos3:torture:delete: add a 12th subtest to the delete-on-close tests
Michael Adam [Wed, 8 Aug 2012 10:44:01 +0000 (12:44 +0200)]
s3:torture:delete: add a 12th subtest to the delete-on-close tests

test whether second open is possible with initial delete on close
and how setting and unsetting delete on close on the handle affects
the initial delete on close (it does not...)

11 years agos3:torture:delete: fix 11th test to work against windows
Michael Adam [Thu, 9 Aug 2012 14:11:08 +0000 (16:11 +0200)]
s3:torture:delete: fix 11th test to work against windows

11 years agos3:torture:delete: simplify return code handling, fixing a couple of return codes...
Michael Adam [Wed, 8 Aug 2012 10:25:09 +0000 (12:25 +0200)]
s3:torture:delete: simplify return code handling, fixing a couple of return codes in error cases

11 years agos3:torture:delete: reduce indentation
Michael Adam [Wed, 8 Aug 2012 10:20:24 +0000 (12:20 +0200)]
s3:torture:delete: reduce indentation

11 years agos3:torture:delete: add a comment
Michael Adam [Wed, 8 Aug 2012 10:19:52 +0000 (12:19 +0200)]
s3:torture:delete: add a comment

11 years agos3:torture:delete: add a comment
Michael Adam [Wed, 8 Aug 2012 10:18:40 +0000 (12:18 +0200)]
s3:torture:delete: add a comment

11 years agos3:torture:delete: add a comment
Michael Adam [Wed, 8 Aug 2012 10:17:53 +0000 (12:17 +0200)]
s3:torture:delete: add a comment

11 years agos3:torture:delete: move the success message for a subtest to the correct place
Michael Adam [Wed, 8 Aug 2012 09:32:55 +0000 (11:32 +0200)]
s3:torture:delete: move the success message for a subtest to the correct place

11 years agos3:torture:delete: remove an else, reducing indentation
Michael Adam [Wed, 8 Aug 2012 10:19:31 +0000 (12:19 +0200)]
s3:torture:delete: remove an else, reducing indentation

11 years agos3:torture:delete: remove an else, reducing indentation
Michael Adam [Wed, 8 Aug 2012 10:17:29 +0000 (12:17 +0200)]
s3:torture:delete: remove an else, reducing indentation

11 years agos3:torture:delete: remove an else, reducing indentation
Michael Adam [Wed, 8 Aug 2012 09:27:55 +0000 (11:27 +0200)]
s3:torture:delete: remove an else, reducing indentation

11 years agos3:torture:delete: remove an else, reducing indentation
Michael Adam [Wed, 8 Aug 2012 10:15:16 +0000 (12:15 +0200)]
s3:torture:delete: remove an else, reducing indentation

11 years agos3:torture:delete: really fail the test in a failure case
Michael Adam [Wed, 8 Aug 2012 10:14:36 +0000 (12:14 +0200)]
s3:torture:delete: really fail the test in a failure case

11 years agos3:torture:delete: fix a comment
Michael Adam [Wed, 8 Aug 2012 10:06:13 +0000 (12:06 +0200)]
s3:torture:delete: fix a comment

11 years agos3:torture:delete: fix a message
Michael Adam [Wed, 8 Aug 2012 10:05:53 +0000 (12:05 +0200)]
s3:torture:delete: fix a message

11 years agos3:torture:delete: fix a message
Michael Adam [Wed, 8 Aug 2012 10:05:38 +0000 (12:05 +0200)]
s3:torture:delete: fix a message

11 years agos3:torture:delete: fix a message
Michael Adam [Wed, 8 Aug 2012 09:56:48 +0000 (11:56 +0200)]
s3:torture:delete: fix a message

11 years agos3:torture:delete: fix a message (counting the opens)
Michael Adam [Wed, 8 Aug 2012 09:24:55 +0000 (11:24 +0200)]
s3:torture:delete: fix a message (counting the opens)

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 18:07:38 +0000 (20:07 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 10:18:55 +0000 (12:18 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 10:18:16 +0000 (12:18 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untanlge function call from result check
Michael Adam [Wed, 8 Aug 2012 10:07:29 +0000 (12:07 +0200)]
s3:torture:delete: untanlge function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:58:24 +0000 (11:58 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:58:01 +0000 (11:58 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:57:33 +0000 (11:57 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:57:03 +0000 (11:57 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:56:17 +0000 (11:56 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:55:46 +0000 (11:55 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:32:37 +0000 (11:32 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:27:19 +0000 (11:27 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos3:torture:delete: untangle function call from result check
Michael Adam [Wed, 8 Aug 2012 09:24:29 +0000 (11:24 +0200)]
s3:torture:delete: untangle function call from result check

11 years agos4-ldb_wrap: Do not vasprintf() the ldb debug messages that will not be shown
Andrew Bartlett [Thu, 9 Aug 2012 09:41:05 +0000 (19:41 +1000)]
s4-ldb_wrap: Do not vasprintf() the ldb debug messages that will not be shown

This malloc() and free() actually shows up quite high on a call profile of
provision of the AD DC.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug  9 13:51:06 CEST 2012 on sn-devel-104

11 years agolib/ldb: Do not vasprintf() the tevent debug messages that will not be shown samba-upstream/tags/ldb-1.1.10
Andrew Bartlett [Thu, 9 Aug 2012 09:40:45 +0000 (19:40 +1000)]
lib/ldb: Do not vasprintf() the tevent debug messages that will not be shown

This malloc() and free() actually shows up quite high on a call profile of
provision of the AD DC.

This allows the debug handler to decide if the argument list should be
printed.

Andrew Bartlett

11 years agos4-events: Do not vasprintf() the tevent debug messages that will not be shown
Andrew Bartlett [Thu, 9 Aug 2012 08:34:48 +0000 (18:34 +1000)]
s4-events: Do not vasprintf() the tevent debug messages that will not be shown

This malloc() and free() actually shows up quite high on a call profile of
provision of the AD DC.

Andrew Bartlett

11 years agos3-events: Do not vasprintf() the tevent debug messages that will not be shown
Andrew Bartlett [Thu, 9 Aug 2012 08:34:28 +0000 (18:34 +1000)]
s3-events: Do not vasprintf() the tevent debug messages that will not be shown

This malloc() and free() actually shows up quite high on a call profile of
provision of the AD DC (and this is the matching patch for source3).

Andrew Bartlett

11 years agolib/ldb: Use tdb_exists() rather than tdb_fetch()/talloc_free()
Andrew Bartlett [Thu, 9 Aug 2012 09:58:31 +0000 (19:58 +1000)]
lib/ldb: Use tdb_exists() rather than tdb_fetch()/talloc_free()

This avoids pulling the record and doing an allocation when we just
want to know if it exists.

Andrew Bartlett

11 years agos4-dsdb: Remove strcasecmp() fallback in replmd_ldb_message_element_attid_sort
Andrew Bartlett [Thu, 9 Aug 2012 06:16:03 +0000 (16:16 +1000)]
s4-dsdb: Remove strcasecmp() fallback in replmd_ldb_message_element_attid_sort

In all callers, we must already have a attributeID for each of the
values or else we would have already given an error, or could not have
obtained the message over DRS.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug  9 11:39:54 CEST 2012 on sn-devel-104

11 years agos4-dsdb: Do not reload partition metadata except on transaction start
Andrew Bartlett [Thu, 9 Aug 2012 05:16:37 +0000 (15:16 +1000)]
s4-dsdb: Do not reload partition metadata except on transaction start

This ensures that we do not add objects that should go into a partition, but we
simply return that an object is not present if the connection was created
before the partition was loaded.  It is rare to create a new partition.

Andrew Bartlett

11 years agos3:smb2_sesssetup: setup global->[en|de]cryption_key
Stefan Metzmacher [Wed, 8 Aug 2012 07:32:22 +0000 (09:32 +0200)]
s3:smb2_sesssetup: setup global->[en|de]cryption_key

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug  9 09:59:02 CEST 2012 on sn-devel-104

11 years agos3:smb2_read: don't try sendfile if encryption is used
Stefan Metzmacher [Wed, 8 Aug 2012 04:35:34 +0000 (06:35 +0200)]
s3:smb2_read: don't try sendfile if encryption is used

metze

11 years agos3:smb2_server: add smbd_smb2_request->do_encryption
Stefan Metzmacher [Wed, 8 Aug 2012 04:35:03 +0000 (06:35 +0200)]
s3:smb2_server: add smbd_smb2_request->do_encryption

For now it's always false...

metze

11 years agos3:smb2_tcon: set global->encryption_required and enforce it
Stefan Metzmacher [Wed, 8 Aug 2012 04:25:10 +0000 (06:25 +0200)]
s3:smb2_tcon: set global->encryption_required and enforce it

This the account or client doesn't support encryption we should
reject the tree connect.

metze

11 years agos3:smb2_sesssetup: set global->encryption_required and enforce it
Stefan Metzmacher [Wed, 8 Aug 2012 04:25:10 +0000 (06:25 +0200)]
s3:smb2_sesssetup: set global->encryption_required and enforce it

This the account or client doesn't support encryption we should
reject the session setup.

metze

11 years agos3:smbXsrv.idl: add encryption_required to smbXsrv_tcon_global0
Stefan Metzmacher [Wed, 8 Aug 2012 04:24:01 +0000 (06:24 +0200)]
s3:smbXsrv.idl: add encryption_required to smbXsrv_tcon_global0

metze

11 years agos3:smb2_server: check the session before we could response with an error.
Stefan Metzmacher [Wed, 8 Aug 2012 04:57:45 +0000 (06:57 +0200)]
s3:smb2_server: check the session before we could response with an error.

metze

11 years agos3:smb2_server: do central file_id check if the operation requires it
Stefan Metzmacher [Tue, 7 Aug 2012 07:44:31 +0000 (09:44 +0200)]
s3:smb2_server: do central file_id check if the operation requires it

Note that it's fine to call file_fsp_smb2() twice, the 2nd call
just returns smb2req->compat_chain_fsp without a 2nd lookup.

metze

11 years agos4-dsdb: Ensure we have indexing enabled during the provision
Andrew Bartlett [Thu, 9 Aug 2012 04:33:49 +0000 (14:33 +1000)]
s4-dsdb: Ensure we have indexing enabled during the provision

Because we set the schema before we connected the ldb to a file, the @INDEX records
were not added until next startup.  This cost 100% more time in running provision on
my laptop.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug  9 08:20:36 CEST 2012 on sn-devel-104

11 years agos4-pydsdb: Provide control of if we should write index attributes when reloading...
Andrew Bartlett [Thu, 9 Aug 2012 04:23:12 +0000 (14:23 +1000)]
s4-pydsdb: Provide control of if we should write index attributes when reloading a schema

This allows us to carefully control the loading of the schema.

Andrew Bartlett

11 years agos4-dsdb: Change talloc parent
Andrew Bartlett [Thu, 9 Aug 2012 02:23:58 +0000 (12:23 +1000)]
s4-dsdb: Change talloc parent

This matches the rest of the function.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug  9 06:26:36 CEST 2012 on sn-devel-104

11 years agos4-dsdb: Remove ldb_sequence_type argument from partition_primary_sequence_number
Andrew Bartlett [Thu, 9 Aug 2012 02:23:13 +0000 (12:23 +1000)]
s4-dsdb: Remove ldb_sequence_type argument from partition_primary_sequence_number

We always want LDB_SEQ_HIGHEST_SEQ here.

Andrew Bartlett

11 years agos4-dsdb: simplify migration of old-style seqence numbers to metadata.tdb
Andrew Bartlett [Thu, 9 Aug 2012 02:20:37 +0000 (12:20 +1000)]
s4-dsdb: simplify migration of old-style seqence numbers to metadata.tdb

This simple operation does not need to be encased in generic ldb extended operations.

Andrew Bartlett

11 years agos4-dsdb: Reduce calls to the ldb layer by reloading less often
Andrew Bartlett [Thu, 9 Aug 2012 00:21:38 +0000 (10:21 +1000)]
s4-dsdb: Reduce calls to the ldb layer by reloading less often

We do not need to reload the partition list to get the global sequence
number, as that number is stored in the metadata.tdb, not the ldb files.

Andrew Bartlett

11 years agos3:nmbd: log a failure in get_domain_master_name_node_status_success() as level 1
Stefan Metzmacher [Wed, 8 Aug 2012 16:21:16 +0000 (18:21 +0200)]
s3:nmbd: log a failure in get_domain_master_name_node_status_success() as level 1

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  8 20:14:29 CEST 2012 on sn-devel-104

11 years agos3:nmbd: don't log get_domain_master_name_node_status_fail at level 0
Stefan Metzmacher [Wed, 8 Aug 2012 16:16:30 +0000 (18:16 +0200)]
s3:nmbd: don't log get_domain_master_name_node_status_fail at level 0

metze

11 years agos3:smb2_server: s/i/idx in smbd_smb2_request_pending_queue()
Stefan Metzmacher [Wed, 8 Aug 2012 07:15:17 +0000 (09:15 +0200)]
s3:smb2_server: s/i/idx in smbd_smb2_request_pending_queue()

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  8 17:32:26 CEST 2012 on sn-devel-104

11 years agos3:smb2_server: make use of SMBD_SMB2_OUT_HDR_PTR() in smbd_smb2_request_pending_queue()
Stefan Metzmacher [Wed, 8 Aug 2012 07:13:17 +0000 (09:13 +0200)]
s3:smb2_server: make use of SMBD_SMB2_OUT_HDR_PTR() in smbd_smb2_request_pending_queue()

metze

11 years agos3:smb2_server: remove useless variable 'i'
Stefan Metzmacher [Wed, 8 Aug 2012 07:12:31 +0000 (09:12 +0200)]
s3:smb2_server: remove useless variable 'i'

metze

11 years agos3:smb2_server: rewrite dup_smb2_vec3() using SMBD_SMB2_*_IOV_OFS and helper variables
Stefan Metzmacher [Wed, 8 Aug 2012 06:32:40 +0000 (08:32 +0200)]
s3:smb2_server: rewrite dup_smb2_vec3() using SMBD_SMB2_*_IOV_OFS and helper variables

metze

11 years agos3:smb2_server: make use of SMBD_SMB2_* macros in smbd_smb2_request_done_ex()
Stefan Metzmacher [Wed, 8 Aug 2012 06:05:55 +0000 (08:05 +0200)]
s3:smb2_server: make use of SMBD_SMB2_* macros in smbd_smb2_request_done_ex()

metze

11 years agos3:smb2_server: make use of SMBD_SMB2_* macros in smbd_smb2_request_verify_sizes()
Stefan Metzmacher [Wed, 8 Aug 2012 06:05:55 +0000 (08:05 +0200)]
s3:smb2_server: make use of SMBD_SMB2_* macros in smbd_smb2_request_verify_sizes()

metze

11 years agos3:smb2_server: use the common buffer layout for smbd_smb2_request_pending*
Stefan Metzmacher [Wed, 8 Aug 2012 04:40:51 +0000 (06:40 +0200)]
s3:smb2_server: use the common buffer layout for smbd_smb2_request_pending*

metze

11 years agos3:smb2_read: use SMBD_SMB2_NUM_IOV_PER_REQ when checking for sendfile() support
Stefan Metzmacher [Wed, 8 Aug 2012 04:17:33 +0000 (06:17 +0200)]
s3:smb2_read: use SMBD_SMB2_NUM_IOV_PER_REQ when checking for sendfile() support

metze

11 years agos3:smb2_read: fix indentation in schedule_smb2_sendfile_read()
Stefan Metzmacher [Wed, 8 Aug 2012 04:16:35 +0000 (06:16 +0200)]
s3:smb2_read: fix indentation in schedule_smb2_sendfile_read()

metze

11 years agos3:smb2_server: don't try to update req->in.vector[0] in smbd_smb2_request_pending_qu...
Stefan Metzmacher [Wed, 8 Aug 2012 10:50:22 +0000 (12:50 +0200)]
s3:smb2_server: don't try to update req->in.vector[0] in smbd_smb2_request_pending_queue()

req->in.vector[0] is reserved for the transport and might be removed in future.
This is currently always { NULL, 0 }, as it's not used, by our
transport layer code. The SMB2 layer should never touch this!

metze

11 years agoselftest: Rename samba4.blackbox.pdbtest to samba.blackbox.pdbtest
Andrew Bartlett [Wed, 8 Aug 2012 06:02:29 +0000 (16:02 +1000)]
selftest: Rename samba4.blackbox.pdbtest to samba.blackbox.pdbtest

This test covers s3dc as well.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug  8 09:57:14 CEST 2012 on sn-devel-104

11 years agos3-torture: Extend pdbtest to also run an authentication unit-test
Andrew Bartlett [Wed, 8 Aug 2012 05:22:03 +0000 (15:22 +1000)]
s3-torture: Extend pdbtest to also run an authentication unit-test

This tests both the builtin auth_sam against passdb directly and the
configured auth module.

Andrew Bartlett

11 years agobuild: Remove pdbtest from the autoconf build
Andrew Bartlett [Wed, 8 Aug 2012 05:53:36 +0000 (15:53 +1000)]
build: Remove pdbtest from the autoconf build

pdbtest is internal test utility that is not installed.  It is only
run from the full (waf) make test, and does not need to be built in
the autoconf build.

Removing it from the autoconf build makes it easier to expand this
test to depend on more parts of Samba.

Andrew Bartlett

11 years agolibcli/smb: do not set SMB2_TF_MSG_SIZE in the caller
Stefan Metzmacher [Wed, 8 Aug 2012 03:04:07 +0000 (05:04 +0200)]
libcli/smb: do not set SMB2_TF_MSG_SIZE in the caller

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug  8 07:32:55 CEST 2012 on sn-devel-104

11 years agolibcli/smb: smb2_signing_[en|de]crypt_pdu() check and set SMB2_TF_MSG_SIZE
Stefan Metzmacher [Wed, 8 Aug 2012 03:03:19 +0000 (05:03 +0200)]
libcli/smb: smb2_signing_[en|de]crypt_pdu() check and set SMB2_TF_MSG_SIZE

metze

11 years agos3:smb2_sesssetup: remove unused code in smbd_smb2_reauth_generic_return()
Stefan Metzmacher [Wed, 8 Aug 2012 03:35:37 +0000 (05:35 +0200)]
s3:smb2_sesssetup: remove unused code in smbd_smb2_reauth_generic_return()

A reauth exchange is already signed, with the channel signing key.

metze

11 years agos3:smb2_sesssetup: remove TALLOC_FREE(session) from smbd_smb2_[re]auth_generic_return
Stefan Metzmacher [Wed, 8 Aug 2012 03:33:50 +0000 (05:33 +0200)]
s3:smb2_sesssetup: remove TALLOC_FREE(session) from smbd_smb2_[re]auth_generic_return

The caller does this via the smbd_smb2_session_setup_state_destructor()

metze

11 years agos3:smb2_server: sign the last request at the start of smbd_smb2_request_reply()
Stefan Metzmacher [Wed, 8 Aug 2012 02:35:15 +0000 (04:35 +0200)]
s3:smb2_server: sign the last request at the start of smbd_smb2_request_reply()

This means we correctly sign all responses in a compound chain.

metze

11 years agos3: Fix a crash in reply_lockingX_error
Volker Lendecke [Tue, 7 Aug 2012 20:25:53 +0000 (22:25 +0200)]
s3: Fix a crash in reply_lockingX_error

A timed brlock with 2 locks comes in and the second one blocks,
file is closed. smbd_cancel_pending_lock_requests_by_fid sets
blr->fsp to NULL. reply_lockingX_error (called via
MSG_SMB_BLOCKING_LOCK_CANCEL) deferences blr->fsp because
blr->lock_num==1 (the second one blocked).

This patch fixes the bug by only undoing the locks if fsp!=NULL.
fsp==NULL is the close case where everything is undone anyway.

Thanks to Peter Somogyi, somogyi@hu.ibm.com for this bug report.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug  8 04:12:04 CEST 2012 on sn-devel-104

11 years agovfs_dirsort: Remove unnecessary return; statement
Björn Jacke [Tue, 7 Aug 2012 22:19:00 +0000 (00:19 +0200)]
vfs_dirsort: Remove unnecessary return; statement

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Aug  8 02:17:13 CEST 2012 on sn-devel-104

11 years agovfs_afsacl.c: Remove some unnecessary return; statements
Björn Jacke [Tue, 7 Aug 2012 22:15:29 +0000 (00:15 +0200)]
vfs_afsacl.c: Remove some unnecessary return; statements