r14638: we need to call smbsrv_setup_reply() before using smbsrv_setup_error()
authorStefan Metzmacher <metze@samba.org>
Wed, 22 Mar 2006 11:49:24 +0000 (11:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:59:03 +0000 (13:59 -0500)
tridge: can you please check if the whole function ok?

jelmer: this fixes a crash bug, when asking for Security Descriptors
        and should be in the TP2

metze

source/smb_server/smb/nttrans.c

index 4fbb1f656dd41b6bb17fb9ad50543a2b7c5faee7..1bc828b0f04996e776f1ddfb8ce98e4aabf6045d 100644 (file)
@@ -465,6 +465,8 @@ static void reply_nttrans_send(struct ntvfs_request *ntvfs)
                }
        }
 
                }
        }
 
+       smbsrv_setup_reply(req, 18 + trans->out.setup_count, 0);
+
        /* note that we don't check the max_setup count (matching w2k3
           behaviour) */
 
        /* note that we don't check the max_setup count (matching w2k3
           behaviour) */
 
@@ -482,8 +484,6 @@ static void reply_nttrans_send(struct ntvfs_request *ntvfs)
        params      = trans->out.params.data;
        data        = trans->out.data.data;
 
        params      = trans->out.params.data;
        data        = trans->out.data.data;
 
-       smbsrv_setup_reply(req, 18 + trans->out.setup_count, 0);
-
        /* we need to divide up the reply into chunks that fit into
           the negotiated buffer size */
        do {
        /* we need to divide up the reply into chunks that fit into
           the negotiated buffer size */
        do {