summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/blob.c10
-rw-r--r--source4/smb_server/smb2/negprot.c5
2 files changed, 6 insertions, 9 deletions
diff --git a/source4/smb_server/blob.c b/source4/smb_server/blob.c
index bf8985ccdf..182c803f96 100644
--- a/source4/smb_server/blob.c
+++ b/source4/smb_server/blob.c
@@ -272,15 +272,13 @@ NTSTATUS smbsrv_push_passthru_fsinfo(TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
case RAW_QFS_OBJECTID_INFORMATION: {
- enum ndr_err_code ndr_err;
+ NTSTATUS status;
BLOB_CHECK(smbsrv_blob_grow_data(mem_ctx, blob, 64));
- ndr_err = ndr_push_struct_blob(&guid_blob, mem_ctx, NULL,
- &fsinfo->objectid_information.out.guid,
- (ndr_push_flags_fn_t)ndr_push_GUID);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- BLOB_CHECK(ndr_map_error2ntstatus(ndr_err));
+ status = GUID_to_ndr_blob(&fsinfo->objectid_information.out.guid, mem_ctx, &guid_blob);
+ if (!NT_STATUS_IS_OK(status)) {
+ BLOB_CHECK(status);
}
memcpy(blob->data, guid_blob.data, guid_blob.length);
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c
index faf025a1f8..260822f2c5 100644
--- a/source4/smb_server/smb2/negprot.c
+++ b/source4/smb_server/smb2/negprot.c
@@ -153,7 +153,6 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2
static void smb2srv_negprot_send(struct smb2srv_request *req, struct smb2_negprot *io)
{
NTSTATUS status;
- enum ndr_err_code ndr_err;
if (NT_STATUS_IS_ERR(req->status)) {
smb2srv_send_error(req, req->status); /* TODO: is this correct? */
@@ -170,8 +169,8 @@ static void smb2srv_negprot_send(struct smb2srv_request *req, struct smb2_negpro
SSVAL(req->out.body, 0x02, io->out.security_mode);
SIVAL(req->out.body, 0x04, io->out.dialect_revision);
SIVAL(req->out.body, 0x06, io->out.reserved);
- ndr_err = smbcli_push_guid(req->out.body, 0x08, &io->out.server_guid);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ status = smbcli_push_guid(req->out.body, 0x08, &io->out.server_guid);
+ if (!NT_STATUS_IS_OK(status)) {
smbsrv_terminate_connection(req->smb_conn, nt_errstr(status));
talloc_free(req);
return;