From: Jeremy Allison Date: Thu, 24 Mar 2005 01:02:52 +0000 (+0000) Subject: r6020: Never do NT status codes with protocols before NT1 as we don't get client... X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5050 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4868e4202775c1c0a60828e0c6f6fa23cf8346e1;p=thirdparty%2Fsamba.git r6020: Never do NT status codes with protocols before NT1 as we don't get client caps. Jeremy. --- diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c index e1fb71d5754..48524b472d2 100644 --- a/source/smbd/sesssetup.c +++ b/source/smbd/sesssetup.c @@ -677,6 +677,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, if (Protocol < PROTOCOL_NT1) { uint16 passlen1 = SVAL(inbuf,smb_vwv7); + + /* Never do NT status codes with protocols before NT1 as we don't get client caps. */ + remove_from_common_flags2(FLAGS2_32_BIT_ERROR_CODES); + if ((passlen1 > MAX_PASS_LEN) || (passlen1 > smb_bufrem(inbuf, smb_buf(inbuf)))) { return ERROR_NT(NT_STATUS_INVALID_PARAMETER); }