summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_dual.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-07-28 15:06:11 -0400
committerVolker Lendecke <vl@samba.org>2009-08-05 03:21:19 -0400
commit6cf3db91499ebd245b08997a319edf36cfee3365 (patch)
treea7355f3e0b25e2a13964b7500c77980e94cf2373 /source3/winbindd/winbindd_dual.c
parentddd13c6816e7d289406948fe2f68db1aba7669d3 (diff)
downloadsamba-6cf3db91499ebd245b08997a319edf36cfee3365.tar.gz
samba-6cf3db91499ebd245b08997a319edf36cfee3365.tar.bz2
samba-6cf3db91499ebd245b08997a319edf36cfee3365.zip
s3:winbind: Add NDR-based parent-child communication to winbind
Diffstat (limited to 'source3/winbindd/winbindd_dual.c')
-rw-r--r--source3/winbindd/winbindd_dual.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 1985dd8b12..2158834bdd 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -592,6 +592,8 @@ void setup_child(struct winbindd_child *child,
child->table = table;
child->queue = tevent_queue_create(NULL, "winbind_child");
SMB_ASSERT(child->queue != NULL);
+ child->rpccli = wbint_rpccli_create(NULL, child);
+ SMB_ASSERT(child->rpccli != NULL);
}
struct winbindd_child *children = NULL;
@@ -1307,6 +1309,16 @@ bool winbindd_reinit_after_fork(const char *logfilename)
return true;
}
+/*
+ * In a child there will be only one domain, reference that here.
+ */
+static struct winbindd_domain *child_domain;
+
+struct winbindd_domain *wb_child_domain(void)
+{
+ return child_domain;
+}
+
static bool fork_domain_child(struct winbindd_child *child)
{
int fdpair[2];
@@ -1321,6 +1333,7 @@ static bool fork_domain_child(struct winbindd_child *child)
} else {
DEBUG(10, ("fork_domain_child called without domain.\n"));
}
+ child_domain = child->domain;
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fdpair) != 0) {
DEBUG(0, ("Could not open child pipe: %s\n",