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

9 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

9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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

9 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

9 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>
9 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

9 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>
9 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>
9 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

9 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>
9 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>
9 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>
9 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>
9 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

9 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>
9 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

9 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

9 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>
9 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

9 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>
9 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>
9 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>
9 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

9 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>
9 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

9 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>
9 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>
9 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>
9 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>
9 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>
9 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

9 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

9 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

9 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

9 years agoFix typo in docs-xml/manpages/net.8.xml
Marc Muehlfeld [Tue, 4 Nov 2014 00:54:47 +0000 (01:54 +0100)]
Fix typo in docs-xml/manpages/net.8.xml

Typo: s/Createa/Create/

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue Nov  4 04:29:23 CET 2014 on sn-devel-104

9 years agosmbstatus: check for lock_path talloc failures
David Disseldorp [Sun, 2 Nov 2014 19:21:49 +0000 (20:21 +0100)]
smbstatus: check for lock_path talloc failures

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 Nov  4 02:07:35 CET 2014 on sn-devel-104

9 years agosmbXsrv: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:48 +0000 (20:21 +0100)]
smbXsrv: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agonotify_internal: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:47 +0000 (20:21 +0100)]
notify_internal: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoprinter_list: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:46 +0000 (20:21 +0100)]
printer_list: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agonmbd_namelistdb: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:45 +0000 (20:21 +0100)]
nmbd_namelistdb: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoshare_mode_lock: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:44 +0000 (20:21 +0100)]
share_mode_lock: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agobrlock: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:43 +0000 (20:21 +0100)]
brlock: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoserverid: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:42 +0000 (20:21 +0100)]
serverid: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoserver_mutex: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:41 +0000 (20:21 +0100)]
server_mutex: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agog_lock: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:40 +0000 (20:21 +0100)]
g_lock: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agodbwrap_watch: don't leak lock_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:39 +0000 (20:21 +0100)]
dbwrap_watch: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolang_tdb: don't leak lock_path or data_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:38 +0000 (20:21 +0100)]
lang_tdb: don't leak lock_path or data_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agowinbindd_cache: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:37 +0000 (20:21 +0100)]
winbindd_cache: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agowinbindd: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:36 +0000 (20:21 +0100)]
winbindd: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoidmap_autorid: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:35 +0000 (20:21 +0100)]
idmap_autorid: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agosmbcontrol: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:34 +0000 (20:21 +0100)]
smbcontrol: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agonet_registry: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:33 +0000 (20:21 +0100)]
net_registry: don't leak state_path onto talloc tos

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agonet_idmap: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:32 +0000 (20:21 +0100)]
net_idmap: don't leak state_path onto talloc tos

net_idmap currently uses a net_idmap_dbfile() helper to return the idmap
backed specific db path. Fix leaks in all callers.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoreg_perfcount: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:31 +0000 (20:21 +0100)]
reg_perfcount: don't leak state_path onto talloc tos

reg_perfcount currently uses a counters_directory() helper to return the
counter specific tdb path. Fix leaks and error checking in the helper
function and all callers.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoreg_backend_db: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:30 +0000 (20:21 +0100)]
reg_backend_db: don't leak state_path onto talloc tos

Also check for allocation failures, and ensure that the regdb refcount
is not set by regdb_open() on failure.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agont_printing: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:29 +0000 (20:21 +0100)]
nt_printing: don't leak state_path onto talloc tos

Also check for allocation failures, and close tdbs in
nt_printing_tdb_upgrade error paths.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agopdb_tdb: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:28 +0000 (20:21 +0100)]
pdb_tdb: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoaccount_pol: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:27 +0000 (20:21 +0100)]
account_pol: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agonmbd_winsserver: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:26 +0000 (20:21 +0100)]
nmbd_winsserver: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agosharesec: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:25 +0000 (20:21 +0100)]
sharesec: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoeventlog: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:24 +0000 (20:21 +0100)]
eventlog: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agogroupdb: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:23 +0000 (20:21 +0100)]
groupdb: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoChange expired password flag indicator
Gabriel Buades [Mon, 8 Sep 2014 10:21:26 +0000 (12:21 +0200)]
Change expired password flag indicator

Signed-off-by: Gabriel Buades <gbuades@soffid.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
9 years agos3:locking: remove dead code from brl_get_locks_readonly()
Stefan Metzmacher [Wed, 29 Oct 2014 16:29:06 +0000 (17:29 +0100)]
s3:locking: remove dead code from brl_get_locks_readonly()

struct byte_range_lock *rw = NULL; will never change...

commit 105724073300af03eb0835b3c93d9b2e2bfacb07 removed the
possible assigment of 'rw'.

So we can remove all code under if (rw != NULL) { ...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 31 06:07:43 CET 2014 on sn-devel-104

9 years agos3:locking: Change from ndr_pull_struct_blob() to ndr_pull_struct_blob_all() so we...
Volker Lendecke [Tue, 28 Oct 2014 22:20:26 +0000 (15:20 -0700)]
s3:locking: Change from ndr_pull_struct_blob() to ndr_pull_struct_blob_all() so we fail if not all bytes are consumed.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:torture/smb2: test rename dir deny with open files
Volker Lendecke [Wed, 24 Sep 2014 23:32:00 +0000 (01:32 +0200)]
s4:torture/smb2: test rename dir deny with open files

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:smbd: Don't rename a dir with files open underneath
Volker Lendecke [Wed, 24 Sep 2014 23:30:33 +0000 (01:30 +0200)]
s3:smbd: Don't rename a dir with files open underneath

This is an EXPENSIVE check. We'll have to guard this with an option

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoselftest:Samba3: use "strict rename = yes"
Jeremy Allison [Fri, 24 Oct 2014 20:57:04 +0000 (13:57 -0700)]
selftest:Samba3: use "strict rename = yes"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:param: Add new option "strict rename".
Jeremy Allison [Fri, 24 Oct 2014 20:57:04 +0000 (13:57 -0700)]
s3:param: Add new option "strict rename".

Control whether smbd can rename directories containing
open files. Defaults to "no" (meaning we *can* do
such renames).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:locking: allow early return for share_entry_forall()
Volker Lendecke [Wed, 24 Sep 2014 18:46:15 +0000 (20:46 +0200)]
s3:locking: allow early return for share_entry_forall()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:locking: Introduce share_mode_forall
Volker Lendecke [Tue, 23 Sep 2014 03:45:49 +0000 (05:45 +0200)]
s3:locking: Introduce share_mode_forall

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3:locking: Rename share_mode_forall->share_entry_forall
Volker Lendecke [Tue, 23 Sep 2014 03:18:54 +0000 (05:18 +0200)]
s3:locking: Rename share_mode_forall->share_entry_forall

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agolibcli: Make sure status is initialized.
Andreas Schneider [Thu, 30 Oct 2014 15:12:19 +0000 (16:12 +0100)]
libcli: Make sure status is initialized.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agotorture: Make sure server_type isn't used uninitialized.
Andreas Schneider [Thu, 30 Oct 2014 15:12:18 +0000 (16:12 +0100)]
torture: Make sure server_type isn't used uninitialized.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos3-libsmb: Make sure the stat structure is initialized.
Andreas Schneider [Thu, 30 Oct 2014 15:12:17 +0000 (16:12 +0100)]
s3-libsmb: Make sure the stat structure is initialized.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos3-rpcclient: Make sure current_nt_hash is initialized.
Andreas Schneider [Thu, 30 Oct 2014 15:12:16 +0000 (16:12 +0100)]
s3-rpcclient: Make sure current_nt_hash is initialized.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoctdb-includes: Reorder includes.h more logically
Martin Schwenke [Wed, 8 Oct 2014 08:59:10 +0000 (19:59 +1100)]
ctdb-includes: Reorder includes.h more logically

For now replace.h needs to be before tdb.h, since tdb.h needs
stdbool.h.  This is fixed upstream but not yet in various packaged
versions.

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): Fri Oct 31 03:46:40 CET 2014 on sn-devel-104

9 years agoctdb-includes: Remove unused idtree.h
Martin Schwenke [Wed, 8 Oct 2014 09:54:22 +0000 (20:54 +1100)]
ctdb-includes: Remove unused idtree.h

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agoctdb-includes: Clean up includes.h
Martin Schwenke [Mon, 18 Aug 2014 04:58:53 +0000 (14:58 +1000)]
ctdb-includes: Clean up includes.h

Remove unused #defines.  CTDB doesn't use these.  _PUBLIC_ is defined
in replace.h anyway.

Remove unnecessary #includes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
9 years agobuild: fix check for subunit file when selftest prefix is given
Michael Adam [Mon, 27 Oct 2014 22:24:28 +0000 (23:24 +0100)]
build: fix check for subunit file when selftest prefix is given

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Oct 30 22:45:45 CET 2014 on sn-devel-104

9 years agoscript: fix display of ten slowest tests if < 10 tests are run.
Michael Adam [Mon, 27 Oct 2014 11:35:12 +0000 (12:35 +0100)]
script: fix display of ten slowest tests if < 10 tests are run.

Note: $#array is the biggest index in an array in perl.
@array evaluated in scalar context is the number of elements.
Hence scalar(@array) = 1 + $#array

Or equivalently: 0 + @array = 1 + $#array

... :-)

Apart from this off-by-one error, the "unless" clause to trigger
the capping of the number of tests listed was wrong. Hence if
less then 10 tests were run, a number of blank lines were appended.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>