[Pkg-samba-maint] [samba] 04/29: s3-winbind: Add functions for domain online/offline handling.

Jelmer Vernooij jelmer at moszumanska.debian.org
Fri Dec 6 23:16:44 UTC 2013


This is an automated email from the git hooks/post-receive script.

jelmer pushed a commit to branch samba_4.1
in repository samba.

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)
---
 source3/winbindd/winbindd_cm.c    | 40 +++++++++++++++++++++++++++++++++++++++
 source3/winbindd/winbindd_proto.h | 10 ++++++++++
 2 files changed, 50 insertions(+)

diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 4c1a8cc..488876f 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.
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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list