diff options
Diffstat (limited to 'libcli/auth/smbencrypt.c')
-rw-r--r-- | libcli/auth/smbencrypt.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c index d090345bb8..366f6df3ad 100644 --- a/libcli/auth/smbencrypt.c +++ b/libcli/auth/smbencrypt.c @@ -385,11 +385,18 @@ DATA_BLOB NTLMv2_generate_names_blob(TALLOC_CTX *mem_ctx, DATA_BLOB names_blob = data_blob_talloc(mem_ctx, NULL, 0); /* Deliberately ignore return here.. */ - (void)msrpc_gen(mem_ctx, &names_blob, - "aaa", - MsvAvNbDomainName, domain, - MsvAvNbComputerName, hostname, - MsvAvEOL, ""); + if (hostname != NULL) { + (void)msrpc_gen(mem_ctx, &names_blob, + "aaa", + MsvAvNbDomainName, domain, + MsvAvNbComputerName, hostname, + MsvAvEOL, ""); + } else { + (void)msrpc_gen(mem_ctx, &names_blob, + "aa", + MsvAvNbDomainName, domain, + MsvAvEOL, ""); + } return names_blob; } |