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

99527 Commits

Author SHA1 Message Date
Amitay Isaacs
6c4e3cf1a9 ctdb-packaging: Package private libraries
Remove the private libraries from builtin_libraries and package them
instead.

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): Wed Jul  1 07:19:43 CEST 2015 on sn-devel-104
2015-07-01 07:19:43 +02:00
Mathieu Parent
ba7790720d ctdb-build: Fix ctdb --with-socketpath configure option
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-07-01 04:18:29 +02:00
Amitay Isaacs
94285d961f ctdb-packaging: Pass extra arguments to rpmbuild from commandline
To build CTDB rpms with PCP PMDA, use

make rpm RPM_OPTIONS="--with pmda"

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Martin Schwenke <martin@meltin.net>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-07-01 04:18:29 +02:00
Martin Schwenke
1e13455d7e ctdb-build: Fix building of PCP PMDA module
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-01 04:18:29 +02:00
Martin Schwenke
0c609c9505 ctdb-scripts: Only write to /proc route flush files if they exist
On IPv4-only or IPv6-only systems one of these files will not exist.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-01 04:18:29 +02:00
Martin Schwenke
eb159f3ff5 ctdb-daemon: Promote debug messages about --start-as-* to NOTICE level
It is important to know when ctdbd is started with --start-as-stopped
or --start-as-disabled.  Given that this only happens once it makes
sense to promote these debug items to NOTICE level.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-01 04:18:29 +02:00
Martin Schwenke
b234ae0a90 ctdb-recoverd: Clear IP assignment tree on election loss
If a node was previously recovery master (say, 20 years ago) and it
becomes recovery master again then, if IP assignments have changed,
verify_remote_ip_allocation() can produce messages like the following
when called during recovery:

  ctdbd: recoverd:Inconsistent IP allocation - node 0 thinks 10.1.1.1 is held by node 0 while it is assigned to node 1

When a node loses an election it should clear all data specific to it
being the recovery master.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-01 04:18:28 +02:00
Martin Schwenke
036c2a9243 ctdb-recoverd: Add new function clear_ip_assignment_tree()
This needs to be cleared to avoid stale data when a new recovery
master is elected.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-01 04:18:28 +02:00
Martin Schwenke
27674c413d ctdb-scripts: Create the directory containing the recovery lock
This will handle the most obvious cases.  It won't handle the case
where the directory is missing and the recovery lock location is
updated at run-time.  However, this is a good improvement.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-01 04:18:28 +02:00
Martin Schwenke
f4871b8736 ctdb-tests: Run transaction tests with externally imposed timeout
This works around cases where ctdb_transaction gets stuck - this still
needs to be debugged.  However, this change will at least cause
individual tests to fail rather than having whole test runs time out.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-07-01 04:18:28 +02:00
Volker Lendecke
e1a87d8676 libldap: Fix CID 1308982 Unchecked return value from library
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): Wed Jul  1 00:11:41 CEST 2015 on sn-devel-104
2015-07-01 00:11:41 +02:00
Günther Deschner
2749e08437 ntlmssp: add NTLMSSP_WINDOWS_MINOR_VERSION_3 as seen from Windows 8.1 clients.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-30 21:12:19 +02:00
Günther Deschner
c638ce839b s3-smbd: reset protocol in smbXsrv_connection_init_tables failure paths.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11373

Guenther

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-06-30 21:12:19 +02:00
Volker Lendecke
6fc65aaf95 lib: Fix rundown of open_socket_out()
Under valgrind I've seen the abort in async_connect_cleanup kick in. Yes, it's
good that we check these return codes!

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jun 30 20:24:37 CEST 2015 on sn-devel-104
2015-06-30 20:24:37 +02:00
Michael Adam
36272ac198 selftest: skip the ntvfs based base.defer_open tests
They have timing issues and the ntvfs is not the focus
of development.

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): Tue Jun 30 17:24:37 CEST 2015 on sn-devel-104
2015-06-30 17:24:37 +02:00
Michael Adam
3bc8d520e9 net:conf:import: print error message when importing fails.
If there is a mis-spelled option in a share definition,
'net conf import' will currently silently drop it
(but exit with code != 0). We want to be notified
of what went wrong.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-06-30 14:23:18 +02:00
Stefan Metzmacher
7372f17cb1 selftest: use server_maxtime = 10800 by default
With something like this:

samba.stdout:
[1855(18118)/1864 at 2h37m4s] samba4.krb5.kdc with account ALLOWED permission to replicate to an RODC(fl2008r2dc)
[1856(18378)/1864 at 2h37m57s] samba4.blackbox.dbcheck(ad_dc_ntvfs)
ERROR: Testsuite[samba4.blackbox.dbcheck(ad_dc_ntvfs)]
REASON: unable to set up environment ad_dc_ntvfs:local - exiting

samba.stderr:
samba: maximum runtime exceeded - terminating at 1435553350, current ts: 1435553350

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-30 14:23:18 +02:00
Amitay Isaacs
4974322119 wafsamba: Cache final_libs for each target
The code for saving/loading dependencies does not cache final_libs for
each target.  If wafsamba tries to reuse the saved dependencies, then
it does not get the dependencies on the private libraries correctly.

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 Jun 30 09:44:10 CEST 2015 on sn-devel-104
2015-06-30 09:44:10 +02:00
Uri Simchoni
eaf9920309 winbindd: disconnect child process if request is cancelled at main process
When cancelling a request at the main winbindd process, that is currently
being served by a child winbindd process, just freeing all objects related
to the request is not enough, as the next bytes to come through the pipe
from the child process are the response to the cancelled request, and the
object reading those bytes will be the next request. This breaks the protocol.

This change, upon canceling a request that is being served, closes the
connection to the child process, causing the next request to be served
by a new child process (and the detached child to die eventually).

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

Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jun 29 14:00:24 CEST 2015 on sn-devel-104
2015-06-29 14:00:24 +02:00
Douglas Bagnall
e3373e9d14 Revert "lib: Fix deps for LIBCRYPTO"
This reverts commit 30bfb8d638.

Talloc is still needed by LIBCRYPTO, because arcfour.h
includes lib/util/data_blob.h which includes talloc.h.

It seems arcfour only uses the DATA_BLOB struct (in e.g. arcfour_crypt
and arcfour_init).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Jun 28 11:47:16 CEST 2015 on sn-devel-104
2015-06-28 11:47:16 +02:00
Michael Adam
15ac12af9c ctdb: strip trailing spaces from nodes file.
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Jun 27 13:20:18 CEST 2015 on sn-devel-104
2015-06-27 13:20:18 +02:00
Volker Lendecke
c5be94c5da libsmb: Use fstr_sprint in convert_sid_to_string
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): Fri Jun 26 22:35:02 CEST 2015 on sn-devel-104
2015-06-26 22:35:02 +02:00
Volker Lendecke
994d08e420 libsmb: Streamline smb1cli_trans a bit
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-26 19:32:19 +02:00
Anubhav Rakshit
5af2e3eed2 s3:libsmb: Fix a bug in conversion of ea list to ea array.
Bug 11361 - Reading of EA's (Extended Attributes) fails using SMB2 and above
protocols

Tested against Win2k12r2 server.

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

Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-26 19:32:19 +02:00
Michael Adam
5c1ed7f18f ctdbd_conn: use the right error code from ctdbd_connect for debug and return
ctdbd_connect() explicitly returns the errno.
Using errno instead of ret misses some important
manually set return values and might use the
errno that is changed by close(fd).

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

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Jun 26 17:21:26 CEST 2015 on sn-devel-104
2015-06-26 17:21:26 +02:00
Michael Adam
3320a565fb ctdbd_conn: lower the debug level 0 for failing connection to ctdbd.
If e.g. samba fails to start because it can not open the
connection to ctdbd, we want to see some indication in the
logs about this.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2015-06-26 14:18:15 +02:00
Douglas Bagnall
bbb18875dc Avoid segfault in durable_open tests
There are "goto done"s hiding in CHECK_STATUS in parts of
the code where tree1 is unequivocally NULL.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jun 26 05:12:02 CEST 2015 on sn-devel-104
2015-06-26 05:12:02 +02:00
Thomas Nagy
26a7372e3b Always use Samba's CHECK_CFG instead of waf check_cfg 2015-06-26 02:10:12 +02:00
Thomas Nagy
21f98e58da Remove PYTHONDIR and PYTHONARCHDIR in a single place 2015-06-26 02:10:12 +02:00
Jeremy Allison
e2c4b8967d s3: smbd: Use separate flag to track become_root()/unbecome_root() state.
Early function exit can mean backup_priv is set but we haven't called
become_root(). *Lots* of work by the reviewers went in to checking this
isn't a security issue.

Found by Codenomicon at the Redmond plugfest.

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

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun 25 22:14:58 CEST 2015 on sn-devel-104
2015-06-25 22:14:58 +02:00
Michael Adam
c0364fa075 ctdb: remove useless setting of variable domain_socket_name
This was used to unlink the socket at daemon exit, which
was removed in ctdb commit b18356764cd49d934eab901e596bb75c6e3ecdf8
(Samba master commit 4259156050).

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

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jun 25 18:29:59 CEST 2015 on sn-devel-104
2015-06-25 18:29:59 +02:00
Andrew Bartlett
c31c30043b s4-winbindd: Remove the winbind rewrite from the samba4 effort
This winbind implementation is undermaintained, out of date and not the
future of even the AD DC, let alone any other purpose.

Removing it will reduce our security and bug exposure on this
off by default subsystem

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 Jun 24 22:34:57 CEST 2015 on sn-devel-104
2015-06-24 22:34:57 +02:00
Andrew Bartlett
45b7992428 Allow winbind removal by matching delays to Samba3.pm
When using winbindd with the ntvfs file server, the responses are faster than
they were in the past.  Therefore, set:
 posix:sharedelay = 100000
 posix:writetimeupdatedelay = 500000
to the values used in Samba3.pm to allow the tests to pass against the NTVFS
file server without the internal winbind.

This allows the internal winbind to be removed.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-24 19:33:23 +02:00
Stefan Metzmacher
fb63fd1dc4 s3:winbindd: remove unused argument 'server' from winbind_samlogon_retry_loop()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-06-24 19:33:23 +02:00
Andreas Schneider
0438027a47 auth: Explain why GSS_KRB5_CRED_NO_CI_FLAGS_X is needed
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun 24 13:37:02 CEST 2015 on sn-devel-104
2015-06-24 13:37:02 +02:00
Douglas Bagnall
225d701546 correct sense of macro variable name in SMB2 durable open test
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 24 08:54:23 CEST 2015 on sn-devel-104
2015-06-24 08:54:23 +02:00
Douglas Bagnall
69e511e478 Avoid casting pointer to unsigned long long for NULL check
This allows compilation on i386 with -WError. Otherwise we see
this:

  ../source4/torture/smb2/durable_open.c:41:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       __location__, #v, (unsigned long long)v, (unsigned long long)correct); \

because the pointer is 32 bits, while long long is 64.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 06:04:10 +02:00
Douglas Bagnall
8ed6523b6c Use large enough unsigned values in server_id IDL
This matches what we have in struct server_id.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 06:04:10 +02:00
Douglas Bagnall
8a3d548ee7 remove trailing whitespace in Pidl/Samba4/Python.pm
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 06:04:10 +02:00
Douglas Bagnall
3c9f7957c9 Treat unsigned 64 bit IDL values as unsigned long long in Python
This caused a compilation error on i386:

default/librpc/gen_ndr/py_server_id.c:216:75: error: overflow in implicit constant conversion [-Werror=overflow]
  PyModule_AddObject(m, "SERVERID_UNIQUE_ID_NOT_TO_VERIFY", PyInt_FromLong(0xFFFFFFFFFFFFFFFFULL));

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 06:04:10 +02:00
Douglas Bagnall
c3cf813247 Byte order reversal shouldn't assume size_t is 64 bit.
This fixes compilation on 32 bit i386 with -WError.

 ../lib/crypto/aes_gcm_128.c:213:2: error: right shift count >= width of type [-Werror]
 ../lib/crypto/aes_gcm_128.c:213:2: error: left shift count >= width of type [-Werror]

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 06:04:10 +02:00
Stefan Metzmacher
fa4f4fed2e s4:gensec/gssapi: make use of add gssapi_get_sig_size() and gssapi_{seal,unseal,sign,check}_packet() helper functions
This way are able to support GENSEC_FEATURE_SIGN_PKT_HEADER also together with
GENSEC_FEATURE_SEAL.

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): Wed Jun 24 04:00:43 CEST 2015 on sn-devel-104
2015-06-24 04:00:43 +02:00
Stefan Metzmacher
f643677d3f s3:librpc/gse: make use of add gssapi_get_sig_size() and gssapi_{seal,unseal,sign,check}_packet() helper functions
This way are able to support GENSEC_FEATURE_SIGN_PKT_HEADER.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 01:03:17 +02:00
Stefan Metzmacher
8a4c0abb3e auth/kerberos: add gssapi_get_sig_size() and gssapi_{seal,unseal,sign,check}_packet() helper functions
These make use of gss_[un]wrap_iov[_length]() where required and support
header signing.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 01:03:16 +02:00
Stefan Metzmacher
c245d4f33e heimdal:lib/gssapi/krb5: implement gss_[un]wrap_iov[_length] with arcfour-hmac-md5
Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 01:03:16 +02:00
Stefan Metzmacher
571a05c649 heimdal:lib/gssapi/krb5: split out a arcfour_mic_cksum_iov() function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 01:03:16 +02:00
Stefan Metzmacher
688c537ab1 heimdal:lib/gssapi/krb5: add const to arcfour_mic_key()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 01:03:16 +02:00
Stefan Metzmacher
3269ebfcbf heimdal:lib/gssapi/krb5: clear temporary buffer with cleartext data.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 01:03:16 +02:00
Stefan Metzmacher
01350c76ad heimdal:lib/gssapi/krb5: fix indentation in _gk_wrap_iov()
Now it matches _gk_unwrap_iov() and _gk_wrap_iov_length().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 01:03:16 +02:00
Stefan Metzmacher
9414d9867c heimdal:lib/gssapi/krb5: make _gssapi_verify_pad() more robust
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 01:03:16 +02:00