gd/samba-autobuild/.git
8 years agopidl:Python: use discard_const() to pass a possible const pointer to talloc_unlink()
Stefan Metzmacher [Thu, 11 Jun 2015 07:58:13 +0000 (09:58 +0200)]
pidl:Python: use discard_const() to pass a possible const pointer to talloc_unlink()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agos4:ntvfs/pyposix_eadb: fix initposix_eadb() prototype
Stefan Metzmacher [Thu, 11 Jun 2015 07:57:23 +0000 (09:57 +0200)]
s4:ntvfs/pyposix_eadb: fix initposix_eadb() prototype

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agotevent: version 0.9.25 tevent-0.9.25
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>
8 years agopytevent: add a TeventTimer_Object_ref helper structure to make the code clearer
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>
8 years agopytevent: remove const warnings using discard_const_p()
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>
8 years agopytevent: remove dead code TEVENT_DEPRECATED is never defined
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>
8 years agotalloc:guide: fix documented signature of talloc_unlink().
Michael Adam [Fri, 12 Jun 2015 08:23:41 +0000 (10:23 +0200)]
talloc:guide: fix documented signature of talloc_unlink().

The second argument is void *, not const void *.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotalloc:manpage: fix documented signature of talloc_unlink().
Michael Adam [Fri, 12 Jun 2015 08:16:40 +0000 (10:16 +0200)]
talloc:manpage: fix documented signature of talloc_unlink().

The second argument is void *, not const void *.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotalloc: sync the talloc_reference() description between talloc_guide and manpage
Stefan Metzmacher [Thu, 11 Jun 2015 14:39:35 +0000 (16:39 +0200)]
talloc: sync the talloc_reference() description between talloc_guide and manpage

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoctdb-vacuum: revert "Do not delete VACUUM MIGRATED records immediately"
Michael Adam [Fri, 12 Jun 2015 08:59:54 +0000 (10:59 +0200)]
ctdb-vacuum: revert "Do not delete VACUUM MIGRATED records immediately"

This reverts commit 257311e337065f089df688cbf261d2577949203d.

That commit was due to a misunderstanding, and it
does not fix what it was supposed to fix.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
8 years agoctdb-ib: make sure the tevent_fd is removed before the fd is closed
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>
8 years agolibcli/smb: make sure we remove the writev_send() request when a request is destroyed
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>
8 years agolibcli/smb: add smb1 requests to the pending array before writev_send()
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>
8 years agolibcli/smb: make sure the writev_send of smbXcli_conn_samba_suicide() is removed...
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>
8 years agolibcli/smb: remove unused split of read_fd and write_fd
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>
8 years agolibcli/smb: close the socket fd at the end of smbXcli_conn_disconnect()
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>
8 years agolibcli/smb: use tevent_req_received(req) in read_smb_recv()
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>
8 years agolib/async_req: remove the tevent_fd as early as possible via a wait_for_read_cleanup...
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>
8 years agolib/async_req: remove the tevent_fd as early as possible via a read_packet_cleanup...
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>
8 years agolib/async_req: use tevent_req_nomem/tevent_req_post in read_packet_send()
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>
8 years agolib/async_req: s/result/req/ in read_packet_send()
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>
8 years agolib/async_req: remove the tevent_fd as early as possible via a writev_cleanup() hook
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>
8 years agolib/async_req: simplify async_connect_* using a _cleanup() hook
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>
8 years agolib/async_req: s/result/req/ in async_connect_send()
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>
8 years agolib/async_req: remove unused sendto_{send,recv} and recvfrom_{send,recv}
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>
8 years agos3:libsmb: convert nb_trans_send/recv internals to tdgram
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>
8 years agos3:libsmb: convert nb_packet_reader to tstream_* functions
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>
8 years agos3:libsmb: convert nb_packet_client to tstream_* functions
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>
8 years agos3:libsmb: let nb_packet_server_destructor() explicitly destroy the tevent_fd
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>
8 years agos3:libsmb: remove pending requests as early as possible via a smbsock_any_connect_cle...
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>
8 years agos3:libsmb: remove subreqs as early as possible via a smbsock_connect_cleanup() hook
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>
8 years agos3:libsmb: remove the cli_session_request as early as possible via a nb_connect_clean...
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>
8 years agos3:lib/addrchange: make use of tdgram_* in addrchange_*()
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>
8 years agos3:lib/addrchange: look at the correct nl_pid in addrchange_done()
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>
8 years agos3:lib/background: make sure we destroy a pending read_packet_send() before closing...
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>
8 years agos3:wscript: move lib/util_tsock.c from 'TLDAP' to 'samba3util'
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>
8 years agos4:libcli/raw: make sure smbcli_transport_connect_send/recv correctly cleanup on...
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>
8 years agolib/tsocket: add tdgram_inet_udp_broadcast_socket()
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>
8 years agolib/tsocket: add tdgram_bsd_existing_socket() helper function
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>
8 years agotevent.h: propose tstream_ versions of read_packet_send/recv and writev_send/recv
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>
8 years agotevent/testsuite: make sure we cleanup tevent_fd structures in the correct order
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>
8 years agoctdb-locking: move all auto_mark logic into process_callbacks()
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

8 years agoctdb-locking: make process_callbacks() more robust
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>
8 years agoctdb-locking: Add a comment to explain auto_mark usage
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>
8 years agoctdb-locking: Avoid resetting talloc destructor
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>
8 years agoctdb-locking: Avoid memory leak in the failure case
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>
8 years agoctdb-locking: Set destructor when lock_context is created
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>
8 years agoctdb-locking: Set the lock_ctx->request to NULL when request is freed
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>
8 years agoctdb-locking: Avoid memory corruption in ctdb_lock_context_destructor
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>
8 years agodocs: Add missing SRVSVC entries in rpcclient manpage
Christof Schmitt [Thu, 11 Jun 2015 22:21:17 +0000 (15:21 -0700)]
docs: Add missing SRVSVC entries in rpcclient manpage

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): Fri Jun 12 12:39:08 CEST 2015 on sn-devel-104

8 years agorpcclient: Add netsharesetdfsflags command
Christof Schmitt [Thu, 11 Jun 2015 22:03:41 +0000 (15:03 -0700)]
rpcclient: Add netsharesetdfsflags command

This allows setting the DFS flags through a NetShareSetInfo with info
level 1005.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agorpcclient: Add info level 1005 for netsharegetinfo
Christof Schmitt [Thu, 11 Jun 2015 20:55:15 +0000 (13:55 -0700)]
rpcclient: Add info level 1005 for netsharegetinfo

This allows querying the DFS flags and the csc policy. Also update the
usage info that ths share name is not optional and print the supported
info levels.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agorpcclient: Add netsharedel command
Christof Schmitt [Thu, 11 Jun 2015 19:06:33 +0000 (12:06 -0700)]
rpcclient: Add netsharedel command

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agorpcclient: Add netshareadd command
Christof Schmitt [Thu, 11 Jun 2015 18:53:43 +0000 (11:53 -0700)]
rpcclient: Add netshareadd command

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agoKCC: use python 2.6 compatible dictonary comprehensions
Douglas Bagnall [Wed, 10 Jun 2015 23:11:06 +0000 (11:11 +1200)]
KCC: use python 2.6 compatible dictonary comprehensions

The `{k: v for k, v in whatever}` syntax is "new" in Python 2.7.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jun 12 09:46:13 CEST 2015 on sn-devel-104

8 years agoKCC: intrasite double_directed_ring test shouldn't include RODCs
Douglas Bagnall [Wed, 27 May 2015 06:04:15 +0000 (18:04 +1200)]
KCC: intrasite double_directed_ring test shouldn't include RODCs

RODCs don't belong in the ring. In practice, they don't really belong
in the same site as a ring, but that is another matter.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: use logger.critical rather than print >> sys.stderr
Douglas Bagnall [Fri, 15 May 2015 03:04:01 +0000 (15:04 +1200)]
KCC: use logger.critical rather than print >> sys.stderr

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: draw a site-edges graph for each partition
Douglas Bagnall [Fri, 15 May 2015 03:03:35 +0000 (15:03 +1200)]
KCC: draw a site-edges graph for each partition

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: use KccError, simplify logic in NTDSConn.commit_modified
Douglas Bagnall [Wed, 13 May 2015 03:36:09 +0000 (15:36 +1200)]
KCC: use KccError, simplify logic in NTDSConn.commit_modified

silence a pep8 thing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: remove unused create_edge_set() function
Douglas Bagnall [Wed, 13 May 2015 02:43:29 +0000 (14:43 +1200)]
KCC: remove unused create_edge_set() function

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: ignore the bridges_required option
Douglas Bagnall [Wed, 13 May 2015 01:58:15 +0000 (13:58 +1200)]
KCC: ignore the bridges_required option

At least until we have SiteLinkBridges to test against.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: fix the polarity of bridges_required option
Douglas Bagnall [Wed, 13 May 2015 01:55:00 +0000 (13:55 +1200)]
KCC: fix the polarity of bridges_required option

If one of the *_BRIDGES_REQUIRED flags is set, bridges_required is
True.

We ignore this option anyway.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: remove a TODO with seemingly no basis in specification
Douglas Bagnall [Wed, 13 May 2015 01:33:51 +0000 (13:33 +1200)]
KCC: remove a TODO with seemingly no basis in specification

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: clarify setup-vertices docstring, remove TODO
Douglas Bagnall [Fri, 5 Jun 2015 00:14:12 +0000 (12:14 +1200)]
KCC: clarify setup-vertices docstring, remove TODO

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: note about the meaning of None in schedule types
Douglas Bagnall [Fri, 8 May 2015 04:38:42 +0000 (16:38 +1200)]
KCC: note about the meaning of None in schedule types

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: combine_repl_info() returns the combined replinfo
Douglas Bagnall [Wed, 10 Jun 2015 04:01:52 +0000 (16:01 +1200)]
KCC: combine_repl_info() returns the combined replinfo

Previously it returned False if there was no intersections (i.e,
the new repl_info duration was 0). Now the same check can be performed
by checking the duration directly.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Conflicts:
python/samba/kcc/graph.py

8 years agoKCC: remove unnecessary comment
Douglas Bagnall [Wed, 13 May 2015 03:09:03 +0000 (15:09 +1200)]
KCC: remove unnecessary comment

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: reword comment, removing unwarranted XXX
Douglas Bagnall [Wed, 13 May 2015 03:08:47 +0000 (15:08 +1200)]
KCC: reword comment, removing unwarranted XXX

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: remove an unwarranted XXX comment
Douglas Bagnall [Wed, 13 May 2015 03:08:06 +0000 (15:08 +1200)]
KCC: remove an unwarranted XXX comment

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: let kcc.graph.ReplInfo know its duration
Douglas Bagnall [Fri, 5 Jun 2015 00:35:39 +0000 (12:35 +1200)]
KCC: let kcc.graph.ReplInfo know its duration

This is going to lead to a few simplifications.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.InternalEdge
Douglas Bagnall [Fri, 8 May 2015 02:53:41 +0000 (14:53 +1200)]
KCC: docstring for kcc.graph.InternalEdge

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.MultiEdge
Douglas Bagnall [Fri, 8 May 2015 02:53:27 +0000 (14:53 +1200)]
KCC: docstring for kcc.graph.MultiEdge

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.Vertex
Douglas Bagnall [Fri, 8 May 2015 02:53:16 +0000 (14:53 +1200)]
KCC: docstring for kcc.graph.Vertex

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.VertexColour()
Douglas Bagnall [Fri, 8 May 2015 02:52:59 +0000 (14:52 +1200)]
KCC: docstring for kcc.graph.VertexColour()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.setup_graph()
Douglas Bagnall [Fri, 8 May 2015 02:52:41 +0000 (14:52 +1200)]
KCC: docstring for kcc.graph.setup_graph()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.add_edge_out()
Douglas Bagnall [Fri, 8 May 2015 02:52:27 +0000 (14:52 +1200)]
KCC: docstring for kcc.graph.add_edge_out()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.find_component()
Douglas Bagnall [Fri, 8 May 2015 02:52:13 +0000 (14:52 +1200)]
KCC: docstring for kcc.graph.find_component()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: some rearrangement in kcc.graph.add_int_edge()
Douglas Bagnall [Fri, 8 May 2015 00:26:00 +0000 (12:26 +1200)]
KCC: some rearrangement in kcc.graph.add_int_edge()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.kruskal()
Douglas Bagnall [Fri, 8 May 2015 00:25:12 +0000 (12:25 +1200)]
KCC: docstring for kcc.graph.kruskal()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.add_int_edge()
Douglas Bagnall [Fri, 8 May 2015 00:19:51 +0000 (12:19 +1200)]
KCC: docstring for kcc.graph.add_int_edge()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.process_edge()
Douglas Bagnall [Thu, 7 May 2015 23:03:37 +0000 (11:03 +1200)]
KCC: docstring for kcc.graph.process_edge()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.process_edge_set()
Douglas Bagnall [Thu, 7 May 2015 23:03:26 +0000 (11:03 +1200)]
KCC: docstring for kcc.graph.process_edge_set()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.undemote_vertex()
Douglas Bagnall [Thu, 7 May 2015 23:03:07 +0000 (11:03 +1200)]
KCC: docstring for kcc.graph.undemote_vertex()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for kcc.graph.check_demote_vertex()
Douglas Bagnall [Thu, 7 May 2015 23:02:54 +0000 (11:02 +1200)]
KCC: docstring for kcc.graph.check_demote_vertex()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: pep8 line length in plot all connections
Douglas Bagnall [Wed, 13 May 2015 03:38:22 +0000 (15:38 +1200)]
KCC: pep8 line length in plot all connections

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: pep8 -- remove an extra line in graph_utils
Douglas Bagnall [Wed, 13 May 2015 03:37:24 +0000 (15:37 +1200)]
KCC: pep8 -- remove an extra line in graph_utils

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: pep8 remove a line
Douglas Bagnall [Wed, 13 May 2015 03:34:32 +0000 (15:34 +1200)]
KCC: pep8 remove a line

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: samba.kcc formatting fixes for pep8
Douglas Bagnall [Thu, 7 May 2015 23:00:23 +0000 (11:00 +1200)]
KCC: samba.kcc formatting fixes for pep8

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: remove XXX scare comments around guid comparisons.
Douglas Bagnall [Thu, 7 May 2015 02:26:33 +0000 (14:26 +1200)]
KCC: remove XXX scare comments around guid comparisons.

The guid comparisons are settled. We use ndrpack.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: setup_dijkstra() creates its own empty queue
Douglas Bagnall [Thu, 7 May 2015 02:22:56 +0000 (14:22 +1200)]
KCC: setup_dijkstra() creates its own empty queue

It needs to operate on an empty list, which is something the caller
really shouldn't have to worry about.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Add graph.InternalEdge.__lt__ docstring
Douglas Bagnall [Thu, 7 May 2015 02:07:27 +0000 (14:07 +1200)]
KCC: Add graph.InternalEdge.__lt__ docstring

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Add graph.try_new_path docstring
Douglas Bagnall [Thu, 7 May 2015 02:07:01 +0000 (14:07 +1200)]
KCC: Add graph.try_new_path docstring

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Add graph.dijkstra and setup_dijkstra() docstrings
Douglas Bagnall [Thu, 7 May 2015 02:06:42 +0000 (14:06 +1200)]
KCC: Add graph.dijkstra and setup_dijkstra() docstrings

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Add graph.setup_vertices() docstring
Douglas Bagnall [Thu, 7 May 2015 02:06:09 +0000 (14:06 +1200)]
KCC: Add graph.setup_vertices() docstring

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: don't pretend graph.create_edge_set() is useful
Douglas Bagnall [Thu, 7 May 2015 02:04:23 +0000 (14:04 +1200)]
KCC: don't pretend graph.create_edge_set() is useful

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Add s.k.g.create_auto_edge_set() docstring, improve variable name
Douglas Bagnall [Thu, 7 May 2015 01:59:39 +0000 (13:59 +1200)]
KCC: Add s.k.g.create_auto_edge_set() docstring, improve variable name

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Add samba.kcc.graph.create_edge() docstring
Douglas Bagnall [Thu, 7 May 2015 01:57:58 +0000 (13:57 +1200)]
KCC: Add samba.kcc.graph.create_edge() docstring

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: improve samba.kcc.graph.get_spanning_tree_edges() docstring
Douglas Bagnall [Thu, 7 May 2015 01:57:10 +0000 (13:57 +1200)]
KCC: improve samba.kcc.graph.get_spanning_tree_edges() docstring

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: Add ReplInfo docstring
Douglas Bagnall [Thu, 7 May 2015 01:56:18 +0000 (13:56 +1200)]
KCC: Add ReplInfo docstring

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
8 years agoKCC: docstring for test_all_reps_from()
Douglas Bagnall [Wed, 6 May 2015 22:33:29 +0000 (10:33 +1200)]
KCC: docstring for test_all_reps_from()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>