s3-netlogon: pass down account name to remote password set functions.
[bbaumbach/samba-autobuild/.git] / source3 / libnet / libnet_join.c
index 5315fccff6108e24c29218e45f25ab90d96013d4..aa5f54adaf6035fd7bcfb3934c1a102ee51fc4c8 100644 (file)
@@ -789,6 +789,7 @@ static NTSTATUS libnet_join_joindomain_rpc_unsecure(TALLOC_CTX *mem_ctx,
        E_md4hash(trust_passwd, orig_trust_passwd_hash);
 
        status = rpccli_netlogon_set_trust_password(pipe_hnd, mem_ctx,
+                                                   r->in.machine_name,
                                                    orig_trust_passwd_hash,
                                                    r->in.machine_password,
                                                    new_trust_passwd_hash,
@@ -1828,7 +1829,7 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx,
                                "failed to find DC for domain %s",
                                r->in.domain_name,
                                get_friendly_nt_error_msg(status));
-                       return WERR_DOMAIN_CONTROLLER_NOT_FOUND;
+                       return WERR_DCNOTFOUND;
                }
 
                dc = strip_hostname(info->dc_unc);
@@ -2019,7 +2020,7 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx,
                                "failed to find DC for domain %s",
                                r->in.domain_name,
                                get_friendly_nt_error_msg(status));
-                       return WERR_DOMAIN_CONTROLLER_NOT_FOUND;
+                       return WERR_DCNOTFOUND;
                }
 
                dc = strip_hostname(info->dc_unc);