summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2019-05-29 16:22:11 +0200
committerAndrew Bartlett <abartlet@samba.org>2019-07-26 01:48:22 +0000
commit4b9b1dbe9c8c988a39b1318a4f7aac031bc1ea8b (patch)
tree344a205d4afb1e5eebadb2768779c78ea13b93af /source3/libnet
parentbaa96ef20945638fb5ee76b03543c7b611e9c7d7 (diff)
downloadsamba-4b9b1dbe9c8c988a39b1318a4f7aac031bc1ea8b.tar.gz
s3:rpc_client: Return NTSTATUS for init_samr_CryptPassword()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_join.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index b876d7ea89f..4670617d74f 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1539,9 +1539,12 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
/* retry with level 24 */
- init_samr_CryptPassword(r->in.machine_password,
- &session_key,
- &crypt_pwd);
+ status = init_samr_CryptPassword(r->in.machine_password,
+ &session_key,
+ &crypt_pwd);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto error;
+ }
user_info.info24.password = crypt_pwd;
user_info.info24.password_expired = PASS_DONT_CHANGE_AT_NEXT_LOGON;
@@ -1553,6 +1556,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
&result);
}
+error:
old_timeout = rpccli_set_timeout(pipe_hnd, old_timeout);
if (!NT_STATUS_IS_OK(status)) {