From 706a04d81e0fdb8d1cc5b328b1b4f60a7e804645 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 31 May 2011 17:56:16 +0200 Subject: [PATCH] s3:cli_np_tstream: don't use trans against NT4 servers (bug #8195) When we try a ChangePasswordUser3 against a NT4 DC, we generate a DCERPC request PDU with 1216 bytes. We fragment this at the SMB layer into a write request with 1024 bytes and a trans request with 192 bytes. This works fine with Windows 2000 and higher and also with Samba, but Windows NT4 returns NT_STATUS_PIPE_BUSY to the trans request. We need some research for the real fix. I guess we have to create a HACK to make it working at all... metze --- source3/libsmb/cli_np_tstream.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/source3/libsmb/cli_np_tstream.c b/source3/libsmb/cli_np_tstream.c index ba37ea5..c03fa31 100644 --- a/source3/libsmb/cli_np_tstream.c +++ b/source3/libsmb/cli_np_tstream.c @@ -237,6 +237,22 @@ NTSTATUS tstream_cli_np_use_trans(struct tstream_context *stream) return NT_STATUS_PIPE_BUSY; } + if (!(cli_nps->cli->capabilities & CAP_EXTENDED_SECURITY)) { + /* + * NT4 returns NT_STATUS_PIPE_BUSY, even if we + * use the correct order like write,write,trans,read,read + * + * This is a HACK to work arround this problem, it means + * that we only use write,write,write,read,read,read + * instead against servers which do not support + * CAP_EXTENDED_SECURITY, as that's the only + * + * TODO: we need to do more research in order + * to create a better fix. + */ + return NT_STATUS_OK; + } + cli_nps->trans.active = true; return NT_STATUS_OK; -- 1.7.4.1