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,
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 <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
#include "libcli/auth/libcli_auth.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "librpc/gen_ndr/ndr_netlogon_c.h"
-
+#include "auth/credentials/credentials.h"
struct schannel_key_state {
struct dcerpc_pipe *pipe;
c->status = dcerpc_epm_map_binding_recv(ctx);
if (!NT_STATUS_IS_OK(c->status)) {
DEBUG(0,("Failed to map DCERPC/TCP NCACN_NP pipe for '%s' - %s\n",
- DCERPC_NETLOGON_UUID, nt_errstr(c->status)));
+ NDR_NETLOGON_UUID, nt_errstr(c->status)));
composite_error(c, c->status);
return;
}
talloc_steal(s, s->pipe2);
/* initiate a non-authenticated bind */
- auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe2, &dcerpc_table_netlogon);
+ auth_none_req = dcerpc_bind_auth_none_send(c, s->pipe2, &ndr_table_netlogon);
if (composite_nomem(auth_none_req, c)) return;
composite_continue(c, auth_none_req, continue_bind_auth_none, c);
struct schannel_key_state *s;
struct rpc_request *srv_auth2_req;
- c = talloc_get_type(req->async.private, struct composite_context);
+ c = talloc_get_type(req->async.private_data, struct composite_context);
s = talloc_get_type(c->private_data, struct schannel_key_state);
/* receive rpc request result - netlogon challenge */
struct composite_context *c;
struct schannel_key_state *s;
- c = talloc_get_type(req->async.private, struct composite_context);
+ c = talloc_get_type(req->async.private_data, struct composite_context);
s = talloc_get_type(c->private_data, struct schannel_key_state);
/* receive rpc request result - auth2 credentials */
struct composite_context *epm_map_req;
/* composite context allocation and setup */
- c = talloc_zero(mem_ctx, struct composite_context);
+ c = composite_create(mem_ctx, p->conn->event_ctx);
if (c == NULL) return NULL;
s = talloc_zero(c, struct schannel_key_state);
if (composite_nomem(s, c)) return c;
-
- c->state = COMPOSITE_STATE_IN_PROGRESS;
c->private_data = s;
- c->event_ctx = p->conn->event_ctx;
/* store parameters in the state structure */
s->pipe = p;
/* request the netlogon endpoint mapping */
epm_map_req = dcerpc_epm_map_binding_send(c, s->binding,
- &dcerpc_table_netlogon,
+ &ndr_table_netlogon,
s->pipe->conn->event_ctx);
if (composite_nomem(epm_map_req, c)) return c;
struct auth_schannel_state {
struct dcerpc_pipe *pipe;
struct cli_credentials *credentials;
- const struct dcerpc_interface_table *table;
+ const struct ndr_interface_table *table;
uint8_t auth_level;
};
*/
struct composite_context *dcerpc_bind_auth_schannel_send(TALLOC_CTX *tmp_ctx,
struct dcerpc_pipe *p,
- const struct dcerpc_interface_table *table,
+ const struct ndr_interface_table *table,
struct cli_credentials *credentials,
uint8_t auth_level)
{
struct composite_context *schan_key_req;
/* composite context allocation and setup */
- c = talloc_zero(tmp_ctx, struct composite_context);
+ c = composite_create(tmp_ctx, p->conn->event_ctx);
if (c == NULL) return NULL;
s = talloc_zero(c, struct auth_schannel_state);
if (composite_nomem(s, c)) return c;
-
- c->state = COMPOSITE_STATE_IN_PROGRESS;
c->private_data = s;
- c->event_ctx = p->conn->event_ctx;
-
+
/* store parameters in the state structure */
s->pipe = p;
s->credentials = credentials;
*/
NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx,
struct dcerpc_pipe *p,
- const struct dcerpc_interface_table *table,
+ const struct ndr_interface_table *table,
struct cli_credentials *credentials,
uint8_t auth_level)
{