From 58e8db912d2213a594714ac29866396098662557 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 18 Jun 2009 12:33:46 +1000 Subject: s4:libnet Allow 'net password change' to work on expired passwords We need to pass down flags to the DCE/RPC layer to allow fallback to anonymous connections, as we can't log in with an expired password. The anonymous connection can then change the password with SAMR. Andrew Bartlett --- source4/libnet/libnet_domain.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/libnet/libnet_domain.c') diff --git a/source4/libnet/libnet_domain.c b/source4/libnet/libnet_domain.c index eb6920d88e..43a6a0e10b 100644 --- a/source4/libnet/libnet_domain.c +++ b/source4/libnet/libnet_domain.c @@ -427,6 +427,8 @@ struct composite_context* libnet_DomainOpenLsa_send(struct libnet_context *ctx, /* check, if there's lsa pipe opened already, before opening a handle */ if (ctx->lsa.pipe == NULL) { + ZERO_STRUCT(s->rpcconn); + /* attempting to connect a domain controller */ s->rpcconn.level = LIBNET_RPC_CONNECT_DC; s->rpcconn.in.name = talloc_strdup(c, io->in.domain_name); @@ -1179,6 +1181,8 @@ struct composite_context* libnet_DomainList_send(struct libnet_context *ctx, /* check whether samr pipe has already been opened */ if (ctx->samr.pipe == NULL) { + ZERO_STRUCT(s->rpcconn); + /* prepare rpc connect call */ s->rpcconn.level = LIBNET_RPC_CONNECT_SERVER; s->rpcconn.in.name = s->hostname; -- cgit