From 9593101ec118dd242bf25fabf3e17c58269e632c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 25 Sep 2005 21:01:56 +0000 Subject: r10491: First step towards wbinfo -t: This issues a name request for the primary domain and gets the DC's name via a mailslot call. Metze, I renamed wbsrv_queue_reply to wbsrv_send_reply in accordance with irpc_send_reply. Having _queue_ here and _send_ there is a bit confusing. And as everything is async anyway, the semantics should not be too much of a problem. Volker (This used to be commit 4637964b19c6e9f7d201b287e2d409d029fced01) --- source4/winbind/wb_async_helpers.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 source4/winbind/wb_async_helpers.h (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h new file mode 100644 index 0000000000..6c4f1d84a8 --- /dev/null +++ b/source4/winbind/wb_async_helpers.h @@ -0,0 +1,36 @@ +/* + Unix SMB/CIFS implementation. + + SMB composite request interfaces + + Copyright (C) Volker Lendecke 2005 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +struct wb_finddcs { + struct { + struct messaging_context *msg_ctx; + const char *domain; + } in; + + struct { + int num_dcs; + struct nbt_dc_name { + const char *address; + const char *name; + } *dcs; + } out; +}; -- cgit From e5c6a3e36147103e87d1c55173f4b54ba6134904 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 3 Oct 2005 13:46:11 +0000 Subject: r10683: Samba3's wbinfo -t should give the correct answer now. Tridge, if you have time, you might want to look at the segfault I was still seeing. Now I store the handle to the netlogon pipe in the global winbind state and free it on the next entry into check_machacc. The problem seems to be that talloc_free()ing a pipe struct from within a callback function on that pipe is not possible. I think I can live with that, but it has been not really obvious. To reproduce the segfault you might want to look at putting a talloc_free(state->getcreds->out.netlogon) into wbsrv_samba3_check_machacc_receive_creds. This is called from a dcerpc callback function. In particular if the check failed it would be nice if I could delete the pipe directly and not post a different event to some winbind queue. I tried to delete the pipe from a timed event triggered immediately, but this also fails because the inner loop seems to hit the same event again, calling it twice. Volker (This used to be commit 5436d7764812bb632ba865e633005ed07923b57f) --- source4/winbind/wb_async_helpers.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index 6c4f1d84a8..b37a66e972 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -34,3 +34,13 @@ struct wb_finddcs { } *dcs; } out; }; + +struct wb_get_schannel_creds { + struct { + struct cli_credentials *creds; + struct smbcli_tree *tree; + } in; + struct { + struct dcerpc_pipe *netlogon; + } out; +}; -- cgit From 012893cb421d77efc538c9f4c78b2421aef3f06e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 3 Oct 2005 17:36:49 +0000 Subject: r10691: This gets half-way to wbinfo -n. It acquires an lsa pipe, and does a queryinfopolicy. Idea is to get a consistency check between that and our notion of the domain name and sid, and take the lsa pipe as the holder of the central smbcli_tree that netlogon and samr use as well. Volker (This used to be commit 126c80aefc4f53c4ba79afc12d70602ef9055ddb) --- source4/winbind/wb_async_helpers.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index b37a66e972..e3de312590 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -44,3 +44,15 @@ struct wb_get_schannel_creds { struct dcerpc_pipe *netlogon; } out; }; + +struct wb_get_lsa_pipe { + struct { + struct event_context *event_ctx; + struct messaging_context *msg_ctx; + const char *domain; + } in; + struct { + const struct dom_sid *domain_sid; + struct dcerpc_pipe *pipe; + } out; +}; -- cgit From b1b6eb7b67542c656e1c087ba590c4269f867772 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 7 Oct 2005 19:08:51 +0000 Subject: r10825: Complete wbinfo -n (This used to be commit 1afa893506f3d7157e251eec9baeba28dc011587) --- source4/winbind/wb_async_helpers.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index e3de312590..473c2b772e 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -20,6 +20,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "librpc/gen_ndr/lsa.h" + struct wb_finddcs { struct { struct messaging_context *msg_ctx; @@ -56,3 +58,10 @@ struct wb_get_lsa_pipe { struct dcerpc_pipe *pipe; } out; }; + +struct wb_sid_object { + enum lsa_SidType type; + struct dom_sid *sid; + const char *domain; + const char *name; +}; -- cgit From e0c11738ae9cf6a2fd3c3d8f4ec036f615f1f472 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 8 Oct 2005 16:25:00 +0000 Subject: r10834: Work in progress on winbind. With some helper routines the composite functions start to look sane. Question: What about providing all winbind commands as irpc interfaces that are called from the samba3 compatibility layer? This way it would be easy for other samba components to access its functionality. Does that make sense? Volker (This used to be commit 2a6b8053859ea5690f90a8d2074d2bb4f06551f8) --- source4/winbind/wb_async_helpers.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index 473c2b772e..e2fa7e3698 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -37,28 +37,6 @@ struct wb_finddcs { } out; }; -struct wb_get_schannel_creds { - struct { - struct cli_credentials *creds; - struct smbcli_tree *tree; - } in; - struct { - struct dcerpc_pipe *netlogon; - } out; -}; - -struct wb_get_lsa_pipe { - struct { - struct event_context *event_ctx; - struct messaging_context *msg_ctx; - const char *domain; - } in; - struct { - const struct dom_sid *domain_sid; - struct dcerpc_pipe *pipe; - } out; -}; - struct wb_sid_object { enum lsa_SidType type; struct dom_sid *sid; -- cgit From b468ba1386166cfe2f026051b205468de1c6103e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 9 Oct 2005 12:50:35 +0000 Subject: r10846: Create a "wbsrv_domain", change wb_finddcs to the style of the rest of the async helpers. Volker (This used to be commit 10585ba4e81e979a03aec747db6fc059978fa566) --- source4/winbind/wb_async_helpers.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index e2fa7e3698..1bf1c78ca8 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -22,19 +22,9 @@ #include "librpc/gen_ndr/lsa.h" -struct wb_finddcs { - struct { - struct messaging_context *msg_ctx; - const char *domain; - } in; - - struct { - int num_dcs; - struct nbt_dc_name { - const char *address; - const char *name; - } *dcs; - } out; +struct nbt_dc_name { + const char *address; + const char *name; }; struct wb_sid_object { -- cgit From 0f51ae83f09fa90362cae12a37ca4debc35f8491 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 19 Oct 2005 13:45:44 +0000 Subject: r11181: Implement wbinfo -s and wbinfo --user-sids. The patch is so large because --user-sids required the extension to trusted domains. Implement "winbind sealed pipes" parameter for debugging purposes. Volker (This used to be commit 3821a17bdb68b2f1389b5a150502c057d28569d2) --- source4/winbind/wb_async_helpers.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index 1bf1c78ca8..413747090c 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -33,3 +33,8 @@ struct wb_sid_object { const char *domain; const char *name; }; + +struct wb_dom_info { + const char *name; + const struct dom_sid *sid; +}; -- cgit From 69307693dc47cdaa931551c99914e85273037886 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 5 Nov 2005 23:46:57 +0000 Subject: r11528: Separate finding dcs from initializing a domain. Makes it easier to possibly support cldap and other stuff in the future. This temporarily disables wbinfo -t, but that will come back soon. Try an ldap bind using gss-spnego. This got me krb5 binds against "our" w2k3 and a trusted w2k, although with some memleaks from krb5 and a BAD_OPTION tgs-rep error. Volker (This used to be commit d14948fdf687c8f70ef9ec35445b7eb04da84253) --- source4/winbind/wb_async_helpers.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index 413747090c..532cd9730c 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -34,7 +34,3 @@ struct wb_sid_object { const char *name; }; -struct wb_dom_info { - const char *name; - const struct dom_sid *sid; -}; -- cgit From 2fad2c945b2a9773b5016ff616929117b1ceb73c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 12 Jan 2006 09:56:15 +0000 Subject: r12868: Remove unused code. This has moved to libcli/finddcs.c. Andrew Bartlett (This used to be commit a30a359c45c3dac4b910ec130b73cc01324b399a) --- source4/winbind/wb_async_helpers.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index 532cd9730c..2754a8acd6 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -22,11 +22,6 @@ #include "librpc/gen_ndr/lsa.h" -struct nbt_dc_name { - const char *address; - const char *name; -}; - struct wb_sid_object { enum lsa_SidType type; struct dom_sid *sid; -- cgit From e3f2414cf9e582a4e4deecc662b64a7bb2679a34 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 14 Mar 2006 15:03:25 +0000 Subject: r14380: Reduce the size of structs.h (This used to be commit 1a16a6f1dfa66499af43a6b88b3ea69a6a75f1fe) --- source4/winbind/wb_async_helpers.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index 2754a8acd6..af6a52b1d1 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -20,6 +20,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef __WB_ASYNC_HELPERS_H__ +#define __WB_ASYNC_HELPERS_H__ + #include "librpc/gen_ndr/lsa.h" struct wb_sid_object { @@ -29,3 +32,4 @@ struct wb_sid_object { const char *name; }; +#endif /* __WB_ASYNC_HELPERS_H__ */ -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/winbind/wb_async_helpers.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/winbind/wb_async_helpers.h') diff --git a/source4/winbind/wb_async_helpers.h b/source4/winbind/wb_async_helpers.h index af6a52b1d1..0dc2d4ff10 100644 --- a/source4/winbind/wb_async_helpers.h +++ b/source4/winbind/wb_async_helpers.h @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,8 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef __WB_ASYNC_HELPERS_H__ -- cgit