From a788dd5e99c559fbbdae8c15de006b39c6ef2404 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 16 Oct 2008 21:03:19 -0700 Subject: [PATCH] Cope with bad trans2mkdir requests from System i QNTC IBM SMB client. If total_data == 4 Windows doesn't care what values are placed in that field, it just ignores them. The System i QNTC IBM SMB client puts bad values here, so ignore them. Jeremy. (cherry picked from commit 218879cb9069046df2b7e49627aa48cb487098c8) --- source/smbd/trans2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 1e2095a3ea3..146746b4e67 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -7065,10 +7065,11 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req, reply_nterror(req, NT_STATUS_INVALID_PARAMETER); return; } - } else if (IVAL(pdata,0) != 4) { - reply_nterror(req, NT_STATUS_INVALID_PARAMETER); - return; } + /* If total_data == 4 Windows doesn't care what values + * are placed in that field, it just ignores them. + * The System i QNTC IBM SMB client puts bad values here, + * so ignore them. */ status = create_directory(conn, req, directory); -- 2.11.4.GIT