The Samba-Bugzilla – Attachment 9276 Details for
Bug 10194
Offline logon cache not updating for cross child domain group membership
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v4-0-test patch
v4-0-test.patch (text/plain), 8.30 KB, created by
Andreas Schneider
on 2013-10-11 12:52:51 UTC
(
hide
)
Description:
v4-0-test patch
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2013-10-11 12:52:51 UTC
Size:
8.30 KB
patch
obsolete
>From 8bda29b56931ddf66894ffbf662d60c1b60efbcd Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@cryptomilk.org> >Date: Thu, 10 Oct 2013 09:15:57 +0200 >Subject: [PATCH 1/4] 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@cryptomilk.org> >Reviewed-by: Volker Lendecke <vl@samba.org> >(cherry picked from commit 1a884636542ba0e54c6d209662a5d1613d727a85) >--- > source3/librpc/idl/messaging.idl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl >index c262889..a6258a8 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, >-- >1.8.4 > > >From 8c36b21f581dbe67567a3d900587253e5993c024 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@cryptomilk.org> >Date: Thu, 10 Oct 2013 10:01:40 +0200 >Subject: [PATCH 2/4] 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@cryptomilk.org> >Reviewed-by: Volker Lendecke <vl@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 e7b0d93..9967a25 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 41aa9ac..59dfee0 100644 >--- a/source3/winbindd/winbindd_proto.h >+++ b/source3/winbindd/winbindd_proto.h >@@ -151,6 +151,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); >-- >1.8.4 > > >From 500c94adca6dd5fbd46fbecc397b806352e887f0 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@cryptomilk.org> >Date: Thu, 10 Oct 2013 10:02:27 +0200 >Subject: [PATCH 3/4] 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@cryptomilk.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >(cherry picked from commit fc5941622010843d823b5c245eccc68d1d3bce19) >--- > source3/winbindd/winbindd.c | 6 ++++++ > source3/winbindd/winbindd_dual.c | 5 +++++ > 2 files changed, 11 insertions(+) > >diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c >index 21cc5f2..839655e 100644 >--- a/source3/winbindd/winbindd.c >+++ b/source3/winbindd/winbindd.c >@@ -1137,6 +1137,12 @@ void winbindd_register_handlers(bool foreground) > messaging_register(winbind_messaging_context(), 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(winbind_messaging_context(), NULL, > MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list); > >diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c >index 60b15e3..3c0e757 100644 >--- a/source3/winbindd/winbindd_dual.c >+++ b/source3/winbindd/winbindd_dual.c >@@ -1223,6 +1223,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. */ >-- >1.8.4 > > >From e218f75a2253c436bd8daa01d6b3fb14233b403b Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@cryptomilk.org> >Date: Thu, 10 Oct 2013 10:03:32 +0200 >Subject: [PATCH 4/4] 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@cryptomilk.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Volker Lendecke <vl@samba.org> >Autobuild-Date(master): Fri Oct 11 13:37:56 CEST 2013 on sn-devel-104 > >(cherry picked from commit 275f6586c4d4547978c6ff2f04670b0d8f89fd4b) >--- > source3/winbindd/winbindd_cm.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > >diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c >index 9967a25..1883ddc 100644 >--- a/source3/winbindd/winbindd_cm.c >+++ b/source3/winbindd/winbindd_cm.c >@@ -387,6 +387,8 @@ void winbind_msg_domain_online(struct messaging_context *msg_ctx, > > 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 )); > >@@ -434,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 */ > >@@ -458,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 )); > >@@ -509,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 */ > >-- >1.8.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 10194
:
9267
|
9271
|
9272
|
9275
| 9276 |
9277