summaryrefslogtreecommitdiff
path: root/libcli/auth/smbencrypt.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-03-28 13:26:27 -0700
committerJeremy Allison <jra@samba.org>2011-03-28 23:12:07 +0200
commit52602e4f5ad0f7c3cdb4a50dfe32d0b8ad49b6e4 (patch)
tree69911fe6eca738368d497107032f3a3b084058b6 /libcli/auth/smbencrypt.c
parentfbe19ba39843d0c70758fc8d775b085a67224a94 (diff)
downloadsamba-52602e4f5ad0f7c3cdb4a50dfe32d0b8ad49b6e4.tar.gz
samba-52602e4f5ad0f7c3cdb4a50dfe32d0b8ad49b6e4.tar.bz2
samba-52602e4f5ad0f7c3cdb4a50dfe32d0b8ad49b6e4.zip
Fix inspired by work done by David Disseldorp for bug #8040 - smbclient segfaults when a Cyrillic netbios name or workgroup is configured.
Change msrpc_gen to return NTSTATUS and ensure everywhere this is used it is correctly checked to return that status. Jeremy.
Diffstat (limited to 'libcli/auth/smbencrypt.c')
-rw-r--r--libcli/auth/smbencrypt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index abd8ad92a3..825739ac4b 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -363,7 +363,8 @@ DATA_BLOB NTLMv2_generate_names_blob(TALLOC_CTX *mem_ctx,
{
DATA_BLOB names_blob = data_blob_talloc(mem_ctx, NULL, 0);
- msrpc_gen(mem_ctx, &names_blob,
+ /* Deliberately ignore return here.. */
+ (void)msrpc_gen(mem_ctx, &names_blob,
"aaa",
MsvAvNbDomainName, domain,
MsvAvNbComputerName, hostname,
@@ -386,7 +387,8 @@ static DATA_BLOB NTLMv2_generate_client_data(TALLOC_CTX *mem_ctx, const DATA_BLO
/* See http://www.ubiqx.org/cifs/SMB.html#SMB.8.5 */
- msrpc_gen(mem_ctx, &response, "ddbbdb",
+ /* Deliberately ignore return here.. */
+ (void)msrpc_gen(mem_ctx, &response, "ddbbdb",
0x00000101, /* Header */
0, /* 'Reserved' */
long_date, 8, /* Timestamp */