Andrew Bartlett [Wed, 17 Jun 2015 00:05:58 +0000 (12:05 +1200)]
selftest: Change chgdcpass environment to use winbindd
This allows us to test that winbindd starts up without secrets.tdb, as happens after
a classicupgrade.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10991
(backport of master commit
db59f9ec731e3abbeba3070925a6dedaac26e6e5)
Andrew Bartlett [Thu, 11 Jun 2015 23:57:07 +0000 (11:57 +1200)]
winbindd: Sync secrets.ldb into secrets.tdb on startup
This ensures that the domain SID and machine account password are written into
secrets.tdb if the secrets.tdb file was either never written or was deleted.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10991
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
(backport of master commit
5de7621cbfba1e1fb52cddf41a5a13d027d45b46)
Andrew Bartlett [Thu, 11 Jun 2015 23:54:21 +0000 (11:54 +1200)]
winbindd: Use pdb_get_domain_info() to get exactly the local domain info when we are an AD DC
This also triggers pdb_samba_dsdb_init_secrets(), to force the
correct SID into secrets.tdb.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10991
(backport of master commit
b209cd1677b306d72e56a98ecb02db421a5ca35a)
Andrew Bartlett [Tue, 16 Jun 2015 23:10:15 +0000 (11:10 +1200)]
selftest: Run winbind tests in chgdcpass environment
This ensures that winbind both starts and operates without a secrets.tdb
(chgdcpass deliberatly removes the secrets.tdb file after provision, like has happend with classicupgrade).
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
(backport of master commit
5bb647b78806413a94f959d0b2b417a97b7a2173)
Jeremy Allison [Wed, 17 Jun 2015 17:23:30 +0000 (10:23 -0700)]
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
(cherry picked from commit
e2c4b8967d33b610f9f076c614352e4b8fc7c558)
Christof Schmitt [Tue, 9 Jun 2015 17:29:21 +0000 (10:29 -0700)]
docs-xml: Update sharesec manpage to reflect current output
Update the sharesec man page to reflect the output currently used, and
also add a note that the OWNER and GROUP fields are not used for share
ACLs.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11324
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jun 17 13:36:23 CEST 2015 on sn-devel-104
(cherry picked from commit
8406d4dd1593b4a4d7bcbdc7b7c7893339f8e814)
Christof Schmitt [Tue, 9 Jun 2015 17:28:17 +0000 (10:28 -0700)]
selftest: Add test for sharesec command
Add a test for the sharesec command to ensure that it works, and to also
verify that the output does not change.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11324
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
a6650d74d1b7cc051637c1a19daff5a8009f405b)
Christof Schmitt [Tue, 9 Jun 2015 16:50:18 +0000 (09:50 -0700)]
sharesec: Use non-numerical output for sharesec
This is an easy change to get the sharesec output back to the format
used before. It is also easier to understand than the output of the
flags.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11324
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
0b9fa2849dc8b7c61467a6517c40e6e15c104d4a)
Stefan Metzmacher [Fri, 5 Jun 2015 08:30:39 +0000 (10:30 +0200)]
ctdb-ib: make sure the tevent_fd is removed before the fd is closed
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
53ff3e4f31f3debd98f9293171c023a0a406858d)
Stefan Metzmacher [Fri, 29 May 2015 14:14:40 +0000 (16:14 +0200)]
libcli/smb: make sure we remove the writev_send() request when a request is destroyed
This way smbXcli_conn_disconnect() removes all tevent_fd structures attached to
the sock_fd before closing it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
006042ac126261e87089fb9835c28789e8aeae1b)
Stefan Metzmacher [Fri, 29 May 2015 13:48:26 +0000 (15:48 +0200)]
libcli/smb: add smb1 requests to the pending array before writev_send()
This way we have a change to destroy the pending writev_send request before
closing the socket in smbXcli_conn_disconnect().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
f3982eb2c7f1d17a013dacfd430a3752e6ef4ae4)
Stefan Metzmacher [Fri, 29 May 2015 13:29:31 +0000 (15:29 +0200)]
libcli/smb: make sure the writev_send of smbXcli_conn_samba_suicide() is removed before closing the socket
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
59338434274799db1ac60b082a6453bd924c5f4c)
Stefan Metzmacher [Thu, 28 May 2015 11:22:19 +0000 (13:22 +0200)]
libcli/smb: remove unused split of read_fd and write_fd
The tevent epoll backend supports separate read and write tevent_fd structure
on a single fd, so there's no need for a dup() anymore.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
8f42df235dc825a103631fdf0e37e1c1d03cf420)
Stefan Metzmacher [Thu, 28 May 2015 11:09:11 +0000 (13:09 +0200)]
libcli/smb: close the socket fd at the end of smbXcli_conn_disconnect()
We need to cancel all pending requests before closing the socket fds,
otherwise we cause problem with the interaction with the epoll event backend.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
46e1aa22b12eacc3567f7897716ae07837545c23)
Stefan Metzmacher [Thu, 21 May 2015 20:29:55 +0000 (22:29 +0200)]
libcli/smb: use tevent_req_received(req) in read_smb_recv()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
26c4b3fc9db507557b2539dd7d1f9e593c3fa35a)
Stefan Metzmacher [Thu, 21 May 2015 20:28:14 +0000 (22:28 +0200)]
lib/async_req: remove the tevent_fd as early as possible via a wait_for_read_cleanup() hook
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
64640cc99c7b8543ee8d35ca243c57c048cdb490)
Stefan Metzmacher [Thu, 21 May 2015 20:28:14 +0000 (22:28 +0200)]
lib/async_req: remove the tevent_fd as early as possible via a read_packet_cleanup() hook
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
a2a7cbc66c4713493e6ade45d0cdde25f64c9007)
Stefan Metzmacher [Thu, 21 May 2015 20:28:14 +0000 (22:28 +0200)]
lib/async_req: use tevent_req_nomem/tevent_req_post in read_packet_send()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
9a116b28bab20507760f50f25214635a60ea6c43)
Stefan Metzmacher [Thu, 21 May 2015 20:28:14 +0000 (22:28 +0200)]
lib/async_req: s/result/req/ in read_packet_send()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
4f05f68abc1d756bb114260e80d3532f3f959fec)
Stefan Metzmacher [Thu, 21 May 2015 20:28:14 +0000 (22:28 +0200)]
lib/async_req: remove the tevent_fd as early as possible via a writev_cleanup() hook
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
0c1109695639a177d3d739b343e7588a6ecf0949)
Stefan Metzmacher [Thu, 21 May 2015 20:28:14 +0000 (22:28 +0200)]
lib/async_req: simplify async_connect_* using a _cleanup() hook
This makes sure we remove the tevent_fd as soon as possible
and always reset the old_sockflags.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
d5a4b30f894f0d4d4fa728ebd2c435254bf3b142)
Stefan Metzmacher [Fri, 5 Jun 2015 11:58:19 +0000 (13:58 +0200)]
lib/async_req: s/result/req/ in async_connect_send()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
be8c2ff10353df00f05cd378c251a33a9e08563a)
Stefan Metzmacher [Thu, 21 May 2015 10:25:38 +0000 (12:25 +0200)]
lib/async_req: remove unused sendto_{send,recv} and recvfrom_{send,recv}
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
ccd038e1523a69197a9aaeca00305b0958f09ff0)
Stefan Metzmacher [Thu, 21 May 2015 02:43:27 +0000 (04:43 +0200)]
s3:libsmb: convert nb_trans_send/recv internals to tdgram
This simplifies/fixes the cleanup, because we need to remove any
tevent_fd object before closing the socket fd.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
a3282911f6ceb76b2ada567e569a55af8c7ef160)
Stefan Metzmacher [Thu, 21 May 2015 00:18:26 +0000 (02:18 +0200)]
s3:libsmb: convert nb_packet_reader to tstream_* functions
By using the tstream abstraction we don't need to take care
error handling regarding dangling tevent_fd structures.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
ecb4d041de89441941a112ab3a724887e568117e)
Stefan Metzmacher [Wed, 20 May 2015 23:53:44 +0000 (01:53 +0200)]
s3:libsmb: convert nb_packet_client to tstream_* functions
By using the tstream abstraction we don't need to take care
error handling regarding dangling tevent_fd structures.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
3ecf4ec6574de9bdd5a2d55529ed81b17c74d452)
Stefan Metzmacher [Thu, 21 May 2015 00:20:00 +0000 (02:20 +0200)]
s3:libsmb: let nb_packet_server_destructor() explicitly destroy the tevent_fd
The need to destroy the tevent_fd before closing the socket fd.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
9ccf8e6d36618498c4952bb1d4b74152f75ab793)
Stefan Metzmacher [Thu, 21 May 2015 01:01:30 +0000 (03:01 +0200)]
s3:libsmb: remove pending requests as early as possible via a smbsock_any_connect_cleanup() hook
Once we got an error or a valid connection we should destroy all other
connection attempts as early as possible.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
058d84747e75a5f97a02e31bac9c8d0d147174bc)
Stefan Metzmacher [Thu, 21 May 2015 01:01:05 +0000 (03:01 +0200)]
s3:libsmb: remove subreqs as early as possible via a smbsock_connect_cleanup() hook
open_socket_out_send() or nb_connect_send() likely use socket fds and
tevent_fd objects. We should clean them up as early as possible.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
04f89d4255ed95631aa8f0ada4bcf5f888e126d4)
Stefan Metzmacher [Thu, 21 May 2015 01:00:17 +0000 (03:00 +0200)]
s3:libsmb: remove the cli_session_request as early as possible via a nb_connect_cleanup() hook
cli_session_request_send() is likely to use tevent_fd objects on the given
socket fd, so we need to destroy the request before closing the socket fd.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
992be06f165c3d05e85d16baf514dba49f55d1ec)
Stefan Metzmacher [Thu, 21 May 2015 10:17:24 +0000 (12:17 +0200)]
s3:lib/addrchange: make use of tdgram_* in addrchange_*()
This makes the cleanup handling easier to get right,
as we need to make sure any tevent_fd is removed before
closing a socket fd.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
0d161e42d9aeb155eae2b04eccec497b21de8029)
Stefan Metzmacher [Fri, 5 Jun 2015 12:19:00 +0000 (14:19 +0200)]
s3:lib/addrchange: look at the correct nl_pid in addrchange_done()
state->fromaddr is the address we got from recvfrom_send/recv.
state->addr is completely untouched after tevent_req_create().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
257bc586c22f9a7f34b913823d5c89592d433454)
Stefan Metzmacher [Thu, 28 May 2015 11:31:17 +0000 (13:31 +0200)]
s3:lib/background: make sure we destroy a pending read_packet_send() before closing the pipe fd
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
9d3444ad887bb3a118eaecd141c79dfd6de53f41)
Stefan Metzmacher [Thu, 21 May 2015 01:45:36 +0000 (03:45 +0200)]
s3:wscript: move lib/util_tsock.c from 'TLDAP' to 'samba3util'
tstream_read_packet_send/recv() is a generic helper function...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(similar to commit
0c108f55d9c3cca0bde1c15c66dccabbc40e6133)
Stefan Metzmacher [Thu, 28 May 2015 12:25:27 +0000 (14:25 +0200)]
s4:libcli/raw: make sure smbcli_transport_connect_send/recv correctly cleanup on error
We need to make sure that we remove any pending writev_send or read_smb_send
request before closing the socket fd. As a side effect we always close the
socket fd if we don't return success for any any reason.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
dd037b0be4ed2df7239cb61bd3d4bb868bb09126)
Stefan Metzmacher [Thu, 21 May 2015 09:39:38 +0000 (11:39 +0200)]
lib/tsocket: add tdgram_inet_udp_broadcast_socket()
This is similar to tdgram_inet_udp_socket(), but it allows
the use of ipv4 broadcast traffic.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
36b97d0bb9fe004f3d8a500f3af83dff34f86d7b)
Stefan Metzmacher [Thu, 21 May 2015 09:37:06 +0000 (11:37 +0200)]
lib/tsocket: add tdgram_bsd_existing_socket() helper function
This is similar to tstream_bsd_existing_socket().
Both help to migrate strange code path to using the tstream or tdgram
abstractions.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
3a8b7b0518b33b016d2dbb8dd23d35ef1c6aaa5c)
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>
(cherry picked from commit
f5c17d41e085e083ef970692ff7f50f7a6642ea3)
Marc Muehlfeld [Thu, 11 Jun 2015 19:20:55 +0000 (21:20 +0200)]
Group creation: Add msSFU30Name only when --nis-domain was given
This fixes a bug, that all new created groups automatically get an
msSFU30Name attribute added. This should only be the case, when
we also have a nis-domain (samba-tool --nis-domain=...).
Bugreport: https://bugzilla.samba.org/show_bug.cgi?id=11315
Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Tue Jun 16 11:58:02 CEST 2015 on sn-devel-104
(cherry picked from commit
9df07e6f1bcea55fcdab777c3f45a1a6ca88f69e)
Christian Ambach [Mon, 8 Jun 2015 21:48:54 +0000 (23:48 +0200)]
s3:param/loadparm fix testparm --show-all-parameters
it didn't know about the new types of config parameters
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11170
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun 9 11:49:18 CEST 2015 on sn-devel-104
Stefan Metzmacher [Fri, 12 Jun 2015 07:10:39 +0000 (09:10 +0200)]
tdb: version 1.3.6
* Fix runtime detection for robust mutexes in the standalone build.
bug #11326
* Possible fix for the build with robust mutexes on solaris 11
bug #11319
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 Jun 12 19:55:34 CEST 2015 on sn-devel-104
(cherry picked from commit
4ddf78a282c85e84b6201a79b707fad9487f3ccd)
The last 13 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11331
Backport tdb-1.3.6.
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Sat Jun 20 23:13:17 CEST 2015 on sn-devel-104
Stefan Metzmacher [Fri, 12 Jun 2015 09:01:21 +0000 (11:01 +0200)]
lib/replace: remove unused HAVE_DECL_PTHREAD_{MUTEXATTR_SETROBUST,MUTEX_CONSISTENT}_NP checks
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11319
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
89dcfbf3f45f448e515a1da82e09002a0aafb7b4)
Stefan Metzmacher [Fri, 12 Jun 2015 09:01:21 +0000 (11:01 +0200)]
lib/replace: fix PTHREAD_MUTEX_ROBUST fallback to PTHREAD_MUTEX_ROBUST_NP on solaris 11
Without this we got the following defines in config.h:
#define HAVE_DECL_PTHREAD_MUTEXATTR_SETROBUST_NP 1
#define HAVE_DECL_PTHREAD_MUTEX_CONSISTENT_NP 1
#define HAVE_PTHREAD_MUTEXATTR_SETROBUST 1
#define HAVE_PTHREAD_MUTEX_CONSISTENT 1
#define HAVE_ROBUST_MUTEXES 1
#define USE_TDB_MUTEX_LOCKING 1
And the build failed with PTHREAD_MUTEX_ROBUST being unknown.
Note that PTHREAD_MUTEX_ROBUST and PTHREAD_MUTEX_ROBUST_NP are enum values
while they're defines on solaris 11
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11319
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
34cf1d213ec0261af41ef6a16f5b37e5015c614b)
Stefan Metzmacher [Fri, 12 Jun 2015 10:13:23 +0000 (12:13 +0200)]
wafsamba: let CHECK_DECLS() find enum values
In the current state this still generates the same config.h
at least on ubuntu 14.04 amd64.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
ff072a633660780cf72d204f4620c664957a6072)
Stefan Metzmacher [Wed, 10 Jun 2015 12:33:35 +0000 (14:33 +0200)]
s3:wscript: remove signal related configure checks
These are done in lib/replace now.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jun 10 17:50:41 CEST 2015 on sn-devel-104
(cherry picked from commit
a5fd4ca0dbe4f7cbf0d3ead4214af283aabe4790)
Stefan Metzmacher [Wed, 10 Jun 2015 12:33:35 +0000 (14:33 +0200)]
lib/util: remove signal related configure checks
These are done in lib/replace now.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
322f4b76e5cae9f2513ef68d7d86ad19d4a88244)
Stefan Metzmacher [Wed, 10 Jun 2015 12:33:35 +0000 (14:33 +0200)]
lib/replace: add signal related configure checks
These should be in a central place available for
all lib/replace users instead of having each caller
do its own checks.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
a82acb076e78eb513fb1228595b220f61377e23c)
Alexander Drozdov [Tue, 28 Apr 2015 07:31:43 +0000 (10:31 +0300)]
tdb: version 1.3.5
ABI change: tdb_chainlock_read_nonblock() has been added.
Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
Reviewed-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 Apr 29 00:05:29 CEST 2015 on sn-devel-104
(cherry picked from commit
3f35c1d52ee77f7cabd52dd503565cec360f1de2)
Alexander Drozdov [Tue, 28 Apr 2015 04:42:43 +0000 (07:42 +0300)]
tdb: introduce tdb_chainlock_read_nonblock(), a nonblock variant of tdb_chainlock_read()
Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
e4fe0aff5252b37536eec4a130d4e40a05a56ddb)
Jelmer Vernooij [Sun, 26 Apr 2015 10:13:05 +0000 (10:13 +0000)]
Add set date to tdb manpages.
This makes builds reproducible.
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reveiewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
38553a305fe4021e2bd034bed11eaef18863aa0a)
Amitay Isaacs [Fri, 15 Aug 2014 01:36:40 +0000 (11:36 +1000)]
tdb: Do not build test binaries if it's not a standalone build
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 31 01:56:02 CEST 2015 on sn-devel-104
(cherry picked from commit
48e90ba062ecde71d03c3cf4bc9a809f805fabe4)
Volker Lendecke [Sun, 8 Mar 2015 19:21:23 +0000 (19:21 +0000)]
tdb: Fix CID
1034842 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Mar 11 00:23:20 CET 2015 on sn-devel-104
(cherry picked from commit
006328b81b2dd3416c20b0f19b438c614c1932cc)
Volker Lendecke [Sun, 8 Mar 2015 19:18:21 +0000 (19:18 +0000)]
tdb: Fix CID
1034841 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
(cherry picked from commit
1b8c07ac7d51eb2a1957d79ea05b170106a9c0e8)
Ralph Boehme [Wed, 3 Jun 2015 15:07:46 +0000 (17:07 +0200)]
smbd/trans2: add a useful diagnostic for files with bad encoding
Catch conversion error and log the path of the offending file.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11323
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jun 9 21:00:02 CEST 2015 on sn-devel-104
(cherry picked from commit
0615b72a6b62d590831f1c24c5678dd29b9a2338)
Ralph Boehme [Wed, 3 Jun 2015 14:58:22 +0000 (16:58 +0200)]
lib/util/charset: fix conversion failure logging
Move catch-all debug statement with loglevel 0 from behind the switch
clause into the switch clause as default case. Fixes an issue that
resulted in the log being flooded with level 0 messages in case someone
put a file with an illegal UTF8 encoding (eg '\xA0test') on the server.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11323
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
1c60dc5c3252685d51324481063461f60cf968fe)
Ralph Boehme [Sat, 9 May 2015 06:31:24 +0000 (08:31 +0200)]
vfs_fruit: add option veto_appledouble
vfs_fruit adds a wildcard path "._*" to the vetolist in order to prevent
client access to ._ AppleDouble files created internally by vfs_fruit
for storing the Mac resource fork stream.
Unfortunately there are legitimite use cases where an OS X client may
want to use such filenames, extracting ZIP archives (where the archive
contains ._ files) being one of them.
A possible simple solution to this problem would be to not veto ._ files
in the first place, even though that exposes internally created ._ files
which the client shouldn't be able to access.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11305
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jun 9 14:48:14 CEST 2015 on sn-devel-104
(cherry picked from commit
b26a1449a0e6d01d5ddca89547df739732c8a230)
Stefan Metzmacher [Tue, 2 Jun 2015 10:43:17 +0000 (12:43 +0200)]
ctdb-locking: move all auto_mark logic into process_callbacks()
The caller should not dereference lock_ctx after invoking
process_callbacks(), it might be destroyed already.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Jun 12 15:28:57 CEST 2015 on sn-devel-104
(cherry picked from commit
b3a18d66c00dba73a3f56a6f95781b4d34db1fe2)
Stefan Metzmacher [Tue, 2 Jun 2015 10:39:17 +0000 (12:39 +0200)]
ctdb-locking: make process_callbacks() more robust
We should not dereference lock_ctx after invoking the callback
in the auto_mark == false case. The callback could have destroyed it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
a2690bc3f4e28a2ed50ccb47cb404fc8570fde6d)
Amitay Isaacs [Tue, 2 Jun 2015 03:15:37 +0000 (13:15 +1000)]
ctdb-locking: Add a comment to explain auto_mark usage
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
89849c4d31c0bb0c47864e11abc89efe7d812d87)
Amitay Isaacs [Tue, 2 Jun 2015 01:25:44 +0000 (11:25 +1000)]
ctdb-locking: Avoid resetting talloc destructor
Let ctdb_lock_request_destructor() take care of the proper cleanup.
If the request if freed from the callback function, then the lock context
should not be freed. Setting request->lctx to NULL takes care of that
in the destructor.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
bc747030d435447e62262541cf2e74be4c4229d8)
Amitay Isaacs [Tue, 2 Jun 2015 01:15:11 +0000 (11:15 +1000)]
ctdb-locking: Avoid memory leak in the failure case
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
2b352ff20597b9e34b3777d35deca1bf56209f8a)
Amitay Isaacs [Mon, 1 Jun 2015 14:22:07 +0000 (00:22 +1000)]
ctdb-locking: Set destructor when lock_context is created
There is already code in the destructor to correctly remove it from the
pending or the active queue. This also ensures that when lock context
is in pending queue and if the lock request gets freed, the lock context
is correctly removed from the pending queue.
Thanks to Stefan Metzmacher for noticing this and suggesting the fix.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
5ae6a8f2fff5b5f4d46f496fd83f555be4b3d448)
Stefan Metzmacher [Mon, 1 Jun 2015 14:15:11 +0000 (00:15 +1000)]
ctdb-locking: Set the lock_ctx->request to NULL when request is freed
The code was added to ctdb_lock_context_destructor() to ensure that
the if a lock_ctx gets freed first, the lock_request does not have a
dangling pointer. However, the reverse is also true. When a lock_request
is freed, then lock_ctx should not have a dangling pointer.
In commit
374cbc7b0ff68e04ee4e395935509c7df817b3c0, the code for second
condition was dropped causing a regression.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
752ec31bcbbfe9f5b3b1c5dde4179d69f41cb53c)
Stefan Metzmacher [Tue, 26 May 2015 14:45:34 +0000 (16:45 +0200)]
ctdb-locking: Avoid memory corruption in ctdb_lock_context_destructor
If the lock request is freed from within the callback, then setting
lock_ctx->request to NULL in ctdb_lock_context_destructor will end up
corrupting memory. In this case, lock_ctx->request could be reallocated
and pointing to something else. This may cause unexpected abort trying
to dereference a NULL pointer.
So, set lock_ctx->request to NULL before processing callbacks.
This avoids the following valgrind problem.
==3636== Invalid write of size 8
==3636== at 0x151F3D: ctdb_lock_context_destructor (ctdb_lock.c:276)
==3636== by 0x58B3618: _talloc_free_internal (talloc.c:993)
==3636== by 0x58AD692: _talloc_free_children_internal (talloc.c:1472)
==3636== by 0x58AD692: _talloc_free_internal (talloc.c:1019)
==3636== by 0x58AD692: _talloc_free (talloc.c:1594)
==3636== by 0x15292E: ctdb_lock_handler (ctdb_lock.c:471)
==3636== by 0x56A535A: epoll_event_loop (tevent_epoll.c:728)
==3636== by 0x56A535A: epoll_event_loop_once (tevent_epoll.c:926)
==3636== by 0x56A3826: std_event_loop_once (tevent_standard.c:114)
==3636== by 0x569FFFC: _tevent_loop_once (tevent.c:533)
==3636== by 0x56A019A: tevent_common_loop_wait (tevent.c:637)
==3636== by 0x56A37C6: std_event_loop_wait (tevent_standard.c:140)
==3636== by 0x11E03A: ctdb_start_daemon (ctdb_daemon.c:1320)
==3636== by 0x118557: main (ctdbd.c:321)
==3636== Address 0x9c5b660 is 96 bytes inside a block of size 120 free'd
==3636== at 0x4C29D17: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==3636== by 0x58B32D3: _talloc_free_internal (talloc.c:1063)
==3636== by 0x58B3232: _talloc_free_children_internal (talloc.c:1472)
==3636== by 0x58B3232: _talloc_free_internal (talloc.c:1019)
==3636== by 0x58B3232: _talloc_free_children_internal (talloc.c:1472)
==3636== by 0x58B3232: _talloc_free_internal (talloc.c:1019)
==3636== by 0x58AD692: _talloc_free_children_internal (talloc.c:1472)
==3636== by 0x58AD692: _talloc_free_internal (talloc.c:1019)
==3636== by 0x58AD692: _talloc_free (talloc.c:1594)
==3636== by 0x11EC30: daemon_incoming_packet (ctdb_daemon.c:844)
==3636== by 0x136F4A: lock_fetch_callback (ctdb_ltdb_server.c:268)
==3636== by 0x152489: process_callbacks (ctdb_lock.c:353)
==3636== by 0x152489: ctdb_lock_handler (ctdb_lock.c:468)
==3636== by 0x56A535A: epoll_event_loop (tevent_epoll.c:728)
==3636== by 0x56A535A: epoll_event_loop_once (tevent_epoll.c:926)
==3636== by 0x56A3826: std_event_loop_once (tevent_standard.c:114)
==3636== by 0x569FFFC: _tevent_loop_once (tevent.c:533)
==3636== by 0x56A019A: tevent_common_loop_wait (tevent.c:637)
==3636== by 0x56A37C6: std_event_loop_wait (tevent_standard.c:140)
==3636== by 0x11E03A: ctdb_start_daemon (ctdb_daemon.c:1320)
==3636== by 0x118557: main (ctdbd.c:321)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11293
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
ee02e40e869fd46f113d016122dd5384b7887228)
Stefan Metzmacher [Fri, 12 Jun 2015 06:58:26 +0000 (08:58 +0200)]
tevent: version 0.9.25
* Fix compile error in Solaris ports backend.
* Fix access after free in tevent_common_check_signal(). bug #11308
* Improve pytevent bindings.
* Testsuite fixes.
* Improve the documentation of the tevent_add_fd()
assumtions. It must be talloc_free'ed before closing the fd!
See bug #11141 and bug #11316.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
d7bdb30cc1731dc84831e323332a85be2bccf6a7)
The last 14 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11330
Backport tevent-0.9.25.
Stefan Metzmacher [Thu, 11 Jun 2015 07:51:19 +0000 (09:51 +0200)]
pytevent: add a TeventTimer_Object_ref helper structure to make the code clearer
This gives talloc_set_destructor to verify the type,
which removes a compiler warning.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
93ee074f912da02d4c1f1584df9b107364b639be)
Stefan Metzmacher [Thu, 11 Jun 2015 07:50:35 +0000 (09:50 +0200)]
pytevent: remove const warnings using discard_const_p()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
fb04f0f4190005ff21817b79d02897af23ddc7ee)
Stefan Metzmacher [Thu, 11 Jun 2015 07:49:18 +0000 (09:49 +0200)]
pytevent: remove dead code TEVENT_DEPRECATED is never defined
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
1a8a5ba0d51f9c2c9e84a3400e05327e7059156b)
Stefan Metzmacher [Thu, 28 May 2015 07:32:26 +0000 (09:32 +0200)]
tevent.h: propose tstream_ versions of read_packet_send/recv and writev_send/recv
The functions operating on the raw file descriptor are for advanced callers,
which take extra care and avoid the problems of
https://bugzilla.samba.org/show_bug.cgi?id=11141.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
44584f810720602201a9afaaa087eeb83579eff5)
Stefan Metzmacher [Fri, 29 May 2015 23:42:08 +0000 (01:42 +0200)]
tevent/testsuite: make sure we cleanup tevent_fd structures in the correct order
First we need to remove the tevent_fd structures without
tevent_fd_set_auto_close(). Closing the fd needs to be the last
thing...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
88971d4870a197f656ef912911ca1e4ff5b56749)
Petr Viktorin [Fri, 22 May 2015 09:47:56 +0000 (11:47 +0200)]
pytevent: Port to Python 3
- Use PyStr (String on py2, Unicode on py3) for text strings
- Use PyLong instead of PyInt on Python 3
- Use new module initialization
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
(cherry picked from commit
8dbdd27526c4d5358bc2614e90f9aca36f41ed1a)
Petr Viktorin [Tue, 26 May 2015 11:25:12 +0000 (13:25 +0200)]
pytalloc: Improve timer wrapper, and test it
Using Context.add_timer resulted in crashes due to missing type object
and bad reference handling.
Add a TeventTimer_Type struct, and introduce a clear ownership/lifetime model.
Add a "add_timer_offset" to allow adding timers from Python. (add_timer
requires passing struct timeval as a Python integer, which can't really
be done portably).
Add tests.
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
(similar to commit
560576217f11b132f9c32de6e41c623dbc152137)
(We don't run the tests in the backport)
Petr Viktorin [Fri, 22 May 2015 11:29:11 +0000 (13:29 +0200)]
pytevent: Define missing TeventFd_Type object
The type objects for Fd was declared but never defined,
resulting in segfaults when it was used.
Define it.
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
(cherry picked from commit
4399dc582fa06b04e1cec1d3aa59cd332e4b5ba2)
Petr Viktorin [Thu, 4 Dec 2014 11:44:56 +0000 (12:44 +0100)]
pytevent: Better error and reference handling
py_backend_list:
- Handle cases of PyString_FromString or PyList_Append failing.
- Properly decrease the reference count of the returned strings.
py_register_backend:
- Decref "name" after use
Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
(cherry picked from commit
f5838df58ea36e64cd0295b595df9cbd10d8c757)
Stefan Metzmacher [Tue, 2 Jun 2015 10:18:22 +0000 (12:18 +0200)]
tevent: fix access after free in tevent_common_check_signal()
This was reported by Pavel Březina <pbrezina@redhat.com>:
We found a crash in SSSD when a tevent signal is freed in its handler, tevent
than crashes when it access siginfo.
sig_info is freed in signal destructor:
> #ifdef SA_SIGINFO
> if (se->sa_flags & SA_SIGINFO) {
> if (sig_state->sig_info[se->signum]) {
> talloc_free(sig_state->sig_info[se->signum]);
> sig_state->sig_info[se->signum] = NULL;
> }
> }
> #endif
(gdb) bt
#0 0x00007f5d4d86cc74 in tevent_signal_destructor (se=0x7f5d5370f920) at
../tevent_signal.c:213
#1 0x00007f5d4d65f233 in _talloc_free_internal () from /lib64/libtalloc.so.2
#2 0x00007f5d4d6593a3 in _talloc_free () from /lib64/libtalloc.so.2
#3 0x00007f5d4342f3d4 in proxy_child_init_done (subreq=0x7f5d5370f600) at
src/providers/proxy/proxy_auth.c:436
#4 0x00007f5d4d86b0c2 in _tevent_req_error (req=req@entry=0x7f5d5370f600,
error=error@entry=5, location=location@entry=0x7f5d43433010
"src/providers/proxy/proxy_auth.c:356")
at ../tevent_req.c:167
#5 0x00007f5d4342ef5e in pc_init_sig_handler (ev=<optimized out>,
sige=<optimized out>, signum=<optimized out>, count=<optimized out>,
__siginfo=<optimized out>, pvt=<optimized out>)
at src/providers/proxy/proxy_auth.c:356
#6 0x00007f5d4d86d48c in tevent_common_check_signal (ev=0x7f5d536de670) at
../tevent_signal.c:428
#7 0x00007f5d4d86f28c in epoll_event_loop (tvalp=0x7fff7b568490,
epoll_ev=0x7f5d536de8b0) at ../tevent_epoll.c:647
#8 epoll_event_loop_once (ev=<optimized out>, location=<optimized out>) at
../tevent_epoll.c:926
#9 0x00007f5d4d86d7d7 in std_event_loop_once (ev=0x7f5d536de670,
location=0x7f5d50faedc3 "src/util/server.c:668") at ../tevent_standard.c:114
#10 0x00007f5d4d869fbd in _tevent_loop_once (ev=ev@entry=0x7f5d536de670,
location=location@entry=0x7f5d50faedc3 "src/util/server.c:668") at
../tevent.c:530
#11 0x00007f5d4d86a15b in tevent_common_loop_wait (ev=0x7f5d536de670,
location=0x7f5d50faedc3 "src/util/server.c:668") at ../tevent.c:634
#12 0x00007f5d4d86d777 in std_event_loop_wait (ev=0x7f5d536de670,
location=0x7f5d50faedc3 "src/util/server.c:668") at ../tevent_standard.c:140
#13 0x00007f5d50f96863 in server_loop (main_ctx=0x7f5d536dfac0) at
src/util/server.c:668
#14 0x00007f5d5180aa42 in main (argc=8, argv=<optimized out>) at
src/providers/data_provider_be.c:2909
But then it is accessed again in tevent_common_check_signal:
> #ifdef SA_SIGINFO
> if (clear_processed_siginfo) {
> uint32_t j;
> for (j=0;j<count;j++) {
> uint32_t ofs = (counter.seen + j)
> % TEVENT_SA_INFO_QUEUE_COUNT;
> memset((void*)&sig_state->sig_info[i][ofs],
> '\0',
> sizeof(siginfo_t));
> }
> }
> #endif
(gdb) bt
#0 0x00007fd7ba400505 in memset (__len=<optimized out>, __ch=<optimized out>,
__dest=<optimized out>) at /usr/include/bits/string3.h:84
#1 tevent_common_check_signal (ev=0x7fd7bfddf670) at ../tevent_signal.c:459
#2 0x00007fd7ba40228c in epoll_event_loop (tvalp=0x7fff85536430,
epoll_ev=0x7fd7bfddf8b0) at ../tevent_epoll.c:647
#3 epoll_event_loop_once (ev=<optimized out>, location=<optimized out>) at
../tevent_epoll.c:926
#4 0x00007fd7ba4007d7 in std_event_loop_once (ev=0x7fd7bfddf670,
location=0x7fd7bdb417c3 "src/util/server.c:668") at ../tevent_standard.c:114
#5 0x00007fd7ba3fcfbd in _tevent_loop_once (ev=ev@entry=0x7fd7bfddf670,
location=location@entry=0x7fd7bdb417c3 "src/util/server.c:668") at
../tevent.c:530
#6 0x00007fd7ba3fd15b in tevent_common_loop_wait (ev=0x7fd7bfddf670,
location=0x7fd7bdb417c3 "src/util/server.c:668") at ../tevent.c:634
#7 0x00007fd7ba400777 in std_event_loop_wait (ev=0x7fd7bfddf670,
location=0x7fd7bdb417c3 "src/util/server.c:668") at ../tevent_standard.c:140
#8 0x00007fd7bdb29343 in server_loop (main_ctx=0x7fd7bfde0ac0) at
src/util/server.c:668
#9 0x00007fd7be39ca42 in main (argc=8, argv=<optimized out>) at
src/providers/data_provider_be.c:2909
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11308
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): Tue Jun 2 21:02:11 CEST 2015 on sn-devel-104
(cherry picked from commit
9d797ffb27bf4be100c900b0373f62b029679de3)
Stefan Metzmacher [Mon, 18 May 2015 11:25:33 +0000 (13:25 +0200)]
tevent: add a note to tevent_add_fd()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11141
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
33ca0179ac091c8bb1c2b3fa7999cc5047d09a80)
Gordon Ross [Wed, 29 Apr 2015 18:34:10 +0000 (11:34 -0700)]
lib: tevent: Fix compile error in Solaris ports backend.
Signed-off-by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
a7d41e94603d789bb461b84380a8fba3f837bc4f)
Volker Lendecke [Tue, 31 Mar 2015 19:15:53 +0000 (21:15 +0200)]
tevent: Fix CID
1035381 Unchecked return value
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
6bcc037b5b636e88a914f1d39a95eb6eb72937e0)
Volker Lendecke [Fri, 10 Oct 2014 09:40:14 +0000 (11:40 +0200)]
smbd: Fix a use-after-free
We can't reference xconn->next after it was talloc_free'ed
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): Fri Oct 10 14:32:53 CEST 2014 on sn-devel-104
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11218
(cherry picked from commit
6d2c8f54e5e87485783b5173aa9f903a79d25443)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Tue Jun 16 01:12:23 CEST 2015 on sn-devel-104
Jeremy Allison [Thu, 28 May 2015 18:07:41 +0000 (11:07 -0700)]
s3: libsmbclient: Re-resolving targetcli on every read/write/lseek/ftruncate/close is both incorrect and slow.
Cache targetcli on file open in the SMBCFILE struct.
Bug 11295 - Excessive cli_resolve_path() usage can slow down transmission.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11295
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
9f57244bbd1ffa203a1f50bb289789628c4a3f66)
Youzhong Yang [Mon, 20 Apr 2015 13:42:42 +0000 (09:42 -0400)]
s3-unix_msg: remove socket file after closing socket fd
This is needed on Solaris.
It fixes https://bugzilla.samba.org/show_bug.cgi?id=11217
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Apr 22 03:43:30 CEST 2015 on sn-devel-104
(cherry picked from commit
74e684db80f1e80592f642d29669bbcbe8db17ba)
Volker Lendecke [Wed, 3 Jun 2015 13:41:24 +0000 (13:41 +0000)]
tstream: Make socketpair nonblocking
When we have a large RPC reply, we can't block in the RPC server.
Test: Do rpcclient netshareenumall with a thousand shares defined
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11312
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Sun Jun 7 02:29:10 CEST 2015 on sn-devel-104
Christof Schmitt [Fri, 5 Jun 2015 15:59:50 +0000 (08:59 -0700)]
nsswitch: Extend idmap_rfc2307 testcase for reverse lookup
Also test the codepaths to map UID and GID back to SID and names. Use
different user and group to avoid returning results cached from the
previous lookups.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11313
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jun 5 01:24:32 CEST 2015 on sn-devel-104
(cherry picked from commit
c1c07b462058f863e706127203e6f30dba89a2a9)
Christof Schmitt [Thu, 4 Jun 2015 19:11:27 +0000 (12:11 -0700)]
idmap_rfc2307: Fix wbinfo --gid-to-sid query
Fix syntax error in LDAP query for gidNumber.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11313
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
835c278e43b9dec98834de0fb12445720e9df2e5)
Steve Howells [Sat, 31 Jan 2015 16:09:17 +0000 (16:09 +0000)]
s4.2/fsmo.py: fixed fsmo transfer exception
In transfer_role() there is an duplicate call to samdb.modify() inside the if statement
where the type of role is being determined (specifically for the naming fsmo). This
call is unnecessary as after the if statement their is a correct call, with a try/catch
block, used by all fsmo transfers that will handle errors - such as the DC with the
fsmo role being offline.
The call to samdb.modify() inside the if statement for naming fsmo has been removed.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10924
Signed-off-by: Steve Howells <steve.howells@moscowfirst.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
9198246f91c02e33ed7a3580588557d0fb9f8811)
Evangelos Foutras [Mon, 13 Apr 2015 20:11:14 +0000 (23:11 +0300)]
s4:lib/tls: fix build with gnutls 3.4
gnutls_certificate_type_set_priority() was removed in GnuTLS 3.4.0. Use
gnutls_priority_set_direct instead.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8780
Signed-off-by: Björn Jacke <bj@sernet.de>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Apr 29 22:29:02 CEST 2015 on sn-devel-104
(cherry picked from commit
c6ad8a10c12c8a79dc83cab1591e5279edd62bd6)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Mon Jun 1 23:45:45 CEST 2015 on sn-devel-104
David Holder [Wed, 13 May 2015 14:10:47 +0000 (15:10 +0100)]
s3: IPv6 enabled DNS connections for ADS client
This patch makes DNS client connections protocol independent.
For example DNS updates. This makes IPv6-only clients possible.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11283
Signed-off-by: David Holder <david.holder@erion.co.uk>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
(cherry picked from commit
fff774eda3ed04d319232b108a94282af24cc6b0)
David Holder [Tue, 12 May 2015 16:40:29 +0000 (17:40 +0100)]
Add IPv6 support for determining FQDN during ADS join.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11282
Signed-off-by: David Holder <david.holder@erion.co.uk>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue May 12 23:35:32 CEST 2015 on sn-devel-104
(cherry picked from commit
6e08bfb4441022a00d0c29205e835a4858a3a57f)
David Holder [Tue, 12 May 2015 15:09:54 +0000 (16:09 +0100)]
Add IPv6 support to ADS client side LDAP connects. Corrected format for IPv6 LDAP URI. Signed-off-by: David Holder <david.holder@erion.co.uk>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11281
Signed-off-by: David Holder <david.holder@erion.co.uk>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
(cherry picked from commit
c324d7901c991a6700abdc3ee701920fea5e5819)
Ralph Boehme [Thu, 14 May 2015 02:27:54 +0000 (04:27 +0200)]
s4:torture:smb2:compound: compound read and padding
Add test to check that compound read responses are padded to an 8 byte
boundary.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11277
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu May 28 16:50:39 CEST 2015 on sn-devel-104
(cherry picked from commit
2ffa939bbe2c02509e1790c8b3f6f9b6910e3cf6)
Ralph Boehme [Thu, 28 May 2015 07:02:17 +0000 (09:02 +0200)]
s3:smb2: add padding to last command in compound requests
Following Windows behaviour, the last command in a compound request
should be padded to an 8 byte boundary and OS X clients crash badly if
we don't pad.
[MS-SMB2] 3.3.4.1.3, "Sending Compounded Responses", doesn't make it
clear whether the padding requirement governs the last command in a
compound response, a future MS-SMB2 update will document Windwows
product behaviour in a footnote.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11277
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
dfa64b958b201931e0dbe11f153f606f20217594)
Jeremy Allison [Thu, 21 May 2015 10:35:43 +0000 (12:35 +0200)]
s3: lib: util: Ensure we read a hex number as %x, not %u.
Based on a patch from Zoe O'Connell <zoe@metail.com>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11068
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 21 15:34:59 CEST 2015 on sn-devel-104
(cherry picked from commit
e9f08528af0a5420d6a5fa3799b75c6058b6775f)
Günther Deschner [Thu, 30 Apr 2015 09:20:58 +0000 (11:20 +0200)]
s3-rpc_server: fix rpc_create_tcpip_sockets() processing of interfaces.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11245
We were supplying an empty value for the "host" binding string option, causing
dcerpc_binding_vector_add_port() call to fail.
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Alexander Bokovoy <ab@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Apr 30 15:14:27 CEST 2015 on sn-devel-104
Karolin Seeger [Wed, 27 May 2015 19:46:16 +0000 (21:46 +0200)]
VERSION: Bump version up to 4.2.3...
and re-enable git snapshots.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Wed, 27 May 2015 19:45:21 +0000 (21:45 +0200)]
VERSION: Disable git snapshot for the 4.2.2 release.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Wed, 27 May 2015 19:43:36 +0000 (21:43 +0200)]
WHATSNEW: Add release notes for Samba 4.2.2.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Alexander Bokovoy [Wed, 20 May 2015 08:17:38 +0000 (11:17 +0300)]
s4: libcli/finddcs_cldap: continue processing CLDAP until all addresses are used
This is a subtle bug that causes CLDAP pings to fail if SRV records
discovered cannot be resolved or connection to them cannot be
established. The code that fires up CLDAP ping will silently cancel
the whole tevent request without going to the next server in the queue.
This may happen, for example, when connection to IPv6 addresses couldn't
be established, or when IPv4 address is not online or blocked by
firewall.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11284
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
eb029b32e95c9e7382488f3a1b033cdbe3237c1c)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Thu May 21 20:06:21 CEST 2015 on sn-devel-104
Volker Lendecke [Mon, 20 Apr 2015 10:44:07 +0000 (10:44 +0000)]
torture: Add smb2.notify.rmdir
We need to cancel a pending FileChangeNotify with DELETE_PENDING if the
directory watched is about to be deleted.
I know I just deleted a bool parameter, but to me torture is different :-)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11257
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 Apr 23 01:36:48 CEST 2015 on sn-devel-104
(cherry picked from commit
79dc084dcb6e28211addfc5d75b817cc735d67c1)
Volker Lendecke [Tue, 21 Apr 2015 08:16:16 +0000 (10:16 +0200)]
smbd: Cancel pending notifies if the directory goes away
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11257
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
50a1247927cb68303701a11517811deda10364f7)
Volker Lendecke [Tue, 21 Apr 2015 09:41:45 +0000 (11:41 +0200)]
smbd: Remove bool arg from set_delete_on_close_lck
We now have reset_delete_on_close_lck, this was called with "true"
everywhere now.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11257
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
b0d4a7daa149cfc9ef697dd7fae4524a35078126)