[SCM] Samba Shared Repository - branch v4-1-test updated
Karolin Seeger
kseeger at samba.org
Mon Oct 14 04:07:04 MDT 2013
The branch, v4-1-test has been updated
via 06c6866 s3-winbind: Send online/offline message of the domain to the parent.
via 944c3e5 s3-winbind: Register handlers for domain online/offline messages.
via 393f6a8 s3-winbind: Add functions for domain online/offline handling.
via 7ea11ba idl: Add a new message for winbind domain states.
via 45a1cbb ccan: Fix calling memset with zero length parameter
via d932142 Fix bug #10187 - Missing talloc_free can leak stackframe in error path.
from ff0cd26 VERSION: Bump version number up to 4.1.1...
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-1-test
- Log -----------------------------------------------------------------
commit 06c6866f2d3ffb781a270438db85bd6d61dce39c
Author: Andreas Schneider <asn at cryptomilk.org>
Date: Thu Oct 10 10:03:32 2013 +0200
s3-winbind: Send online/offline message of the domain to the parent.
https://bugzilla.samba.org/show_bug.cgi?id=10194
Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Fri Oct 11 13:37:56 CEST 2013 on sn-devel-104
(cherry picked from commit 275f6586c4d4547978c6ff2f04670b0d8f89fd4b)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-1-test): Mon Oct 14 12:06:45 CEST 2013 on sn-devel-104
commit 944c3e5552b6fbb166158a8740dc06ac359cf3d6
Author: Andreas Schneider <asn at cryptomilk.org>
Date: Thu Oct 10 10:02:27 2013 +0200
s3-winbind: Register handlers for domain online/offline messages.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10194
Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
(cherry picked from commit fc5941622010843d823b5c245eccc68d1d3bce19)
commit 393f6a8c7563992fee6cbe9dbf5d46c6f2898b26
Author: Andreas Schneider <asn at cryptomilk.org>
Date: Thu Oct 10 10:01:40 2013 +0200
s3-winbind: Add functions for domain online/offline handling.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10194
Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
(cherry picked from commit 447ec17a6bec814a2ac5cadb74dbef5789f07c52)
commit 7ea11ba9ade511b6940cde2f86878eb5da2c2fbf
Author: Andreas Schneider <asn at cryptomilk.org>
Date: Thu Oct 10 09:15:57 2013 +0200
idl: Add a new message for winbind domain states.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10194
Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
(cherry picked from commit 1a884636542ba0e54c6d209662a5d1613d727a85)
commit 45a1cbb7514f9db5fe2d7c2207d7723092aa164d
Author: Volker Lendecke <vl at samba.org>
Date: Thu Jul 11 14:57:53 2013 +0200
ccan: Fix calling memset with zero length parameter
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Thu Jul 11 16:55:49 CEST 2013 on sn-devel-104
Signed-off-by: Andreas Schneider <asn at samba.org>
Fix bug #10190 - Fix memset used with constant zero length parameter.
commit d9321421b88a3ba7c98186934b5fe8872f764f15
Author: Jeremy Allison <jra at samba.org>
Date: Tue Oct 8 15:01:38 2013 -0700
Fix bug #10187 - Missing talloc_free can leak stackframe in error path.
Fix error path.
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
Autobuild-User(master): David Disseldorp <ddiss at samba.org>
Autobuild-Date(master): Wed Oct 9 03:50:56 CEST 2013 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
lib/ccan/tally/tally.c | 2 +-
source3/librpc/idl/messaging.idl | 2 +
source3/winbindd/winbindd.c | 6 +++
source3/winbindd/winbindd_cm.c | 62 +++++++++++++++++++++++++++++++++++++
source3/winbindd/winbindd_dual.c | 5 +++
source3/winbindd/winbindd_msrpc.c | 5 ++-
source3/winbindd/winbindd_proto.h | 10 ++++++
7 files changed, 89 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c
index 774373c..29f0555 100644
--- a/lib/ccan/tally/tally.c
+++ b/lib/ccan/tally/tally.c
@@ -506,11 +506,11 @@ char *tally_histogram(const struct tally *tally,
if (count > covered) {
count -= covered;
+ memset(p, '*', count);
} else {
count = 0;
}
- memset(p, '*', count);
p += count;
*p = '\n';
p++;
diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl
index ddcf0e3..9d16570 100644
--- a/source3/librpc/idl/messaging.idl
+++ b/source3/librpc/idl/messaging.idl
@@ -100,6 +100,8 @@ interface messaging
MSG_WINBIND_VALIDATE_CACHE = 0x0408,
MSG_WINBIND_DUMP_DOMAIN_LIST = 0x0409,
MSG_WINBIND_IP_DROPPED = 0x040A,
+ MSG_WINBIND_DOMAIN_ONLINE = 0x040B,
+ MSG_WINBIND_DOMAIN_OFFLINE = 0x040C,
/* event messages */
MSG_DUMP_EVENT_LIST = 0x0500,
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 953e208..50573ac 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -1168,6 +1168,12 @@ static void winbindd_register_handlers(struct messaging_context *msg_ctx,
messaging_register(msg_ctx, NULL,
MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus);
+ /* Handle domain online/offline messages for domains */
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_WINBIND_DOMAIN_OFFLINE, winbind_msg_domain_offline);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_WINBIND_DOMAIN_ONLINE, winbind_msg_domain_online);
+
messaging_register(msg_ctx, NULL,
MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 4c1a8cc..61917db 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -340,6 +340,46 @@ static void calc_new_online_timeout_check(struct winbindd_domain *domain)
}
}
+void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+ const char *domain_name = (const char *)data->data;
+ struct winbindd_domain *domain;
+
+ domain = find_domain_from_name_noinit(domain_name);
+ if (domain == NULL) {
+ return;
+ }
+
+ domain->online = false;
+
+ DEBUG(10, ("Domain %s is marked as offline now.\n",
+ domain_name));
+}
+
+void winbind_msg_domain_online(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+ const char *domain_name = (const char *)data->data;
+ struct winbindd_domain *domain;
+
+ domain = find_domain_from_name_noinit(domain_name);
+ if (domain == NULL) {
+ return;
+ }
+
+ domain->online = true;
+
+ DEBUG(10, ("Domain %s is marked as online now.\n",
+ domain_name));
+}
+
/****************************************************************
Set domain offline and also add handler to put us back online
if we detect a DC.
@@ -347,6 +387,8 @@ static void calc_new_online_timeout_check(struct winbindd_domain *domain)
void set_domain_offline(struct winbindd_domain *domain)
{
+ pid_t parent_pid = getppid();
+
DEBUG(10,("set_domain_offline: called for domain %s\n",
domain->name ));
@@ -394,6 +436,15 @@ void set_domain_offline(struct winbindd_domain *domain)
DEBUG(10,("set_domain_offline: added event handler for domain %s\n",
domain->name ));
+ /* Send a message to the parent that the domain is offline. */
+ if (parent_pid > 1 && !domain->internal) {
+ messaging_send_buf(winbind_messaging_context(),
+ pid_to_procid(parent_pid),
+ MSG_WINBIND_DOMAIN_OFFLINE,
+ (uint8 *)domain->name,
+ strlen(domain->name) + 1);
+ }
+
/* Send an offline message to the idmap child when our
primary domain goes offline */
@@ -418,6 +469,8 @@ void set_domain_offline(struct winbindd_domain *domain)
static void set_domain_online(struct winbindd_domain *domain)
{
+ pid_t parent_pid = getppid();
+
DEBUG(10,("set_domain_online: called for domain %s\n",
domain->name ));
@@ -469,6 +522,15 @@ static void set_domain_online(struct winbindd_domain *domain)
domain->online = True;
+ /* Send a message to the parent that the domain is online. */
+ if (parent_pid > 1 && !domain->internal) {
+ messaging_send_buf(winbind_messaging_context(),
+ pid_to_procid(parent_pid),
+ MSG_WINBIND_DOMAIN_ONLINE,
+ (uint8 *)domain->name,
+ strlen(domain->name) + 1);
+ }
+
/* Send an online message to the idmap child when our
primary domain comes online */
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 34896d5..972924c 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -1241,6 +1241,11 @@ NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
messaging_deregister(winbind_messaging_context(),
MSG_DEBUG, NULL);
+ messaging_deregister(winbind_messaging_context(),
+ MSG_WINBIND_DOMAIN_OFFLINE, NULL);
+ messaging_deregister(winbind_messaging_context(),
+ MSG_WINBIND_DOMAIN_ONLINE, NULL);
+
/* We have destroyed all events in the winbindd_event_context
* in reinit_after_fork(), so clean out all possible pending
* event pointers. */
diff --git a/source3/winbindd/winbindd_msrpc.c b/source3/winbindd/winbindd_msrpc.c
index e86838c..61447d3 100644
--- a/source3/winbindd/winbindd_msrpc.c
+++ b/source3/winbindd/winbindd_msrpc.c
@@ -944,8 +944,9 @@ static NTSTATUS msrpc_trusted_domains(struct winbindd_domain *domain,
}
status = cm_connect_lsa(domain, tmp_ctx, &lsa_pipe, &lsa_policy);
- if (!NT_STATUS_IS_OK(status))
- return status;
+ if (!NT_STATUS_IS_OK(status)) {
+ goto done;
+ }
status = rpc_trusted_domains(tmp_ctx,
lsa_pipe,
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index b07f303..3df7d7c 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -153,6 +153,16 @@ enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *doma
void winbindd_ccache_save(struct winbindd_cli_state *state);
/* The following definitions come from winbindd/winbindd_cm.c */
+void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data);
+void winbind_msg_domain_online(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data);
void set_domain_offline(struct winbindd_domain *domain);
void set_domain_online_request(struct winbindd_domain *domain);
--
Samba Shared Repository
More information about the samba-cvs
mailing list