kai/samba.git
7 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

7 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

7 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

7 years agolib/ldb: Do not vasprintf() the tevent debug messages that will not be shown save-diskspace-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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 years agovfs_full_audit: Remove some unnecessary return; statements
Björn Jacke [Tue, 7 Aug 2012 22:14:46 +0000 (00:14 +0200)]
vfs_full_audit: Remove some unnecessary return; statements

7 years agovfs_time_audit: Remove unnecessary return; statement
Björn Jacke [Tue, 7 Aug 2012 22:13:10 +0000 (00:13 +0200)]
vfs_time_audit: Remove unnecessary return; statement

7 years agovfs_time_audit: Remove some unnecessary return; statements
Björn Jacke [Tue, 7 Aug 2012 22:12:00 +0000 (00:12 +0200)]
vfs_time_audit: Remove some unnecessary return; statements

7 years agovfs-mediaharmony: Remove some unnecessary return; statements
Volker Lendecke [Tue, 7 Aug 2012 20:42:02 +0000 (22:42 +0200)]
vfs-mediaharmony: Remove some unnecessary return; statements

7 years agovfs_media_harmony: fix return of void
Björn Jacke [Tue, 7 Aug 2012 17:16:40 +0000 (19:16 +0200)]
vfs_media_harmony: fix return of void

caught by the Studio Compiler

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Aug  7 22:22:48 CEST 2012 on sn-devel-104

7 years agos3:smb2_server: fix SMB2 signing of compound responses
Stefan Metzmacher [Tue, 7 Aug 2012 12:24:28 +0000 (14:24 +0200)]
s3:smb2_server: fix SMB2 signing of compound responses

We need to defer the signing until we know the response
doesn't change anymore before it goes over the wire.

metze

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

7 years agos3:smb2_server: there's no need to copy req->out.vector when we just keep the last...
Stefan Metzmacher [Tue, 7 Aug 2012 11:02:14 +0000 (13:02 +0200)]
s3:smb2_server: there's no need to copy req->out.vector when we just keep the last request

metze

7 years agos3:smb2_server: use memmove instead of copying single vector elements
Stefan Metzmacher [Tue, 7 Aug 2012 11:00:50 +0000 (13:00 +0200)]
s3:smb2_server: use memmove instead of copying single vector elements

metze

7 years agos3:smb2_server: make use of SMBD_SMB2_OUT_HDR_PTR() smbd_smb2_request_pending_queue()
Stefan Metzmacher [Tue, 7 Aug 2012 10:57:14 +0000 (12:57 +0200)]
s3:smb2_server: make use of SMBD_SMB2_OUT_HDR_PTR() smbd_smb2_request_pending_queue()

metze

7 years agos3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ
Stefan Metzmacher [Tue, 7 Aug 2012 10:56:23 +0000 (12:56 +0200)]
s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ

metze

7 years agos3:smb2_server: make use of SMBD_SMB2_OUT_*_IOV smbd_smb2_request_reply()
Stefan Metzmacher [Tue, 7 Aug 2012 10:55:28 +0000 (12:55 +0200)]
s3:smb2_server: make use of SMBD_SMB2_OUT_*_IOV smbd_smb2_request_reply()

metze

7 years agos3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ
Stefan Metzmacher [Tue, 7 Aug 2012 10:47:44 +0000 (12:47 +0200)]
s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ

metze

7 years agos3:smb2_server: make use of SMBD_SMB2_*_IOV_OFS
Stefan Metzmacher [Tue, 7 Aug 2012 10:41:07 +0000 (12:41 +0200)]
s3:smb2_server: make use of SMBD_SMB2_*_IOV_OFS

metze

7 years agos3:smb2_server: make use of helper macros in smb2_calculate_credits()
Stefan Metzmacher [Tue, 7 Aug 2012 10:31:36 +0000 (12:31 +0200)]
s3:smb2_server: make use of helper macros in smb2_calculate_credits()

metze

7 years agos3:smb2_server: make use of helper macros in smbd_smb2_request_validate()
Stefan Metzmacher [Tue, 7 Aug 2012 10:30:54 +0000 (12:30 +0200)]
s3:smb2_server: make use of helper macros in smbd_smb2_request_validate()

metze

7 years agos3:smb2_server: make use of SMBD_SMB2_NUM_IOV_PER_REQ
Stefan Metzmacher [Tue, 7 Aug 2012 10:26:38 +0000 (12:26 +0200)]
s3:smb2_server: make use of SMBD_SMB2_NUM_IOV_PER_REQ

metze

7 years agos3:smb2_server: add some more SMBD_SMB2_* defines/macros
Stefan Metzmacher [Tue, 7 Aug 2012 10:22:06 +0000 (12:22 +0200)]
s3:smb2_server: add some more SMBD_SMB2_* defines/macros

metze

7 years agos3-param: Remove never-reached condition for popts == NULL
Andrew Bartlett [Tue, 7 Aug 2012 11:29:53 +0000 (21:29 +1000)]
s3-param: Remove never-reached condition for popts == NULL

All the callers provide a parametric options pointer to fill in.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  7 17:16:38 CEST 2012 on sn-devel-104

7 years agos3-param: Remove never-reached condition for opt_list == NULL
Andrew Bartlett [Tue, 7 Aug 2012 11:20:47 +0000 (21:20 +1000)]
s3-param: Remove never-reached condition for opt_list == NULL

All the callers provide a parametric options pointer to fill in.

Andrew Bartlett

7 years agosource3/loadparm.c: Move string_set/string_free inside.
Rusty Russell [Mon, 23 Jul 2012 05:21:39 +0000 (14:51 +0930)]
source3/loadparm.c: Move string_set/string_free inside.

The only user, so make them static inside loadparm.c

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agosource3/smbd/conn.c: wean off string_set/string_free
Rusty Russell [Mon, 23 Jul 2012 05:21:34 +0000 (14:51 +0930)]
source3/smbd/conn.c: wean off string_set/string_free

Use straight talloc strings.  This is the only user outside loadparm.c.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agosource3/loadparm: make struct loadparm_service a talloc object.
Rusty Russell [Mon, 23 Jul 2012 02:50:26 +0000 (12:20 +0930)]
source3/loadparm: make struct loadparm_service a talloc object.

This gives us a place to allocate members from.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agoloadparm: Add ctx member to struct loadparm_global.
Rusty Russell [Mon, 23 Jul 2012 02:49:46 +0000 (12:19 +0930)]
loadparm: Add ctx member to struct loadparm_global.

Rather than tallocing global parameters off NULL, keep it neat by having
a Global.ctx member.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agomedia_harmony VFS module: Add and build by default.
Andrew Klaassen [Thu, 3 May 2012 17:39:53 +0000 (13:39 -0400)]
media_harmony VFS module: Add and build by default.

 - Supersedes previous patch.
 - Added various fixes for fake mtime functionality.
 - Now requires lp_cache_locked_write_times patch (bug 8912).
 - Removed various xattr functions to comply with recent VFS changes.
 - Changed SMB_STRUCT_DIR to DIR and SMB_STRUCT_DIRENT to struct dirent to comply with recent VFS changes.
 - Added manpage.
 - Added sample trigger_avid_update.py script.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Aug  7 15:16:39 CEST 2012 on sn-devel-104

7 years agos3:smb2_server: do one central as_root check if the operation requires it
Stefan Metzmacher [Mon, 6 Aug 2012 10:32:50 +0000 (12:32 +0200)]
s3:smb2_server: do one central as_root check if the operation requires it

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug  7 13:14:38 CEST 2012 on sn-devel-104

7 years agos3:smb2_server: do one central tcon check if the operation requires it
Stefan Metzmacher [Mon, 6 Aug 2012 10:32:50 +0000 (12:32 +0200)]
s3:smb2_server: do one central tcon check if the operation requires it

metze

7 years agos3:smb2_server: do one central session check if the operation requires it
Stefan Metzmacher [Mon, 6 Aug 2012 10:32:50 +0000 (12:32 +0200)]
s3:smb2_server: do one central session check if the operation requires it

metze

7 years agos3:smb2_server: add and use smbd_smb2_call()
Stefan Metzmacher [Mon, 6 Aug 2012 08:42:30 +0000 (10:42 +0200)]
s3:smb2_server: add and use smbd_smb2_call()

metze

7 years agos3:smb2_server: add .as_root to smbd_smb2_dispatch_table
Stefan Metzmacher [Mon, 6 Aug 2012 08:04:48 +0000 (10:04 +0200)]
s3:smb2_server: add .as_root to smbd_smb2_dispatch_table

metze

7 years agos3:smb2_server: add .need_tcon to smbd_smb2_dispatch_table
Stefan Metzmacher [Mon, 6 Aug 2012 08:04:48 +0000 (10:04 +0200)]
s3:smb2_server: add .need_tcon to smbd_smb2_dispatch_table

metze

7 years agos3:smb2_server: add .need_session to smbd_smb2_dispatch_table
Stefan Metzmacher [Mon, 6 Aug 2012 08:02:54 +0000 (10:02 +0200)]
s3:smb2_server: add .need_session to smbd_smb2_dispatch_table

metze

7 years agos3:smb2_server: introduce a smbd_smb2_dispatch_table (for now just with names)
Stefan Metzmacher [Mon, 6 Aug 2012 07:29:40 +0000 (09:29 +0200)]
s3:smb2_server: introduce a smbd_smb2_dispatch_table (for now just with names)

metze

7 years agos3:smb2_server: move 'conn' to main block of smbd_smb2_request_dispatch()
Stefan Metzmacher [Tue, 7 Aug 2012 07:48:22 +0000 (09:48 +0200)]
s3:smb2_server: move 'conn' to main block of smbd_smb2_request_dispatch()

metze

7 years agolibcli/util: add NT_STATUS_FILE_NOT_AVAILABLE
Stefan Metzmacher [Tue, 7 Aug 2012 07:22:53 +0000 (09:22 +0200)]
libcli/util: add NT_STATUS_FILE_NOT_AVAILABLE

metze

7 years agolibcli/smb: use forward declaration instead of includes
Stefan Metzmacher [Tue, 7 Aug 2012 05:24:22 +0000 (07:24 +0200)]
libcli/smb: use forward declaration instead of includes

metze

7 years agos4-scripting: Remove unused variables from ntacl tests
Andrew Bartlett [Tue, 7 Aug 2012 06:55:58 +0000 (16:55 +1000)]
s4-scripting: Remove unused variables from ntacl tests

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  7 11:15:41 CEST 2012 on sn-devel-104

7 years agos4-smbd: Check for failure of irpc_add_name
Andrew Bartlett [Tue, 7 Aug 2012 05:50:46 +0000 (15:50 +1000)]
s4-smbd: Check for failure of irpc_add_name

7 years agos3-pysmbd: Try opening as a file, then as a directory
Andrew Bartlett [Tue, 7 Aug 2012 04:19:06 +0000 (14:19 +1000)]
s3-pysmbd: Try opening as a file, then as a directory

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  7 08:59:21 CEST 2012 on sn-devel-104

7 years agos3-pysmbd: Use talloc_zero()
Andrew Bartlett [Tue, 7 Aug 2012 04:18:41 +0000 (14:18 +1000)]
s3-pysmbd: Use talloc_zero()

This avoids operating on uninitialised data

Andrew Bartlett

7 years agos3-passdb: Simplify idmap wrapper in pdb_samba4
Andrew Bartlett [Tue, 7 Aug 2012 04:17:09 +0000 (14:17 +1000)]
s3-passdb: Simplify idmap wrapper in pdb_samba4

The source3 consumers of this API are now quite happy to be given an answer
of ID_TYPE_BOTH, so we do not need this extra code to try and force the
answer to UID or GID.

Andrew Bartlett

7 years agos3-pysmbd: Add talloc_stackframe() to smbd_set_simple_acl wrapper
Andrew Bartlett [Tue, 7 Aug 2012 00:45:14 +0000 (10:45 +1000)]
s3-pysmbd: Add talloc_stackframe() to smbd_set_simple_acl wrapper

7 years agos3:smb2_server: make use of smbd_smb2_inbuf_parse_compound() in smbd_smb2_request_read*()
Stefan Metzmacher [Sun, 5 Aug 2012 18:52:55 +0000 (20:52 +0200)]
s3:smb2_server: make use of smbd_smb2_inbuf_parse_compound() in smbd_smb2_request_read*()

This changes the way we read SMB2 traffic from the socket,
now as create just one large buffer for the whole NBT payload
and then split it into iovec elements in smbd_smb2_inbuf_parse_compound()

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Aug  6 21:54:35 CEST 2012 on sn-devel-104

7 years agos3:smb2_server: make use of smbd_smb2_inbuf_parse_compound() in smbd_smb2_request_cre...
Stefan Metzmacher [Sun, 5 Aug 2012 18:48:51 +0000 (20:48 +0200)]
s3:smb2_server: make use of smbd_smb2_inbuf_parse_compound() in smbd_smb2_request_create()

metze

7 years agos3:smb2_server: remove const from smbd_smb2_first_negprot()
Stefan Metzmacher [Sun, 5 Aug 2012 18:46:35 +0000 (20:46 +0200)]
s3:smb2_server: remove const from smbd_smb2_first_negprot()

metze

7 years agos3:smb2_server: add smbd_smb2_inbuf_parse_compound()
Stefan Metzmacher [Sun, 5 Aug 2012 17:39:39 +0000 (19:39 +0200)]
s3:smb2_server: add smbd_smb2_inbuf_parse_compound()

metze

7 years agos4:libcli/smb2/write correct error checking
Christian Ambach [Fri, 27 Jul 2012 13:09:18 +0000 (15:09 +0200)]
s4:libcli/smb2/write correct error checking

Server might return STATUS_BUFFER_OVERFLOW, which is not caught by NT_STATUS_IS_ERR

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Mon Aug  6 20:01:01 CEST 2012 on sn-devel-104

7 years agosmbXcli: add some includes to fix compiler warnings
Christian Ambach [Tue, 24 Jul 2012 11:16:57 +0000 (13:16 +0200)]
smbXcli: add some includes to fix compiler warnings

if smbXcli_base.h is included on its own, there are various compiler warnings
about implicitly declared struct iovec and smb2_create_blobs

7 years agolib/socket_wrapper: writev returns ssize_t, not int
Christian Ambach [Fri, 27 Jul 2012 13:08:05 +0000 (15:08 +0200)]
lib/socket_wrapper: writev returns ssize_t, not int

7 years agolib/param: move enum dns_update_settings to lib/param
Christian Ambach [Fri, 3 Aug 2012 15:59:17 +0000 (17:59 +0200)]
lib/param: move enum dns_update_settings to lib/param

7 years agos4:libcli/pyerrors: add PyErr_NTSTATUS_NOT_OK_RAISE()
Stefan Metzmacher [Mon, 6 Aug 2012 08:41:31 +0000 (10:41 +0200)]
s4:libcli/pyerrors: add PyErr_NTSTATUS_NOT_OK_RAISE()

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Aug  6 18:06:50 CEST 2012 on sn-devel-104

7 years agos4:libcli/pyerrors: s/PyErr_WERROR_IS_ERR_RAISE/PyErr_WERROR_NOT_OK_RAISE/
Stefan Metzmacher [Mon, 6 Aug 2012 08:39:19 +0000 (10:39 +0200)]
s4:libcli/pyerrors: s/PyErr_WERROR_IS_ERR_RAISE/PyErr_WERROR_NOT_OK_RAISE/

metze

7 years agoRevert "ldb: Add parameter to avoid NULL format string flagged by -Werror=format"
Andrew Bartlett [Mon, 6 Aug 2012 08:46:41 +0000 (18:46 +1000)]
Revert "ldb: Add parameter to avoid NULL format string flagged by -Werror=format"

This reverts commit cddcaf7bd2c272bc578ac1e4f7ec438ab94fc243.

-Werror=format is no longer uses when it would cause this to fail.
 This is a legitimate use of the ldb_search API.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug  6 14:47:27 CEST 2012 on sn-devel-104

7 years agobuild: Make -Werror=format check only run where NULL is still accepted
Andrew Bartlett [Mon, 6 Aug 2012 08:46:30 +0000 (18:46 +1000)]
build: Make -Werror=format check only run where NULL is still accepted

This is needed because ldb_search() allows a NULL parameter for the format string
and this needs to be permitted by the format string checker before we want to
make this error fatal.

Andrew Bartlett

7 years agoRework recursive waf build to be a selftest-enabled not a developer build
Andrew Bartlett [Mon, 6 Aug 2012 08:33:35 +0000 (18:33 +1000)]
Rework recursive waf build to be a selftest-enabled not a developer build

This essentially reverts commit a943a9ba2f739e8aee630f774915e8204aa8cf3a.

I've fixed this by making lib/param/parm_table.c honour --enable-selftest.

Andrew Bartlett