summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_server.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-11-05 23:46:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:49 -0500
commit69307693dc47cdaa931551c99914e85273037886 (patch)
tree538173f824d7e93fc740ccea105f61196a070859 /source4/winbind/wb_server.c
parentf792c4f8f23793b2a99d2cb6beff12bbe4044151 (diff)
downloadsamba-69307693dc47cdaa931551c99914e85273037886.tar.gz
samba-69307693dc47cdaa931551c99914e85273037886.tar.bz2
samba-69307693dc47cdaa931551c99914e85273037886.zip
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)
Diffstat (limited to 'source4/winbind/wb_server.c')
-rw-r--r--source4/winbind/wb_server.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c
index d12adfc9d4..a66bc0832f 100644
--- a/source4/winbind/wb_server.c
+++ b/source4/winbind/wb_server.c
@@ -248,32 +248,6 @@ static const struct wbsrv_protocol_ops wbsrv_samba3_protocol_ops = {
.push_reply = wbsrv_samba3_push_reply
};
-static NTSTATUS init_my_domain(TALLOC_CTX *mem_ctx,
- struct wbsrv_domain **domain)
-{
- struct wbsrv_domain *result;
-
- result = talloc_zero(mem_ctx, struct wbsrv_domain);
- NT_STATUS_HAVE_NO_MEMORY(result);
-
- result->name = talloc_strdup(result, lp_workgroup());
- if (result->name == NULL) {
- talloc_free(result);
- return NT_STATUS_NO_MEMORY;
- }
-
- result->sid = secrets_get_domain_sid(result, lp_workgroup());
- if (result->sid == NULL) {
- talloc_free(result);
- return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
- }
-
- result->initialized = False;
-
- *domain = result;
- return NT_STATUS_OK;
-}
-
/*
startup the winbind task
*/
@@ -304,16 +278,14 @@ static void winbind_task_init(struct task_server *task)
if (!service) goto nomem;
service->task = task;
- status = init_my_domain(service, &service->domains);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("Could not init my domain: %s\n",
- nt_errstr(status)));
- task_server_terminate(task, nt_errstr(status));
+ service->primary_sid = secrets_get_domain_sid(service,
+ lp_workgroup());
+ if (service->primary_sid == NULL) {
+ task_server_terminate(
+ task, nt_errstr(NT_STATUS_CANT_ACCESS_DOMAIN_INFO));
return;
}
- service->primary_sid = talloc_reference(service, service->domains->sid);
-
/* setup the unprivileged samba3 socket */
listen_socket = talloc(service, struct wbsrv_listen_socket);
if (!listen_socket) goto nomem;