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

109130 Commits

Author SHA1 Message Date
Andrew Bartlett
070f24bc9d selftest: Avoid a build started just before midnight failing
By allowing 41 or 42 days, we still test the expiry but are less sensitive to the
current time.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-09-07 06:56:26 +02:00
Volker Lendecke
1e4c32e3ff cli_credentials: Fix a typo
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): Thu Sep  7 05:56:14 CEST 2017 on sn-devel-144
2017-09-07 05:56:14 +02:00
Jeremy Allison
c754f48575 WHATSNEW: Add Using x86_64 Accelerated AES Crypto Instructions section.
Describes --accel-aes configure time option.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-09-07 02:01:09 +02:00
Jeremy Allison
5f87a05aa3 lib: crypto: Add the ability to select Intel AESNI instruction set at configure time.
Add --accel-aes=[none|intelaesni] to select.
Default is none.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-09-07 02:01:08 +02:00
Jeremy Allison
53ac0f7c59 lib: crypto: Plumb in the Intel AES instructions.
Causes:

AES_set_encrypt_key()
AES_set_decrypt_key()
AES_encrypt()
AES_decrypt()

to probe for the Intel AES instructions at runtime (only once)
and then call the hardware implementations if so, otherwise
fall back to the software implementations.

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

Based on original work by Justin Maggard <jmaggard@netgear.com>

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-09-07 02:01:08 +02:00
Jeremy Allison
3324b55bde lib: crypt: Prepare the existing code to switch to Intel AES hardware instructions.
Rename the old struct aes_key as an intermediate struct aes_key_rj
and wrap it in a union so we can chose an alternate aes_key struct
when using Intel AES hardware.

Rename the original software implementations of:

 AES_set_encrypt_key()
 AES_set_decrypt_key()
 AES_encrypt()
 AES_decrypt()

by adding an _rj on the end, and call them via a wrapper
function.

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

Based on original work by Justin Maggard <jmaggard@netgear.com>

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-09-07 02:01:08 +02:00
Jeremy Allison
11a5676895 third_party: Add build capability to aesni-intel.
Minor modifications to code to allow building as a Samba
shared library.

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

Based on original work by Justin Maggard <jmaggard@netgear.com>

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-09-07 02:01:08 +02:00
Jeremy Allison
421fa346de third_party: Add the Intel Add support for AES-NI acceleration.
This commit takes the Linux kernel AES-NI code, and puts it into a
third_party private library. The Linux kernel code is under GPLv2+
so is compatible with Samba.

This can result in massive speed improvements (up to 200% on some
platforms), by using Intel AES-NI instructions.

These are the pristine check-ins of Linux kernel files for Intel AESNI crypto.

git show 8691ccd764f9ecc69a6812dfe76214c86ac9ba06:arch/x86/crypto/aesni-intel_asm.S
git show 2baad6121e2b2fa3428ee6cb2298107be11ab23a:arch/x86/include/asm/inst.h

Show the exact Linux kernel git refspecs we have imported.

These files are not yet used.

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

Based on original work by Justin Maggard <jmaggard@netgear.com>

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-09-07 02:01:08 +02:00
Lumir Balhar
8c365c5fe0 python: Enable execution of samba.tests.security with Python 3.
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep  6 15:29:58 CEST 2017 on sn-devel-144
2017-09-06 15:29:58 +02:00
Lumir Balhar
c81aff362f python: Fix bad type in conversion of NTSTATUS.
More info: https://lists.samba.org/archive/samba-technical/2017-August/122574.html

Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-09-06 11:35:18 +02:00
Lumir Balhar
6f877285a3 python: Add tests for check_access function from samba.security.
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-09-06 11:35:18 +02:00
Lumir Balhar
022aa5ea34 python: Port samba.security to Python 3 compatible form.
Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2017-09-06 11:35:18 +02:00
Andreas Schneider
2d0e13837d python:samba: Add code to remove obsolete files in the private dir
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12957

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep  6 03:54:19 CEST 2017 on sn-devel-144
2017-09-06 03:54:19 +02:00
Andreas Schneider
8f2dee256e python:samba: Use 'binddns dir' in samba-tool and samba_upgradedns
This provisions the bind_dlz files in the 'binddns dir'. If you want to
migrate to the new files strcuture you can run samba_upgradedns!

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2017-09-05 23:58:20 +02:00
Andreas Schneider
3fa7c43ef7 s4:bind_dlz: Use the 'binddns dir' if possible
The code makes sure we are backwards compatible. It will first check if
we still have files in the private directory, if yes it will use those.

If the the file is not in the private directory it will try the binddns
dir.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2017-09-05 23:58:20 +02:00
Andreas Schneider
4c9608fb27 param: Add 'binddns dir' parameter
This allows to us to have restricted access to the directory by the group
'named' which bind is a member of.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2017-09-05 23:58:20 +02:00
Andreas Schneider
3b1aa2ca5f python:samba: Remove code to change group
This is the wrong place, it will just prepare the ldif. The file is not
created here.

The code is corrently changing the group in:
    python/samba/provision/__init__.py

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2017-09-05 23:58:20 +02:00
Andreas Schneider
47c039792a dynconfig: Change permission of the private dir to 0700
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12957

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
2017-09-05 23:58:20 +02:00
Volker Lendecke
f8b491fac4 cli_credentials: Fix a return value
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 Sep  5 23:06:42 CEST 2017 on sn-devel-144
2017-09-05 23:06:41 +02:00
Volker Lendecke
5b53254ffc lib: Fix 1417431 Unchecked return value from library
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-09-05 19:13:12 +02:00
Anoop C S
970f78ea2e Remove misleading entry from vfs_streams_xattr man page
The line which is being removed says that streams_xattr vfs module
cannot be used when kernel oplocks is enabled. But the underlying
bug(#7537) and another dependant bug(#12791) has been resolved
sometime back.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-09-05 19:13:12 +02:00
Volker Lendecke
d1c96dc0ac messaging: Avoid a socket leak after fork
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13006

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): Tue Sep  5 19:12:34 CEST 2017 on sn-devel-144
2017-09-05 19:12:34 +02:00
Amitay Isaacs
587bdfe6cc ctdb-protocol: Fix CID 1417428
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): Tue Sep  5 15:16:06 CEST 2017 on sn-devel-144
2017-09-05 15:16:06 +02:00
Amitay Isaacs
40c5361d41 ctdb-protocol: Fix CID 1417430
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-09-05 11:20:15 +02:00
Amitay Isaacs
b74599b43d ctdb-protocol: Fix CID 1417433
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-09-05 11:20:15 +02:00
Christof Schmitt
139bbf327e vfs_gpfs: Request DENY_DELETE sharemode when possible
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Sep  4 14:08:45 CEST 2017 on sn-devel-144
2017-09-04 14:08:45 +02:00
Christof Schmitt
19004113f3 vfs_gpfs: Do not map DELETE sharemode access to WRITE
A SMB client can deny the WRITE sharemode, but still grant the DELETE
sharemode. Mapping the requested DELETE access to WRITE access breaks
this case. Fix this by removing the incorrect mapping from DELETE access
to WRITE access.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-09-04 10:09:23 +02:00
Amitay Isaacs
dccd9630fb ctdb-client: Use sock_client abstraction for eventd client
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 Sep  1 12:49:27 CEST 2017 on sn-devel-144
2017-09-01 12:49:27 +02:00
Amitay Isaacs
dcc1eaf542 ctdb-common: Add sock_client abstraction
This sets up boilerplate required for a client code connecting to a
server over unix domain socket.  The communication between client
and server is "request" from client to server and "reply" from
server to client.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-09-01 08:52:07 +02:00
Amitay Isaacs
dfa87862fb ctdb-protocol: Drop struct ctdb_event_header
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-09-01 08:52:07 +02:00
Amitay Isaacs
164d65ace2 ctdb-protocol: Replace ctdb_event_header with sock_packet_header
This removes the static declaration and adds prototype declarations
of ctdb_event_header marshalling functions to avoid compiler warnings.
These functions will be removed.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-09-01 08:52:07 +02:00
Amitay Isaacs
1787a4b632 ctdb-protocol: Add a generic packet header
This will avoid duplication when new daemons (and new client-server
protocols) are created out of the main ctdb daemon.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-09-01 08:52:07 +02:00
Martin Schwenke
15c91774d9 ctdb-common: Parse IPv4-mapped IPv6 addresses into IPv4 addresses
Tools like ctdb_killtcp can't route packets to IPv4-mapped IPv6
addresses so this works around that.

Add a test case to confirm that this works.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Sep  1 04:06:32 CEST 2017 on sn-devel-144
2017-09-01 04:06:32 +02:00
Martin Schwenke
e78d2cbff2 ctdb-tests: Improve releaseip connection resetting tests
Make the tests more general by setting up the IP address using a
"takeip" event.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-09-01 00:13:06 +02:00
Martin Schwenke
0dce39e278 ctdb-tests: Add tests to ensure reset of server end of connections
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-09-01 00:13:06 +02:00
Martin Schwenke
d6b77c3033 ctdb-tools: Remove broken natgwlist command
The replacement was documented for Samba 4.5, so this is not worth fixing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-09-01 00:13:06 +02:00
Martin Schwenke
ef46d352e4 ctdb-tests: Drop onnode test README file and buggy onnode example
These are of no value.  The test system is documented elsewhere.  An
old version of onnode can always be retrieved from git.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2017-09-01 00:13:06 +02:00
Amitay Isaacs
fc493780cf ctdb-tests: Shutdown local daemons unconditionally
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-09-01 00:13:06 +02:00
Volker Lendecke
981e674a74 pthreadpool: Test fork with an active thread
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13006
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): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Aug 31 21:34:57 CEST 2017 on sn-devel-144
2017-08-31 21:34:57 +02:00
Volker Lendecke
ff98e3fb66 pthreadpool: Fix fork behaviour
glibc's pthread_cond_wait(&c, &m) increments m.__data.__nusers, making
pthread_mutex_destroy return EBUSY. Thus we can't allow any thread waiting for
a job across a fork. Also, the state of the condvar itself is unclear across a
fork. Right now to me it looks like an initialized but unused condvar can be
used in the child. Busy worker threads don't cause any trouble here, they don't
hold mutexes or condvars. Also, they can't reach the condvar because _prepare
holds all mutexes.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13006
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-08-31 17:44:22 +02:00
Volker Lendecke
cc639765ff winbind: Rename winbindd_cm_conn->netlogon_creds to _ctx
We have too many variables called _creds :-)

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): Wed Aug 30 22:44:45 CEST 2017 on sn-devel-144
2017-08-30 22:44:45 +02:00
Volker Lendecke
ef3b31ab09 winbind: Fix a signed/unsigned hickup
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-08-30 18:56:13 +02:00
Amitay Isaacs
01dd8dd768 ctdb-tests: Drop unused test template
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): Wed Aug 30 18:55:42 CEST 2017 on sn-devel-144
2017-08-30 18:55:42 +02:00
Amitay Isaacs
a8bdcf9c65 ctdb-protocol: Fix marshalling of ctdb_event_reply
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
b107397d8b ctdb-protocol: Fix marshalling for ctdb_event_request
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
54421df6cd ctdb-protocol: Fix marshalling for ctdb_event_header
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
f8e1aaa321 ctdb-protocol: Fix marshalling for ctdb_event_reply_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
ab88bad3e2 ctdb-protocol: Fix marshalling for ctdb_event_reply_script_list
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
4788016cfd ctdb-protocol: Fix marshaling for ctdb_event_reply_status
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00
Amitay Isaacs
a0a162a855 ctdb-protocol: Fix marshalling for ctdb_event_request_data
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30 14:59:26 +02:00