Fix signing problem in the client with transs requests
[samba.git] / source / libsmb / clitrans.c
index 33fddae2023319d9252bfc5c4004e0b2cd87f100..441f5a0a8925b493ce27859fe6ee3de552fd0cce 100644 (file)
@@ -113,6 +113,9 @@ BOOL cli_send_trans(struct cli_state *cli, int trans,
                        this_lparam = MIN(lparam-tot_param,cli->max_xmit - 500); /* hack */
                        this_ldata = MIN(ldata-tot_data,cli->max_xmit - (500+this_lparam));
 
+                       client_set_trans_sign_state_off(cli, mid);
+                       client_set_trans_sign_state_on(cli, mid);
+
                        set_message(cli->outbuf,trans==SMBtrans?8:9,0,True);
                        SCVAL(cli->outbuf,smb_com,(trans==SMBtrans ? SMBtranss : SMBtranss2));
                        
@@ -194,15 +197,13 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
         * to a trans call. This is not an error and should not
         * be treated as such. Note that STATUS_NO_MORE_FILES is
         * returned when a trans2 findfirst/next finishes.
-        * When setting up an encrypted transport we can also
-        * see NT_STATUS_MORE_PROCESSING_REQUIRED here.
         */
        status = cli_nt_error(cli);
        
-       if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
-               if (NT_STATUS_IS_ERR(status) || NT_STATUS_EQUAL(status,STATUS_NO_MORE_FILES)) {
-                       goto out;
-               }
+       if (NT_STATUS_IS_ERR(status) ||
+            NT_STATUS_EQUAL(status,STATUS_NO_MORE_FILES) ||
+            NT_STATUS_EQUAL(status,STATUS_INACCESSIBLE_SYSTEM_SHORTCUT)) {
+               goto out;
        }
 
        /* parse out the lengths */
@@ -307,10 +308,8 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
                                 CVAL(cli->inbuf,smb_com)));
                        goto out;
                }
-               if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
-                       if (NT_STATUS_IS_ERR(cli_nt_error(cli))) {
-                               goto out;
-                       }
+               if (NT_STATUS_IS_ERR(cli_nt_error(cli))) {
+                       goto out;
                }
 
                /* parse out the total lengths again - they can shrink! */