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

95986 Commits

Author SHA1 Message Date
Martin Schwenke
a81dccf7ad ctdb-daemon: Move some inline declarations to header file
To avoid warnings when using --enable-developer, which uses
-Wmissing-prototypes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Martin Schwenke
6336b958d6 ctdb-tests: Add missing declarations caused by #define magic
Some declarations get lost because they basically get #define-d away,
so they need to be repeated after the #undef-s.  Also, some functions
are introduced due the #define-s.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Martin Schwenke
6674949317 ctdb-tests: Mark some functions as static
To avoid warnings when using --enable-developer, which uses
-Wmissing-prototypes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Martin Schwenke
5de4a97fe9 ctdb-util: Remove util/strlist.c and references to str_util_*()
They're not used in CTDB.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Martin Schwenke
b0f9d33058 ctdb: Fix some "declarations after code" problems
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Martin Schwenke
1d16555fa0 ctdb-util: Variables should be declared extern in headers
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-09-10 01:36:14 +02:00
Karolin Seeger
210c647b65 docs-xml: Bump version up to 4.2.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Sep  9 15:33:54 CEST 2014 on sn-devel-104
2014-09-09 15:33:54 +02:00
Karolin Seeger
b3b1bb092f WHATSNEW: Start release notes for Samba 4.2.0rc1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-09-09 13:03:58 +02:00
Ralph Boehme
e8f76e162c s3:smbd: fix a comment typo
Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-09-09 13:03:58 +02:00
Volker Lendecke
af23d5efc0 smbd: Move make_dir_struct() to reply.c
This routine has nothing to do with dptr handling, it is SMB1 marshalling
called only from reply_search().

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-09-09 13:03:58 +02:00
Stefan Metzmacher
dec0243c85 s3:smbd: close the connection if the client doesn't start with a SMB1 Negprot or old messaging call.
The case where the client starts with a SMB2 Negprot is already handled
in smbd_smb2_request_dispatch().

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep  9 13:02:21 CEST 2014 on sn-devel-104
2014-09-09 13:02:21 +02:00
Michael Adam
1f878b9986 Revert "buildtools: Rename perl vendorarch configure option."
This reverts commit 04685ff4ee.

We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state.
Everything special is now in buildtools/wafsamba/samba_perl.py.

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

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

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep  9 03:07:20 CEST 2014 on sn-devel-104
2014-09-09 03:07:20 +02:00
Michael Adam
0b91f7d806 Revert "buildtools: Add perl vendorlib configure option."
This reverts commit 48f0183dbe.

We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state.
Everything special is now in buildtools/wafsamba/samba_perl.py.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-09 00:39:07 +02:00
Michael Adam
42990ca3c8 Revert "wafsamba: If perl can't provide defaults, define them."
This reverts commit 0ba276ebad.

We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state.
Everything special is now in buildtools/wafsamba/samba_perl.py.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-09 00:39:07 +02:00
Michael Adam
c5dd2f18dd Revert "wafsamba: Fail with error message if perl doesn't provide valid dirs."
This reverts commit 2637890ef4.

We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state.
Everything special is now in buildtools/wafsamba/samba_perl.py.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-09 00:39:07 +02:00
Stefan Metzmacher
ee2148754e pidl/wscript: remove --with-perl-* options
These are not needed anymore as we have useful defaults now.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-09 00:39:07 +02:00
David Disseldorp
cd87d9f782 torture: basic FSCTL_SET_ZERO_DATA tests
Attempt to punch holes in a file using FSCTL_SET_ZERO_DATA. Check that
the resulting data is zeroed. Also confirm that when the file is marked
sparse, the zeroed range is no longer allocated.
Finally, check that removing the sparse flag causes any holes to be
unsparsed.

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): Mon Sep  8 21:40:34 CEST 2014 on sn-devel-104
2014-09-08 21:40:34 +02:00
David Disseldorp
5d8bfb5c41 torture: add file zero-range checker
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-08 19:11:13 +02:00
David Disseldorp
750e67aeb2 torture: malformed FSCTL_QUERY_ALLOCATED_RANGES tests
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-08 19:11:13 +02:00
David Disseldorp
10e86bf481 torture: basic FSCTL_QUERY_ALLOCATED_RANGES test
Add a test and helper function for FSCTL_QUERY_ALLOCATED_RANGES
requests.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-08 19:11:13 +02:00
David Disseldorp
9a9cae9555 torture: split pattern write into helper function
This allows for patterned writes after file creation, as needed for
sparse file integrity testing.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-08 19:11:12 +02:00
David Disseldorp
3fcbfa967a torture: test oversize FSCTL_SET_SPARSE request
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-08 19:11:12 +02:00
Volker Lendecke
abe499be56 torture: Correctly initialize array size
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10800
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep  8 16:41:51 CEST 2014 on sn-devel-104
2014-09-08 16:41:51 +02:00
Björn Jacke
815fdb493b samba-tool: fix reply when zero day pwd expiry is set
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10318

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Mon Sep  8 14:15:51 CEST 2014 on sn-devel-104
2014-09-08 14:15:51 +02:00
Jeremy Allison
01a18811cc s3: smbd: smb2-sessionsetup. Fix use after free when the sessionsetup request state is freed before struct smbXsrv_session struct.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Sep  8 09:52:23 CEST 2014 on sn-devel-104
2014-09-08 09:52:23 +02:00
Andrew Bartlett
b19750dbe9 winbindd: Do not use group_list->out.resume_index after free
Found by AddressSanitizer

Change-Id: I59009144b28c390ddb80b7b3fbb4007dfd16db0e
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-09-08 07:26:34 +02:00
Andrew Bartlett
34cc5bd260 winbindd: Do not use user_list->out.resume_index after free
Found by AddressSanitizer

Change-Id: I9f8b95b65de788994a7404fa8889fce45ccb3a30
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-09-08 07:26:34 +02:00
Andrew Bartlett
e93affbe1b torture: allow us to correctly use sizeof(buf) in raw.open tests
This changes the sizeof(buf) from sizeof(void *), 8 on 64-bit machines, to sizeof("test") (eg 5).

Found by AddressSanitizer

Andrew Bartlett

Change-Id: I01f18b35c041f3b16be9f6da8ae5d1917d7e24d9
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-09-08 07:26:34 +02:00
Andrew Bartlett
cb25480e82 s3-lib: Do not walk past the end of the dos_to_ntstatus_map array
Found by AddressSanitizer

Change-Id: Ic8b3e2599713c37b11324f9ec2d01891f0f287b9
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-09-08 07:26:34 +02:00
Andrew Bartlett
b8fc4d4ab5 Use correct size for test string, sizeof() was of the pointer
Found by AddressSanitizer

Change-Id: Ifc9883d958f253df903775544010c0228a102f0f
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-09-08 07:26:34 +02:00
Andrew Bartlett
c0dfda35f7 passdb: Avoid use-after-free when setting a plaintext password
The issue here is that pdb_set_plaintext_passwd() re-used the memory from pdb_get_pw_history() as input

We need to free this after we copy and set it.

Found by AddressSanitizer

Andrew Bartlett

Change-Id: I4e148e23ccbbe5444c969ff8f91709791c7696bb
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-09-08 07:26:34 +02:00
Andrew Bartlett
3cd5e67226 s4-auth: Use sizeof() rather than a fixed constant in memcmp() call
Change-Id: I2807cf2af9e4c3282e6ff54a6dd8e90f34e9481f
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-09-08 07:26:34 +02:00
Andrew Bartlett
b1b3167de9 selftest: Show filename or script we had trouble reading
Change-Id: I12c26e807ab0d65031347bc3be609b2e87dcabb5
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-09-08 07:26:34 +02:00
Michael Adam
b760056f84 torture: fix whitespace/tab mixup in internal_torture_run_test()
No diff visible with "git show|diff -w".

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Mon Sep  8 04:21:52 CEST 2014 on sn-devel-104
2014-09-08 04:21:52 +02:00
Stefan Metzmacher
8c3e0f84cc script/autobuild.py: remove explicit --with-perl-*-install-dir options
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

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

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Sep  5 22:09:47 CEST 2014 on sn-devel-104
2014-09-05 22:09:47 +02:00
Michael Adam
fac24e1165 pidl: remove superfluous "use lib ...".
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
b537c5a340 pidl: fix the perl module search path (use lib ...) when installing pidl.
This way, pidl can also run with modules installed under the $prefix.

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

Signed-off-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
f73a0c2af9 wafsamba: add perl_fixup parameter to INSTALL_FILES
This fixes the search path for modules when installing
a perl "binary" by replacing a line 'use lib "$RealBin/lib";'
which works for the build directory with the appropriate
"use lib" line.

This is a step in allowing to install perl modules under the
prefix directory again.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
e7fc38a7df s3:build: don't detect perl in source3/wscript again.
This is done in the top level now.

Signed-off-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
191fc0e541 pidl/wscript: don't check for perl again.
This is done at the toplevel now.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
7bf9e937ae build: do full SAMBA_CHECK_PERL() check in configure
...instead of only checking for the perl binary

This autodetects PERL_LIB_INSTALL_DIR and removes the
need of the --with-perl-lib-install-dir when using a --prefix!=/usr.

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

Signed-off-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
75c3e240e0 wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check.
This checks for the perl binary, sets PERL and PERL_SPECIFIED
as well es the PERL_ARCH_INSTALL_DIR and PERL_LIB_INSTALL_DIR.

We want to avoid installing the perl modules outside the prefix.
I.e. generally,the perl modules should be installed
under "$prefix/share/perl5".

This improves the fixes for bug #10472.

The new strategy for automatically setting the paths is this:

- if the prefix equals perl's vendorprefix, then
  - PERL_LIB_INSTALL_DIR is set to perl's vendorlib dir
  - PERL_ARCH_INSTALL_DIR is set to perl's vendorarch dir
- otherwise:
  - PERL_LIB_INSTALL_DIR is set to ${DATADIR}/perl5
    (usually ${PREFIX}/share/perl5)
  - PERL_ARCH_INSTALL_DIR is set to ${LIBDIR}/perl5
    (usually ${PREFIX}/lib/perl5)

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
6ad678166c dynconfig: implement PERL_ARCH_INSTALL_DIR
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
e5d54c5841 dynconfig: implement PERL_LIB_INSTALL_DIR.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
bb9a939e78 lib/ldb/wscript: pass dep_vars=['LDB_VERSION'] to SAMBA_GENERATOR()
bld.add_manual_dependency() only works for files not for environment variables.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
de0443ac76 docs-xml/wscript_build: pass dep_vars=bld.dynconfig_varnames() to SAMBA_GENERATOR()
This avoids the use of always=True.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
32ddd5b655 dynconfig/wscript: add dynconfig_varnames()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
bab349c2a1 ctdb/wscript: pass dep_vars=['VERSION'] to SAMBA_GENERATOR()
This avoid the use of always=True.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
a41a9ad074 wafsamba: let SAMBA_BLDOPTIONS() use dep_vars=['defines'] instead of always=True
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Stefan Metzmacher
7316653a82 wafsamba: fix dependencies on environment variables for python_fixup
We now checksum the sourcecode of copy_and_fix_python_path()
and the env variables used by this function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00