From: Jeremy Allison Date: Wed, 18 Apr 2012 19:36:19 +0000 (-0700) Subject: Ensure we have 12 bytes of data for a SMB_SET_CIFS_UNIX_INFO call. Add debug. X-Git-Tag: samba-4.0.0alpha20~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=124be4cf8830c149076b7007b15f43f184a6e531;p=thirdparty%2Fsamba.git Ensure we have 12 bytes of data for a SMB_SET_CIFS_UNIX_INFO call. Add debug. --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index dcf771a5b9e..63ee76bce9e 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3648,13 +3648,16 @@ static void call_trans2setfsinfo(connection_struct *conn, switch(info_level) { case SMB_SET_CIFS_UNIX_INFO: if (!lp_unix_extensions()) { + DEBUG(2,("call_trans2setfsinfo: " + "SMB_SET_CIFS_UNIX_INFO is invalid with " + "unix extensions off\n")); reply_nterror(req, NT_STATUS_INVALID_LEVEL); return; } /* There should be 12 bytes of capabilities set. */ - if (total_data < 8) { + if (total_data < 12) { reply_nterror( req, NT_STATUS_INVALID_PARAMETER);