1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

105648 Commits

Author SHA1 Message Date
Andrew Bartlett
5cb1882dc6 talloc: Add tests for talloc_parent() after realloc() of the parent
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:22 +01:00
Andrew Bartlett
48c897f126 talloc: clarify that talloc_magic never includes the bits in TALLOC_FLAG_MASK
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:22 +01:00
Andrew Bartlett
032e25fdc6 talloc: add ASCII art to describe parent/child arrangement
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:22 +01:00
Alexis La Goutte
3c9d703d45 Fix typo
Fix (minor) typo found in wireshark with lintian tools
https://code.wireshark.org/review/#/c/18485/

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Petr Viktorin
a39c4948a6 python: Add py3compat.h
This adds a shared header file with macros that enable compatibility
between Python 2 and 3.
The macros are the ones used in ldb/tdb, with some additions
that make sense when the header is shared among several modules.
See the module for a summary of contents.

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Lumir Balhar
1e27111955 python: samba.subunit.run: Fix Python 3 compatibility.
Usage of function _test_id() which generates test id in bytes breaks
Python 3 compatibility. After fix, this function is not used any more.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Lumir Balhar
8f8b0fd12a python: selftesthelpers: Add possibility for planning tests for
'extra_python' (Python 3).

This change allows us to mark modules which are Python 3 compatible
with the keyword argument `py3_compatible`. Then, if building with
Python 3 is configured using --extra-python, `planpythontestsuite`
will plan an extra Python test for each marked module.

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Lumir Balhar
358eaf810e python: wscript_build: Prepare build environment for Python 3 porting
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Andrew Bartlett
c503ca302d join.py: Attempt to allocate a RID Set during the join
If we are joining the RID Manager, then we should get a RID Set, but
otherwise we should accept failure with the right error code

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Andrew Bartlett
62e19e6b4a selftest: Ensure vampiredc has a full copy of localdc before we start
Otherwise we may fail tests because we are still pulling in the full replica
from localdc during the tests.  This may block RID allocation in particular.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Andrew Bartlett
07df896a34 selftest: Rework child process cleanup
We now:
 - call gdb_backtrace on the stuck pid to determine why it is stuck
 - cleanup faster as we catch the process exit
   (by not waiting until 1 second after the exit for waitpid() to return -1)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Stefan Metzmacher
e952a127d6 selftest/gdb_*: make use of 'mktemp'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Jeremy Allison
446851c861 librpc: cab: Fix ndr_size_cab_file() to detect integer wrap.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Dec  1 05:53:43 CET 2016 on sn-devel-144
2016-12-01 05:53:43 +01:00
Jeremy Allison
d2fe23ae0a librpc: cab: Integer wrap protection for ndr_count_cfdata().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-12-01 02:02:19 +01:00
Douglas Bagnall
737599268f smbclient: fix string formatting in print command
At one time, the variables lname and rname were char arrays, but now they
are pointers. When they were arrays, sizeof(rname) was the length of the
array, but now it gives the size of the pointer which is not what we want.

In the case where the filename is -, rname was alloced as size 1, which
could never fit the name it wanted to have contain ("stdin-<pid>").

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-12-01 02:02:19 +01:00
Douglas Bagnall
c98bdf2494 smbd/service_stream: connection processing flag is not really bool
The warning is:

../source4/smbd/service_stream.c: In function ‘stream_io_handler’:
../source4/smbd/service_stream.c:94:18: warning: increment of a boolean expression [-Wbool-operation]
  conn->processing++;
                    ^~
../source4/smbd/service_stream.c💯18: warning: decrement of a boolean expression [-Wbool-operation]
  conn->processing--;
                    ^~

while the code in question looks like:

	conn->processing++;
	if (flags & TEVENT_FD_WRITE) {
		conn->ops->send_handler(conn, flags);
	} else if (flags & TEVENT_FD_READ) {
		conn->ops->recv_handler(conn, flags);
	}
	conn->processing--;

If this is never going to be nested, processing can be bool and the ++
and -- can be true/false assignments. But it seems possible that these
might be nested so it is better to go the other way.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Dec  1 00:28:05 CET 2016 on sn-devel-144
2016-12-01 00:28:05 +01:00
Douglas Bagnall
28eb49c7ed lib/registry/regf: better initialise nk_block
We were initialising a uint32_t[5] block with memset(..., 5) when we
surely meant memset(..., 5 * sizeof(uint32_t)) or some equivalent.

Thanks go to gcc-7 and -Wmemset-elt-size. The warning looks like this:

../source4/lib/registry/regf.c: In function ‘reg_create_regf_file’:
../source4/lib/registry/regf.c:2095:2: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
  memset(nk.unk3, 0, 5);
    ^~~~~~

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-11-30 20:36:24 +01:00
Volker Lendecke
f5154a86fa ldb: Fix an unused variable warning
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-11-30 20:36:24 +01:00
Volker Lendecke
b38c8da937 ldb: Fix typos
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-11-30 20:36:24 +01:00
Stefan Metzmacher
78a77d468f tdb: version 1.3.12
* Bug 12455 - tdb mutexes don't work on FreeBSD

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Nov 30 20:02:28 CET 2016 on sn-devel-144
2016-11-30 20:02:28 +01:00
Ralph Wuerthner
6e95fd8247 param: fix lp_parameter_value_is_valid() for parametric options
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Nov 30 04:00:54 CET 2016 on sn-devel-144
2016-11-30 04:00:54 +01:00
Volker Lendecke
275d9fc7d9 tdb: Fix mutexes on FreeBSD
susv4 on mmap has the following snippet:

> The state of synchronization objects such as mutexes, semaphores,
> barriers, and conditional variables placed in shared memory mapped
> with MAP_SHARED becomes undefined when the last region in any process
> containing the synchronization object is unmapped.

This means we can't keep the mutex mmap area unmapped at any point
in time.

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

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 29 23:59:52 CET 2016 on sn-devel-144
2016-11-29 23:59:52 +01:00
Volker Lendecke
5ce95abf37 tdb: Only mmap the mutex area if not already mmap'ed
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12455

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-29 20:03:25 +01:00
Volker Lendecke
a2843cfd4d tdb: NULL out tdb->mutexes in tdb_mutex_munmap
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12455

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-11-29 20:03:25 +01:00
Martin Schwenke
bdc049dfce ctdb-common: Drop CTDB's copy of sys_read() and sys_write()
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 29 11:22:40 CET 2016 on sn-devel-144
2016-11-29 11:22:40 +01:00
Martin Schwenke
dcde6f1619 ctdb-lock-helper: Drop include of ctdb_private.h
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-11-29 07:25:19 +01:00
Martin Schwenke
de22783f73 lib/util: Make sys_rw available to CTDB
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-11-29 07:25:19 +01:00
Volker Lendecke
4ca7d50c87 ntlm_auth4: Remove it
This had install=False for rather exactly 4 years now. If someone wants to
start working on it again, we can always dig it up from the git history.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 29 02:18:37 CET 2016 on sn-devel-144
2016-11-29 02:18:37 +01:00
Amitay Isaacs
f2414841f2 ctdb-daemon: Mark RecoverPDBBySeqNum tunable deprecated
Persistent databases are now always recovered by sequence number, so
there is no need for this tunable.

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 25 08:13:59 CET 2016 on sn-devel-144
2016-11-25 08:13:59 +01:00
Amitay Isaacs
2a9584dc0a ctdb-daemon: Remove unused code cmdline.[ch]
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-11-25 04:19:23 +01:00
Amitay Isaacs
569d787a1d ctdb-daemon: Consolidate command line options to ctdbd
This inserts the code from ctdb_cmdline_init() function directly in
main(), so common/cmdline.[ch] can be removed.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-11-25 04:19:23 +01:00
Amitay Isaacs
7dec7e0b99 ctdb-tests: Remove unused test code
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-11-25 04:19:23 +01:00
Günther Deschner
5adb1693bd s4-torture: Add LZX compressed cabinet test
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Nov 25 00:17:02 CET 2016 on sn-devel-144
2016-11-25 00:17:02 +01:00
Günther Deschner
6361559f41 s4-torture: Add MSZIP compressed cabinet test
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:27 +01:00
Günther Deschner
9ddf9bfb41 s4-torture: Add a validation test for uncompressed Cabinet files
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
d5dd99a95f s4-torture: Introduce Cabinet ndr testsuite
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
e91895f411 librpc: Add ndr_cab_get_compression() for Cabinet compression evaluation
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
983dac44f2 librpc: Add autogenerated file offset calculation for Cabinet files
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
59ae0e5f34 librpc: Add autogenerated total cabinet size for Cabinet files
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
4cc4fca23e librpc: Add autogenerated checksum calculation for Cabinet files
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
88e1c4dc44 librpc: Introduce cab.idl
This allows processing of Windows Cabinet files (required for the MS-PAR
print protocol implementation)

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
20eadb5f9a s3-rpcclient: Add AsyncCorePrinterDriverInstalled command
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
53be405e8e s3-rpcclient: Add rpcclient IRemoteWinspool commands
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Günther Deschner
bc0aa242c5 s3-rpc_cli: Support the use of the object_uuid in rpc_cli interfaces
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-24 20:24:26 +01:00
Uri Simchoni
60fd6a324b WHATSNEW: document new inherit owner option
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Nov 24 20:23:46 CET 2016 on sn-devel-144
2016-11-24 20:23:46 +01:00
Uri Simchoni
bb7594392f WHATSNEW: document kerberos encryption types
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Rowland Penny <rpenny@samba.org>
2016-11-24 16:31:19 +01:00
Günther Deschner
a59e547853 docs: fix funny typo in smb.conf manpage wrt Samba's FSRVP server.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Nov 24 16:30:13 CET 2016 on sn-devel-144
2016-11-24 16:30:13 +01:00
Volker Lendecke
b5fe9c685f selftest: Fix timestamps on FreeBSD 11
FreeBSD's date does not print the %, and \? does not catch that

Tested this manually:

$ echo 'time: 2016-11-23 12:52:19.123456Z'| sed 's/\..*NZ$/.000000Z/'
time: 2016-11-23 12:52:19.123456Z
$ echo 'time: 2016-11-23 12:52:19.%6NZ'| sed 's/\..*NZ$/.000000Z/'
time: 2016-11-23 12:52:19.000000Z
$ echo 'time: 2016-11-23 12:52:19.6NZ'| sed 's/\..*NZ$/.000000Z/'
time: 2016-11-23 12:52:19.000000Z
$ echo 'time: 2016-11-23 12:52:19.NZ'| sed 's/\..*NZ$/.000000Z/'
time: 2016-11-23 12:52:19.000000Z
$

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Nov 24 00:42:55 CET 2016 on sn-devel-144
2016-11-24 00:42:54 +01:00
Anoop C S
656f2a9dcd s3/dump_core: Honour pipe symbol (|) in system-wide core_pattern under linux
From man core(5):

"Since  kernel  2.6.19, Linux supports an alternate syntax for the
/proc/sys/kernel/core_pattern file.  If the first character of this
file is a pipe symbol (|), then the remainder of the line is interpreted
as a user-space program to be executed."

Discarding this symbol would result in misleading logs for smbd/nmbd/winbindd.
For example even if core_pattern contains '|', smbd logs would suggest the
following:

...
dumping core in /var/log/samba/cores/smbd
...

and coredump may or may not get created at that location depending on which
helper binary is being used for handling coredumps.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-11-23 20:49:28 +01:00
Volker Lendecke
530c2c8f97 ldb: version 1.1.28
* Fix the build with installed ldb-devel 1.1.27
  We depend on LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC.

* Some build fixes.

* More performance improvements.

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): Wed Nov 23 20:48:31 CET 2016 on sn-devel-144
2016-11-23 20:48:31 +01:00