diff options
Diffstat (limited to 'source4/smb_server/smb2/negprot.c')
-rw-r--r-- | source4/smb_server/smb2/negprot.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c index 2aca91adf8..78c17aa03e 100644 --- a/source4/smb_server/smb2/negprot.c +++ b/source4/smb_server/smb2/negprot.c @@ -27,6 +27,7 @@ #include "smb_server/service_smb_proto.h" #include "smb_server/smb2/smb2_server.h" #include "smbd/service_stream.h" +#include "param/param.h" static NTSTATUS smb2srv_negprot_secblob(struct smb2srv_request *req, DATA_BLOB *_blob) { @@ -52,7 +53,7 @@ static NTSTATUS smb2srv_negprot_secblob(struct smb2srv_request *req, DATA_BLOB * return NT_STATUS_NO_MEMORY; } - cli_credentials_set_conf(server_credentials); + cli_credentials_set_conf(server_credentials, global_loadparm); nt_status = cli_credentials_set_machine_account(server_credentials); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(10, ("Failed to obtain server credentials, perhaps a standalone server?: %s\n", nt_errstr(nt_status))); @@ -121,7 +122,7 @@ static void smb2srv_negprot_send(struct smb2srv_request *req, struct smb2_negpro return; } - status = smb2srv_setup_reply(req, 0x40, True, io->out.secblob.length); + status = smb2srv_setup_reply(req, 0x40, true, io->out.secblob.length); if (!NT_STATUS_IS_OK(status)) { smbsrv_terminate_connection(req->smb_conn, nt_errstr(status)); talloc_free(req); @@ -196,7 +197,7 @@ void smb2srv_reply_smb_negprot(struct smbsrv_request *smb_req) req->in.size = NBT_HDR_SIZE+SMB2_HDR_BODY+body_fixed_size; req->in.allocated = req->in.size; - req->in.buffer = talloc_size(req, req->in.allocated); + req->in.buffer = talloc_array(req, uint8_t, req->in.allocated); if (!req->in.buffer) goto nomem; req->in.hdr = req->in.buffer + NBT_HDR_SIZE; req->in.body = req->in.hdr + SMB2_HDR_BODY; |