gensec_set_max_update_size TODO
authorStefan Metzmacher <metze@samba.org>
Sat, 24 Dec 2011 00:32:17 +0000 (01:32 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 May 2012 16:47:01 +0000 (18:47 +0200)
source4/smb_server/smb/negprot.c
source4/smb_server/smb/sesssetup.c
source4/smb_server/smb2/negprot.c
source4/smb_server/smb2/sesssetup.c

index 8621666f6a8b50399bae71ce591b055fc0b4add7..b5c70b1c5a217be699a9e1da9335051580f446fe 100644 (file)
@@ -376,7 +376,9 @@ static void reply_nt1(struct smbsrv_request *req, uint16_t choice)
 
                oid = GENSEC_OID_SPNEGO;
                nt_status = gensec_start_mech_by_oid(gensec_security, oid);
-               
+
+               gensec_set_max_update_size(gensec_security, 1024);
+
                if (NT_STATUS_IS_OK(nt_status)) {
                        /* Get and push the proposed OID list into the packets */
                        nt_status = gensec_update(gensec_security, req, req->smb_conn->connection->event.ctx, null_data_blob, &blob);
index b26c1281ddaf354367f20f51b5dc7d34a7b2a4e2..e2974b5e6d13995d76332ad493c6b14db9cf69a6 100644 (file)
@@ -459,6 +459,8 @@ static void sesssetup_spnego(struct smbsrv_request *req, union smb_sesssetup *se
                        goto failed;
                }
 
+               gensec_set_max_update_size(gensec_security, req->smb_conn->negotiate.max_send);
+
                /* allocate a new session */
                smb_sess = smbsrv_session_new(req->smb_conn, req->smb_conn, gensec_ctx);
                if (!smb_sess) {
index 1a3bc9ce352f9becc12115531f9432c25b97a3b9..6c45ec2def05882104a202a69d43660f4cd52c12 100644 (file)
@@ -79,6 +79,8 @@ static NTSTATUS smb2srv_negprot_secblob(struct smb2srv_request *req, DATA_BLOB *
                return nt_status;
        }
 
+       gensec_set_max_update_size(gensec_security, UINT16_MAX);
+
        nt_status = gensec_update(gensec_security, req, req->smb_conn->connection->event.ctx, null_data_blob, &blob);
        if (!NT_STATUS_IS_OK(nt_status) && !NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
                DEBUG(0, ("Failed to get SPNEGO to give us the first token: %s\n", nt_errstr(nt_status)));
index 35a148403007409de3fa9d76c4bb266fbf92e505..db6b2871b41cfabd54b93b3e77044472519be84a 100644 (file)
@@ -151,6 +151,8 @@ static void smb2srv_sesssetup_backend(struct smb2srv_request *req, union smb_ses
                        goto failed;
                }
 
+               gensec_set_max_update_size(gensec_security, UINT16_MAX);
+
                /* allocate a new session */
                smb_sess = smbsrv_session_new(req->smb_conn, req->smb_conn, gensec_ctx);
                if (!smb_sess) {