]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Ensure we have 12 bytes of data for a SMB_SET_CIFS_UNIX_INFO call. Add debug.
authorJeremy Allison <jra@samba.org>
Wed, 18 Apr 2012 19:36:19 +0000 (12:36 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 18 Apr 2012 19:38:52 +0000 (12:38 -0700)
source3/smbd/trans2.c

index dcf771a5b9ea3b6180d2f17c4863e3d234f9c0d1..63ee76bce9e771186d1c664850c8359173543de2 100644 (file)
@@ -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);