kai/samba-autobuild/.git
10 years agolib/compression/tests: add missing #include "torture/local/proto.h"
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
lib/compression/tests: add missing #include "torture/local/proto.h"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoauth/tests: add missing #include "torture/local/proto.h"
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
auth/tests: add missing #include "torture/local/proto.h"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:dsdb/ldb_modules: avoid invalid pointer type warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:dsdb/ldb_modules: avoid invalid pointer type warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:dsdb/ldb_modules: avoid str_list related const warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:dsdb/ldb_modules: avoid str_list related const warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:dsdb/ldb_modules: avoid declaration after code warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:dsdb/ldb_modules: avoid declaration after code warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:smb_server/smb: fix invalid pointer type warnings in negprot.c
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
s4:smb_server/smb: fix invalid pointer type warnings in negprot.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:smb_server/smb: fix declaration after code warnings in negprot.c
Stefan Metzmacher [Thu, 27 Feb 2014 08:08:17 +0000 (09:08 +0100)]
s4:smb_server/smb: fix declaration after code warnings in negprot.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:ntvfs/sysdep: add sys_notify_inotify_init() prototype to avoid a warning
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:ntvfs/sysdep: add sys_notify_inotify_init() prototype to avoid a warning

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:ntvfs/posix: correctly reset errno on success in pvfs_sys_mkdir()
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:ntvfs/posix: correctly reset errno on success in pvfs_sys_mkdir()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:ntvfs/posix: avoid const warnings in pvfs_resolve_name_handle()
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:ntvfs/posix: avoid const warnings in pvfs_resolve_name_handle()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:ntvfs/common: explicitly check the status of imessaging_send() in notify_send()
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:ntvfs/common: explicitly check the status of imessaging_send() in notify_send()

This avoid an unused warning...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:auth/ntlm: add auth4_sam_init() prototype to avoid a warning
Stefan Metzmacher [Thu, 27 Feb 2014 08:29:36 +0000 (09:29 +0100)]
s4:auth/ntlm: add auth4_sam_init() prototype to avoid a warning

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:auth: avoid str_list related const warnings
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s4:auth: avoid str_list related const warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:auth/gensec: fix declaration after code warning in gensec_tstream.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s4:auth/gensec: fix declaration after code warning in gensec_tstream.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:auth/gensec: include gensec_krb5_util.h in gensec_krb5_util.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s4:auth/gensec: include gensec_krb5_util.h in gensec_krb5_util.c

This avoids missing prototype warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos4:libcli/resolve: avoid some const warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:52:36 +0000 (09:52 +0100)]
s4:libcli/resolve: avoid some const warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:winbindd: avoid argv related const warnings
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:winbindd: avoid argv related const warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:utils: explicitly check the return value of fscanf() to avoid unused warnings...
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:utils: explicitly check the return value of fscanf() to avoid unused warnings in smbta-util.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:utils: check the status of open_socket_out() correctly in smbfilter.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:utils: check the status of open_socket_out() correctly in smbfilter.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:utils: use char packet[] in smbfilter.c to avoid warnings
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:utils: use char packet[] in smbfilter.c to avoid warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:utils: avoid argv related const warnings
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:utils: avoid argv related const warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:torture: avoid compiler warnings in vfstest.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:torture: avoid compiler warnings in vfstest.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:torture: check the result of cli_nt_delete_on_close_recv() in test_notify.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:torture: check the result of cli_nt_delete_on_close_recv() in test_notify.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:torture: remove unused variables in test_buffersize.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:torture: remove unused variables in test_buffersize.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:torture: avoid explicit casting and compiler warnings in pdbtest.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:torture: avoid explicit casting and compiler warnings in pdbtest.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:smbd: let srvstr_pull_req_talloc() take 'const uint8_t *src'
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:smbd: let srvstr_pull_req_talloc() take 'const uint8_t *src'

This is the correct thing to do the smb request buffer contains
just bytes (uint8_t).

It also avoids strange casting in the callers.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:smbd: avoid compiler warnings in smbd_tevent_trace_callback()
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:smbd: avoid compiler warnings in smbd_tevent_trace_callback()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:registry: fix invalid pointer type warning in reg_format.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:registry: fix invalid pointer type warning in reg_format.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:lib/netapi/examples: remove unused variables
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/netapi/examples: remove unused variables

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:lib/netapi/examples: fix const warnings in netlogon_control2.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/netapi/examples: fix const warnings in netlogon_control2.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:lib/netapi/examples: fix invalid pointer value warnings in getjoininformation.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/netapi/examples: fix invalid pointer value warnings in getjoininformation.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:lib/netapi: fix some incompatible pointer type warnings in NetGetJoinableOUs_l()
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/netapi: fix some incompatible pointer type warnings in NetGetJoinableOUs_l()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:lib/smbconf: fix const warnings in testsuite.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib/smbconf: fix const warnings in testsuite.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3:lib: fix a const warning in client_match()
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)]
s3:lib: fix a const warning in client_match()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolibcli/lsarpc: add struct trustAuthInOutBlob; forward declaration
Stefan Metzmacher [Thu, 27 Feb 2014 08:40:52 +0000 (09:40 +0100)]
libcli/lsarpc: add struct trustAuthInOutBlob; forward declaration

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolibcli/auth: s/encrypt/do_encrypt
Stefan Metzmacher [Thu, 27 Feb 2014 08:40:03 +0000 (09:40 +0100)]
libcli/auth: s/encrypt/do_encrypt

This avoids compiler warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoexamples/libsmbclient: avoid some compiler warnings
Stefan Metzmacher [Thu, 27 Feb 2014 08:39:20 +0000 (09:39 +0100)]
examples/libsmbclient: avoid some compiler warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolibrpc/idl: remove unused [gensize] from DNS_RPC_RECORD_STRING
Stefan Metzmacher [Mon, 10 Mar 2014 15:19:43 +0000 (16:19 +0100)]
librpc/idl: remove unused [gensize] from DNS_RPC_RECORD_STRING

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolibcli/security: s/remove/remove_ace/
Stefan Metzmacher [Wed, 26 Feb 2014 07:12:09 +0000 (08:12 +0100)]
libcli/security: s/remove/remove_ace/

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolib/util: fix const warnings
Stefan Metzmacher [Wed, 26 Feb 2014 06:38:07 +0000 (07:38 +0100)]
lib/util: fix const warnings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolib/util: declare smb_panic_default() as _NORETURN_
Stefan Metzmacher [Wed, 26 Feb 2014 06:37:13 +0000 (07:37 +0100)]
lib/util: declare smb_panic_default() as _NORETURN_

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotdb/wscript: maintain a global list of unit tests
Stefan Metzmacher [Mon, 3 Feb 2014 09:40:45 +0000 (10:40 +0100)]
tdb/wscript: maintain a global list of unit tests

This makes sure a new test is also added to 'make test'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotdb/test: avoid const warnings by using 'discard_const_p(uint8_t,' instead of '(void *)'
Stefan Metzmacher [Mon, 3 Feb 2014 10:31:05 +0000 (11:31 +0100)]
tdb/test: avoid const warnings by using 'discard_const_p(uint8_t,' instead of '(void *)'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotdb/test: remove "\n" in diag() arguments
Stefan Metzmacher [Thu, 30 Jan 2014 12:20:33 +0000 (13:20 +0100)]
tdb/test: remove "\n" in diag() arguments

diag() already adds "\n".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotdb/test: always call fflush() after [f]printf() in tap-interface.h
Stefan Metzmacher [Thu, 30 Jan 2014 12:01:08 +0000 (13:01 +0100)]
tdb/test: always call fflush() after [f]printf() in tap-interface.h

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotdb/tools: avoid const warnings in tdbdump.c
Stefan Metzmacher [Mon, 3 Feb 2014 10:30:12 +0000 (11:30 +0100)]
tdb/tools: avoid const warnings in tdbdump.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agotdb: don't alter errno on success of tdb_open_ex()
Stefan Metzmacher [Thu, 30 Jan 2014 15:07:10 +0000 (16:07 +0100)]
tdb: don't alter errno on success of tdb_open_ex()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolib/zlib: make use of conf.CHECK_BUNDLED_SYSTEM()
Stefan Metzmacher [Fri, 14 Mar 2014 09:34:00 +0000 (10:34 +0100)]
lib/zlib: make use of conf.CHECK_BUNDLED_SYSTEM()

This way --bundled-libraries=ALL will use the internal zlib version.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: allow --bundled-libraries=ALL,!popt
Stefan Metzmacher [Fri, 14 Mar 2014 09:48:56 +0000 (10:48 +0100)]
wafsamba: allow --bundled-libraries=ALL,!popt

This will not bundle 'popt', but everything else.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: allow --bundled-libraries=NONE,popt
Stefan Metzmacher [Fri, 14 Mar 2014 09:48:56 +0000 (10:48 +0100)]
wafsamba: allow --bundled-libraries=NONE,popt

This will bundle only 'popt'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: simplify LIB_MUST_BE_BUNDLED()
Stefan Metzmacher [Fri, 14 Mar 2014 09:48:12 +0000 (10:48 +0100)]
wafsamba: simplify LIB_MUST_BE_BUNDLED()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: simplify LIB_MAY_BE_BUNDLED()
Stefan Metzmacher [Fri, 14 Mar 2014 09:47:30 +0000 (10:47 +0100)]
wafsamba: simplify LIB_MAY_BE_BUNDLED()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: allow optional 'checkcode' argument to CHECK_BUNDLED_SYSTEM()
Stefan Metzmacher [Fri, 14 Mar 2014 09:19:41 +0000 (10:19 +0100)]
wafsamba: allow optional 'checkcode' argument to CHECK_BUNDLED_SYSTEM()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: allow CHECK_BUNDLED_SYSTEM() to check headers without functions
Stefan Metzmacher [Fri, 14 Mar 2014 09:18:18 +0000 (10:18 +0100)]
wafsamba: allow CHECK_BUNDLED_SYSTEM() to check headers without functions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: simplify CHECK_BUNDLED_SYSTEM_PKG() by just calling CHECK_BUNDLED_SYSTEM()
Stefan Metzmacher [Fri, 14 Mar 2014 08:55:45 +0000 (09:55 +0100)]
wafsamba: simplify CHECK_BUNDLED_SYSTEM_PKG() by just calling CHECK_BUNDLED_SYSTEM()

If checkfunctions is not specified they are the same.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: port optional 'pkg' option from CHECK_BUNDLED_SYSTEM_PKG() to CHECK_BUNDLED...
Stefan Metzmacher [Fri, 14 Mar 2014 08:52:51 +0000 (09:52 +0100)]
wafsamba: port optional 'pkg' option from CHECK_BUNDLED_SYSTEM_PKG() to CHECK_BUNDLED_SYSTEM()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agowafsamba: require a ';' after STATIC_*_MODULES_PROTO
Stefan Metzmacher [Thu, 27 Mar 2014 08:37:26 +0000 (09:37 +0100)]
wafsamba: require a ';' after STATIC_*_MODULES_PROTO

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoRename module init functions from samba_init_module
Christof Schmitt [Tue, 1 Apr 2014 22:45:38 +0000 (15:45 -0700)]
Rename module init functions from samba_init_module

Some modules use samba_init_module as the name for the init functions,
others use a name based on the module name.

Rename the init functions from samba_init_module, to be consistent
across all modules. This change also allows to build idmap_tdb2 and
perfcount_test statically.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  2 08:50:04 CEST 2014 on sn-devel-104

10 years agolibsmbclient: Wrap more function calls in talloc_stackframe() to protect against...
Andrew Bartlett [Tue, 1 Apr 2014 04:03:34 +0000 (17:03 +1300)]
libsmbclient: Wrap more function calls in talloc_stackframe() to protect against talloc_tos() calls

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  2 02:36:08 CEST 2014 on sn-devel-104

10 years agopam_smbpass: Wrap calls in talloc_stackframe() to avoid warnings about leaking memory
Andrew Bartlett [Tue, 1 Apr 2014 04:01:26 +0000 (17:01 +1300)]
pam_smbpass: Wrap calls in talloc_stackframe() to avoid warnings about leaking memory

Any code in source3 is permitted to use talloc_tos() at any point, so we must protect all the library interfaces
against memory leaks this way.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolibsmb: Provide a talloc_stackframe() to external users of libsmb_setget.c
Andrew Bartlett [Sun, 30 Mar 2014 21:19:58 +0000 (10:19 +1300)]
libsmb: Provide a talloc_stackframe() to external users of libsmb_setget.c

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoselftest: Remove reduction in time window in delaywrite test
Andrew Bartlett [Thu, 27 Mar 2014 01:52:26 +0000 (14:52 +1300)]
selftest: Remove reduction in time window in delaywrite test

This causes flakey autobuilds from time to time.

The reduction in the time window to 30% was added in:

commit c2df97f57ce205935c37cd5a90cfeddb129cd92b
Author: Jeremy Allison <jra@samba.org>
Date:   Thu Nov 5 15:37:26 2009 -0800

    Fix up some of the timing constants for DELAYWRITE. Add some extra tests up test_delayed_write_update6
    to investigate what happens to a sticky write handle after a second handle close.
    Jeremy.

The original reduction to 75% was set in the new code

commit 0d0fddf8ae856efd7ffb07ba8fa32d2f55d3f9c0
Author: Jeremy Allison <jra@samba.org>
Date:   Fri Sep 5 14:24:36 2008 -0700

    Added tests that show that write time update is immediate
    when changing file size using SMBwrite of size zero,
    SET_END_OF_FILE, or SET_ALLOCATION_SIZE - no 2 second
    delay in these cases.
    Jeremy.
    (This used to be commit 3aa7523d7750fe30d1e6bb5a75ac42b681b9e493)

and in:

commit edb3a83a069d39e123f18de098cfaab6deb16729
Author: Stefan Metzmacher <metze@samba.org>
Date:   Tue Apr 8 10:25:51 2008 +0200

    BASE-DELAYWRITE: use timeval_* and make it possible to spefic the writetime update delay

    metze
    (This used to be commit 751ab2992afd13548af6e67a03d3ced566cb136f)

Change-Id: I8ff9fb8a8b66308f6d784351a0f43b5b234889d1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-smbd: Align debug level for the same information.
Andreas Schneider [Wed, 26 Mar 2014 15:20:01 +0000 (16:20 +0100)]
s3-smbd: Align debug level for the same information.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr  1 23:16:19 CEST 2014 on sn-devel-104

10 years agos3-nmbd: Align debug level for the same information.
Andreas Schneider [Wed, 26 Mar 2014 15:18:55 +0000 (16:18 +0100)]
s3-nmbd: Align debug level for the same information.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
10 years agoctdb:daemon avoid goto ctdb_remove_orphaned_ifaces()
Gregor Beck [Mon, 31 Mar 2014 06:04:21 +0000 (08:04 +0200)]
ctdb:daemon avoid goto ctdb_remove_orphaned_ifaces()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Apr  1 02:59:05 CEST 2014 on sn-devel-104

10 years agoctdb:daemon take a shortcut in all_nodes_are_disabled()
Gregor Beck [Mon, 31 Mar 2014 05:50:45 +0000 (07:50 +0200)]
ctdb:daemon take a shortcut in all_nodes_are_disabled()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agorpcclient: abort shadow-copy set on commit failure
David Disseldorp [Sat, 29 Mar 2014 01:18:20 +0000 (02:18 +0100)]
rpcclient: abort shadow-copy set on commit failure

Use similar behaviour to the diskshadow.exe FSRVP client, which aborts
the shadow-copy set if it receives a failed commit response.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr  1 00:54:06 CEST 2014 on sn-devel-104

10 years agotorture: test FSRVP UNCs with and without trailing slashes
David Disseldorp [Sat, 29 Mar 2014 01:18:19 +0000 (02:18 +0100)]
torture: test FSRVP UNCs with and without trailing slashes

The trailing slash should not make a difference, unless the target share
is hidden.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agorpcclient: append a trailing slash to FSRVP request UNCs
David Disseldorp [Sat, 29 Mar 2014 01:18:18 +0000 (02:18 +0100)]
rpcclient: append a trailing slash to FSRVP request UNCs

The Windows Server 2012 FSRVP server exhibits strange behaviour when
exposing hidden shadow copy shares. If the hidden share UNC in the
AddToShadowCopySet request includes a trailing backslash (e.g.
"\\server\share$\"), then the new shadow-copy share will also be hidden
(e.g. "\\server\share$@{ShadowCopy.ShadowCopyId}$").
However, if the UNC does not include a trailing backslash, which until
now was rpcclient's default behaviour, then the exposed shadow-copy
share is not hidden.

Thanks to the MS Open Specifications team for helping me track down this
one.

bug: https://bugzilla.samba.org/show_bug.cgi?id=10521

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging4: Simplify irpc_namedb_open a bit
Volker Lendecke [Thu, 27 Mar 2014 10:42:34 +0000 (10:42 +0000)]
messaging4: Simplify irpc_namedb_open a bit

It does not really need the msg_ctx, and it also removes the implicit talloc
hierarchy.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging4: Remove lp_ctx from imessaging_context
Volker Lendecke [Thu, 27 Mar 2014 10:18:05 +0000 (10:18 +0000)]
messaging4: Remove lp_ctx from imessaging_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging4: Store a names_db handle in the imessaging_context
Volker Lendecke [Thu, 27 Mar 2014 10:16:08 +0000 (10:16 +0000)]
messaging4: Store a names_db handle in the imessaging_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging4: Add some NULL checks
Volker Lendecke [Thu, 27 Mar 2014 10:08:55 +0000 (10:08 +0000)]
messaging4: Add some NULL checks

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging4: Add "goto fail" to imessaging_init
Volker Lendecke [Thu, 27 Mar 2014 10:07:34 +0000 (10:07 +0000)]
messaging4: Add "goto fail" to imessaging_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotdb_wrap: Remove tdb_wrap_open_ again
Volker Lendecke [Wed, 26 Mar 2014 14:41:03 +0000 (14:41 +0000)]
tdb_wrap: Remove tdb_wrap_open_ again

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agontvfs: Avoid passing lp_ctx to tdb_wrap_open in py_wrap_setxattr
Volker Lendecke [Wed, 26 Mar 2014 14:19:16 +0000 (14:19 +0000)]
ntvfs: Avoid passing lp_ctx to tdb_wrap_open in py_wrap_setxattr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomutex: Avoid passing lp_ctx to tdb_wrap_open in grab_named_mutex
Volker Lendecke [Wed, 26 Mar 2014 14:35:31 +0000 (14:35 +0000)]
mutex: Avoid passing lp_ctx to tdb_wrap_open in grab_named_mutex

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodbwrap: Avoid passing lp_ctx to tdb_wrap_open in db_open_ctdb
Volker Lendecke [Wed, 26 Mar 2014 14:32:58 +0000 (14:32 +0000)]
dbwrap: Avoid passing lp_ctx to tdb_wrap_open in db_open_ctdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoserverid: Avoid passing lp_ctx to tdb_wrap_open in serverid_parent_init
Volker Lendecke [Wed, 26 Mar 2014 14:31:16 +0000 (14:31 +0000)]
serverid: Avoid passing lp_ctx to tdb_wrap_open in serverid_parent_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agovfs: Avoid passing lp_ctx to tdb_wrap_open in posix_eadb_init
Volker Lendecke [Wed, 26 Mar 2014 14:28:57 +0000 (14:28 +0000)]
vfs: Avoid passing lp_ctx to tdb_wrap_open in posix_eadb_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_parent_init
Volker Lendecke [Wed, 26 Mar 2014 14:35:31 +0000 (14:35 +0000)]
messaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_parent_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agomessaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_init
Volker Lendecke [Wed, 26 Mar 2014 14:35:31 +0000 (14:35 +0000)]
messaging: Avoid passing lp_ctx to tdb_wrap_open in messaging_tdb_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodbwrap: Avoid passing lp_ctx to tdb_wrap_open in db_open_tdb
Volker Lendecke [Wed, 26 Mar 2014 14:26:24 +0000 (14:26 +0000)]
dbwrap: Avoid passing lp_ctx to tdb_wrap_open in db_open_tdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoimessaging: Avoid passing lp_ctx to tdb_wrap_open in irpc_namedb_open
Volker Lendecke [Wed, 26 Mar 2014 14:20:44 +0000 (14:20 +0000)]
imessaging: Avoid passing lp_ctx to tdb_wrap_open in irpc_namedb_open

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agontvfs: Avoid passing lp_ctx to tdb_wrap_open in py_wrap_getxattr
Volker Lendecke [Wed, 26 Mar 2014 14:19:16 +0000 (14:19 +0000)]
ntvfs: Avoid passing lp_ctx to tdb_wrap_open in py_wrap_getxattr

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agontvfs: Avoid passing lp_ctx to tdb_wrap_open in pvfs_setup_options
Volker Lendecke [Wed, 26 Mar 2014 14:17:07 +0000 (14:17 +0000)]
ntvfs: Avoid passing lp_ctx to tdb_wrap_open in pvfs_setup_options

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture: Avoid passing lp_ctx to tdb_wrap_open in test_tdb_speed
Volker Lendecke [Wed, 26 Mar 2014 14:14:45 +0000 (14:14 +0000)]
torture: Avoid passing lp_ctx to tdb_wrap_open in test_tdb_speed

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodsdb: Avoid passing lp_ctx to tdb_wrap_open in partition_metadata_open
Volker Lendecke [Wed, 26 Mar 2014 14:12:24 +0000 (14:12 +0000)]
dsdb: Avoid passing lp_ctx to tdb_wrap_open in partition_metadata_open

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodsdb: Avoid passing lp_ctx to tdb_wrap_open in schema_metadata_open
Volker Lendecke [Wed, 26 Mar 2014 14:11:21 +0000 (14:11 +0000)]
dsdb: Avoid passing lp_ctx to tdb_wrap_open in schema_metadata_open

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosecrets: Avoid passing lp_ctx to tdb_wrap_open in randseed_init
Volker Lendecke [Wed, 26 Mar 2014 14:08:40 +0000 (14:08 +0000)]
secrets: Avoid passing lp_ctx to tdb_wrap_open in randseed_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoparam: Add lpcfg_tdb_flags()
Volker Lendecke [Wed, 26 Mar 2014 14:06:08 +0000 (14:06 +0000)]
param: Add lpcfg_tdb_flags()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoparam: Add lpcfg_tdb_hash_size()
Volker Lendecke [Wed, 26 Mar 2014 14:04:41 +0000 (14:04 +0000)]
param: Add lpcfg_tdb_hash_size()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib: Add interim tdb_wrap_open_ without lp_ctx
Volker Lendecke [Wed, 26 Mar 2014 13:36:48 +0000 (13:36 +0000)]
lib: Add interim tdb_wrap_open_ without lp_ctx

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib: Pull up lp_ctx use one level
Volker Lendecke [Wed, 26 Mar 2014 13:32:16 +0000 (13:32 +0000)]
lib: Pull up lp_ctx use one level

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib: Fix blank line endings
Volker Lendecke [Wed, 26 Mar 2014 13:08:13 +0000 (13:08 +0000)]
lib: Fix blank line endings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agofix 2 typos
Guenter Kukkukk [Thu, 27 Mar 2014 23:05:02 +0000 (00:05 +0100)]
fix 2 typos

Signed-off-by: Guenter Kukkukk <linux@kukkukk.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:rpcclient: fix build without HAVE_IPV6
Gregor Beck [Wed, 26 Mar 2014 08:30:24 +0000 (09:30 +0100)]
s3:rpcclient: fix build without HAVE_IPV6

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoctdb-readonly: Do not use hard-coded value for readonly revoke timeout
Amitay Isaacs [Fri, 28 Mar 2014 02:44:34 +0000 (13:44 +1100)]
ctdb-readonly: Do not use hard-coded value for readonly revoke timeout

In case of control timeouts, readonly revoke code currently aborts.  This
needs to be fixed.  Meanwhile, using control_timeout instead of 5 seconds,
increases the timeout to 60 seconds.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Mar 31 07:20:48 CEST 2014 on sn-devel-104

10 years agoRevert "s4:tls_tstream: allow mode of SSL keyfile to be 0400, not only 0600"
Stefan Metzmacher [Fri, 28 Mar 2014 09:24:56 +0000 (10:24 +0100)]
Revert "s4:tls_tstream: allow mode of SSL keyfile to be 0400, not only 0600"

This reverts commit 05c1fe50556e2330e23b7efb38e653428b9bdadf.

This was discussed here:
https://bugzilla.samba.org/show_bug.cgi?id=10392#c11

This generated warnings like:
invalid permissions on file
'/memdisk/metze/W/b138235/samba/bin/ab/promoted_dc/private/tls/key.pem': has
0600 should be 0400'.

I think we need a better way. Maybe file_check_permissions()
should get allow_perms and deny_perms. And we would call it
with allow_perms = 0400 and deny_perms = 0177. And bits in none
of them are ignored.

For now we revert this and wait for a better fix.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Mar 28 12:37:17 CET 2014 on sn-devel-104

10 years agos4:librpc/rpc: remember "ncalrpc_dir" on the dcerpc_pipe->binding
Stefan Metzmacher [Thu, 13 Feb 2014 08:42:10 +0000 (09:42 +0100)]
s4:librpc/rpc: remember "ncalrpc_dir" on the dcerpc_pipe->binding

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Mar 28 10:34:51 CET 2014 on sn-devel-104