summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2013-03-05 11:44:03 +0100
committerChristian Ambach <ambi@samba.org>2013-03-05 14:02:07 +0100
commit9755541ed156d71df98607375ee3b925266c3c74 (patch)
tree40eedcaa948ec29fe1477249b79f2a0b5aba0be3 /source3
parent68698b4e64831d2fdf762b5f8577ff404f10a3cb (diff)
downloadsamba-9755541ed156d71df98607375ee3b925266c3c74.tar.gz
samba-9755541ed156d71df98607375ee3b925266c3c74.tar.bz2
samba-9755541ed156d71df98607375ee3b925266c3c74.zip
s3:libnet increase timeout for machine password change
DCs might run password filter modules that can delay the setting of the machine password for a significant amount of time use the same timeout as in the other paths of domain join (e.g. rpccli_netlogon_set_trust_password) Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_join.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 2b4ab0bf9e..dfe7283ce7 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -863,6 +863,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
struct samr_Ids name_types;
union samr_UserInfo user_info;
struct dcerpc_binding_handle *b = NULL;
+ unsigned int old_timeout = 0;
DATA_BLOB session_key = data_blob_null;
struct samr_CryptPassword crypt_pwd;
@@ -1087,6 +1088,12 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
/* Set password on machine account - first try level 26 */
+ /*
+ * increase the timeout as password filter modules on the DC
+ * might delay the operation for a significant amount of time
+ */
+ old_timeout = rpccli_set_timeout(pipe_hnd, 600000);
+
init_samr_CryptPasswordEx(r->in.machine_password,
&session_key,
&crypt_pwd_ex);
@@ -1118,6 +1125,8 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
&result);
}
+ old_timeout = rpccli_set_timeout(pipe_hnd, old_timeout);
+
if (!NT_STATUS_IS_OK(status)) {
dcerpc_samr_DeleteUser(b, mem_ctx,