diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-07-15 10:46:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:01:07 -0500 |
commit | b9d77db587f42c2c7a26b7fd8082740c617cb467 (patch) | |
tree | 4bee429f250993f4b35bfd587194614b36d327bf /source4/winbind | |
parent | 40dbe572e5884d123377608f83dbe4bc3054565e (diff) | |
download | samba-b9d77db587f42c2c7a26b7fd8082740c617cb467.tar.gz samba-b9d77db587f42c2c7a26b7fd8082740c617cb467.tar.xz samba-b9d77db587f42c2c7a26b7fd8082740c617cb467.zip |
r23880: Don't crash when we run wbinfo -a against our own winbind when we are a DC.
Next step is to make it work...
Andrew Bartlett
(This used to be commit a1b6c9ecb9a6f17bcbabf81a8128398df6447490)
Diffstat (limited to 'source4/winbind')
-rw-r--r-- | source4/winbind/wb_init_domain.c | 8 | ||||
-rw-r--r-- | source4/winbind/wb_pam_auth.c | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source4/winbind/wb_init_domain.c b/source4/winbind/wb_init_domain.c index 6b8606bb0c..69ea9c7533 100644 --- a/source4/winbind/wb_init_domain.c +++ b/source4/winbind/wb_init_domain.c @@ -161,9 +161,10 @@ struct composite_context *wb_init_domain_send(TALLOC_CTX *mem_ctx, state->domain->netlogon_pipe = NULL; if ((!cli_credentials_is_anonymous(state->domain->schannel_creds)) && - ((lp_server_role() == ROLE_DOMAIN_MEMBER) && - (dom_sid_equal(state->domain->info->sid, - state->service->primary_sid)))) { + ((lp_server_role() == ROLE_DOMAIN_MEMBER) || + (lp_server_role() == ROLE_DOMAIN_CONTROLLER)) && + (dom_sid_equal(state->domain->info->sid, + state->service->primary_sid))) { state->domain->netlogon_binding->flags |= DCERPC_SCHANNEL; /* For debugging, it can be a real pain if all the traffic is encrypted */ @@ -233,6 +234,7 @@ static bool retry_with_schannel(struct init_domain_state *state, void (*continuation)(struct composite_context *)) { struct composite_context *ctx; + state->ctx->status = NT_STATUS_OK; if (state->domain->netlogon_binding->flags & DCERPC_SCHANNEL && !(binding->flags & DCERPC_SCHANNEL)) { /* Opening a policy handle failed, perhaps it was diff --git a/source4/winbind/wb_pam_auth.c b/source4/winbind/wb_pam_auth.c index e29bb7c472..fffb7c408c 100644 --- a/source4/winbind/wb_pam_auth.c +++ b/source4/winbind/wb_pam_auth.c @@ -128,6 +128,7 @@ static void pam_auth_crap_recv_domain(struct composite_context *ctx) struct wbsrv_domain *domain; state->ctx->status = wb_sid2domain_recv(ctx, &domain); + if (!composite_is_ok(state->ctx)) return; state->creds_state = cli_credentials_get_netlogon_creds(domain->schannel_creds); |