sfrench/samba-autobuild/.git
5 years agotdb_wrap: Make mutexes easier to use
Volker Lendecke [Tue, 30 Sep 2014 11:04:21 +0000 (11:04 +0000)]
tdb_wrap: Make mutexes easier to use

This patch makes sure we work fine and open without mutexes if they
are not supported.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agotdb: allow tdb_open_ex() with O_RDONLY of TDB_FEATURE_FLAG_MUTEX tdbs.
Stefan Metzmacher [Tue, 4 Nov 2014 08:51:51 +0000 (09:51 +0100)]
tdb: allow tdb_open_ex() with O_RDONLY of TDB_FEATURE_FLAG_MUTEX tdbs.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10781

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agos3:smbprofile: profile async pread/pwrite/fsync syscalls
Stefan Metzmacher [Sat, 15 Nov 2014 22:58:15 +0000 (23:58 +0100)]
s3:smbprofile: profile async pread/pwrite/fsync syscalls

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 19 23:13:10 CET 2014 on sn-devel-104

5 years agos3:smbprofile: track connect_count and disconnect_count
Stefan Metzmacher [Fri, 14 Nov 2014 11:47:01 +0000 (12:47 +0100)]
s3:smbprofile: track connect_count and disconnect_count

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: remove unused {START,END}_PROFILE_STAMP()
Stefan Metzmacher [Mon, 17 Nov 2014 19:05:09 +0000 (20:05 +0100)]
s3:smbprofile: remove unused {START,END}_PROFILE_STAMP()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: report idle state of 'idle_count' and 'idle_time'
Stefan Metzmacher [Mon, 17 Nov 2014 11:58:25 +0000 (12:58 +0100)]
s3:smbprofile: report idle state of 'idle_count' and 'idle_time'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: improve profiling for the security context switching.
Stefan Metzmacher [Mon, 17 Nov 2014 11:52:35 +0000 (12:52 +0100)]
s3:smbprofile: improve profiling for the security context switching.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: count all SMB1 and SMB2 requests as 'request_count'
Stefan Metzmacher [Fri, 14 Nov 2014 11:42:51 +0000 (12:42 +0100)]
s3:smbprofile: count all SMB1 and SMB2 requests as 'request_count'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smb2_server: use async smbprofile macros
Stefan Metzmacher [Fri, 31 Oct 2014 10:15:50 +0000 (11:15 +0100)]
s3:smb2_server: use async smbprofile macros

This improves profiling and corrently counts the total and idle time for async
requests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: rewrite the internal macros
Stefan Metzmacher [Thu, 23 Oct 2014 16:06:15 +0000 (18:06 +0200)]
s3:smbprofile: rewrite the internal macros

We now autogenerate a lot of code using
SMBPROFILE_STATS_ALL_SECTIONS macro which expands to
different SMBPROFILE_STATS_{COUNT,BASIC,BYTES,IOBYTES} macros.

This also allows async profiling using:

   struct mystate {
       ...

       SMBPROFILE_BASIC_ASYNC_STATE(profile_state);
       ...
   };

   ...

   SMBPROFILE_BASIC_ASYNC_START(SMB2_negotiate, profile_p, mystate->profile_state);

   ...

   SMBPROFILE_BYTES_ASYNC_SET_IDLE(mystate->profile_state);

   ...

   SMBPROFILE_BYTES_ASYNC_SET_BUSY(mystate->profile_state);

   ...

   SMBPROFILE_BASIC_ASYNC_END(mystate->profile_state);

The current START_PROFILE*()/END_PROFILE*() are implemented as legacy wrappers.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: Use "smbd profiling level"
Volker Lendecke [Fri, 10 Oct 2014 11:38:27 +0000 (13:38 +0200)]
s3:smbd: Use "smbd profiling level"

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: add "smbd profiling level" option
Volker Lendecke [Thu, 9 Oct 2014 12:56:28 +0000 (12:56 +0000)]
param: add "smbd profiling level" option

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: Make "status_profile.h" a proper header
Volker Lendecke [Fri, 10 Oct 2014 12:18:50 +0000 (14:18 +0200)]
s3:smbprofile: Make "status_profile.h" a proper header

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: Make smbprofile.h includable on its own
Volker Lendecke [Thu, 9 Oct 2014 12:41:03 +0000 (12:41 +0000)]
s3:smbprofile: Make smbprofile.h includable on its own

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: improve writecache profiling
Stefan Metzmacher [Wed, 5 Nov 2014 14:54:02 +0000 (15:54 +0100)]
s3:smbd: improve writecache profiling

In order to have useful profiling counters should never be decremented.
We need a separate counter for deallocation events.

The current value can be calculated by allocations - deallocations.

We also use better names and avoid having an array for the flush reasons.
This will simplify further profiling improvements a lot.

The value writecache_num_write_caches (this was similar to writecache_allocations)
is replaced by writecache_cached_writes, which counts the amount of writes which
were completely handled by the cache.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:wscript_build: remove unused to dependency from 'smbtree' to 'PROFILE'
Stefan Metzmacher [Fri, 7 Nov 2014 14:18:44 +0000 (15:18 +0100)]
s3:wscript_build: remove unused to dependency from 'smbtree' to 'PROFILE'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: remove unused nmbd related counters
Stefan Metzmacher [Wed, 5 Nov 2014 12:13:35 +0000 (13:13 +0100)]
s3:smbprofile: remove unused nmbd related counters

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:nmbd: remove START/END_PROFILE() calls
Stefan Metzmacher [Wed, 5 Nov 2014 12:10:49 +0000 (13:10 +0100)]
s3:nmbd: remove START/END_PROFILE() calls

nmbd never calls profile_setup() and never collects any profiling data.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:modules: make use of END_PROFILE_BYTES() when START_PROFILE_BYTES() was used
Stefan Metzmacher [Thu, 23 Oct 2014 16:31:09 +0000 (18:31 +0200)]
s3:modules: make use of END_PROFILE_BYTES() when START_PROFILE_BYTES() was used

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbprofile: add END_PROFILE_BYTES() marco
Stefan Metzmacher [Thu, 23 Oct 2014 16:30:41 +0000 (18:30 +0200)]
s3:smbprofile: add END_PROFILE_BYTES() marco

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agofilter-subunit: Consistently use spaces rather than tabs.
Jelmer Vernooij [Sun, 26 Oct 2014 18:31:38 +0000 (11:31 -0700)]
filter-subunit: Consistently use spaces rather than tabs.

Change-Id: I760399cb4bf0aa9753f5f1e842919b386e1caca9
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Wed Nov 19 20:50:29 CET 2014 on sn-devel-104

5 years agoSupport using system ldbmodify.
Jelmer Vernooij [Sat, 1 Nov 2014 17:17:23 +0000 (10:17 -0700)]
Support using system ldbmodify.

Fixes this test when bin/ldbmodify isn't built because we're using the
system ldbmodify.

Change-Id: I2ff0d9808245353006c6be4989976a3edad8f98e
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoFix subunit test suite name.
Jelmer Vernooij [Sat, 1 Nov 2014 22:57:35 +0000 (15:57 -0700)]
Fix subunit test suite name.

Only run it when testscenarios is installed, as it depends on that.

Change-Id: I1e1284024cf94f909e585a55b8a15e33273f167b
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodsdb.tests.acl: Create and run a single testsuite, should easy migration to regulary...
Jelmer Vernooij [Sun, 2 Nov 2014 03:06:52 +0000 (20:06 -0700)]
dsdb.tests.acl: Create and run a single testsuite, should easy migration to regulary Python unit tests.

Change-Id: I89072d3af1d90e87a47c197d28943f47cedc5deb
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodsdb.tests.ldap: Create and run a single testsuite, should easy migration to regulary...
Jelmer Vernooij [Sun, 2 Nov 2014 03:07:02 +0000 (20:07 -0700)]
dsdb.tests.ldap: Create and run a single testsuite, should easy migration to regulary Python unit tests.

Change-Id: I07216ff1063e127b541bf4e5d6349d5a75cec678
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agospeedtest: Create and run a single testsuite, should easy migration to regulary Pytho...
Jelmer Vernooij [Sun, 2 Nov 2014 03:09:12 +0000 (20:09 -0700)]
speedtest: Create and run a single testsuite, should easy migration to regulary Python unit tests.

Change-Id: Ib31eb26b8f6094a51cd4985b9ae98d018ae95c2d
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agodirsync test: Create and run a single testsuite, should easy migration to regulary...
Jelmer Vernooij [Sun, 2 Nov 2014 03:27:30 +0000 (20:27 -0700)]
dirsync test: Create and run a single testsuite, should easy migration to regulary Python unit tests.

Change-Id: I6fbffd6453f8af966938943f2895bd6d93f8fb59
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoAdd 'make randomized-test' rule.
Jelmer Vernooij [Sun, 16 Nov 2014 15:44:33 +0000 (15:44 +0000)]
Add 'make randomized-test' rule.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
5 years agoRemove tabs in python file, unnecessary 'pass'.
Jelmer Vernooij [Sun, 16 Nov 2014 14:43:29 +0000 (14:43 +0000)]
Remove tabs in python file, unnecessary 'pass'.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
5 years agopidl: White space cleanups in Conformance.pm and NDR.pm
Guy Harris [Sat, 1 Nov 2014 15:50:43 +0000 (08:50 -0700)]
pidl: White space cleanups in Conformance.pm and NDR.pm

Change-Id: Ibf106d023c50a7f3caf8f416e9927ac4a040f2c0
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10842
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Wed Nov 19 05:06:33 CET 2014 on sn-devel-104

5 years agoRewrite show_test_time in python and support --limit argument.
Jelmer Vernooij [Sat, 1 Nov 2014 21:33:37 +0000 (14:33 -0700)]
Rewrite show_test_time in python and support --limit argument.

Change-Id: I6c3f28ed52cc8597251aa195ec3c7e38587c2573
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoformat-subunit: Remove remaining tabs.
Jelmer Vernooij [Sat, 1 Nov 2014 15:38:31 +0000 (08:38 -0700)]
format-subunit: Remove remaining tabs.

Change-Id: I70eabda60e3d4eede874eb5e95bf455eddfb0992
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoRemove unused imports.
Jelmer Vernooij [Sat, 1 Nov 2014 13:56:09 +0000 (06:56 -0700)]
Remove unused imports.

Change-Id: I8915f62206edb53ffc2d89434e46d9e71db8bb9a
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoDisplay total number of tests in format-subunit, not just number of test suites.
Jelmer Vernooij [Sat, 1 Nov 2014 19:51:31 +0000 (12:51 -0700)]
Display total number of tests in format-subunit, not just number of test suites.

Change-Id: Iae17df773f380b13d2b3f69e83593139c01c4a6d
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib: Add proper {} to tcopy_passwd
Volker Lendecke [Tue, 18 Nov 2014 09:37:15 +0000 (10:37 +0100)]
lib: Add proper {} to tcopy_passwd

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 Nov 18 21:45:40 CET 2014 on sn-devel-104

5 years agolib: Use talloc_pooled_object in tcopy_passwd
Volker Lendecke [Tue, 18 Nov 2014 09:36:50 +0000 (10:36 +0100)]
lib: Use talloc_pooled_object in tcopy_passwd

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoctdb-scripts: Fix stack dumping when debugging hung scripts
Martin Schwenke [Mon, 17 Nov 2014 03:15:14 +0000 (14:15 +1100)]
ctdb-scripts: Fix stack dumping when debugging hung scripts

There are parentheses missing that stop the default pattern from
matching commands with trailing garbage (e.g. "exportfs.orig").

A careful check of POSIX (and running GNU sed with --posix) suggests
that "\|" isn't a supported way of specifying alternation in a regular
expression.  Therefore, it is clearer to switch to extended regular
expressions so that this has a chance of being portable (even though
the point is to print /proc/<pid>/stack, which only works on Linux).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Nov 18 06:37:45 CET 2014 on sn-devel-104

5 years agoctdb-scripts: Try to restart statd after every 10 failures
Martin Schwenke [Fri, 14 Nov 2014 05:42:01 +0000 (16:42 +1100)]
ctdb-scripts: Try to restart statd after every 10 failures

Also add and update tests for statd stack dumps.  Update the existing
60.ganesha statd test to do more iterations.  Duplicate the result as
a new test for 60.nfs.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: Add rpc.statd stack dumping to Ganesha restart
Martin Schwenke [Fri, 14 Nov 2014 05:39:07 +0000 (16:39 +1100)]
ctdb-scripts: Add rpc.statd stack dumping to Ganesha restart

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: Dump stack traces for hung mountd, rquotad, statd processes
Martin Schwenke [Fri, 14 Nov 2014 02:59:16 +0000 (13:59 +1100)]
ctdb-scripts: Dump stack traces for hung mountd, rquotad, statd processes

Add a corresponding new unit test for statd.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: Add optional program name argument to nfs_dump_some_threads()
Martin Schwenke [Fri, 14 Nov 2014 02:48:16 +0000 (13:48 +1100)]
ctdb-scripts: Add optional program name argument to nfs_dump_some_threads()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-scripts: Factor out new function program_stack_traces()
Martin Schwenke [Fri, 14 Nov 2014 02:31:03 +0000 (13:31 +1100)]
ctdb-scripts: Factor out new function program_stack_traces()

In the process, fix a bug where an extra trace would be printed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agos4:dns_server: allocate substructures of struct dns_request_state on the correct...
Stefan Metzmacher [Tue, 14 Oct 2014 07:34:29 +0000 (09:34 +0200)]
s4:dns_server: allocate substructures of struct dns_request_state on the correct TALLOC_CTX

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agos4:dns_server: add some const to dns_server_process_update/dns_update_allowed arguments
Stefan Metzmacher [Tue, 14 Oct 2014 07:30:43 +0000 (09:30 +0200)]
s4:dns_server: add some const to dns_server_process_update/dns_update_allowed arguments

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agosamba: pass down size_t instead of int to add_string_to_array().
Günther Deschner [Fri, 14 Nov 2014 13:12:26 +0000 (14:12 +0100)]
samba: pass down size_t instead of int to add_string_to_array().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Nov 17 19:53:22 CET 2014 on sn-devel-104

5 years agolib/util: use size_t for add_string_to_array().
Günther Deschner [Fri, 14 Nov 2014 12:27:45 +0000 (13:27 +0100)]
lib/util: use size_t for add_string_to_array().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agos3-proto: remove duplicate proto for add_string_to_array().
Günther Deschner [Fri, 14 Nov 2014 12:47:16 +0000 (13:47 +0100)]
s3-proto: remove duplicate proto for add_string_to_array().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agodbwrap_ctdb: Pass on mutex flags to tdb_open
Volker Lendecke [Thu, 6 Nov 2014 10:59:34 +0000 (11:59 +0100)]
dbwrap_ctdb: Pass on mutex flags to tdb_open

Without this, ctdb can create a tdb file with mutex activated, but the
local tdb_open will not open the tdb due to strict flags checks whether
mutexes are possible.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10922

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Nov 16 12:13:54 CET 2014 on sn-devel-104

5 years agos3:lib: fix const warnings in popt_common.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib: fix const warnings in popt_common.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Nov 15 01:46:13 CET 2014 on sn-devel-104

5 years agos3:auth: add some const to user_in_list()
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:auth: add some const to user_in_list()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:auth: add missing auth_samba4_init() prototype
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:auth: add missing auth_samba4_init() prototype

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agonsswitch: avoid some compiler warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:38:39 +0000 (09:38 +0100)]
nsswitch: avoid some compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoauth: add missing includes to auth/wbc_auth_util.c
Stefan Metzmacher [Thu, 22 May 2014 08:36:41 +0000 (10:36 +0200)]
auth: add missing includes to auth/wbc_auth_util.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:librpc/idl: add a uuid to sasl_helpers.idl
Stefan Metzmacher [Wed, 29 Oct 2014 11:03:15 +0000 (12:03 +0100)]
s4:librpc/idl: add a uuid to sasl_helpers.idl

This makes it possible to use decode_saslauthd in ndrdump.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:librpc: remove unused allow_warnings=True from NDR_WINSREPL and NDR_WINSIF
Stefan Metzmacher [Wed, 29 Oct 2014 11:00:12 +0000 (12:00 +0100)]
s4:librpc: remove unused allow_warnings=True from NDR_WINSREPL and NDR_WINSIF

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli/nbt: use NDR_SCALAR_PTR_PROTO() and fix the prototype of ndr_pull_wrepl_nbt_name()
Stefan Metzmacher [Wed, 29 Oct 2014 10:57:41 +0000 (11:57 +0100)]
libcli/nbt: use NDR_SCALAR_PTR_PROTO() and fix the prototype of ndr_pull_wrepl_nbt_name()

This avoids compiler warnings in pidl generated code.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibrpc/ndr: add NDR_SCALAR_PTR_PROTO() helper macro
Stefan Metzmacher [Wed, 29 Oct 2014 10:57:10 +0000 (11:57 +0100)]
librpc/ndr: add NDR_SCALAR_PTR_PROTO() helper macro

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/smbconf: remove const warning
Stefan Metzmacher [Thu, 27 Feb 2014 08:31:42 +0000 (09:31 +0100)]
lib/smbconf: remove const warning

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: fix const warnings
Stefan Metzmacher [Wed, 26 Feb 2014 07:07:47 +0000 (08:07 +0100)]
lib/param: fix const warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/util/tests: avoid some compiler warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:35:15 +0000 (09:35 +0100)]
lib/util/tests: avoid some compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/util: add str_list_make_v3_const()
Stefan Metzmacher [Wed, 29 Oct 2014 09:59:49 +0000 (10:59 +0100)]
lib/util: add str_list_make_v3_const()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/ldb: remove unused 'allow_warnings=True'
Stefan Metzmacher [Wed, 29 Oct 2014 10:56:25 +0000 (11:56 +0100)]
lib/ldb: remove unused 'allow_warnings=True'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/ldb: fix compiler warnings in ldb_tdb.c
Stefan Metzmacher [Wed, 29 Oct 2014 10:53:06 +0000 (11:53 +0100)]
lib/ldb: fix compiler warnings in ldb_tdb.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/ldb: fix compiler warnings in ldb_modules_list_from_string()
Stefan Metzmacher [Wed, 29 Oct 2014 10:52:37 +0000 (11:52 +0100)]
lib/ldb: fix compiler warnings in ldb_modules_list_from_string()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/texpect: fix compiler warnings
Stefan Metzmacher [Fri, 26 Sep 2014 07:06:59 +0000 (09:06 +0200)]
lib/texpect: fix compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/texpect: make the code more portable by using "replace.h" and "system/wait.h"
Stefan Metzmacher [Wed, 29 Oct 2014 10:48:59 +0000 (11:48 +0100)]
lib/texpect: make the code more portable by using "replace.h" and "system/wait.h"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowafsamba: add -Werror=return-type for developer builds
Stefan Metzmacher [Fri, 7 Nov 2014 08:36:16 +0000 (09:36 +0100)]
wafsamba: add -Werror=return-type for developer builds

This avoids errors like this:

 ../source3/utils/status.c: In function ‘print_share_mode’:
 ../source3/utils/status.c:126:3: error: ‘return’ with no value, in function
 returning non-void [-Werror=return-type]
   return;

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agofsrvp: define FSRVP_E_SHADOWCOPYSET_ID_MISMATCH
David Disseldorp [Fri, 14 Nov 2014 17:36:28 +0000 (18:36 +0100)]
fsrvp: define FSRVP_E_SHADOWCOPYSET_ID_MISMATCH

This was recently added to the [MS-FSRVP] specification with the errata
http://msdn.microsoft.com/en-us/library/dn785066.aspx#BKMK_FSRVP

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoctdb-daemon: Improve error handling for running event scripts
Amitay Isaacs [Thu, 13 Nov 2014 00:02:26 +0000 (11:02 +1100)]
ctdb-daemon: Improve error handling for running event scripts

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Nov 14 03:06:12 CET 2014 on sn-devel-104

5 years agolib: Slightly simplify strupper_m
Volker Lendecke [Sun, 9 Nov 2014 12:48:09 +0000 (12:48 +0000)]
lib: Slightly simplify strupper_m

toupper_ascii_fast_table is only referenced here, make it static.

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 Nov 14 00:31:16 CET 2014 on sn-devel-104

5 years agoregistry: Slightly simplify tdb_data_is_cstr
Volker Lendecke [Sun, 9 Nov 2014 12:50:53 +0000 (12:50 +0000)]
registry: Slightly simplify tdb_data_is_cstr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoMove dnspython to third_party.
Jelmer Vernooij [Fri, 7 Nov 2014 20:09:10 +0000 (20:09 +0000)]
Move dnspython to third_party.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 12 22:40:53 CET 2014 on sn-devel-104

5 years agoAdd samba.ensure_third_party_module() function, loading external python modules from...
Jelmer Vernooij [Fri, 17 Oct 2014 07:48:20 +0000 (00:48 -0700)]
Add samba.ensure_third_party_module() function, loading external python modules from third_party/ if the system doesn't provide them.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3-keytab: fix keytab array NULL termination.
Matt Rogers [Wed, 12 Nov 2014 16:21:05 +0000 (17:21 +0100)]
s3-keytab: fix keytab array NULL termination.

Signed-off-by: Matt Rogers <mrogers@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smb2_break: First test for NT_STATUS_INVALID_OPLOCK_PROTOCOL, then for in_oplock_l...
Volker Lendecke [Tue, 23 Sep 2014 16:49:46 +0000 (18:49 +0200)]
s3:smb2_break: First test for NT_STATUS_INVALID_OPLOCK_PROTOCOL, then for in_oplock_level being reasonable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 12 00:03:34 CET 2014 on sn-devel-104

5 years agos3:locking: convert brl_have_read field to brl_num_read.
Volker Lendecke [Tue, 28 Oct 2014 22:27:09 +0000 (15:27 -0700)]
s3:locking: convert brl_have_read field to brl_num_read.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: Don't set fsp->oplock_type before we've granted any oplocks.
Jeremy Allison [Thu, 23 Oct 2014 00:53:01 +0000 (17:53 -0700)]
s3:smbd: Don't set fsp->oplock_type before we've granted any oplocks.

It's not needed, and may lead to unexpected side effects.

grant_fsp_oplock_type() is the only place to touch this.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbd: move all oplock granting code to grant_fsp_oplock_type()
Volker Lendecke [Tue, 28 Oct 2014 22:27:09 +0000 (15:27 -0700)]
s3:smbd: move all oplock granting code to grant_fsp_oplock_type()

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Jeremy Allison <jra@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: break oplocks to none with FILE_OVERWRITE
Volker Lendecke [Tue, 23 Sep 2014 21:34:14 +0000 (23:34 +0200)]
s3:smbd: break oplocks to none with FILE_OVERWRITE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agopdb_tdb: Avoid a nasty error message with ctdb
Volker Lendecke [Tue, 11 Nov 2014 10:36:23 +0000 (10:36 +0000)]
pdb_tdb: Avoid a nasty error message with ctdb

ctdb gives us 0-sized records for deleted passdb entries

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Nov 11 16:19:37 CET 2014 on sn-devel-104

5 years agopdb_tdb: Fix a TALLOC/SAFE_FREE mixup
Volker Lendecke [Tue, 11 Nov 2014 10:35:50 +0000 (10:35 +0000)]
pdb_tdb: Fix a TALLOC/SAFE_FREE mixup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
5 years agoselftest: ignore flapping addprinter[ex].print_job_enum test
David Disseldorp [Mon, 10 Nov 2014 14:16:31 +0000 (15:16 +0100)]
selftest: ignore flapping addprinter[ex].print_job_enum test

This test currently fails intermittently, and should be disabled until
bug 10930 is resolved.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Nov 11 10:47:08 CET 2014 on sn-devel-104

5 years agoeventlog: Free tos talloced path.
David Disseldorp [Thu, 6 Nov 2014 10:32:45 +0000 (11:32 +0100)]
eventlog: Free tos talloced path.

Non-error code path was missed in the last talloc tos leak fix patch-set.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Nov 10 19:00:01 CET 2014 on sn-devel-104

5 years agomapping_tdb: add missing talloc_free in error path
David Disseldorp [Mon, 3 Nov 2014 13:33:06 +0000 (14:33 +0100)]
mapping_tdb: add missing talloc_free in error path

Reported-by: Michael Croes <mycroes@gmail.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agoDon't use a nested function when testing for visibility attribute support.
Jelmer Vernooij [Sat, 8 Nov 2014 16:22:30 +0000 (16:22 +0000)]
Don't use a nested function when testing for visibility attribute support.

Some compilers support __attribute__((visibility)), but not nested
functions (e.g. http://www.cprover.org/goto-cc/)

Change-Id: I01a5dd6f5f913664621c4090e2dca177527436bb
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749983
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749985
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749986
Signed-Off-By: Jelmer Vernooij <jelmer@debian.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 10 08:29:19 CET 2014 on sn-devel-104

5 years agodata_blob.h: Add space between literal and string constant.
Jelmer Vernooij [Sat, 8 Nov 2014 14:15:41 +0000 (14:15 +0000)]
data_blob.h: Add space between literal and string constant.

C++11 compilers warn if there is a missing space:

invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

Change-Id: Ib7e11c72c09de588ec558cfbf9dded8c625bf49b
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoUse tevent_req_simple_recv_unix in a few places
Volker Lendecke [Sat, 8 Nov 2014 09:05:23 +0000 (09:05 +0000)]
Use tevent_req_simple_recv_unix in a few places

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Add tevent_req_simple_recv_unix
Volker Lendecke [Sat, 8 Nov 2014 09:00:31 +0000 (09:00 +0000)]
lib: Add tevent_req_simple_recv_unix

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs_snapper: check for <linux/ioctl.h>
Ralph Boehme [Sat, 8 Nov 2014 21:18:08 +0000 (22:18 +0100)]
vfs_snapper: check for <linux/ioctl.h>

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Nov  9 16:02:24 CET 2014 on sn-devel-104

5 years agos3:messaging: fix conversion specifier
Ralph Boehme [Sun, 5 Oct 2014 15:44:08 +0000 (17:44 +0200)]
s3:messaging: fix conversion specifier

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agolibcli/smb: Add smb2_lease_equal() which compares client_guids and keys.
Jeremy Allison [Wed, 5 Nov 2014 05:44:45 +0000 (21:44 -0800)]
libcli/smb: Add smb2_lease_equal() which compares client_guids and keys.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov  7 22:41:47 CET 2014 on sn-devel-104

5 years agolibcli/smb: add smb2_lease_key_equal() helper function
Volker Lendecke [Wed, 29 Oct 2014 12:55:16 +0000 (13:55 +0100)]
libcli/smb: add smb2_lease_key_equal() helper function

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibcli/smb: mask off SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET for version 1
Volker Lendecke [Mon, 22 Sep 2014 19:21:36 +0000 (21:21 +0200)]
libcli/smb: mask off SMB2_LEASE_FLAG_PARENT_LEASE_KEY_SET for version 1

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibcli/smb: remember the lease_version in struct smb2_lease
Volker Lendecke [Tue, 23 Sep 2014 20:56:41 +0000 (22:56 +0200)]
libcli/smb: remember the lease_version in struct smb2_lease

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos4:torture: Add smb2.oplock test batch9a and raw.oplock test batch9a
Jeremy Allison [Wed, 5 Nov 2014 18:12:20 +0000 (10:12 -0800)]
s4:torture: Add smb2.oplock test batch9a and raw.oplock test batch9a

Shows attribute(stat) access open can create a file,
and subsequent attribute(stat) opens don't break oplocks.

Can be extended to explore more varients.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3:smbstatus: fix return value in print_share_mode()
Stefan Metzmacher [Wed, 5 Nov 2014 19:27:06 +0000 (20:27 +0100)]
s3:smbstatus: fix return value in print_share_mode()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:smbd: fix file corruption using "write cache size != 0"
Stefan Metzmacher [Thu, 6 Nov 2014 08:23:46 +0000 (09:23 +0100)]
s3:smbd: fix file corruption using "write cache size != 0"

A client can:
- open a handle (h1)
- write some data to h1.
- open a 2nd handle h2 (downgrades both handles to level II)
- try to read the data on h2 (this gets old data)

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10921

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Nov  6 13:09:38 CET 2014 on sn-devel-104

5 years agosmbcontrol: Use server_id_str_buf
Volker Lendecke [Tue, 4 Nov 2014 12:59:25 +0000 (13:59 +0100)]
smbcontrol: Use server_id_str_buf

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Nov  5 13:03:39 CET 2014 on sn-devel-104

5 years agobtrfs: don't leak opened directory handle
Noel Power [Tue, 4 Nov 2014 15:52:49 +0000 (16:52 +0100)]
btrfs: don't leak opened directory handle

Closing a directory handle file descriptor via close() is undefined,
according to:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Nov  4 20:51:02 CET 2014 on sn-devel-104

5 years agos3: nmbd: Ensure NetBIOS names are only 15 characters stored.
Jeremy Allison [Fri, 31 Oct 2014 18:01:26 +0000 (11:01 -0700)]
s3: nmbd: Ensure NetBIOS names are only 15 characters stored.

This screws up if the name is greater than MAX_NETBIOSNAME_LEN-1 in the
unix charset, but less than or equal to MAX_NETBIOSNAME_LEN-1 in the DOS
charset, but this is so old we have to live with that.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Nov  4 18:23:11 CET 2014 on sn-devel-104